1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089 |
- import { ref as Le, reactive as C0, nextTick as fo, openBlock as Je, createElementBlock as qe, normalizeStyle as Pr, createElementVNode as ar, toDisplayString as yn, unref as k0, createCommentVNode as Kn, createTextVNode as Up, Fragment as Qa, renderList as tl, normalizeClass as A0, defineCustomElement as Vp } from "vue";
- const go = {
- //图表配置
- chart: {
- spacingTop: 30,
- backgroundColor: "rgba(0,0,0,0)"
- },
- title: {
- enabled: !1
- },
- exporting: {
- enabled: !1
- },
- boost: {
- useGPUTranslations: !0
- },
- //默认颜色配置
- colors: [
- "#00f",
- "#f00",
- "#999",
- "#000",
- "#7cb5ec",
- "#90ed7d",
- "#f7a35c",
- "#8085e9",
- "#f15c80",
- "#e4d354",
- "#2b908f",
- "#f45b5b",
- "#91e8e1"
- ],
- //版权信息
- credits: { enabled: !1 },
- //数据列通用配置
- plotOptions: {
- series: {
- turboThreshold: 0,
- //不限制数据点个数
- boostThreshold: 0,
- dataGrouping: {
- enabled: !1
- },
- //取消数据大自动数据合并
- animation: {
- duration: 1e3
- }
- },
- areaspline: {
- lineWidth: 1,
- stacking: "normal",
- marker: {
- enabled: !1
- }
- // fillOpacity: 0.5,
- },
- column: {
- pointPadding: 0.05,
- stacking: "normal"
- },
- scatter: {
- turboThreshold: 0,
- marker: {
- symbol: "circle",
- radius: 5,
- states: {
- hover: {
- enabled: !0
- }
- }
- },
- states: {
- hover: {
- marker: {
- enabled: !0
- }
- }
- }
- }
- },
- //范围选择器
- rangeSelector: {
- enabled: !1,
- selected: 2
- },
- //悬浮提示框
- tooltip: {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%Y/%m/%d",
- week: "%Y/%m",
- month: "%Y/%m",
- year: "%Y/%m"
- },
- xDateFormat: "%Y/%m/%d",
- className: "chart-tooltips-box"
- // formatter:function(e){
- // return `<p>${this.x}</p><p>aaa</p>`
- // // return e
- // }
- // outside: true,
- // valueDecimals: 4,
- },
- //图例
- legend: {
- enabled: !0,
- verticalAlign: "top",
- margin: 3
- // layout: 'vertical'
- },
- //滚动条
- scrollbar: {
- enabled: !1
- },
- //导航器
- navigator: {
- enabled: !1
- },
- //范围选择器
- rangeSelector: {
- enabled: !1
- },
- xAxis: {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- }
- // gridLineWidth:0
- }
- }, T0 = {
- //默认颜色配置
- colors: ["#4B0082", "#7FFFAA", "#FF4500", "#808000", "#EEE8AA", "#849EC1", "#8A4294", "#578B5A", "#FDA8C7", "#53B3FF", "#999999", "#000000", "#FFDF0C", "#FF0000", "#0033FF"],
- yAxis: {
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- opposite: !1,
- reversed: !1,
- visible: !0,
- gridLineWidth: 0,
- tickWidth: 1,
- tickLength: 5,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- //显示最后刻度值
- tickPixelInterval: 50
- }
- }, Mn = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- ordinal: !1,
- type: "linear"
- }, fr = {
- tickWidth: 1,
- tickLength: 5,
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- // offset: 0,
- visible: !0,
- gridLineWidth: 0,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- tickPixelInterval: 50
- }, $p = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- },
- xDateFormat: "%Y-%m-%d"
- }, P0 = {
- 年: "Y",
- 季: "Q",
- 月: "M",
- 周: "W",
- 天: "D"
- }, Ep = {
- 年: "Year",
- 季: "Season",
- 月: "Month",
- 周: "Week",
- 天: "Day"
- };
- var Fr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ul = {}, E0 = {
- get exports() {
- return ul;
- },
- set exports(r) {
- ul = r;
- }
- };
- (function(r) {
- (function(f, E) {
- r.exports ? (E.default = E, r.exports = f.document ? E(f) : E) : (f.Highcharts && f.Highcharts.error(16, !0), f.Highcharts = E(f));
- })(typeof window < "u" ? window : Fr, function(f) {
- function E(y, j, I, Z) {
- y.hasOwnProperty(j) || (y[j] = Z.apply(null, I));
- }
- var l = {};
- return E(l, "Core/Globals.js", [], function() {
- var y = typeof f < "u" ? f : typeof window < "u" ? window : {}, j;
- return function(I) {
- I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
- }, I.supportsPassiveEvents = function() {
- var Z = !1;
- if (!I.isMS) {
- var H = Object.defineProperty({}, "passive", { get: function() {
- Z = !0;
- } });
- I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
- "testPassive",
- I.noop,
- H
- ), I.win.removeEventListener("testPassive", I.noop, H));
- }
- return Z;
- }(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
- }(j || (j = {})), j;
- }), E(l, "Core/Utilities.js", [l["Core/Globals.js"]], function(y) {
- function j(t, s, n, T) {
- var _ = s ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = _ + ": Deprecated member");
- var D = S(t), W = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof T < "u") {
- var P = "";
- D && (W += "?"), b(T, function(X, g) {
- P += `
- - ` + g + ": " + X, D && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += P;
- }
- x(y, "displayError", { chart: n, code: t, message: W, params: T }, function() {
- if (s)
- throw Error(W);
- p.console && j.messages.indexOf(W) === -1 && console.warn(W);
- }), j.messages.push(W);
- }
- function I(t, s) {
- var n = {};
- return b(t, function(T, _) {
- F(t[_], !0) && !t.nodeType && s[_] ? (T = I(t[_], s[_]), Object.keys(T).length && (n[_] = T)) : (F(t[_]) || t[_] !== s[_]) && (n[_] = t[_]);
- }), n;
- }
- function Z(t, s) {
- return parseInt(t, s || 10);
- }
- function H(t) {
- return typeof t == "string";
- }
- function U(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function F(t, s) {
- return !!t && typeof t == "object" && (!s || !U(t));
- }
- function N(t) {
- return F(t) && typeof t.nodeType == "number";
- }
- function R(t) {
- var s = t && t.constructor;
- return !(!F(t, !0) || N(t) || !s || !s.name || s.name === "Object");
- }
- function S(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function v(t) {
- return typeof t < "u" && t !== null;
- }
- function d(t, s, n) {
- var T;
- return H(s) ? v(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((T = t.getAttribute(s)) || s !== "class" || (T = t.getAttribute(s + "Name"))) : b(s, function(_, D) {
- v(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
- }), T;
- }
- function u(t, s) {
- var n;
- t || (t = {});
- for (n in s)
- t[n] = s[n];
- return t;
- }
- function A() {
- for (var t = arguments, s = t.length, n = 0; n < s; n++) {
- var T = t[n];
- if (typeof T < "u" && T !== null)
- return T;
- }
- }
- function O(t, s) {
- y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), u(t.style, s);
- }
- function B(t, s) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
- }
- function C(t, s, n) {
- var T = y.getStyle || C;
- if (s === "width")
- return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (T(t, "padding-left", !0) || 0) - (T(t, "padding-right", !0) || 0));
- if (s === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (T(t, "padding-top", !0) || 0) - (T(t, "padding-bottom", !0) || 0));
- if (p.getComputedStyle || j(27, !0), t = p.getComputedStyle(t, void 0)) {
- var _ = t.getPropertyValue(s);
- A(n, s !== "opacity") && (_ = Z(_));
- }
- return _;
- }
- function b(t, s, n) {
- for (var T in t)
- Object.hasOwnProperty.call(t, T) && s.call(n || t[T], t[T], T, t);
- }
- function w(t, s, n) {
- function T(P, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, P, X, !1);
- }
- function _(P) {
- var X;
- if (t.nodeName) {
- if (s) {
- var g = {};
- g[s] = !0;
- } else
- g = P;
- b(g, function(m, L) {
- if (P[L])
- for (X = P[L].length; X--; )
- T(L, P[L][X].fn);
- });
- }
- }
- var D = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(D, "hcEvents")) {
- var W = D.hcEvents;
- s ? (D = W[s] || [], n ? (W[s] = D.filter(function(P) {
- return n !== P.fn;
- }), T(s, n)) : (_(W), W[s] = [])) : (_(W), delete D.hcEvents);
- }
- }
- function x(t, s, n, T) {
- if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var _ = c.createEvent("Events");
- _.initEvent(s, !0, !0), n = u(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
- } else if (t.hcEvents) {
- n.target || u(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: s }), _ = [];
- for (var D = t, W = !1; D.hcEvents; )
- Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[s] && (_.length && (W = !0), _.unshift.apply(_, D.hcEvents[s])), D = Object.getPrototypeOf(D);
- W && _.sort(function(P, X) {
- return P.order - X.order;
- }), _.forEach(function(P) {
- P.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- T && !n.defaultPrevented && T.call(t, n);
- }
- var a = y.charts, c = y.doc, p = y.win;
- (j || (j = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, s) {
- return t.find(s);
- } : function(t, s) {
- var n, T = t.length;
- for (n = 0; n < T; n++)
- if (s(t[n], n))
- return t[n];
- };
- b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
- y[s] = function(n) {
- var T;
- return j(32, !1, void 0, (T = {}, T["Highcharts." + s] = "use Array." + t, T)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var h, o = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
- return function() {
- return "highcharts-" + (h ? "" : t) + s++;
- };
- }();
- return p.jQuery && (p.jQuery.fn.highcharts = function() {
- var t = [].slice.call(arguments);
- if (this[0])
- return t[0] ? (new y[H(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : a[d(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, s, n, T) {
- T === void 0 && (T = {});
- var _ = typeof t == "function" && t.prototype || t;
- Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
- var D = t.addEventListener || y.addEventListenerPolyfill;
- return D && D.call(t, s, n, y.supportsPassiveEvents ? { passive: T.passive === void 0 ? s.indexOf("touch") !== -1 : T.passive, capture: !1 } : !1), _[s] || (_[s] = []), _[s].push({ fn: n, order: typeof T.order == "number" ? T.order : 1 / 0 }), _[s].sort(function(W, P) {
- return W.order - P.order;
- }), function() {
- w(t, s, n);
- };
- }, arrayMax: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] > n && (n = t[s]);
- return n;
- }, arrayMin: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] < n && (n = t[s]);
- return n;
- }, attr: d, clamp: function(t, s, n) {
- return t > s ? t < n ? t : n : s;
- }, cleanRecursively: I, clearTimeout: function(t) {
- v(t) && clearTimeout(t);
- }, correctFloat: B, createElement: function(t, s, n, T, _) {
- return t = c.createElement(t), s && u(t, s), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), T && T.appendChild(t), t;
- }, css: O, defined: v, destroyObjectProperties: function(t, s) {
- b(t, function(n, T) {
- n && n !== s && n.destroy && n.destroy(), delete t[T];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, s) {
- for (var n = t.length; n--; )
- if (t[n] === s) {
- t.splice(n, 1);
- break;
- }
- }, error: j, extend: u, extendClass: function(t, s) {
- var n = function() {
- };
- return n.prototype = new t(), u(n.prototype, s), n;
- }, find: i, fireEvent: x, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, s) {
- for (t = t.split("."); t.length && v(s); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (s = s[n], !v(s) || typeof s == "function" || typeof s.nodeType == "number" || s === p))
- return;
- }
- return s;
- }, getStyle: C, inArray: function(t, s, n) {
- return j(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
- }, isArray: U, isClass: R, isDOMElement: N, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: S, isObject: F, isString: H, keys: function(t) {
- return j(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, s = arguments, n = {}, T = function(D, W) {
- return typeof D != "object" && (D = {}), b(W, function(P, X) {
- X !== "__proto__" && X !== "constructor" && (!F(P, !0) || R(P) || N(P) ? D[X] = W[X] : D[X] = T(D[X] || {}, P));
- }), D;
- };
- s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
- var _ = s.length;
- for (t = 0; t < _; t++)
- n = T(n, s[t]);
- return n;
- }, normalizeTickInterval: function(t, s, n, T, _) {
- var D = t;
- n = A(n, 1);
- var W = t / n;
- for (s || (s = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], T === !1 && (n === 1 ? s = s.filter(function(P) {
- return P % 1 === 0;
- }) : 0.1 >= n && (s = [1 / n]))), T = 0; T < s.length && (D = s[T], !(_ && D * n >= t || !_ && W <= (s[T] + (s[T + 1] || s[T])) / 2)); T++)
- ;
- return D = B(D * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: b, offset: function(t) {
- var s = c.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (p.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, s, n) {
- return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: A, pInt: Z, relativeLength: function(t, s, n) {
- return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: w, splat: function(t) {
- return U(t) ? t : [t];
- }, stableSort: function(t, s) {
- var n = t.length, T, _;
- for (_ = 0; _ < n; _++)
- t[_].safeI = _;
- for (t.sort(function(D, W) {
- return T = s(D, W), T === 0 ? D.safeI - W.safeI : T;
- }), _ = 0; _ < n; _++)
- delete t[_].safeI;
- }, syncTimeout: function(t, s, n) {
- return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: o, useSerialIds: function(t) {
- return h = A(t, h);
- }, wrap: function(t, s, n) {
- var T = t[s];
- t[s] = function() {
- var _ = Array.prototype.slice.call(arguments), D = arguments, W = this;
- return W.proceed = function() {
- T.apply(W, arguments.length ? arguments : D);
- }, _.unshift(T), _ = n.apply(this, _), W.proceed = null, _;
- };
- } }, i;
- }), E(l, "Core/Chart/ChartDefaults.js", [], function() {
- return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
- 10,
- 10,
- 15,
- 10
- ], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
- }), E(l, "Core/Color/Color.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.isNumber, Z = j.merge, H = j.pInt;
- return j = function() {
- function U(F) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
- var N = y.Color;
- if (N && N !== U)
- return new N(F);
- if (!(this instanceof U))
- return new U(F);
- this.init(F);
- }
- return U.parse = function(F) {
- return F ? new U(F) : U.None;
- }, U.prototype.init = function(F) {
- var N;
- if (typeof F == "object" && typeof F.stops < "u")
- this.stops = F.stops.map(function(d) {
- return new U(d[1]);
- });
- else if (typeof F == "string") {
- if (this.input = F = U.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
- var R = F.length, S = parseInt(F.substr(1), 16);
- R === 7 ? N = [(S & 16711680) >> 16, (S & 65280) >> 8, S & 255, 1] : R === 4 && (N = [(S & 3840) >> 4 | (S & 3840) >> 8, (S & 240) >> 4 | S & 240, (S & 15) << 4 | S & 15, 1]);
- }
- if (!N)
- for (S = U.parsers.length; S-- && !N; ) {
- var v = U.parsers[S];
- (R = v.regex.exec(F)) && (N = v.parse(R));
- }
- }
- N && (this.rgba = N);
- }, U.prototype.get = function(F) {
- var N = this.input, R = this.rgba;
- if (typeof N == "object" && typeof this.stops < "u") {
- var S = Z(N);
- return S.stops = [].slice.call(S.stops), this.stops.forEach(function(v, d) {
- S.stops[d] = [S.stops[d][0], v.get(F)];
- }), S;
- }
- return R && I(R[0]) ? F === "rgb" || !F && R[3] === 1 ? "rgb(" + R[0] + "," + R[1] + "," + R[2] + ")" : F === "a" ? "" + R[3] : "rgba(" + R.join(",") + ")" : N;
- }, U.prototype.brighten = function(F) {
- var N = this.rgba;
- if (this.stops)
- this.stops.forEach(function(S) {
- S.brighten(F);
- });
- else if (I(F) && F !== 0)
- for (var R = 0; 3 > R; R++)
- N[R] += H(255 * F), 0 > N[R] && (N[R] = 0), 255 < N[R] && (N[R] = 255);
- return this;
- }, U.prototype.setOpacity = function(F) {
- return this.rgba[3] = F, this;
- }, U.prototype.tweenTo = function(F, N) {
- var R = this.rgba, S = F.rgba;
- return !I(R[0]) || !I(S[0]) ? F.input || "none" : (F = S[3] !== 1 || R[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(S[0] + (R[0] - S[0]) * (1 - N)) + "," + Math.round(S[1] + (R[1] - S[1]) * (1 - N)) + "," + Math.round(S[2] + (R[2] - S[2]) * (1 - N)) + (F ? "," + (S[3] + (R[3] - S[3]) * (1 - N)) : "") + ")");
- }, U.names = { white: "#ffffff", black: "#000000" }, U.parsers = [{
- regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
- parse: function(F) {
- return [H(F[1]), H(F[2]), H(F[3]), parseFloat(F[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
- return [H(F[1]), H(F[2]), H(F[3]), 1];
- } }], U.None = new U(""), U;
- }(), j;
- }), E(l, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), E(l, "Core/Time.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.win, Z = j.defined, H = j.error, U = j.extend, F = j.isObject, N = j.merge, R = j.objectEach, S = j.pad, v = j.pick, d = j.splat, u = j.timeUnits, A = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
- return j = function() {
- function B(C) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(C);
- }
- return B.prototype.get = function(C, b) {
- if (this.variableTimezone || this.timezoneOffset) {
- var w = b.getTime(), x = w - this.getTimezoneOffset(b);
- return b.setTime(x), C = b["getUTC" + C](), b.setTime(w), C;
- }
- return this.useUTC ? b["getUTC" + C]() : b["get" + C]();
- }, B.prototype.set = function(C, b, w) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (C === "Milliseconds" || C === "Seconds" || C === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
- return b["setUTC" + C](w);
- var x = this.getTimezoneOffset(b);
- return x = b.getTime() - x, b.setTime(x), b["setUTC" + C](w), C = this.getTimezoneOffset(b), x = b.getTime() + C, b.setTime(x);
- }
- return this.useUTC || A && C === "FullYear" ? b["setUTC" + C](w) : b["set" + C](w);
- }, B.prototype.update = function(C) {
- var b = v(C && C.useUTC, !0);
- this.options = C = N(!0, this.options || {}, C), this.Date = C.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = b) && C.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!C.getTimezoneOffset && !C.timezone);
- }, B.prototype.makeTime = function(C, b, w, x, a, c) {
- if (this.useUTC) {
- var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
- p += i;
- var h = this.getTimezoneOffset(p);
- i !== h ? p += h - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
- } else
- p = new this.Date(C, b, v(w, 1), v(x, 0), v(a, 0), v(c, 0)).getTime();
- return p;
- }, B.prototype.timezoneOffsetFunction = function() {
- var C = this, b = this.options, w = b.getTimezoneOffset, x = b.moment || I.moment;
- if (!this.useUTC)
- return function(a) {
- return 6e4 * new Date(a.toString()).getTimezoneOffset();
- };
- if (b.timezone) {
- if (x)
- return function(a) {
- return 6e4 * -x.tz(a, b.timezone).utcOffset();
- };
- H(25);
- }
- return this.useUTC && w ? function(a) {
- return 6e4 * w(a.valueOf());
- } : function() {
- return 6e4 * (C.timezoneOffset || 0);
- };
- }, B.prototype.dateFormat = function(C, b, w) {
- if (!Z(b) || isNaN(b))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- C = v(C, "%Y-%m-%d %H:%M:%S");
- var x = this, a = new this.Date(b), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), h = this.get("Month", a), o = this.get("FullYear", a), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
- return a = U({ a: n ? n[p] : s[p].substr(0, 3), A: s[p], d: S(i), e: S(i, 2, " "), w: p, b: t.shortMonths[h], B: t.months[h], m: S(h + 1), o: h + 1, y: o.toString().substr(2, 2), Y: o, H: S(c), k: c, I: S(c % 12 || 12), l: c % 12 || 12, M: S(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: S(a.getSeconds()), L: S(Math.floor(b % 1e3), 3) }, y.dateFormats), R(a, function(T, _) {
- for (; C.indexOf("%" + _) !== -1; )
- C = C.replace("%" + _, typeof T == "function" ? T.call(x, b) : T);
- }), w ? C.substr(0, 1).toUpperCase() + C.substr(1) : C;
- }, B.prototype.resolveDTLFormat = function(C) {
- return F(C, !0) ? C : (C = d(C), { main: C[0], from: C[1], to: C[2] });
- }, B.prototype.getTimeTicks = function(C, b, w, x) {
- var a = this, c = [], p = {}, i = new a.Date(b), h = C.unitRange, o = C.count || 1, t;
- if (x = v(x, 1), Z(b)) {
- if (a.set(
- "Milliseconds",
- i,
- h >= u.second ? 0 : o * Math.floor(a.get("Milliseconds", i) / o)
- ), h >= u.second && a.set("Seconds", i, h >= u.minute ? 0 : o * Math.floor(a.get("Seconds", i) / o)), h >= u.minute && a.set("Minutes", i, h >= u.hour ? 0 : o * Math.floor(a.get("Minutes", i) / o)), h >= u.hour && a.set("Hours", i, h >= u.day ? 0 : o * Math.floor(a.get("Hours", i) / o)), h >= u.day && a.set("Date", i, h >= u.month ? 1 : Math.max(1, o * Math.floor(a.get("Date", i) / o))), h >= u.month) {
- a.set("Month", i, h >= u.year ? 0 : o * Math.floor(a.get("Month", i) / o));
- var s = a.get("FullYear", i);
- }
- h >= u.year && a.set(
- "FullYear",
- i,
- s - s % o
- ), h === u.week && (s = a.get("Day", i), a.set("Date", i, a.get("Date", i) - s + x + (s < x ? -7 : 0))), s = a.get("FullYear", i), x = a.get("Month", i);
- var n = a.get("Date", i), T = a.get("Hours", i);
- for (b = i.getTime(), !a.variableTimezone && a.useUTC || !Z(w) || (t = w - b > 4 * u.month || a.getTimezoneOffset(b) !== a.getTimezoneOffset(w)), b = i.getTime(), i = 1; b < w; )
- c.push(b), b = h === u.year ? a.makeTime(s + i * o, 0) : h === u.month ? a.makeTime(s, x + i * o) : !t || h !== u.day && h !== u.week ? t && h === u.hour && 1 < o ? a.makeTime(s, x, n, T + i * o) : b + h * o : a.makeTime(s, x, n + i * o * (h === u.day ? 1 : 7)), i++;
- c.push(b), h <= u.hour && 1e4 > c.length && c.forEach(function(_) {
- _ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
- });
- }
- return c.info = U(C, { higherRanks: p, totalRange: h * o }), c;
- }, B.prototype.getDateFormat = function(C, b, w, x) {
- var a = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
- for (i in u) {
- if (C === u.week && +this.dateFormat("%w", b) === w && a.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (u[i] > C) {
- i = p;
- break;
- }
- if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
- break;
- i !== "week" && (p = i);
- }
- if (i)
- var h = this.resolveDTLFormat(x[i]).main;
- return h;
- }, B;
- }(), j;
- }), E(l, "Core/DefaultOptions.js", [l["Core/Chart/ChartDefaults.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Color/Palettes.js"], l["Core/Time.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- j = j.parse;
- var F = U.merge, N = {
- colors: Z.colors,
- symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
- lang: {
- loading: "Loading...",
- months: "January February March April May June July August September October November December".split(" "),
- shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
- weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
- decimalPoint: ".",
- numericSymbols: "kMGTPE".split(""),
- resetZoom: "Reset zoom",
- resetZoomTitle: "Reset zoom level 1:1",
- thousandsSep: " "
- },
- global: {},
- time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
- chart: y,
- title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
- subtitle: { text: "", align: "center", widthAdjust: -44 },
- caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
- plotOptions: {},
- labels: { style: { position: "absolute", color: "#333333" } },
- legend: {
- enabled: !0,
- align: "center",
- alignColumns: !0,
- className: "highcharts-no-tooltip",
- layout: "horizontal",
- labelFormatter: function() {
- return this.name;
- },
- borderColor: "#999999",
- borderRadius: 0,
- navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
- itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
- itemHoverStyle: { color: "#000000" },
- itemHiddenStyle: { color: "#cccccc" },
- shadow: !1,
- itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
- squareSymbol: !0,
- symbolPadding: 5,
- verticalAlign: "bottom",
- x: 0,
- y: 0,
- title: { style: { fontWeight: "bold" } }
- },
- loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
- tooltip: {
- enabled: !0,
- animation: I.svg,
- borderRadius: 3,
- dateTimeLabelFormats: {
- millisecond: "%A, %b %e, %H:%M:%S.%L",
- second: "%A, %b %e, %H:%M:%S",
- minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M",
- day: "%A, %b %e, %Y",
- week: "Week from %A, %b %e, %Y",
- month: "%B %Y",
- year: "%Y"
- },
- footerFormat: "",
- headerShape: "callout",
- hideDelay: 500,
- padding: 8,
- shape: "callout",
- shared: !1,
- snap: I.isTouchDevice ? 25 : 10,
- headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
- pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
- backgroundColor: j("#f7f7f7").setOpacity(0.85).get(),
- borderWidth: 1,
- shadow: !0,
- stickOnContact: !1,
- style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
- useHTML: !1
- },
- credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
- };
- N.chart.styledMode = !1;
- var R = new H(F(N.global, N.time));
- return y = { defaultOptions: N, defaultTime: R, getOptions: function() {
- return N;
- }, setOptions: function(S) {
- return F(!0, N, S), (S.time || S.global) && (I.time ? I.time.update(F(
- N.global,
- N.time,
- S.global,
- S.time
- )) : I.time = R), N;
- } }, y;
- }), E(l, "Core/Animation/Fx.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.parse, H = j.win, U = I.isNumber, F = I.objectEach;
- return function() {
- function N(R, S, v) {
- this.pos = NaN, this.options = S, this.elem = R, this.prop = v;
- }
- return N.prototype.dSetter = function() {
- var R = this.paths, S = R && R[0];
- R = R && R[1];
- var v = this.now || 0, d = [];
- if (v !== 1 && S && R)
- if (S.length === R.length && 1 > v)
- for (var u = 0; u < R.length; u++) {
- for (var A = S[u], O = R[u], B = [], C = 0; C < O.length; C++) {
- var b = A[C], w = O[C];
- U(b) && U(w) && (O[0] !== "A" || C !== 4 && C !== 5) ? B[C] = b + v * (w - b) : B[C] = w;
- }
- d.push(B);
- }
- else
- d = R;
- else
- d = this.toD || [];
- this.elem.attr("d", d, void 0, !0);
- }, N.prototype.update = function() {
- var R = this.elem, S = this.prop, v = this.now, d = this.options.step;
- this[S + "Setter"] ? this[S + "Setter"]() : R.attr ? R.element && R.attr(S, v, null, !0) : R.style[S] = v + this.unit, d && d.call(R, v, this);
- }, N.prototype.run = function(R, S, v) {
- var d = this, u = d.options, A = function(C) {
- return A.stopped ? !1 : d.step(C);
- }, O = H.requestAnimationFrame || function(C) {
- setTimeout(
- C,
- 13
- );
- }, B = function() {
- for (var C = 0; C < N.timers.length; C++)
- N.timers[C]() || N.timers.splice(C--, 1);
- N.timers.length && O(B);
- };
- R !== S || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = R, this.end = S, this.unit = v, this.now = this.start, this.pos = 0, A.elem = this.elem, A.prop = this.prop, A() && N.timers.push(A) === 1 && O(B)) : (delete u.curAnim[this.prop], u.complete && Object.keys(u.curAnim).length === 0 && u.complete.call(this.elem));
- }, N.prototype.step = function(R) {
- var S = +/* @__PURE__ */ new Date(), v = this.options, d = this.elem, u = v.complete, A = v.duration, O = v.curAnim;
- if (d.attr && !d.element)
- R = !1;
- else if (R || S >= A + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var B = O[this.prop] = !0;
- F(O, function(C) {
- C !== !0 && (B = !1);
- }), B && u && u.call(d), R = !1;
- } else
- this.pos = v.easing((S - this.startTime) / A), this.now = this.start + (this.end - this.start) * this.pos, this.update(), R = !0;
- return R;
- }, N.prototype.initPath = function(R, S, v) {
- function d(a, c) {
- for (; a.length < x; ) {
- var p = a[0], i = c[x - a.length];
- i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
- "L",
- p[1],
- p[2]
- ]), a.unshift(p), B && (p = a.pop(), a.push(a[a.length - 1], p));
- }
- }
- function u(a, c) {
- for (; a.length < x; )
- if (c = a[Math.floor(a.length / C) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), B) {
- var p = a[Math.floor(a.length / C)].slice();
- a.splice(a.length / 2, 0, c, p);
- } else
- a.push(c);
- }
- var A = R.startX, O = R.endX;
- v = v.slice();
- var B = R.isArea, C = B ? 2 : 1;
- if (S = S && S.slice(), !S)
- return [v, v];
- if (A && O && O.length) {
- for (R = 0; R < A.length; R++)
- if (A[R] === O[0]) {
- var b = R;
- break;
- } else if (A[0] === O[O.length - A.length + R]) {
- b = R;
- var w = !0;
- break;
- } else if (A[A.length - 1] === O[O.length - A.length + R]) {
- b = A.length - R;
- break;
- }
- typeof b > "u" && (S = []);
- }
- if (S.length && U(b)) {
- var x = v.length + b * C;
- w ? (d(S, v), u(v, S)) : (d(v, S), u(S, v));
- }
- return [S, v];
- }, N.prototype.fillSetter = function() {
- N.prototype.strokeSetter.apply(this, arguments);
- }, N.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
- }, N.timers = [], N;
- }();
- }), E(l, "Core/Animation/AnimationUtilities.js", [l["Core/Animation/Fx.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(u) {
- return R(u) ? S({ duration: 500, defer: 0 }, u) : { duration: u ? 500 : 0, defer: 0 };
- }
- function Z(u, A) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== u || A && A !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var H = j.defined, U = j.getStyle, F = j.isArray, N = j.isNumber, R = j.isObject, S = j.merge, v = j.objectEach, d = j.pick;
- return { animate: function(u, A, O) {
- var B, C = "", b, w;
- if (!R(O)) {
- var x = arguments;
- O = { duration: x[2], easing: x[3], complete: x[4] };
- }
- N(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = S(A), v(A, function(a, c) {
- Z(u, c), w = new y(u, O, c), b = void 0, c === "d" && F(A.d) ? (w.paths = w.initPath(u, u.pathArray, A.d), w.toD = A.d, B = 0, b = 1) : u.attr ? B = u.attr(c) : (B = parseFloat(U(u, c)) || 0, c !== "opacity" && (C = "px")), b || (b = a), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), w.run(B, b, C);
- });
- }, animObject: I, getDeferredAnimation: function(u, A, O) {
- var B = I(A), C = 0, b = 0;
- return (O ? [O] : u.series).forEach(function(w) {
- w = I(w.options.animation), C = A && H(A.defer) ? B.defer : Math.max(C, w.duration + w.defer), b = Math.min(B.duration, w.duration);
- }), u.renderer.forExport && (C = 0), { defer: Math.max(0, C - b), duration: Math.min(C, b) };
- }, setAnimation: function(u, A) {
- A.renderer.globalAnimation = d(u, A.options.chart.animation, !0);
- }, stop: Z };
- }), E(l, "Core/Renderer/HTML/AST.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.SVG_NS, Z = j.attr, H = j.createElement, U = j.error, F = j.isFunction, N = j.isString, R = j.objectEach, S = j.splat, v = (j = y.win.trustedTypes) && F(j.createPolicy) && j.createPolicy("highcharts", { createHTML: function(A) {
- return A;
- } }), d = v ? v.createHTML("") : "";
- try {
- var u = !!new DOMParser().parseFromString(d, "text/html");
- } catch {
- u = !1;
- }
- return F = function() {
- function A(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return A.filterUserAttributes = function(O) {
- return R(O, function(B, C) {
- var b = !0;
- A.allowedAttributes.indexOf(C) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(C) !== -1 && (b = N(B) && A.allowedReferences.some(function(w) {
- return B.indexOf(w) === 0;
- })), b || (U("Highcharts warning: Invalid attribute '" + C + "' in config"), delete O[C]);
- }), O;
- }, A.setElementHTML = function(O, B) {
- O.innerHTML = A.emptyHTML, B && new A(B).addToDOM(O);
- }, A.prototype.addToDOM = function(O) {
- function B(C, b) {
- var w;
- return S(C).forEach(function(x) {
- var a = x.tagName, c = x.textContent ? y.doc.createTextNode(x.textContent) : void 0;
- if (a)
- if (a === "#text")
- var p = c;
- else if (A.allowedTags.indexOf(a) !== -1) {
- a = y.doc.createElementNS(a === "svg" ? I : b.namespaceURI || I, a);
- var i = x.attributes || {};
- R(x, function(h, o) {
- o !== "tagName" && o !== "attributes" && o !== "children" && o !== "textContent" && (i[o] = h);
- }), Z(a, A.filterUserAttributes(i)), c && a.appendChild(c), B(x.children || [], a), p = a;
- } else
- U("Highcharts warning: Invalid tagName " + a + " in config");
- p && b.appendChild(p), w = p;
- }), w;
- }
- return B(this.nodes, O);
- }, A.prototype.parseMarkup = function(O) {
- var B = [];
- if (O = O.trim(), u)
- O = new DOMParser().parseFromString(v ? v.createHTML(O) : O, "text/html");
- else {
- var C = H("div");
- C.innerHTML = O, O = { body: C };
- }
- var b = function(w, x) {
- var a = w.nodeName.toLowerCase(), c = { tagName: a };
- if (a === "#text" && (c.textContent = w.textContent || ""), a = w.attributes) {
- var p = {};
- [].forEach.call(a, function(h) {
- p[h.name] = h.value;
- }), c.attributes = p;
- }
- if (w.childNodes.length) {
- var i = [];
- [].forEach.call(w.childNodes, function(h) {
- b(h, i);
- }), i.length && (c.children = i);
- }
- x.push(c);
- };
- return [].forEach.call(O.body.childNodes, function(w) {
- return b(w, B);
- }), B;
- }, A.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), A.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), A.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), A.emptyHTML = d, A;
- }(), F;
- }), E(
- l,
- "Core/FormatUtilities.js",
- [l["Core/DefaultOptions.js"], l["Core/Utilities.js"]],
- function(y, j) {
- function I(S, v, d, u) {
- S = +S || 0, v = +v;
- var A = Z.lang, O = (S.toString().split(".")[1] || "").split("e")[0].length, B = S.toString().split("e"), C = v;
- if (v === -1)
- v = Math.min(O, 20);
- else if (!F(v))
- v = 2;
- else if (v && B[1] && 0 > B[1]) {
- var b = v + +B[1];
- 0 <= b ? (B[0] = (+B[0]).toExponential(b).split("e")[0], v = b) : (B[0] = B[0].split(".")[0] || 0, S = 20 > v ? (B[0] * Math.pow(10, B[1])).toFixed(v) : 0, B[1] = 0);
- }
- b = (Math.abs(B[1] ? B[0] : S) + Math.pow(10, -Math.max(v, O) - 1)).toFixed(v), O = String(R(b));
- var w = 3 < O.length ? O.length % 3 : 0;
- return d = N(d, A.decimalPoint), u = N(u, A.thousandsSep), S = (0 > S ? "-" : "") + (w ? O.substr(0, w) + u : ""), S = 0 > +B[1] && !C ? "0" : S + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + u), v && (S += d + b.slice(-v)), B[1] && +S != 0 && (S += "e" + B[1]), S;
- }
- var Z = y.defaultOptions, H = y.defaultTime, U = j.getNestedProperty, F = j.isNumber, N = j.pick, R = j.pInt;
- return { dateFormat: function(S, v, d) {
- return H.dateFormat(S, v, d);
- }, format: function(S, v, d) {
- var u = "{", A = !1, O = /f$/, B = /\.([0-9])/, C = Z.lang, b = d && d.time || H;
- d = d && d.numberFormatter || I;
- for (var w = []; S; ) {
- var x = S.indexOf(u);
- if (x === -1)
- break;
- var a = S.slice(0, x);
- if (A) {
- if (a = a.split(":"), u = U(a.shift() || "", v), a.length && typeof u == "number")
- if (a = a.join(":"), O.test(a)) {
- var c = parseInt((a.match(B) || ["", "-1"])[1], 10);
- u !== null && (u = d(u, c, C.decimalPoint, -1 < a.indexOf(",") ? C.thousandsSep : ""));
- } else
- u = b.dateFormat(a, u);
- w.push(u);
- } else
- w.push(a);
- S = S.slice(x + 1), u = (A = !A) ? "}" : "{";
- }
- return w.push(S), w.join("");
- }, numberFormat: I };
- }
- ), E(l, "Core/Renderer/RendererUtilities.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.clamp, I = y.pick, Z = y.stableSort, H;
- return function(U) {
- function F(N, R, S) {
- var v = N, d = v.reducedLen || R, u = function(w, x) {
- return (x.rank || 0) - (w.rank || 0);
- }, A = function(w, x) {
- return w.target - x.target;
- }, O, B = !0, C = [], b = 0;
- for (O = N.length; O--; )
- b += N[O].size;
- if (b > d) {
- for (Z(N, u), b = O = 0; b <= d; )
- b += N[O].size, O++;
- C = N.splice(O - 1, N.length);
- }
- for (Z(N, A), N = N.map(function(w) {
- return { size: w.size, targets: [w.target], align: I(w.align, 0.5) };
- }); B; ) {
- for (O = N.length; O--; )
- d = N[O], u = (Math.min.apply(0, d.targets) + Math.max.apply(0, d.targets)) / 2, d.pos = j(
- u - d.size * d.align,
- 0,
- R - d.size
- );
- for (O = N.length, B = !1; O--; )
- 0 < O && N[O - 1].pos + N[O - 1].size > N[O].pos && (N[O - 1].size += N[O].size, N[O - 1].targets = N[O - 1].targets.concat(N[O].targets), N[O - 1].align = 0.5, N[O - 1].pos + N[O - 1].size > R && (N[O - 1].pos = R - N[O - 1].size), N.splice(O, 1), B = !0);
- }
- return v.push.apply(v, C), O = 0, N.some(function(w) {
- var x = 0;
- return (w.targets || []).some(function() {
- return v[O].pos = w.pos + x, typeof S < "u" && Math.abs(v[O].pos - v[O].target) > S ? (v.slice(0, O + 1).forEach(function(a) {
- return delete a.pos;
- }), v.reducedLen = (v.reducedLen || R) - 0.1 * R, v.reducedLen > 0.1 * R && F(v, R, S), !0) : (x += v[O].size, O++, !1);
- });
- }), Z(v, A), v;
- }
- U.distribute = F;
- }(H || (H = {})), H;
- }), E(l, "Core/Renderer/SVG/SVGElement.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = y.animate, F = y.animObject, N = y.stop, R = Z.deg2rad, S = Z.doc, v = Z.noop, d = Z.svg, u = Z.SVG_NS, A = Z.win, O = H.addEvent, B = H.attr, C = H.createElement, b = H.css, w = H.defined, x = H.erase, a = H.extend, c = H.fireEvent, p = H.isArray, i = H.isFunction, h = H.isNumber, o = H.isString, t = H.merge, s = H.objectEach, n = H.pick, T = H.pInt, _ = H.syncTimeout, D = H.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = u, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(P) {
- return P = n(this[P + "Value"], this[P], this.element ? this.element.getAttribute(P) : null, 0), /^[\-0-9\.]+$/.test(P) && (P = parseFloat(P)), P;
- }, W.prototype._defaultSetter = function(P, X, g) {
- g.setAttribute(X, P);
- }, W.prototype.add = function(P) {
- var X = this.renderer, g = this.element;
- if (P && (this.parentGroup = P), this.parentInverted = P && P.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !P || P.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (P ? P.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(P, X) {
- var g = X ? "" : this.attr("class") || "";
- return P = (P || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), P !== g && this.attr("class", P), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(P, X, g) {
- var m = {}, L = this.renderer, Y = L.alignedObjects, V, Q, k;
- P ? (this.alignOptions = P, this.alignByTranslate = X, (!g || o(g)) && (this.alignTo = V = g || "renderer", x(Y, this), Y.push(this), g = void 0)) : (P = this.alignOptions, X = this.alignByTranslate, V = this.alignTo), g = n(g, L[V], V === "scrollablePlotBox" ? L.plotBox : void 0, L), V = P.align;
- var G = P.verticalAlign;
- return L = (g.x || 0) + (P.x || 0), Y = (g.y || 0) + (P.y || 0), V === "right" ? Q = 1 : V === "center" && (Q = 2), Q && (L += (g.width - (P.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (g.height - (P.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(P) {
- var X = { left: "start", center: "middle", right: "end" };
- X[P] && (this.alignValue = P, this.element.setAttribute(
- "text-anchor",
- X[P]
- ));
- }, W.prototype.animate = function(P, X, g) {
- var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(S.hidden, S.msHidden, S.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
- m.element && U(m, P, L);
- }, X)) : (this.attr(P, void 0, g), s(P, function(Y, V) {
- L.step && L.step.call(this, Y, { prop: V, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(P) {
- var X = this.element;
- P.indexOf("contrast") !== -1 && (P = P.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = P.split(" ");
- if (P = g[g.length - 1], (g = g[0]) && g !== "none" && Z.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(Y, V, Q) {
- return 2 * Number(V) + Q;
- }), this.removeTextOutline();
- var m = S.createElementNS(u, "tspan");
- B(m, { class: "highcharts-text-outline", fill: P, stroke: P, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
- var V = Y.cloneNode(!0);
- V.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return V.removeAttribute(Q);
- }), m.appendChild(V);
- });
- var L = S.createElementNS(u, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(Y) {
- var V = X.getAttribute(Y);
- V && L.setAttribute(Y, V);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(P, X, g, m) {
- var L = this.element, Y = this.symbolCustomAttribs, V, Q = this, k, G;
- if (typeof P == "string" && typeof X < "u") {
- var z = P;
- P = {}, P[z] = X;
- }
- return typeof P == "string" ? Q = (this[P + "Getter"] || this._defaultGetter).call(this, P, L) : (s(P, function($, q) {
- k = !1, m || N(this, q), this.symbolName && Y.indexOf(q) !== -1 && (V || (this.symbolAttr(P), V = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, $, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, $, G));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(P) {
- return this.attr("clip-path", P ? "url(" + this.renderer.url + "#" + P.id + ")" : "none");
- }, W.prototype.crisp = function(P, X) {
- X = X || P.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return P.x = Math.floor(P.x || this.x || 0) + g, P.y = Math.floor(P.y || this.y || 0) + g, P.width = Math.floor((P.width || this.width || 0) - 2 * g), P.height = Math.floor((P.height || this.height || 0) - 2 * g), w(P.strokeWidth) && (P.strokeWidth = X), P;
- }, W.prototype.complexColor = function(P, X, g) {
- var m = this.renderer, L, Y, V, Q, k, G, z, $, q, it, et = [], nt;
- c(this.renderer, "complexColor", { args: arguments }, function() {
- if (P.radialGradient ? Y = "radialGradient" : P.linearGradient && (Y = "linearGradient"), Y) {
- if (V = P[Y], k = m.gradients, G = P.stops, q = g.radialReference, p(V) && (P[Y] = V = { x1: V[0], y1: V[1], x2: V[2], y2: V[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !w(V.gradientUnits) && (Q = V, V = t(V, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s(V, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), s(G, function(ct) {
- et.push(ct);
- }), et = et.join(","), k[et])
- it = k[et].attr("id");
- else {
- V.id = it = D();
- var rt = k[et] = m.createElement(Y).attr(V).add(m.defs);
- rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), $ = L.get("a")) : (z = ct[1], $ = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": z,
- "stop-opacity": $
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, P.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(P) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", V = !X;
- if (P && P.color && (P.fill = P.color), X && s(P, function(G, z) {
- X && X[z] !== G && (g[z] = G, V = !0);
- }), V) {
- if (X && (P = a(X, g)), P) {
- if (P.width === null || P.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && P.width)
- var Q = this.textWidth = T(P.width);
- }
- if (this.styles = P, Q && !d && this.renderer.forExport && delete P.width, m.namespaceURI === this.SVG_NS) {
- var k = function(G, z) {
- return "-" + z.toLowerCase();
- };
- s(P, function(G, z) {
- L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
- }), Y && B(m, "style", Y);
- } else
- b(m, P);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), P && P.textOutline && this.applyTextOutline(P.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(P) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), P = P && P.toLowerCase()) {
- var g = P.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (P = g.length; P--; )
- g[P] = "" + T(g[P]) * n(X, NaN);
- P = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", P);
- }
- }, W.prototype.destroy = function() {
- var P = this, X = P.element || {}, g = P.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && P.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, N(P), P.clipPath && m) {
- var Y = P.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(V) {
- -1 < V.getAttribute("clip-path").indexOf(Y.element.id) && V.removeAttribute("clip-path");
- }), P.clipPath = Y.destroy();
- }
- if (P.stops) {
- for (m = 0; m < P.stops.length; m++)
- P.stops[m].destroy();
- P.stops.length = 0, P.stops = void 0;
- }
- for (P.safeRemoveChild(X), g.styledMode || P.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, P.safeRemoveChild(L.div), delete L.div, L = X;
- P.alignTo && x(g.alignedObjects, P), s(P, function(V, Q) {
- P[Q] && P[Q].parentGroup === P && P[Q].destroy && P[Q].destroy(), delete P[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(P) {
- this.safeRemoveChild(P);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(P, X) {
- var g = P.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (P = this.textPathWrapper.element.childNodes; P.length; )
- g.appendChild(P[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (P.getAttribute("dx") || P.getAttribute("dy")) && (P.removeAttribute("dx"), P.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(P, X, g) {
- p(P) && (typeof P[0] == "string" && (P = this.renderer.pathToSegments(P)), this.pathArray = P, P = P.reduce(function(m, L, Y) {
- return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(P) && (P = "M 0 0"), this[X] !== P && (g.setAttribute(X, P), this[X] = P);
- }, W.prototype.fadeOut = function(P) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(P, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(P, X, g) {
- typeof P == "string" ? g.setAttribute(X, P) : P && this.complexColor(P, X, g);
- }, W.prototype.getBBox = function(P, X) {
- var g = this.renderer, m = this.element, L = this.styles, Y = this.textStr, V = g.cache, Q = g.cacheKeys, k = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var G = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
- if (w(Y)) {
- var $ = Y.toString();
- $.indexOf("<") === -1 && ($ = $.replace(/[0-9]/g, "0")), $ += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if ($ && !P && (z = V[$]), !z) {
- if (k || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && b(et, { display: it });
- };
- i(q) && q("none"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!z || 0 > z.width) && (z = {
- width: 0,
- height: 0
- });
- } else
- z = this.htmlGetBBox();
- if (g.isSVG && (P = z.width, g = z.height, k && (z.height = g = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(g)] || g), X && (k = X * R, z.width = Math.abs(g * Math.sin(k)) + Math.abs(P * Math.cos(k)), z.height = Math.abs(g * Math.cos(k)) + Math.abs(P * Math.sin(k)))), $ && (Y === "" || 0 < z.height)) {
- for (; 250 < Q.length; )
- delete V[Q.shift()];
- V[$] || Q.push($), V[$] = z;
- }
- }
- return z;
- }, W.prototype.getStyle = function(P) {
- return A.getComputedStyle(this.element || this, "").getPropertyValue(P);
- }, W.prototype.hasClass = function(P) {
- return ("" + this.attr("class")).split(" ").indexOf(P) !== -1;
- }, W.prototype.hide = function(P) {
- return P ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
- }, W.prototype.htmlGetBBox = function() {
- return { height: 0, width: 0, x: 0, y: 0 };
- }, W.prototype.init = function(P, X) {
- this.element = X === "span" ? C(X) : S.createElementNS(this.SVG_NS, X), this.renderer = P, c(this, "afterInit");
- }, W.prototype.invert = function(P) {
- return this.inverted = P, this.updateTransform(), this;
- }, W.prototype.on = function(P, X) {
- var g = this.onEvents;
- return g[P] && g[P](), g[P] = O(
- this.element,
- P,
- X
- ), this;
- }, W.prototype.opacitySetter = function(P, X, g) {
- this.opacity = P = Number(Number(P).toFixed(3)), g.setAttribute(X, P);
- }, W.prototype.removeClass = function(P) {
- return this.attr("class", ("" + this.attr("class")).replace(o(P) ? new RegExp("(^| )" + P + "( |$)") : P, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var P = this.element.querySelector("tspan.highcharts-text-outline");
- P && this.safeRemoveChild(P);
- }, W.prototype.safeRemoveChild = function(P) {
- var X = P.parentNode;
- X && X.removeChild(P);
- }, W.prototype.setRadialReference = function(P) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = P, X && X.radAttr && X.animate(this.renderer.getRadialAttr(P, X.radAttr)), this;
- }, W.prototype.setTextPath = function(P, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, Y = !1, V = this.textPathWrapper, Q = !V;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var k = j.filterUserAttributes(X.attributes);
- if (P && X && X.enabled) {
- V && V.element.parentNode === null ? (Q = !0, V = V.destroy()) : V && this.removeTextOutline.call(V.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), V || (this.textPathWrapper = V = this.renderer.createElement("textPath"), Y = !0);
- var G = V.element;
- if ((X = P.element.getAttribute("id")) || P.element.setAttribute("id", X = D()), Q)
- for (m.setAttribute("y", 0), h(k.dx) && m.setAttribute("x", -k.dx), P = [].slice.call(m.childNodes), Q = 0; Q < P.length; Q++) {
- var z = P[Q];
- z.nodeType !== A.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
- }
- Y && V && V.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), w(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), s(k, function($, q) {
- G.setAttribute(L[q] || q, $);
- }), g.removeAttribute("transform"), this.removeTextOutline.call(V), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = v;
- } else
- V && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, P), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(P, X, g) {
- var m = [], L = this.element, Y = this.oldShadowOptions, V = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
- if (P === !0 ? k = V : typeof P == "object" && (k = a(V, P)), k && (k && Y && s(k, function(it, et) {
- it !== Y[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
- this.destroyShadows();
- else if (!this.shadows) {
- var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
- for (V = 1; V <= k.width; V++) {
- var $ = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * V;
- B($, { stroke: P.color || "#000000", "stroke-opacity": G * V, "stroke-width": q, transform: z, fill: "none" }), $.setAttribute("class", ($.getAttribute("class") || "") + " highcharts-shadow"), g && (B($, "height", Math.max(B($, "height") - q, 0)), $.cutHeight = q), X ? X.element.appendChild($) : L.parentNode && L.parentNode.insertBefore($, L), m.push($);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(P) {
- return this.attr({ visibility: P ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(P, X, g) {
- this[X] = P, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && P === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
- }, W.prototype.strokeWidth = function() {
- if (!this.renderer.styledMode)
- return this["stroke-width"] || 0;
- var P = this.getStyle("stroke-width"), X = 0;
- if (P.indexOf("px") === P.length - 2)
- X = T(P);
- else if (P !== "") {
- var g = S.createElementNS(u, "rect");
- B(g, { width: P, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(P) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(P[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(P) {
- P !== this.textStr && (delete this.textPxLength, this.textStr = P, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(P) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || S.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(P, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var P = this.element;
- return P.parentNode.appendChild(P), this;
- }, W.prototype.translate = function(P, X) {
- return this.attr({ translateX: P, translateY: X });
- }, W.prototype.updateShadows = function(P, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], P === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : P === "d" ? this.d : X, P, m[L]);
- }, W.prototype.updateTransform = function() {
- var P = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, V = this.translateX || 0, Q = this.translateY || 0;
- g && (V += this.width, Q += this.height), V = ["translate(" + V + "," + Q + ")"], w(L) && V.push("matrix(" + L.join(",") + ")"), g ? V.push("rotate(90) scale(-1,1)") : m && V.push("rotate(" + m + " " + n(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + n(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (w(P) || w(X)) && V.push("scale(" + n(P, 1) + " " + n(X, 1) + ")"), V.length && Y.setAttribute("transform", V.join(" "));
- }, W.prototype.visibilitySetter = function(P, X, g) {
- P === "inherit" ? g.removeAttribute(X) : this[X] !== P && g.setAttribute(
- X,
- P
- ), this[X] = P;
- }, W.prototype.xGetter = function(P) {
- return this.element.nodeName === "circle" && (P === "x" ? P = "cx" : P === "y" && (P = "cy")), this._defaultGetter(P);
- }, W.prototype.zIndexSetter = function(P, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, Y = this.element;
- g = L === g.box;
- var V = !1, Q = this.added, k;
- if (w(P) ? (Y.setAttribute("data-z-index", P), P = +P, this[X] === P && (Q = !1)) : w(this[X]) && Y.removeAttribute("data-z-index"), this[X] = P, Q) {
- for ((P = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !V; k--) {
- m = X[k], Q = m.getAttribute("data-z-index");
- var G = !w(Q);
- m !== Y && (0 > P && G && !g && !k ? (L.insertBefore(Y, X[k]), V = !0) : (T(Q) <= P || G && (!w(P) || 0 <= P)) && (L.insertBefore(Y, X[k + 1] || null), V = !0));
- }
- V || (L.insertBefore(Y, X[g ? 3 : 0] || null), V = !0);
- }
- return V;
- }, W;
- }(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, P) {
- this[P] = W, this.doTransform = !0;
- }, y;
- }), E(l, "Core/Renderer/RendererRegistry.js", [l["Core/Globals.js"]], function(y) {
- var j;
- return function(I) {
- I.rendererTypes = {};
- var Z;
- I.getRendererType = function(H) {
- return H === void 0 && (H = Z), I.rendererTypes[H] || I.rendererTypes[Z];
- }, I.registerRendererType = function(H, U, F) {
- I.rendererTypes[H] = U, (!Z || F) && (Z = H, y.Renderer = U);
- };
- }(j || (j = {})), j;
- }), E(
- l,
- "Core/Renderer/SVG/SVGLabel.js",
- [l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]],
- function(y, j) {
- var I = this && this.__extends || function() {
- var S = function(v, d) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, A) {
- u.__proto__ = A;
- } || function(u, A) {
- for (var O in A)
- A.hasOwnProperty(O) && (u[O] = A[O]);
- }, S(v, d);
- };
- return function(v, d) {
- function u() {
- this.constructor = v;
- }
- S(v, d), v.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
- };
- }(), Z = j.defined, H = j.extend, U = j.isNumber, F = j.merge, N = j.pick, R = j.removeEvent;
- return function(S) {
- function v(d, u, A, O, B, C, b, w, x, a) {
- var c = S.call(this) || this;
- c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(d, "g"), c.textStr = u, c.x = A, c.y = O, c.anchorX = C, c.anchorY = b, c.baseline = x, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = d.text(void 0, 0, 0, w).attr({ zIndex: 1 });
- var p;
- return typeof B == "string" && ((p = /^url\((.*?)\)$/.test(B)) || c.renderer.symbols[B]) && (c.symbolKey = B), c.bBox = v.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = d.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
- }
- return I(v, S), v.prototype.alignSetter = function(d) {
- d = { left: 0, center: 0.5, right: 1 }[d], d !== this.alignFactor && (this.alignFactor = d, this.bBox && U(this.xSetting) && this.attr({ x: this.xSetting }));
- }, v.prototype.anchorXSetter = function(d, u) {
- this.anchorX = d, this.boxAttr(u, Math.round(d) - this.getCrispAdjust() - this.xSetting);
- }, v.prototype.anchorYSetter = function(d, u) {
- this.anchorY = d, this.boxAttr(u, d - this.ySetting);
- }, v.prototype.boxAttr = function(d, u) {
- this.box ? this.box.attr(d, u) : this.deferredAttr[d] = u;
- }, v.prototype.css = function(d) {
- if (d) {
- var u = {};
- d = F(d), v.textProps.forEach(function(O) {
- typeof d[O] < "u" && (u[O] = d[O], delete d[O]);
- }), this.text.css(u);
- var A = "width" in u;
- "fontSize" in u || "fontWeight" in u ? this.updateTextPadding() : A && this.updateBoxSize();
- }
- return y.prototype.css.call(this, d);
- }, v.prototype.destroy = function() {
- R(this.element, "mouseenter"), R(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, v.prototype.fillSetter = function(d, u) {
- d && (this.needsBox = !0), this.fill = d, this.boxAttr(u, d);
- }, v.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var d = this.padding, u = N(this.paddingLeft, d);
- return { width: this.width, height: this.height, x: this.bBox.x - u, y: this.bBox.y - d };
- }, v.prototype.getCrispAdjust = function() {
- return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
- this["stroke-width"],
- 10
- ) : 0) % 2 / 2;
- }, v.prototype.heightSetter = function(d) {
- this.heightSetting = d;
- }, v.prototype.onAdd = function() {
- var d = this.textStr;
- this.text.add(this), this.attr({ text: Z(d) ? d : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, v.prototype.paddingSetter = function(d, u) {
- U(d) ? d !== this[u] && (this[u] = d, this.updateTextPadding()) : this[u] = void 0;
- }, v.prototype.rSetter = function(d, u) {
- this.boxAttr(u, d);
- }, v.prototype.shadow = function(d) {
- return d && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(d)), this;
- }, v.prototype.strokeSetter = function(d, u) {
- this.stroke = d, this.boxAttr(u, d);
- }, v.prototype["stroke-widthSetter"] = function(d, u) {
- d && (this.needsBox = !0), this["stroke-width"] = d, this.boxAttr(u, d);
- }, v.prototype["text-alignSetter"] = function(d) {
- this.textAlign = d;
- }, v.prototype.textSetter = function(d) {
- typeof d < "u" && this.text.attr({ text: d }), this.updateTextPadding();
- }, v.prototype.updateBoxSize = function() {
- var d = this.text.element.style, u = {}, A = this.padding, O = this.bBox = U(this.widthSetting) && U(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? v.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * A, d = this.renderer.fontMetrics(d && d.fontSize, this.text), this.baselineOffset = A + Math.min((this.text.firstLineMetrics || d).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - d.h) / 2), this.needsBox && (this.box || (A = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), A.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), A.add(this)), A = this.getCrispAdjust(), u.x = A, u.y = (this.baseline ? -this.baselineOffset : 0) + A, u.width = Math.round(this.width), u.height = Math.round(this.height), this.box.attr(H(u, this.deferredAttr)), this.deferredAttr = {});
- }, v.prototype.updateTextPadding = function() {
- var d = this.text;
- this.updateBoxSize();
- var u = this.baseline ? 0 : this.baselineOffset, A = N(this.paddingLeft, this.padding);
- Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (A += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (A !== d.x || u !== d.y) && (d.attr("x", A), d.hasBoxWidthChanged && (this.bBox = d.getBBox(!0)), typeof u < "u" && d.attr("y", u)), d.x = A, d.y = u;
- }, v.prototype.widthSetter = function(d) {
- this.widthSetting = U(d) ? d : void 0;
- }, v.prototype.getPaddedWidth = function() {
- var d = this.padding, u = N(this.paddingLeft, d);
- return d = N(this.paddingRight, d), (this.widthSetting || this.bBox.width || 0) + u + d;
- }, v.prototype.xSetter = function(d) {
- this.x = d, this.alignFactor && (d -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(d), this.attr("translateX", this.xSetting);
- }, v.prototype.ySetter = function(d) {
- this.ySetting = this.y = Math.round(d), this.attr("translateY", this.ySetting);
- }, v.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, v.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), v;
- }(y);
- }
- ), E(
- l,
- "Core/Renderer/SVG/Symbols.js",
- [l["Core/Utilities.js"]],
- function(y) {
- function j(N, R, S, v, d) {
- var u = [];
- if (d) {
- var A = d.start || 0, O = F(d.r, S);
- S = F(d.r, v || S);
- var B = (d.end || 0) - 1e-3;
- v = d.innerR;
- var C = F(d.open, 1e-3 > Math.abs((d.end || 0) - A - 2 * Math.PI)), b = Math.cos(A), w = Math.sin(A), x = Math.cos(B), a = Math.sin(B);
- A = F(d.longArc, 1e-3 > B - A - Math.PI ? 0 : 1), u.push(["M", N + O * b, R + S * w], ["A", O, S, 0, A, F(d.clockwise, 1), N + O * x, R + S * a]), H(v) && u.push(C ? ["M", N + v * x, R + v * a] : ["L", N + v * x, R + v * a], ["A", v, v, 0, A, H(d.clockwise) ? 1 - d.clockwise : 0, N + v * b, R + v * w]), C || u.push(["Z"]);
- }
- return u;
- }
- function I(N, R, S, v, d) {
- return d && d.r ? Z(N, R, S, v, d) : [["M", N, R], ["L", N + S, R], ["L", N + S, R + v], ["L", N, R + v], ["Z"]];
- }
- function Z(N, R, S, v, d) {
- return d = d && d.r || 0, [["M", N + d, R], ["L", N + S - d, R], ["C", N + S, R, N + S, R, N + S, R + d], ["L", N + S, R + v - d], ["C", N + S, R + v, N + S, R + v, N + S - d, R + v], ["L", N + d, R + v], ["C", N, R + v, N, R + v, N, R + v - d], ["L", N, R + d], ["C", N, R, N, R, N + d, R]];
- }
- var H = y.defined, U = y.isNumber, F = y.pick;
- return { arc: j, callout: function(N, R, S, v, d) {
- var u = Math.min(d && d.r || 0, S, v), A = u + 6, O = d && d.anchorX;
- d = d && d.anchorY || 0;
- var B = Z(N, R, S, v, { r: u });
- return U(O) && (N + O >= S ? d > R + A && d < R + v - A ? B.splice(3, 1, ["L", N + S, d - 6], ["L", N + S + 6, d], ["L", N + S, d + 6], ["L", N + S, R + v - u]) : B.splice(3, 1, ["L", N + S, v / 2], ["L", O, d], ["L", N + S, v / 2], ["L", N + S, R + v - u]) : 0 >= N + O ? d > R + A && d < R + v - A ? B.splice(7, 1, ["L", N, d + 6], ["L", N - 6, d], ["L", N, d - 6], ["L", N, R + u]) : B.splice(7, 1, ["L", N, v / 2], ["L", O, d], ["L", N, v / 2], ["L", N, R + u]) : d && d > v && O > N + A && O < N + S - A ? B.splice(5, 1, ["L", O + 6, R + v], ["L", O, R + v + 6], ["L", O - 6, R + v], ["L", N + u, R + v]) : d && 0 > d && O > N + A && O < N + S - A && B.splice(1, 1, ["L", O - 6, R], ["L", O, R - 6], ["L", O + 6, R], ["L", S - u, R])), B;
- }, circle: function(N, R, S, v) {
- return j(N + S / 2, R + v / 2, S / 2, v / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(N, R, S, v) {
- return [["M", N + S / 2, R], ["L", N + S, R + v / 2], ["L", N + S / 2, R + v], ["L", N, R + v / 2], ["Z"]];
- }, rect: I, roundedRect: Z, square: I, triangle: function(N, R, S, v) {
- return [["M", N + S / 2, R], ["L", N + S, R + v], ["L", N, R + v], ["Z"]];
- }, "triangle-down": function(N, R, S, v) {
- return [["M", N, R], ["L", N + S, R], ["L", N + S / 2, R + v], ["Z"]];
- } };
- }
- ), E(l, "Core/Renderer/SVG/TextBuilder.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.doc, H = j.SVG_NS, U = j.win, F = I.attr, N = I.isString, R = I.objectEach, S = I.pick;
- return function() {
- function v(d) {
- var u = d.styles;
- this.renderer = d.renderer, this.svgElement = d, this.width = d.textWidth, this.textLineHeight = u && u.lineHeight, this.textOutline = u && u.textOutline, this.ellipsis = !(!u || u.textOverflow !== "ellipsis"), this.noWrap = !(!u || u.whiteSpace !== "nowrap"), this.fontSize = u && u.fontSize;
- }
- return v.prototype.buildSVG = function() {
- var d = this.svgElement, u = d.element, A = d.renderer, O = S(d.textStr, "").toString(), B = O.indexOf("<") !== -1, C = u.childNodes;
- A = this.width && !d.added && A.box;
- var b = /<br.*?>/g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (w !== d.textCache) {
- for (d.textCache = w, delete d.actualWidth, w = C.length; w--; )
- u.removeChild(C[w]);
- B || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (A && A.appendChild(u), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(d.element), this.modifyDOM(), this.ellipsis && (u.textContent || "").indexOf("…") !== -1 && d.attr(
- "title",
- this.unescapeEntities(d.textStr || "", ["<", ">"])
- ), A && A.removeChild(u)) : u.appendChild(Z.createTextNode(this.unescapeEntities(O))), N(this.textOutline) && d.applyTextOutline && d.applyTextOutline(this.textOutline);
- }
- }, v.prototype.modifyDOM = function() {
- var d = this, u = this.svgElement, A = F(u.element, "x");
- u.firstLineMetrics = void 0;
- for (var O; (O = u.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- u.element.removeChild(O);
- [].forEach.call(u.element.querySelectorAll("tspan.highcharts-br"), function(w, x) {
- w.nextSibling && w.previousSibling && (x === 0 && w.previousSibling.nodeType === 1 && (u.firstLineMetrics = u.renderer.fontMetrics(void 0, w.previousSibling)), F(w, { dy: d.getLineHeight(w.nextSibling), x: A }));
- });
- var B = this.width || 0;
- if (B) {
- var C = function(w, x) {
- var a = w.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !d.noWrap && (1 < c.length || 1 < u.element.childNodes.length), i = d.getLineHeight(x), h = 0, o = u.actualWidth;
- if (d.ellipsis)
- a && d.truncate(w, a, void 0, 0, Math.max(0, B - parseInt(d.fontSize || 12, 10)), function(t, s) {
- return t.substring(
- 0,
- s
- ) + "…";
- });
- else if (p) {
- for (a = [], p = []; x.firstChild && x.firstChild !== w; )
- p.push(x.firstChild), x.removeChild(x.firstChild);
- for (; c.length; )
- c.length && !d.noWrap && 0 < h && (a.push(w.textContent || ""), w.textContent = c.join(" ").replace(/- /g, "-")), d.truncate(w, void 0, c, h === 0 && o || 0, B, function(t, s) {
- return c.slice(0, s).join(" ").replace(/- /g, "-");
- }), o = u.actualWidth, h++;
- p.forEach(function(t) {
- x.insertBefore(t, w);
- }), a.forEach(function(t) {
- x.insertBefore(Z.createTextNode(t), w), t = Z.createElementNS(H, "tspan"), t.textContent = "", F(t, { dy: i, x: A }), x.insertBefore(t, w);
- });
- }
- }, b = function(w) {
- [].slice.call(w.childNodes).forEach(function(x) {
- x.nodeType === U.Node.TEXT_NODE ? C(x, w) : (x.className.baseVal.indexOf("highcharts-br") !== -1 && (u.actualWidth = 0), b(x));
- });
- };
- b(u.element);
- }
- }, v.prototype.getLineHeight = function(d) {
- var u;
- return d = d.nodeType === U.Node.TEXT_NODE ? d.parentElement : d, this.renderer.styledMode || (u = d && /(px|em)$/.test(d.style.fontSize) ? d.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(u, d || this.svgElement.element).h;
- }, v.prototype.modifyTree = function(d) {
- var u = this, A = function(O, B) {
- var C = O.attributes;
- C = C === void 0 ? {} : C;
- var b = O.children, w = O.tagName, x = u.renderer.styledMode;
- w === "b" || w === "strong" ? x ? C.class = "highcharts-strong" : C.style = "font-weight:bold;" + (C.style || "") : (w === "i" || w === "em") && (x ? C.class = "highcharts-emphasized" : C.style = "font-style:italic;" + (C.style || "")), N(C.style) && (C.style = C.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (C.class = "highcharts-br", O.textContent = "", (B = d[B + 1]) && B.textContent && (B.textContent = B.textContent.replace(/^ +/gm, ""))) : w === "a" && b && b.some(function(a) {
- return a.tagName === "#text";
- }) && (O.children = [{ children: b, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = C, b && b.filter(function(a) {
- return a.tagName !== "#text";
- }).forEach(A);
- };
- d.forEach(A);
- }, v.prototype.truncate = function(d, u, A, O, B, C) {
- var b = this.svgElement, w = b.renderer, x = b.rotation, a = [], c = A ? 1 : 0, p = (u || A || "").length, i = p, h, o = function(s, n) {
- n = n || s;
- var T = d.parentNode;
- if (T && typeof a[n] > "u")
- if (T.getSubStringLength)
- try {
- a[n] = O + T.getSubStringLength(0, A ? n + 1 : n);
- } catch {
- }
- else
- w.getSpanWidth && (d.textContent = C(u || A, s), a[n] = O + w.getSpanWidth(b, d));
- return a[n];
- };
- b.rotation = 0;
- var t = o(d.textContent.length);
- if (O + t > B) {
- for (; c <= p; )
- i = Math.ceil((c + p) / 2), A && (h = C(A, i)), t = o(i, h && h.length - 1), c === p ? c = p + 1 : t > B ? p = i - 1 : c = i;
- p === 0 ? d.textContent = "" : u && p === u.length - 1 || (d.textContent = h || C(u || A, i));
- }
- A && A.splice(0, i), b.actualWidth = t, b.rotation = x;
- }, v.prototype.unescapeEntities = function(d, u) {
- return R(this.renderer.escapes, function(A, O) {
- u && u.indexOf(A) !== -1 || (d = d.toString().replace(new RegExp(A, "g"), O));
- }), d;
- }, v;
- }();
- }), E(l, "Core/Renderer/SVG/SVGRenderer.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGLabel.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Renderer/SVG/TextBuilder.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, N, R) {
- var S = I.charts, v = I.deg2rad, d = I.doc, u = I.isFirefox, A = I.isMS, O = I.isWebKit, B = I.noop, C = I.SVG_NS, b = I.symbolSizes, w = I.win, x = R.addEvent, a = R.attr, c = R.createElement, p = R.css, i = R.defined, h = R.destroyObjectProperties, o = R.extend, t = R.isArray, s = R.isNumber, n = R.isObject, T = R.isString, _ = R.merge, D = R.pick, W = R.pInt, P = R.uniqueKey, X;
- return I = function() {
- function g(m, L, Y, V, Q, k, G) {
- this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, Y, V, Q, k, G);
- }
- return g.prototype.init = function(m, L, Y, V, Q, k, G) {
- var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), $ = z.element;
- G || z.css(this.getStyle(V)), m.appendChild($), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a($, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = $, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(d.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
- var q;
- u && m.getBoundingClientRect && (L = function() {
- p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
- }, L(), this.unSubPixelFix = x(w, "resize", L));
- }, g.prototype.definition = function(m) {
- return new y([m]).addToDOM(this.defs.element);
- }, g.prototype.getReferenceURL = function() {
- if ((u || O) && d.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = P();
- m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(d.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = d.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", d.body.removeChild(m);
- }
- if (X)
- return w.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
- }
- return "";
- }, g.prototype.getStyle = function(m) {
- return this.style = o({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
- }, g.prototype.setStyle = function(m) {
- this.boxWrapper.css(this.getStyle(m));
- }, g.prototype.isHidden = function() {
- return !this.boxWrapper.getBBox().width;
- }, g.prototype.destroy = function() {
- var m = this.defs;
- return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), h(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
- }, g.prototype.createElement = function(m) {
- var L = new this.Element();
- return L.init(this, m), L;
- }, g.prototype.getRadialAttr = function(m, L) {
- return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
- }, g.prototype.buildText = function(m) {
- new N(m).buildSVG();
- }, g.prototype.getContrast = function(m) {
- return m = j.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
- }, g.prototype.button = function(m, L, Y, V, Q, k, G, z, $, q) {
- var it = this.label(m, L, Y, $, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
- if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
- rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
- var ct = rt.style;
- delete rt.style, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
- var gt = k.style;
- delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
- var dt = G.style;
- delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
- var ht = z.style;
- delete z.style;
- }
- return x(it.element, A ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), x(it.element, A ? "mouseout" : "mouseleave", function() {
- nt !== 3 && it.setState(nt);
- }), it.setState = function(at) {
- at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, k, G, z][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(o({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && V.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, Y) {
- Y === void 0 && (Y = "round");
- var V = m[0], Q = m[1];
- return i(V[1]) && V[1] === Q[1] && (V[1] = Q[1] = Math[Y](V[1]) - L % 2 / 2), i(V[2]) && V[2] === Q[2] && (V[2] = Q[2] = Math[Y](V[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && o(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, Y) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(V, Q, k) {
- k.setAttribute("c" + Q, V);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, Y, V, Q, k) {
- return n(m) ? (V = m, L = V.y, Y = V.r, m = V.x) : V = { innerR: V, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, V), m.r = Y, m;
- }, g.prototype.rect = function(m, L, Y, V, Q, k) {
- Q = n(m) ? m.r : Q;
- var G = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(V, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, $, q) {
- G.r = z, a(q, { rx: z, ry: z });
- }, G.rGetter = function() {
- return G.r || 0;
- }, G.attr(m);
- }, g.prototype.setSize = function(m, L, Y) {
- this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
- this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
- }, duration: D(
- Y,
- !0
- ) ? void 0 : 0 }), this.alignElements();
- }, g.prototype.g = function(m) {
- var L = this.createElement("g");
- return m ? L.attr({ class: "highcharts-" + m }) : L;
- }, g.prototype.image = function(m, L, Y, V, Q, k) {
- var G = { preserveAspectRatio: "none" }, z = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- s(L) && (G.x = L), s(Y) && (G.y = Y), s(V) && (G.width = V), s(Q) && (G.height = Q);
- var $ = this.createElement("image").attr(G);
- return L = function(q) {
- z($.element, m), k.call($, q);
- }, k ? (z(
- $.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), Y = new w.Image(), x(Y, "load", L), Y.src = m, Y.complete && L({})) : z($.element, m), $;
- }, g.prototype.symbol = function(m, L, Y, V, Q, k) {
- var G = this, z = /^url\((.*?)\)$/, $ = z.test(m), q = !$ && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
- if (it) {
- typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(Y || 0), V || 0, Q || 0, k));
- var nt = this.path(et);
- G.styledMode || nt.attr("fill", "none"), o(nt, { symbolName: q || void 0, x: L, y: Y, width: V, height: Q }), k && o(nt, k);
- } else if ($) {
- var rt = m.match(z)[1], ct = nt = this.image(rt);
- ct.imgwidth = D(b[rt] && b[rt].width, k && k.width), ct.imgheight = D(b[rt] && b[rt].height, k && k.height);
- var gt = function(dt) {
- return dt.attr({ width: dt.width, height: dt.height });
- };
- ["width", "height"].forEach(function(dt) {
- ct[dt + "Setter"] = function(ht, at) {
- var J = this["img" + at];
- this[at] = ht, i(J) && (k && k.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
- };
- }), i(L) && ct.attr({ x: L, y: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
- var dt = S[G.chartIndex];
- this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), d.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, Y, V) {
- var Q = P() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, Y, V, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
- }, g.prototype.text = function(m, L, Y, V) {
- var Q = {};
- return V && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!V || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
- for (var $ = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < $.length; it++)
- et = $[it], et.getAttribute(G) === q && et.setAttribute(G, k);
- z.setAttribute(G, k);
- }), m);
- }, g.prototype.fontMetrics = function(m, L) {
- return m = !this.styledMode && /px/.test(m) || !w.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && H.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
- }, g.prototype.rotCorr = function(m, L, Y) {
- var V = m;
- return L && Y && (V = Math.max(V * Math.cos(L * v), 4)), { x: -m / 3 * Math.sin(L * v), y: V };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], Y = [], V = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- T(Y[0]) && s(m[Q]) && Y.length === V[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
- return L.push(Y.slice(0)), L;
- }, g.prototype.label = function(m, L, Y, V, Q, k, G, z, $) {
- return new U(this, m, L, Y, V, Q, k, G, z, $);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), o(I.prototype, { Element: H, SVG_NS: C, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: B }), Z.registerRendererType("svg", I, !0), I;
- }), E(l, "Core/Renderer/HTML/HTMLElement.js", [l["Core/Globals.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var A = function(O, B) {
- return A = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
- C.__proto__ = b;
- } || function(C, b) {
- for (var w in b)
- b.hasOwnProperty(w) && (C[w] = b[w]);
- }, A(O, B);
- };
- return function(O, B) {
- function C() {
- this.constructor = O;
- }
- A(O, B), O.prototype = B === null ? Object.create(B) : (C.prototype = B.prototype, new C());
- };
- }(), H = y.isFirefox, U = y.isMS, F = y.isWebKit, N = y.win, R = I.css, S = I.defined, v = I.extend, d = I.pick, u = I.pInt;
- return function(A) {
- function O() {
- return A !== null && A.apply(this, arguments) || this;
- }
- return Z(O, A), O.compose = function(B) {
- if (O.composedClasses.indexOf(B) === -1) {
- O.composedClasses.push(B);
- var C = O.prototype, b = B.prototype;
- b.getSpanCorrection = C.getSpanCorrection, b.htmlCss = C.htmlCss, b.htmlGetBBox = C.htmlGetBBox, b.htmlUpdateTransform = C.htmlUpdateTransform, b.setSpanRotation = C.setSpanRotation;
- }
- return B;
- }, O.prototype.getSpanCorrection = function(B, C, b) {
- this.xCorr = -B * b, this.yCorr = -C;
- }, O.prototype.htmlCss = function(B) {
- var C = this.element.tagName === "SPAN" && B && "width" in B, b = d(C && B.width, void 0);
- if (C) {
- delete B.width, this.textWidth = b;
- var w = !0;
- }
- return B && B.textOverflow === "ellipsis" && (B.whiteSpace = "nowrap", B.overflow = "hidden"), this.styles = v(this.styles, B), R(this.element, B), w && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var B = this.element;
- return { x: B.offsetLeft, y: B.offsetTop, width: B.offsetWidth, height: B.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var B = this.renderer, C = this.element, b = this.translateX || 0, w = this.translateY || 0, x = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
- if (i = i && i.whiteSpace, R(C, { marginLeft: b, marginTop: w }), !B.styledMode && this.shadows && this.shadows.forEach(function(T) {
- R(T, { marginLeft: b + 1, marginTop: w + 1 });
- }), this.inverted && [].forEach.call(C.childNodes, function(T) {
- B.invertChild(T, C);
- }), C.tagName === "SPAN") {
- var h = this.rotation, o = this.textWidth && u(this.textWidth), t = [h, c, C.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
- if (s = !1, o !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- R(C, { width: "", whiteSpace: i || "nowrap" }), n = C.offsetWidth;
- (o > this.oldTextWidth || n > o) && (/[ \-]/.test(C.textContent || C.innerText) || C.style.textOverflow === "ellipsis") && (R(C, { width: n > o || h ? o + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = o, s = !0);
- }
- this.hasBoxWidthChanged = s, t !== this.cTT && (s = B.fontMetrics(C.style.fontSize, C).b, !S(h) || h === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(h, p, s), this.getSpanCorrection(!S(h) && this.textPxLength || C.offsetWidth, s, p, h, c)), R(C, { left: x + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = h, this.oldAlign = c;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(B, C, b) {
- var w = {}, x = U && !/Edge/.test(N.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : H ? "MozTransform" : N.opera ? "-o-transform" : void 0;
- x && (w[x] = w.transform = "rotate(" + B + "deg)", w[x + (H ? "Origin" : "-origin")] = w.transformOrigin = 100 * C + "% " + b + "px", R(this.element, w));
- }, O.composedClasses = [], O;
- }(j);
- }), E(
- l,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [l["Core/Renderer/HTML/AST.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGRenderer.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var S = function(v, d) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, A) {
- u.__proto__ = A;
- } || function(u, A) {
- for (var O in A)
- A.hasOwnProperty(O) && (u[O] = A[O]);
- }, S(v, d);
- };
- return function(v, d) {
- function u() {
- this.constructor = v;
- }
- S(v, d), v.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
- };
- }(), U = Z.attr, F = Z.createElement, N = Z.extend, R = Z.pick;
- return function(S) {
- function v() {
- return S !== null && S.apply(this, arguments) || this;
- }
- return H(v, S), v.compose = function(d) {
- return v.composedClasses.indexOf(d) === -1 && (v.composedClasses.push(d), d.prototype.html = v.prototype.html), d;
- }, v.prototype.html = function(d, u, A) {
- var O = this.createElement("span"), B = O.element, C = O.renderer, b = C.isSVG, w = function(x, a) {
- ["opacity", "visibility"].forEach(function(c) {
- x[c + "Setter"] = function(p, i, h) {
- var o = x.div ? x.div.style : a;
- j.prototype[c + "Setter"].call(this, p, i, h), o && (o[i] = p);
- };
- }), x.addedSetters = !0;
- };
- return O.textSetter = function(x) {
- x !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, R(x, "")), this.textStr = x, O.doTransform = !0);
- }, b && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(x, a) {
- a === "align" ? O.alignValue = O.textAlign = x : O[a] = x, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: d, x: Math.round(u), y: Math.round(A) }).css({ position: "absolute" }), C.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), B.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(x) {
- var a = C.box.parentNode, c = [];
- if (this.parentGroup = x) {
- var p = x.div;
- if (!p) {
- for (; x; )
- c.push(x), x = x.parentGroup;
- c.reverse().forEach(function(i) {
- function h(n, T) {
- i[T] = n, T === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
- }
- var o = U(i.element, "class"), t = i.styles || {};
- p = i.div = i.div || F("div", o ? { className: o } : void 0, {
- position: "absolute",
- left: (i.translateX || 0) + "px",
- top: (i.translateY || 0) + "px",
- display: i.display,
- opacity: i.opacity,
- cursor: t.cursor,
- pointerEvents: t.pointerEvents,
- visibility: i.visibility
- }, p || a);
- var s = p.style;
- N(i, { classSetter: function(n) {
- return function(T) {
- this.element.setAttribute("class", T), n.className = T;
- };
- }(p), on: function() {
- return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: h, translateYSetter: h }), i.addedSetters || w(i);
- });
- }
- } else
- p = a;
- return p.appendChild(B), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, v.composedClasses = [], v;
- }(I);
- }
- ), E(l, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(j) {
- j.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
- autoRotation: void 0,
- autoRotationLimit: 80,
- distance: void 0,
- enabled: !0,
- indentation: 10,
- overflow: "justify",
- padding: 5,
- reserveSpace: void 0,
- rotation: void 0,
- staggerLines: 0,
- step: 0,
- useHTML: !1,
- x: 0,
- zIndex: 7,
- style: { color: "#666666", cursor: "default", fontSize: "11px" }
- }, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
- align: "middle",
- rotation: 0,
- useHTML: !1,
- x: 0,
- y: 0,
- style: { color: "#666666" }
- }, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, j.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
- animation: {},
- allowOverlap: !1,
- enabled: !1,
- crop: !0,
- overflow: "justify",
- formatter: function() {
- var I = this.axis.chart.numberFormatter;
- return I(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, j.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, j.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, j.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, j.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), E(l, "Core/Foundation.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.isFunction, Z = y.objectEach, H = y.removeEvent, U;
- return function(F) {
- F.registerEventOptions = function(N, R) {
- N.eventOptions = N.eventOptions || {}, Z(R.events, function(S, v) {
- N.eventOptions[v] !== S && (N.eventOptions[v] && (H(N, v, N.eventOptions[v]), delete N.eventOptions[v]), I(S) && (N.eventOptions[v] = S, j(N, v, S)));
- });
- };
- }(U || (U = {})), U;
- }), E(
- l,
- "Core/Axis/Tick.js",
- [l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = j.deg2rad, H = I.clamp, U = I.correctFloat, F = I.defined, N = I.destroyObjectProperties, R = I.extend, S = I.fireEvent, v = I.isNumber, d = I.merge, u = I.objectEach, A = I.pick;
- return j = function() {
- function O(B, C, b, w, x) {
- this.isNewLabel = this.isNew = !0, this.axis = B, this.pos = C, this.type = b || "", this.parameters = x || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, S(this, "init"), b || w || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var B = this, C = B.axis, b = C.options, w = C.chart, x = C.categories, a = C.logarithmic, c = C.names, p = B.pos, i = A(B.options && B.options.labels, b.labels), h = C.tickPositions, o = p === h[0], t = p === h[h.length - 1], s = (!i.step || i.step === 1) && C.tickInterval === 1;
- h = h.info;
- var n = B.label, T;
- if (x = this.parameters.category || (x ? A(x[p], c[p], p) : p), a && v(x) && (x = U(a.lin2log(x))), C.dateTime)
- if (h)
- var _ = w.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && h.higherRanks[p] || h.unitName]), D = _.main;
- else
- v(x) && (D = C.dateTime.getXDateFormat(x, b.dateTimeLabelFormats || {}));
- B.isFirst = o, B.isLast = t;
- var W = {
- axis: C,
- chart: w,
- dateTimeLabelFormat: D,
- isFirst: o,
- isLast: t,
- pos: p,
- tick: B,
- tickPositionInfo: h,
- value: x
- };
- S(this, "labelFormat", W);
- var P = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = C.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : C.defaultLabelFormatter.call(g, g);
- };
- b = P.call(W, W);
- var X = _ && _.list;
- B.shortenLabel = X ? function() {
- for (T = 0; T < X.length; T++)
- if (R(W, { dateTimeLabelFormat: X[T] }), n.attr({ text: P.call(W, W) }), n.getBBox().width < C.getSlotWidth(B) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, s && C._addedPlotLB && B.moveLabel(b, i), F(n) || B.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (B.label = n = B.createLabel({ x: 0, y: 0 }, b, i), B.rotation = 0);
- }, O.prototype.createLabel = function(B, C, b) {
- var w = this.axis, x = w.chart;
- return (B = F(C) && b.enabled ? x.renderer.text(C, B.x, B.y, b.useHTML).add(w.labelGroup) : null) && (x.styledMode || B.css(d(b.style)), B.textPxLength = B.getBBox().width), B;
- }, O.prototype.destroy = function() {
- N(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(B, C, b, w) {
- var x = this.axis, a = x.chart, c = w && a.oldChartHeight || a.chartHeight;
- return B = { x: B ? U(x.translate(C + b, null, null, w) + x.transB) : x.left + x.offset + (x.opposite ? (w && a.oldChartWidth || a.chartWidth) - x.right - x.left : 0), y: B ? c - x.bottom + x.offset - (x.opposite ? x.height : 0) : U(c - x.translate(C + b, null, null, w) - x.transB) }, B.y = H(B.y, -1e5, 1e5), S(this, "afterGetPosition", { pos: B }), B;
- }, O.prototype.getLabelPosition = function(B, C, b, w, x, a, c, p) {
- var i = this.axis, h = i.transA, o = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), T = {}, _ = x.y;
- return F(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * Z) * (s.y - b.getBBox(!1, 0).height / 2)), B = B + x.x + n + s.x - (a && w ? a * h * (o ? -1 : 1) : 0), C = C + _ - (a && !w ? a * h * (o ? 1 : -1) : 0), t && (b = c / (p || 1) % t, i.opposite && (b = t - b - 1), C += i.labelOffset / t * b), T.x = B, T.y = Math.round(C), S(this, "afterGetLabelPosition", { pos: T, tickmarkOffset: a, index: c }), T;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(B, C, b, w, x, a) {
- return a.crispLine([["M", B, C], ["L", B + (x ? 0 : -b), C + (x ? b : 0)]], w);
- }, O.prototype.handleOverflow = function(B) {
- var C = this.axis, b = C.options.labels, w = B.x, x = C.chart.chartWidth, a = C.chart.spacing, c = A(C.labelLeft, Math.min(C.pos, a[3]));
- a = A(C.labelRight, Math.max(C.isRadial ? 0 : C.pos + C.len, x - a[1]));
- var p = this.label, i = this.rotation, h = { left: 0, center: 0.5, right: 1 }[C.labelAlign || p.attr("align")], o = p.getBBox().width, t = C.getSlotWidth(this), s = {}, n = t, T = 1, _;
- i || b.overflow !== "justify" ? 0 > i && w - h * o < c ? _ = Math.round(w / Math.cos(i * Z) - c) : 0 < i && w + h * o > a && (_ = Math.round((x - w) / Math.cos(i * Z))) : (x = w + (1 - h) * o, w - h * o < c ? n = B.x + n * (1 - h) - c : x > a && (n = a - B.x + n * h, T = -1), n = Math.min(t, n), n < t && C.labelAlign === "center" && (B.x += T * (t - n - h * (t - Math.min(o, n)))), (o > n || C.autoRotation && (p.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), p.css(s)));
- }, O.prototype.moveLabel = function(B, C) {
- var b = this, w = b.label, x = b.axis, a = x.reversed, c = !1;
- if (w && w.textStr === B ? (b.movedLabel = w, c = !0, delete b.label) : u(x.ticks, function(i) {
- c || i.isNew || i === b || !i.label || i.label.textStr !== B || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
- }), !c && (b.labelPos || w)) {
- var p = b.labelPos || w.xy;
- w = x.horiz ? a ? 0 : x.width + x.left : p.x, x = x.horiz ? p.y : a ? x.width + x.left : 0, b.movedLabel = b.createLabel({ x: w, y: x }, B, C), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(B, C, b) {
- var w = this.axis, x = w.horiz, a = this.pos, c = A(this.tickmarkOffset, w.tickmarkOffset);
- a = this.getPosition(x, a, c, C), c = a.x;
- var p = a.y;
- w = x && c === w.pos + w.len || !x && p === w.pos ? -1 : 1, x = A(b, this.label && this.label.newOpacity, 1), b = A(b, 1), this.isActive = !0, this.renderGridLine(C, b, w), this.renderMark(a, b, w), this.renderLabel(a, C, x, B), this.isNew = !1, S(this, "afterRender");
- }, O.prototype.renderGridLine = function(B, C, b) {
- var w = this.axis, x = w.options, a = {}, c = this.pos, p = this.type, i = A(
- this.tickmarkOffset,
- w.tickmarkOffset
- ), h = w.chart.renderer, o = this.gridLine, t = x.gridLineWidth, s = x.gridLineColor, n = x.gridLineDashStyle;
- this.type === "minor" && (t = x.minorGridLineWidth, s = x.minorGridLineColor, n = x.minorGridLineDashStyle), o || (w.chart.styledMode || (a.stroke = s, a["stroke-width"] = t || 0, a.dashstyle = n), p || (a.zIndex = 1), B && (C = 0), this.gridLine = o = h.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(w.gridGroup)), o && (b = w.getPlotLinePath({ value: c + i, lineWidth: o.strokeWidth() * b, force: "pass", old: B })) && o[B || this.isNew ? "attr" : "animate"]({ d: b, opacity: C });
- }, O.prototype.renderMark = function(B, C, b) {
- var w = this.axis, x = w.options, a = w.chart.renderer, c = this.type, p = w.tickSize(c ? c + "Tick" : "tick"), i = B.x;
- B = B.y;
- var h = A(x[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && w.isXAxis ? 1 : 0);
- x = x[c !== "minor" ? "tickColor" : "minorTickColor"];
- var o = this.mark, t = !o;
- p && (w.opposite && (p[0] = -p[0]), o || (this.mark = o = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || o.attr({ stroke: x, "stroke-width": h })), o[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- B,
- p[0],
- o.strokeWidth() * b,
- w.horiz,
- a
- ), opacity: C }));
- }, O.prototype.renderLabel = function(B, C, b, w) {
- var x = this.axis, a = x.horiz, c = x.options, p = this.label, i = c.labels, h = i.step;
- x = A(this.tickmarkOffset, x.tickmarkOffset);
- var o = B.x;
- B = B.y;
- var t = !0;
- p && v(o) && (p.xy = B = this.getLabelPosition(o, B, p, a, i, x, w, h), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || C || b === 0 || this.handleOverflow(B), h && w % h && (t = !1), t && v(B.y) ? (B.opacity = b, p[this.isNewLabel ? "attr" : "animate"](B), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var B = this.label, C = this.axis, b = C.reversed;
- if (B && !this.isNew) {
- var w = C.horiz ? b ? C.left : C.width + C.left : B.xy.x;
- b = C.horiz ? B.xy.y : b ? C.width + C.top : C.top, B.animate({ x: w, y: b, opacity: 0 }, void 0, B.destroy), delete this.label;
- }
- C.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), j;
- }
- ), E(l, "Core/Axis/Axis.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/AxisDefaults.js"],
- l["Core/Color/Color.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, N) {
- var R = y.animObject, S = Z.defaultOptions, v = H.registerEventOptions, d = U.deg2rad, u = N.arrayMax, A = N.arrayMin, O = N.clamp, B = N.correctFloat, C = N.defined, b = N.destroyObjectProperties, w = N.erase, x = N.error, a = N.extend, c = N.fireEvent, p = N.getMagnitude, i = N.isArray, h = N.isNumber, o = N.isString, t = N.merge, s = N.normalizeTickInterval, n = N.objectEach, T = N.pick, _ = N.relativeLength, D = N.removeEvent, W = N.splat, P = N.syncTimeout;
- return y = function() {
- function X(g, m) {
- this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
- }
- return X.prototype.init = function(g, m) {
- var L = m.isX;
- this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = T(m.opposite, this.opposite), this.side = T(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var Y = this.options, V = Y.labels, Q = Y.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = T(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = C(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = T(Y.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = h(V.rotation) ? V.rotation : void 0, v(this, Y), c(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(j.defaultXAxisOptions, this.coll === "yAxis" && j.defaultYAxisOptions, [j.defaultTopAxisOptions, j.defaultRightAxisOptions, j.defaultBottomAxisOptions, j.defaultLeftAxisOptions][this.side], t(S[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = h(this.value) ? this.value : NaN, Y = m.chart.time, V = this.dateTimeLabelFormat, Q = S.lang, k = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
- if (m.categories)
- var $ = "" + this.value;
- else if (V)
- $ = Y.dateFormat(V, L);
- else if (z && 1e3 <= G)
- for (; z-- && typeof $ > "u"; )
- m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && ($ = g(L / m, -1) + k[z]);
- return typeof $ > "u" && ($ = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), $;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- c(this, "getSeriesExtremes", null, function() {
- g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(Y) {
- if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
- var V = Y.options, Q = V.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if (V = Y.xData, V.length) {
- V = g.logarithmic ? V.filter(g.validatePositiveValue) : V, L = Y.getXExtremes(V);
- var k = L.min, G = L.max;
- h(k) || k instanceof Date || (V = V.filter(h), L = Y.getXExtremes(V), k = L.min, G = L.max), V.length && (g.dataMin = Math.min(T(g.dataMin, k), k), g.dataMax = Math.max(T(g.dataMax, G), G));
- }
- } else
- Y = Y.applyExtremes(), h(Y.dataMin) && (k = Y.dataMin, g.dataMin = Math.min(T(g.dataMin, k), k)), h(Y.dataMax) && (G = Y.dataMax, g.dataMax = Math.max(T(g.dataMax, G), G)), C(Q) && (g.threshold = Q), (!V.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), c(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, Y, V, Q) {
- var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
- V = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && V) && k.lin2val;
- var $ = 1, q = 0;
- return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && ($ *= -1, q = k.len), k.reversed && ($ *= -1, q -= $ * (k.sector || k.len)), m ? (g = (g * $ + q - z) / Y + G, V && (g = k.lin2val(g))) : (V && (g = k.val2lin(g)), g = h(G) ? $ * (g - G) * Y + q + $ * z + (h(Q) ? Y * Q : 0) : void 0), g;
- }, X.prototype.toPixels = function(g, m) {
- return this.translate(
- g,
- !1,
- !this.horiz,
- null,
- !0
- ) + (m ? 0 : this.pos);
- }, X.prototype.toValue = function(g, m) {
- return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
- }, X.prototype.getPlotLinePath = function(g) {
- function m(at, J, tt) {
- return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
- }
- var L = this, Y = L.chart, V = L.left, Q = L.top, k = g.old, G = g.value, z = g.lineWidth, $ = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: G,
- lineWidth: z,
- old: k,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, c(this, "getPlotLinePath", g, function(at) {
- et = T(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round($ - et - it), h(et) ? L.horiz ? (ct = Q, dt = $ - L.bottom, rt = gt = m(rt, V, V + L.width)) : (rt = V, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var Y = B(Math.floor(m / g) * g);
- L = B(Math.ceil(L / g) * g);
- var V = [], Q;
- if (B(Y + g) === Y && (Q = 20), this.single)
- return [m];
- for (m = Y; m <= L && (V.push(m), m = B(m + g, Q), m !== k); )
- var k = m;
- return V;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? T(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, V = this.min - Y;
- Y = this.max + Y;
- var Q = Y - V, k = [];
- if (Q && Q / L < this.len / 3) {
- var G = this.logarithmic;
- if (G)
- this.paddedTicks.forEach(function(z, $, q) {
- $ && k.push.apply(
- k,
- G.getLogTickPositions(L, q[$ - 1], q[$], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), V, Y, g.startOfWeek));
- else
- for (g = V + (m[0] - V) % L; g <= Y && g !== k[0]; g += L)
- k.push(g);
- }
- return k.length !== 0 && this.trimTicks(k), k;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, Y = this.max, V = 0, Q, k, G, z;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (C(g.min) || C(g.max) || C(g.floor) || C(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
- for (Q = z; 0 < Q; Q--)
- k = G[Q] - G[Q - 1], (!V || k < V) && (V = k);
- }), this.minRange = Math.min(5 * V, this.dataMax - this.dataMin))), Y - L < this.minRange) {
- var $ = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
- it = [L - it, T(g.min, L - it)], $ && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = u(it), Y = [L + q, T(g.max, L + q)], $ && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = A(Y), Y - L < q && (it[0] = Y - q, it[1] = T(g.min, Y - q), L = u(it));
- }
- this.min = L, this.max = Y;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && C(L) && Y && (g = C(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, Y = g.options.x;
- if (g.series.requireSorting = !1, C(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(g.name) : T(L.keys[g.name], -1) : g.series.autoIncrement()), Y === -1) {
- if (!m)
- var V = L.length;
- } else
- V = Y;
- return typeof V < "u" && (this.names[V] = g.name, this.names.keys[g.name] = V), V;
- }, X.prototype.updateNames = function() {
- var g = this, m = this.names;
- 0 < m.length && (Object.keys(m.keys).forEach(function(L) {
- delete m.keys[L];
- }), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
- L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(Y, V) {
- if (Y && Y.options && typeof Y.name < "u") {
- var Q = g.nameToX(Y);
- typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[V] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, Y = !!g.categories, V = g.isXAxis, Q = g.axisPointRange || 0, k = 0, G = 0, z = g.transA;
- if (V || Y || Q) {
- var $ = g.getClosest();
- L ? (k = L.minPointOffset, G = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = Y ? 1 : V ? T(q.options.pointRange, $, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || Y) && (q = q.is("xrange") ? !V : V, k = Math.max(k, q && o(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && $ ? g.ordinal.slope / $ : 1, g.minPointOffset = k *= L, g.pointRangePadding = G *= L, g.pointRange = Math.min(Q, g.single && Y ? 1 : m), V && (g.closestPointRange = $);
- }
- g.translationSlope = g.transA = z = g.staticScale || g.len / (m + G || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, Y = this.options, V = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, $ = Y.maxPadding, q = Y.minPadding, it = h(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = h(this.threshold) ? this.threshold : null;
- this.dateTime || G || Q || this.getTickAmount();
- var nt = T(this.userMin, Y.min), rt = T(this.userMax, Y.max);
- if (Q) {
- this.linkedParent = m[this.coll][Y.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = T(ct.min, ct.dataMin), this.max = T(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && x(11, 1, m);
- } else {
- if (z && C(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- $ = 0;
- }
- }
- this.min = T(nt, ct, this.dataMin), this.max = T(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, T(this.dataMin, this.min)) && x(10, 1, m), this.min = B(L.log2lin(this.min), 16), this.max = B(L.log2lin(this.max), 16)), this.range && C(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && C(this.min) && C(this.max) && (m = this.max - this.min) && (!C(nt) && q && (this.min -= m * q), !C(rt) && $ && (this.max += m * $)), h(this.userMin) || (h(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), h(Y.floor) && (this.min = Math.max(this.min, Y.floor))), h(this.userMax) || (h(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), h(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && C(this.dataMin) && (et = et || 0, !C(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !C(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), h(this.min) && h(this.max) && !this.chart.polar && this.min > this.max && (C(this.options.min) ? this.max = this.min : C(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : T(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), V && !g) {
- var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
- this.series.forEach(function(ht) {
- ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
- }), c(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = T(Y.minTickInterval, this.dateTime && !this.series.some(function(ht) {
- return ht.noSharedTooltip;
- }) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, p(this.tickInterval), T(Y.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
- }, X.prototype.setTickPositions = function() {
- var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), Y = this.hasVerticalPanning(), V = this.coll === "colorAxis", Q = (V || !Y) && g.startOnTick;
- Y = (V || !Y) && g.endOnTick, V = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && C(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
- this.tickInterval,
- this.min,
- this.max
- ) : (L = [this.min, this.max], x(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, V && (V = V.apply(this, [this.min, this.max]))) && (this.tickPositions = L = V), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
- return k.is("heatmap") && k.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || V || this.adjustTickAmount()), c(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var Y = g[0], V = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (c(this, "trimTicks"), !this.isLinked) {
- if (m && Y !== -1 / 0)
- this.min = Y;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = V;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && C(Y) && !this.options.tickPositions && g.push((V + Y) / 2);
- }
- }, X.prototype.alignToOthers = function() {
- var g = {}, m = this.options, L;
- return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(Y) {
- var V = Y.options;
- V = [Y.horiz ? V.left : V.top, V.width, V.height, V.pane].join(), Y.series.length && (g[V] ? L = !0 : g[V] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !C(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
- }, X.prototype.adjustTickAmount = function() {
- var g = this.options, m = this.tickInterval, L = this.tickPositions, Y = this.tickAmount, V = this.finalTickAmt, Q = L && L.length, k = T(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && h(this.min) && h(this.max)) {
- if (Q < Y) {
- for (; L.length < Y; )
- L.length % 2 || this.min === k ? L.push(B(L[L.length - 1] + m)) : L.unshift(B(L[0] - m));
- this.transA *= (Q - 1) / (Y - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
- } else
- Q > Y && (this.tickInterval *= 2, this.setTickPositions());
- if (C(V)) {
- for (m = g = L.length; m--; )
- (V === 3 && m % 2 === 1 || 2 >= V && 0 < m && m < g - 1) && L.splice(m, 1);
- this.finalTickAmt = void 0;
- }
- }
- }, X.prototype.setScale = function() {
- var g = !1, m = !1;
- this.series.forEach(function(Y) {
- g = g || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.xAxis.isDirty || !1;
- }), this.setAxisSize();
- var L = this.len !== (this.old && this.old.len);
- L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, Y, V) {
- var Q = this, k = Q.chart;
- L = T(L, !0), Q.series.forEach(function(G) {
- delete G.kdTree;
- }), V = a(V, { min: g, max: m }), c(Q, "setExtremes", V, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = V, L && k.redraw(Y);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, Y = this.dataMin, V = this.dataMax, Q = this.options, k = Math.min(Y, T(Q.min, Y)), G = Math.max(V, T(Q.max, V));
- return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(z) {
- var $ = z.newMin, q = z.newMax;
- ($ !== L.min || q !== L.max) && (L.allowZoomOutside || (C(Y) && ($ < k && ($ = k), $ > G && ($ = G)), C(V) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof $ < "u" || typeof q < "u", L.setExtremes($, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, V = this.width = Math.round(_(T(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(T(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), k = this.top = Math.round(_(T(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(_(T(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - k, this.right = g.chartWidth - V - m, this.len = Math.max(Y ? V : Q, 0), this.pos = Y ? m : k;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? B(g.lin2log(this.min)) : this.min, max: g ? B(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
- }, X.prototype.getThreshold = function(g) {
- var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
- return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
- }, X.prototype.autoLabelAlign = function(g) {
- var m = (T(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, c(
- this,
- "autoLabelAlign",
- g,
- function(L) {
- 15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
- }
- ), g.align;
- }, X.prototype.tickSize = function(g) {
- var m = this.options, L = T(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && Y) {
- m[g + "Position"] === "inside" && (Y = -Y);
- var V = [Y, L];
- }
- return g = { tickSize: V }, c(this, "afterTickSize", g), g.tickSize;
- }, X.prototype.labelMetrics = function() {
- var g = this.tickPositions && this.tickPositions[0] || 0;
- return this.chart.renderer.fontMetrics(
- this.options.labels.style.fontSize,
- this.ticks[g] && this.ticks[g].label
- );
- }, X.prototype.unsquish = function() {
- var g = this.options.labels, m = this.horiz, L = this.tickInterval, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), V = g.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
- var rt = nt / (Y || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), B(rt * L);
- }, z = L, $, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (h(V))
- var et = [V];
- else
- Y < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === V || nt && -90 <= nt && 90 >= nt) {
- q = G(Math.abs(Q.h / Math.sin(d * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, $ = nt, z = q);
- }
- });
- } else
- g.step || (z = G(Q.h));
- return this.autoRotation = et, this.labelRotation = T($, h(V) ? V : 0), z;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, Y = this.options.labels, V = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && h(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > Y.step)
- return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / V;
- if (!L) {
- if (g = Y.style.width, g !== void 0)
- return parseInt(String(g), 10);
- if (Q)
- return Q - m.spacing[3];
- }
- return 0.33 * m.chartWidth;
- }, X.prototype.renderUnsquish = function() {
- var g = this.chart, m = g.renderer, L = this.tickPositions, Y = this.ticks, V = this.options.labels, Q = V.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * V.padding)), $ = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (o(V.rotation) || ($.rotation = V.rotation || 0), L.forEach(function(gt) {
- gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > z && et > q.h ? $.rotation = this.labelRotation : this.labelRotation = 0;
- else if (G) {
- var nt = z;
- if (!it) {
- var rt = "clip";
- for (z = L.length; !k && z--; ) {
- var ct = L[z];
- (ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- $.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = V.align || this.autoLabelAlign(this.labelRotation)) && ($.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = Y[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr($), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = $.rotation);
- }, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
- }, X.prototype.hasData = function() {
- return this.series.some(function(g) {
- return g.hasData();
- }) || this.options.showEmpty && C(this.min) && C(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, Y = this.opposite, V = this.options.title, Q = this.chart.styledMode, k;
- this.axisTitle || ((k = V.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[V.align]), this.axisTitle = m.text(V.text || "", 0, 0, V.useHTML).attr({ zIndex: 7, rotation: V.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(V.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || V.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
- }, X.prototype.generateTick = function(g) {
- var m = this.ticks;
- m[g] ? m[g].addLabel() : m[g] = new F(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, Y = m.horiz, V = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, $ = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = V.title, rt = V.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = V.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || V.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var ot = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add($);
- };
- m.gridGroup = ot("grid", "-grid", V.gridZIndex), m.axisGroup = ot("axis", "", V.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (G.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, T(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
- tt = Math.max(k[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(k, function(pt, yt) {
- pt.destroy(), delete k[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
- var lt = nt.offset;
- J = C(lt) ? 0 : T(nt.margin, Y ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * T(
- V.offset,
- ct[Q] ? ct[Q] + (V.margin || 0) : 0
- ), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (Y ? T(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = T(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), V = !m.axisLine || V.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
- L[it],
- V
- )), c(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, Y = this.offset, V = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
- return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (g *= -1), m.renderer.crispLine([["M", V ? this.left : Q, V ? Y : this.top], ["L", V ? m.chartWidth - this.right : Q, V ? Y : m.chartHeight - this.bottom]], g);
- }, X.prototype.renderLine = function() {
- this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
- }, X.prototype.getTitlePosition = function() {
- var g = this.horiz, m = this.left, L = this.top, Y = this.len, V = this.options.title, Q = g ? m : L, k = this.opposite, G = this.offset, z = V.x, $ = V.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(V.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (g ? 0 : Y), middle: Q + Y / 2, high: Q + (g ? Y : 0) }[V.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [
- -q,
- q,
- it.f,
- -q
- ][this.side], g = { x: g ? Y + z : m + (k ? this.width : 0) + G + z, y: g ? m + $ - (k ? this.height : 0) + G : Y + $ }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new F(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
- }, X.prototype.renderTick = function(g, m, L) {
- var Y = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (Y[g] || (Y[g] = new F(this, g)), L && Y[g].isNew && Y[g].render(m, !0, -1), Y[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, Y = g.options, V = g.isLinked, Q = g.tickPositions, k = g.axisTitle, G = g.ticks, z = g.minorTicks, $ = g.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = R(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [G, z, $].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || V) {
- var ht = g.chart.hasRendered && g.old && h(g.old.min);
- g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
- g.renderMinorTick(
- at,
- ht
- );
- }), Q.length && (Q.forEach(function(at, J) {
- g.renderTick(at, J, ht);
- }), et && (g.min === 0 || g.single) && (G[-1] || (G[-1] = new F(g, -1, null, !0)), G[-1].render(-1))), it && Q.forEach(function(at, J) {
- dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && ($[at] || ($[at] = new U.PlotLineOrBand(g)), gt = at + et, $[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, $[at].render(), $[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [G, z, $].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(ot, lt) {
- ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
- }), P(function() {
- for (var ot = J.length; ot--; )
- at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
- }, at !== $ && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = g.getTitlePosition(), h(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr(
- "y",
- -9999
- ), k.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, c(this, "afterRender");
- }, X.prototype.redraw = function() {
- this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
- g.render();
- })), this.series.forEach(function(g) {
- g.isDirty = !0;
- });
- }, X.prototype.getKeepProps = function() {
- return this.keepProps || X.keepProps;
- }, X.prototype.destroy = function(g) {
- var m = this, L = m.plotLinesAndBands, Y = this.eventOptions;
- if (c(this, "destroy", { keepEvents: g }), g || D(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- b(Q);
- }), L)
- for (g = L.length; g--; )
- L[g].destroy();
- "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
- m[Q] && (m[Q] = m[Q].destroy());
- });
- for (var V in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[V] = m.plotLinesAndBandsGroups[V].destroy();
- n(m, function(Q, k) {
- m.getKeepProps().indexOf(k) === -1 && delete m[k];
- }), this.eventOptions = Y;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, Y = T(L && L.snap, !0), V = this.chart, Q, k = this.cross;
- if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (C(m) || !Y) !== !1) {
- if (Y ? C(m) && (Q = T(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), C(Q)) {
- var G = { value: m && (this.isXAxis ? m.x : T(m.stackY, m.y)), translatedValue: Q };
- V.polar && a(G, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), G = this.getPlotLinePath(G) || null;
- }
- if (!C(G)) {
- this.hideCrosshair();
- return;
- }
- Y = this.categories && !this.isRadial, k || (this.cross = k = V.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: T(L.zIndex, 2) }).add(), V.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": T(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- c(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
- }, X.prototype.hasVerticalPanning = function() {
- var g = this.chart.options.chart.panning;
- return !!(g && g.enabled && /y/.test(g.type));
- }, X.prototype.validatePositiveValue = function(g) {
- return h(g) && 0 < g;
- }, X.prototype.update = function(g, m) {
- var L = this.chart;
- g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, T(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, Y = this.series, V = Y.length; V--; )
- Y[V] && Y[V].remove(!1);
- w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, k) {
- Q.options.index = Q.userOptions.index = k;
- }), this.destroy(), m.isDirtyBox = !0, T(g, !0) && m.redraw();
- }, X.prototype.setTitle = function(g, m) {
- this.update({ title: g }, m);
- }, X.prototype.setCategories = function(g, m) {
- this.update({ categories: g }, m);
- }, X.defaultOptions = j.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), E(l, "Core/Axis/DateTimeAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.timeUnits, U;
- return function(F) {
- function N() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function R(d) {
- d.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new v(this));
- }
- var S = [];
- F.compose = function(d) {
- return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("dateTime"), d.prototype.getTimeTicks = N, j(
- d,
- "init",
- R
- )), d;
- };
- var v = function() {
- function d(u) {
- this.axis = u;
- }
- return d.prototype.normalizeTimeTickInterval = function(u, A) {
- var O = A || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
- A = O[O.length - 1];
- var B = H[A[0]], C = A[1], b;
- for (b = 0; b < O.length && (A = O[b], B = H[A[0]], C = A[1], !(O[b + 1] && u <= (B * C[C.length - 1] + H[O[b + 1][0]]) / 2)); b++)
- ;
- return B === H.year && u < 5 * B && (C = [1, 2, 5]), u = Z(u / B, C, A[0] === "year" ? Math.max(I(u / B), 1) : 1), { unitRange: B, count: u, unitName: A[0] };
- }, d.prototype.getXDateFormat = function(u, A) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, u, O.options.startOfWeek, A) || A.year : A.day;
- }, d;
- }();
- F.Additions = v;
- }(U || (U = {})), U;
- }), E(l, "Core/Axis/LogarithmicAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.pick, U;
- return function(F) {
- function N(d) {
- var u = this.logarithmic;
- d.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : u || (this.logarithmic = new v(this));
- }
- function R() {
- var d = this.logarithmic;
- d && (this.lin2val = function(u) {
- return d.lin2log(u);
- }, this.val2lin = function(u) {
- return d.log2lin(u);
- });
- }
- var S = [];
- F.compose = function(d) {
- return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("logarithmic"), j(d, "init", N), j(d, "afterInit", R)), d;
- };
- var v = function() {
- function d(u) {
- this.axis = u;
- }
- return d.prototype.getLogTickPositions = function(u, A, O, B) {
- var C = this.axis, b = C.len, w = C.options, x = [];
- if (B || (this.minorAutoInterval = void 0), 0.5 <= u)
- u = Math.round(u), x = C.getLinearTickPositions(u, A, O);
- else if (0.08 <= u) {
- var a = Math.floor(A), c, p = w = void 0;
- for (b = 0.3 < u ? [1, 2, 4] : 0.15 < u ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
- var i = b.length;
- for (c = 0; c < i && !p; c++) {
- var h = this.log2lin(this.lin2log(a) * b[c]);
- h > A && (!B || w <= O) && typeof w < "u" && x.push(w), w > O && (p = !0), w = h;
- }
- }
- } else
- A = this.lin2log(A), O = this.lin2log(O), u = B ? C.getMinorTickInterval() : w.tickInterval, u = H(u === "auto" ? null : u, this.minorAutoInterval, w.tickPixelInterval / (B ? 5 : 1) * (O - A) / ((B ? b / C.tickPositions.length : b) || 1)), u = Z(u, void 0, I(u)), x = C.getLinearTickPositions(u, A, O).map(this.log2lin), B || (this.minorAutoInterval = u / 5);
- return B || (C.tickInterval = u), x;
- }, d.prototype.lin2log = function(u) {
- return Math.pow(10, u);
- }, d.prototype.log2lin = function(u) {
- return Math.log(u) / Math.LN10;
- }, d;
- }();
- F.Additions = v;
- }(U || (U = {})), U;
- }), E(l, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.erase, I = y.extend, Z = y.isNumber, H;
- return function(U) {
- var F = [], N;
- U.compose = function(S, v) {
- return N || (N = S), F.indexOf(v) === -1 && (F.push(v), I(v.prototype, R.prototype)), v;
- };
- var R = function() {
- function S() {
- }
- return S.prototype.getPlotBandPath = function(v, d, u) {
- u === void 0 && (u = this.options);
- var A = this.getPlotLinePath({ value: d, force: !0, acrossPanes: u.acrossPanes }), O = [], B = this.horiz;
- if (d = !Z(this.min) || !Z(this.max) || v < this.min && d < this.min || v > this.max && d > this.max, v = this.getPlotLinePath({ value: v, force: !0, acrossPanes: u.acrossPanes }), u = 1, v && A) {
- if (d) {
- var C = v.toString() === A.toString();
- u = 0;
- }
- for (d = 0; d < v.length; d += 2) {
- var b = v[d], w = v[d + 1], x = A[d], a = A[d + 1];
- b[0] !== "M" && b[0] !== "L" || w[0] !== "M" && w[0] !== "L" || x[0] !== "M" && x[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (B && x[1] === b[1] ? (x[1] += u, a[1] += u) : B || x[2] !== b[2] || (x[2] += u, a[2] += u), O.push(["M", b[1], b[2]], ["L", w[1], w[2]], ["L", a[1], a[2]], ["L", x[1], x[2]], ["Z"])), O.isFlat = C;
- }
- }
- return O;
- }, S.prototype.addPlotBand = function(v) {
- return this.addPlotBandOrLine(v, "plotBands");
- }, S.prototype.addPlotLine = function(v) {
- return this.addPlotBandOrLine(v, "plotLines");
- }, S.prototype.addPlotBandOrLine = function(v, d) {
- var u = this, A = this.userOptions, O = new N(this, v);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (A.plotLines || []).concat(A.plotBands || []).forEach(function(C) {
- u.addPlotBandOrLine(C);
- })), d) {
- var B = A[d] || [];
- B.push(v), A[d] = B;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, S.prototype.removePlotBandOrLine = function(v) {
- var d = this.plotLinesAndBands, u = this.options, A = this.userOptions;
- if (d) {
- for (var O = d.length; O--; )
- d[O].id === v && d[O].destroy();
- [u.plotLines || [], A.plotLines || [], u.plotBands || [], A.plotBands || []].forEach(function(B) {
- for (O = B.length; O--; )
- (B[O] || {}).id === v && j(B, B[O]);
- });
- }
- }, S.prototype.removePlotBand = function(v) {
- this.removePlotBandOrLine(v);
- }, S.prototype.removePlotLine = function(v) {
- this.removePlotBandOrLine(v);
- }, S;
- }();
- }(H || (H = {})), H;
- }), E(l, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [l["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.arrayMax, Z = j.arrayMin, H = j.defined, U = j.destroyObjectProperties, F = j.erase, N = j.fireEvent, R = j.merge, S = j.objectEach, v = j.pick;
- return j = function() {
- function d(u, A) {
- this.axis = u, A && (this.options = A, this.id = A.id);
- }
- return d.compose = function(u) {
- return y.compose(d, u);
- }, d.prototype.render = function() {
- N(this, "render");
- var u = this, A = u.axis, O = A.horiz, B = A.logarithmic, C = u.options, b = C.color, w = v(C.zIndex, 0), x = C.events, a = {}, c = A.chart.renderer, p = C.label, i = u.label, h = C.to, o = C.from, t = C.value, s = u.svgElem, n = [], T = H(o) && H(h);
- n = H(t);
- var _ = !s, D = { class: "highcharts-plot-" + (T ? "band " : "line ") + (C.className || "") }, W = T ? "bands" : "lines";
- if (B && (o = B.log2lin(o), h = B.log2lin(h), t = B.log2lin(t)), A.chart.styledMode || (n ? (D.stroke = b || "#999999", D["stroke-width"] = v(C.width, 1), C.dashStyle && (D.dashstyle = C.dashStyle)) : T && (D.fill = b || "#e6ebf5", C.borderWidth && (D.stroke = C.borderColor, D["stroke-width"] = C.borderWidth))), a.zIndex = w, W += "-" + w, (B = A.plotLinesAndBandsGroups[W]) || (A.plotLinesAndBandsGroups[W] = B = c.g("plot-" + W).attr(a).add()), _ && (u.svgElem = s = c.path().attr(D).add(B)), n)
- n = A.getPlotLinePath({ value: t, lineWidth: s.strokeWidth(), acrossPanes: C.acrossPanes });
- else if (T)
- n = A.getPlotBandPath(
- o,
- h,
- C
- );
- else
- return;
- return !u.eventsAdded && x && (S(x, function(P, X) {
- s.on(X, function(g) {
- x[X].apply(u, [g]);
- });
- }), u.eventsAdded = !0), (_ || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (u.label = i = i.destroy()))), p && (H(p.text) || H(p.formatter)) && n && n.length && 0 < A.width && 0 < A.height && !n.isFlat ? (p = R({ align: O && T && "center", x: O ? !T && 4 : 10, verticalAlign: !O && T && "middle", y: O ? T ? 16 : 10 : T ? 6 : -4, rotation: O && !T && 90 }, p), this.renderLabel(p, n, T, w)) : i && i.hide(), u;
- }, d.prototype.renderLabel = function(u, A, O, B) {
- var C = this.axis, b = C.chart.renderer, w = this.label;
- w || (this.label = w = b.text(this.getLabelText(u), 0, 0, u.useHTML).attr({ align: u.textAlign || u.align, rotation: u.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (u.className || ""), zIndex: B }).add(), C.chart.styledMode || w.css(R({ textOverflow: "ellipsis" }, u.style))), B = A.xBounds || [A[0][1], A[1][1], O ? A[2][1] : A[0][1]], A = A.yBounds || [A[0][2], A[1][2], O ? A[2][2] : A[0][2]], O = Z(B), b = Z(A), w.align(u, !1, { x: O, y: b, width: I(B) - O, height: I(A) - b }), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? C.height - (w.alignAttr.y - C.top) : C.width - (w.alignAttr.x - C.left)) + "px" }), w.show(!0);
- }, d.prototype.getLabelText = function(u) {
- return H(u.formatter) ? u.formatter.call(this) : u.text;
- }, d.prototype.destroy = function() {
- F(this.axis.plotLinesAndBands, this), delete this.axis, U(this);
- }, d;
- }(), j;
- }), E(
- l,
- "Core/Tooltip.js",
- [l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Renderer/RendererUtilities.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H) {
- var U = y.format, F = j.doc, N = I.distribute, R = H.addEvent, S = H.clamp, v = H.css, d = H.defined, u = H.discardElement, A = H.extend, O = H.fireEvent, B = H.isArray, C = H.isNumber, b = H.isString, w = H.merge, x = H.pick, a = H.splat, c = H.syncTimeout;
- return y = function() {
- function p(i, h) {
- this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, h);
- }
- return p.prototype.applyFilter = function() {
- var i = this.chart;
- i.renderer.definition({
- tagName: "filter",
- attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 },
- children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }]
- });
- }, p.prototype.bodyFormatter = function(i) {
- return i.map(function(h) {
- var o = h.series.tooltipOptions;
- return (o[(h.point.formatPrefix || "point") + "Formatter"] || h.point.tooltipFormatter).call(h.point, o[(h.point.formatPrefix || "point") + "Format"] || "");
- });
- }, p.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(h) {
- var o = h && h.tt;
- o && (!o.isActive || i ? h.tt = o.destroy() : o.isActive = !1);
- });
- }, p.prototype.defaultFormatter = function(i) {
- var h = this.points || a(this), o = [i.tooltipFooterHeaderFormatter(h[0])];
- return o = o.concat(i.bodyFormatter(h)), o.push(i.tooltipFooterHeaderFormatter(h[0], !0)), o;
- }, p.prototype.destroy = function() {
- this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), u(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
- }, p.prototype.getAnchor = function(i, h) {
- var o = this.chart, t = o.pointer, s = o.inverted, n = o.plotTop, T = o.plotLeft, _, D, W = 0, P = 0;
- return i = a(i), this.followPointer && h ? (typeof h.chartX > "u" && (h = t.normalize(h)), t = [h.chartX - T, h.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- _ = X.series.yAxis, D = X.series.xAxis, W += X.plotX || 0, P += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (s ? (W += n + o.plotHeight - D.len - D.pos, P += T + o.plotWidth - _.len - _.pos) : (W += D.pos - T, P += _.pos - n));
- }), W /= i.length, P /= i.length, t = [s ? o.plotWidth - P : W, s ? o.plotHeight - W : P], this.shared && 1 < i.length && h && (s ? t[0] = h.chartX - T : t[1] = h.chartY - n)), t.map(Math.round);
- }, p.prototype.getLabel = function() {
- var i = this, h = this.chart.styledMode, o = this.options, t = this.split && this.allowShared, s = "tooltip" + (d(o.className) ? " " + o.className : ""), n = o.style.pointerEvents || (!this.followPointer && o.stickOnContact ? "auto" : "none"), T = function() {
- i.inContact = !0;
- }, _ = function(Y) {
- var V = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && V && V.onMouseOut && V.onMouseOut();
- }, D, W = this.chart.renderer;
- if (i.label) {
- var P = !i.label.hasClass("highcharts-label");
- (t && !P || !t && P) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- P = this.chart.options.chart.style;
- var X = Z.getRendererType();
- this.container = D = j.doc.createElement("div"), D.className = "highcharts-tooltip-container", v(D, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (P && P.zIndex || 0) + 3) }), R(D, "mouseenter", T), R(D, "mouseleave", _), j.doc.body.appendChild(D), this.renderer = W = new X(D, 0, 0, P, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, o.shape, void 0, void 0, o.useHTML, void 0, s).attr({ padding: o.padding, r: o.borderRadius }), h || this.label.attr({
- fill: o.backgroundColor,
- "stroke-width": o.borderWidth
- }).css(o.style).css({ pointerEvents: n }).shadow(o.shadow)), h && o.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
- var g = this.label, m = g.xSetter, L = g.ySetter;
- g.xSetter = function(Y) {
- m.call(g, i.distance), D.style.left = Y + "px";
- }, g.ySetter = function(Y) {
- L.call(g, i.distance), D.style.top = Y + "px";
- };
- }
- this.label.on("mouseenter", T).on("mouseleave", _).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, p.prototype.getPosition = function(i, h, o) {
- var t = this.chart, s = this.distance, n = {}, T = t.inverted && o.h || 0, _ = this.outside, D = _ ? F.documentElement.clientWidth - 2 * s : t.chartWidth, W = _ ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, P = t.pointer.getChartPosition(), X = function(z) {
- var $ = z === "x";
- return [z, $ ? D : W, $ ? i : h].concat(_ ? [$ ? i * P.scaleX : h * P.scaleY, $ ? P.left - s + (o.plotX + t.plotLeft) * P.scaleX : P.top - s + (o.plotY + t.plotTop) * P.scaleY, 0, $ ? D : W] : [$ ? i : h, $ ? o.plotX + t.plotLeft : o.plotY + t.plotTop, $ ? t.plotLeft : t.plotTop, $ ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!o.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var Y = !this.followPointer && x(o.ttBelow, !t.inverted === X), V = function(z, $, q, it, et, nt, rt) {
- var ct = _ ? z === "y" ? s * P.scaleY : s * P.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < $, at = et - ct - q + gt;
- if (et = et + ct - gt, Y && ht)
- n[z] = et;
- else if (!Y && dt)
- n[z] = at;
- else if (dt)
- n[z] = Math.min(rt - it, 0 > at - T ? at : at - T);
- else if (ht)
- n[z] = Math.max(nt, et + T + q > $ ? et : et + T);
- else
- return !1;
- }, Q = function(z, $, q, it, et) {
- var nt;
- return et < s || et > $ - s ? nt = !1 : n[z] = et < q / 2 ? 1 : et > $ - it / 2 ? $ - it - 2 : et - q / 2, nt;
- }, k = function(z) {
- var $ = g;
- g = m, m = $, L = z;
- }, G = function() {
- V.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? n.x = n.y = 0 : (k(!0), G());
- };
- return (t.inverted || 1 < this.len) && k(), G(), n;
- }, p.prototype.hide = function(i) {
- var h = this;
- H.clearTimeout(this.hideTimer), i = x(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
- h.getLabel().fadeOut(i && void 0), h.isHidden = !0;
- }, i));
- }, p.prototype.init = function(i, h) {
- this.chart = i, this.options = h, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = h.split && !i.inverted && !i.polar, this.shared = h.shared || this.split, this.outside = x(h.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, p.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, p.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, p.prototype.move = function(i, h, o, t) {
- var s = this, n = s.now, T = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(h - n.y)), _ = s.followPointer || 1 < s.len;
- A(n, { x: T ? (2 * n.x + i) / 3 : i, y: T ? (n.y + h) / 2 : h, anchorX: _ ? void 0 : T ? (2 * n.anchorX + o) / 3 : o, anchorY: _ ? void 0 : T ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), T && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- s && s.move(i, h, o, t);
- }, 32));
- }, p.prototype.refresh = function(i, h) {
- var o = this.chart, t = this.options, s = a(i), n = s[0], T = [], _ = t.formatter || this.defaultFormatter, D = this.shared, W = o.styledMode, P = {};
- if (t.enabled) {
- H.clearTimeout(this.hideTimer), this.allowShared = !(!B(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, h);
- var X = i[0], g = i[1];
- if (D && this.allowShared ? (o.pointer.applyInactiveState(s), s.forEach(function(Y) {
- Y.setState("hover"), T.push(Y.getLabelConfig());
- }), P = { x: n.category, y: n.y }, P.points = T) : P = n.getLabelConfig(), this.len = T.length, _ = _.call(P, this), D = n.series, this.distance = x(D.tooltipOptions.distance, 16), _ === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(
- _,
- s
- );
- else {
- var m = X, L = g;
- if (h && o.pointer.isDirectTouch && (m = h.chartX - o.plotLeft, L = h.chartY - o.plotTop), o.polar || D.options.clip === !1 || s.some(function(Y) {
- return Y.series.shouldShowTooltip(m, L);
- }))
- h = this.getLabel(), t.style.width && !W || h.css({ width: this.chart.spacingBox.width + "px" }), h.attr({ text: _ && _.join ? _.join("") : _ }), h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + x(n.colorIndex, D.colorIndex)), W || h.attr({ stroke: t.borderColor || n.color || D.color || "#666666" }), this.updatePosition({
- plotX: X,
- plotY: g,
- negative: n.negative,
- ttBelow: n.ttBelow,
- h: i[2] || 0
- });
- else {
- this.hide();
- return;
- }
- }
- this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
- }
- O(this, "refresh");
- }
- }, p.prototype.renderSplit = function(i, h) {
- function o(ht, at, J, tt, ot) {
- return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = S(ht - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = S(ht, ot ? ht : z.left, z.right)), { x: ht, y: at };
- }
- var t = this, s = t.chart, n = t.chart, T = n.chartWidth, _ = n.chartHeight, D = n.plotHeight, W = n.plotLeft, P = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
- g = g === void 0 ? 0 : g;
- var m = n.scrollablePixelsX, L = n.scrollingContainer;
- L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
- var Y = L.scrollLeft;
- L = L.scrollTop;
- var V = n.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: Y, right: Y + T, top: L, bottom: L + _ }, $ = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
- s = X.getChartPosition();
- var et = s.left;
- s = s.top;
- var nt = P + L, rt = 0, ct = D - g;
- b(i) && (i = [!1, i]), i = i.slice(0, h.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = h[J - 1] || { isHeader: !0, plotX: h[0].plotX, plotY: D, series: {} };
- var tt = J.isHeader, ot = tt ? t : J.series;
- at = at.toString();
- var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + x(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: k.padding, r: k.borderRadius }, V || (lt.fill = k.backgroundColor, lt["stroke-width"] = k.borderWidth), lt = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add($)), lt.isActive = !0, lt.attr({ text: at }), V || lt.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
- yt = W + yt;
- var Ct = P + D / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + S(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - P + vt, { ignoreX: !0 }) && (Ct = At.pos + vt);
- }
- yt = S(yt, z.left - Q, z.right + Q), typeof Ct == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : o(
- yt,
- Ct,
- tt,
- at
- ), ht.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: x(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
- }
- return ht;
- }, []), !G && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < z.left && at + ht.boxWidth < z.right ? !0 : at < et - z.left + ht.boxWidth && z.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = o(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return A(ht, { target: at.y, x: at.x });
- })), t.cleanSplit(), N(i, ct);
- var gt = et, dt = et;
- i.forEach(function(ht) {
- var at = ht.x, J = ht.boxWidth;
- ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
- }), i.forEach(function(ht) {
- var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
- if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
- var lt = et - gt;
- 0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = $.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
- }, p.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, h = this.label, o = this.shared ? i.hoverPoints : i.hoverPoint;
- if (h && o) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- o = this.getAnchor(o);
- var s = h.getBBox();
- o[0] += i.plotLeft - h.translateX, o[1] += i.plotTop - h.translateY, t.x = Math.min(0, o[0]), t.y = Math.min(0, o[1]), t.width = 0 > o[0] ? Math.max(Math.abs(o[0]), s.width - o[0]) : Math.max(Math.abs(o[0]), s.width), t.height = 0 > o[1] ? Math.max(Math.abs(o[1]), s.height - Math.abs(o[1])) : Math.max(Math.abs(o[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = h.renderer.rect(t).addClass("highcharts-tracker").add(h), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, p.prototype.styledModeFormat = function(i) {
- return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
- }, p.prototype.tooltipFooterHeaderFormatter = function(i, h) {
- var o = i.series, t = o.tooltipOptions, s = o.xAxis, n = s && s.dateTime;
- s = {
- isFooter: h,
- labelConfig: i
- };
- var T = t.xDateFormat, _ = t[h ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", s, function(D) {
- n && !T && C(i.key) && (T = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && T && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- _ = _.replace("{point." + W + "}", "{point." + W + ":" + T + "}");
- }), o.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = U(_, { point: i, series: o }, this.chart);
- }), s.text;
- }, p.prototype.update = function(i) {
- this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
- }, p.prototype.updatePosition = function(i) {
- var h = this.chart, o = this.options, t = h.pointer, s = this.getLabel();
- t = t.getChartPosition();
- var n = (o.positioner || this.getPosition).call(this, s.width, s.height, i), T = i.plotX + h.plotLeft;
- i = i.plotY + h.plotTop, this.outside && (o = o.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + o, s.height + o, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (v(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), T *= t.scaleX, i *= t.scaleY), T += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), T, i);
- }, p;
- }(), y;
- }
- ), E(l, "Core/Series/Point.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Animation/AnimationUtilities.js"], l["Core/DefaultOptions.js"], l["Core/FormatUtilities.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = j.animObject, F = I.defaultOptions, N = Z.format, R = H.addEvent, S = H.defined, v = H.erase, d = H.extend, u = H.fireEvent, A = H.getNestedProperty, O = H.isArray, B = H.isFunction, C = H.isNumber, b = H.isObject, w = H.merge, x = H.objectEach, a = H.pick, c = H.syncTimeout, p = H.removeEvent, i = H.uniqueKey;
- return j = function() {
- function h() {
- this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
- }
- return h.prototype.animateBeforeDestroy = function() {
- var o = this, t = { x: o.startXPos, opacity: 0 }, s = o.getGraphicalProps();
- s.singular.forEach(function(n) {
- o[n] = o[n].animate(n === "dataLabel" ? {
- x: o[n].startXPos,
- y: o[n].startYPos,
- opacity: 0
- } : t);
- }), s.plural.forEach(function(n) {
- o[n].forEach(function(T) {
- T.element && T.animate(d({ x: o.startXPos }, T.startYPos ? { x: T.startXPos, y: T.startYPos } : {}));
- });
- });
- }, h.prototype.applyOptions = function(o, t) {
- var s = this.series, n = s.options.pointValKey || s.pointValKey;
- return o = h.prototype.optionsToObject.call(this, o), d(this, o), this.options = this.options ? d(this.options, o) : o, o.group && delete this.group, o.dataLabels && delete this.dataLabels, n && (this.y = h.prototype.getNestedProperty.call(this, n)), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !C(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : C(o.x) && s.options.relativeXValue && (this.x = s.autoIncrement(o.x)), this;
- }, h.prototype.destroy = function() {
- function o() {
- (t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
- for (D in t)
- t[D] = null;
- }
- var t = this, s = t.series, n = s.chart;
- s = s.options.dataSorting;
- var T = n.hoverPoints, _ = U(t.series.chart.renderer.globalAnimation), D;
- t.legendItem && n.legend.destroyItem(t), T && (t.setState(), v(T, t), T.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), c(o, _.duration)) : o(), n.pointCount--;
- }, h.prototype.destroyElements = function(o) {
- var t = this;
- o = t.getGraphicalProps(o), o.singular.forEach(function(s) {
- t[s] = t[s].destroy();
- }), o.plural.forEach(function(s) {
- t[s].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[s];
- });
- }, h.prototype.firePointEvent = function(o, t, s) {
- var n = this, T = this.series.options;
- (T.point.events[o] || n.options && n.options.events && n.options.events[o]) && n.importEvents(), o === "click" && T.allowPointSelect && (s = function(_) {
- n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
- }), u(n, o, t, s);
- }, h.prototype.getClassName = function() {
- return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
- }, h.prototype.getGraphicalProps = function(o) {
- var t = this, s = [], n = { singular: [], plural: [] }, T;
- for (o = o || { graphic: 1, dataLabel: 1 }, o.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), o.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), T = s.length; T--; ) {
- var _ = s[T];
- t[_] && n.singular.push(_);
- }
- return ["dataLabel", "connector"].forEach(function(D) {
- var W = D + "s";
- o[D] && t[W] && n.plural.push(W);
- }), n;
- }, h.prototype.getLabelConfig = function() {
- return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
- }, h.prototype.getNestedProperty = function(o) {
- if (o)
- return o.indexOf("custom.") === 0 ? A(o, this.options) : this[o];
- }, h.prototype.getZone = function() {
- var o = this.series, t = o.zones;
- o = o.zoneAxis || "y";
- var s, n = 0;
- for (s = t[n]; this[o] >= s.value; )
- s = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
- }, h.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, h.prototype.init = function(o, t, s) {
- return this.series = o, this.applyOptions(t, s), this.id = S(this.id) ? this.id : i(), this.resolveColor(), o.chart.pointCount++, u(this, "afterInit"), this;
- }, h.prototype.optionsToObject = function(o) {
- var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], T = n.length, _ = {}, D = 0, W = 0;
- if (C(o) || o === null)
- _[n[0]] = o;
- else if (O(o))
- for (!s && o.length > T && (t = typeof o[0], t === "string" ? _.name = o[0] : t === "number" && (_.x = o[0]), D++); W < T; )
- s && typeof o[D] > "u" || (0 < n[W].indexOf(".") ? h.prototype.setNestedProperty(_, o[D], n[W]) : _[n[W]] = o[D]), D++, W++;
- else
- typeof o == "object" && (_ = o, o.dataLabels && (t._hasPointLabels = !0), o.marker && (t._hasPointMarkers = !0));
- return _;
- }, h.prototype.resolveColor = function() {
- var o = this.series, t = o.chart.styledMode, s = o.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, o.options.colorByPoint) {
- if (!t) {
- s = o.options.colors || o.chart.options.colors;
- var n = s[o.colorCounter];
- s = s.length;
- }
- t = o.colorCounter, o.colorCounter++, o.colorCounter === s && (o.colorCounter = 0);
- } else
- t || (n = o.color), t = o.colorIndex;
- this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, n);
- }, h.prototype.setNestedProperty = function(o, t, s) {
- return s.split(".").reduce(function(n, T, _, D) {
- return n[T] = D.length - 1 === _ ? t : b(n[T], !0) ? n[T] : {}, n[T];
- }, o), o;
- }, h.prototype.tooltipFormatter = function(o) {
- var t = this.series, s = t.tooltipOptions, n = a(s.valueDecimals, ""), T = s.valuePrefix || "", _ = s.valueSuffix || "";
- return t.chart.styledMode && (o = t.chart.tooltip.styledModeFormat(o)), (t.pointArrayMap || ["y"]).forEach(function(D) {
- D = "{point." + D, (T || _) && (o = o.replace(RegExp(D + "}", "g"), T + D + "}" + _)), o = o.replace(RegExp(D + "}", "g"), D + ":,." + n + "f}");
- }), N(o, { point: this, series: this.series }, t.chart);
- }, h.prototype.update = function(o, t, s, n) {
- function T() {
- _.applyOptions(o);
- var m = W && _.hasDummyGraphic;
- m = _.y === null ? !m : m, W && m && (_.graphic = W.destroy(), delete _.hasDummyGraphic), b(o, !0) && (W && W.element && o && o.marker && typeof o.marker.symbol < "u" && (_.graphic = W.destroy()), o && o.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, D.updateParallelArrays(_, g), X.data[g] = b(X.data[g], !0) || b(o, !0) ? _.options : a(o, X.data[g]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (P.isDirtyBox = !0), X.legendType === "point" && (P.isDirtyLegend = !0), t && P.redraw(s);
- }
- var _ = this, D = _.series, W = _.graphic, P = D.chart, X = D.options, g;
- t = a(t, !0), n === !1 ? T() : _.firePointEvent("update", { options: o }, T);
- }, h.prototype.remove = function(o, t) {
- this.series.removePoint(this.series.data.indexOf(this), o, t);
- }, h.prototype.select = function(o, t) {
- var s = this, n = s.series, T = n.chart;
- this.selectedStaging = o = a(o, !s.selected), s.firePointEvent(o ? "select" : "unselect", { accumulate: t }, function() {
- s.selected = s.options.selected = o, n.options.data[n.data.indexOf(s)] = s.options, s.setState(o && "select"), t || T.getSelectedPoints().forEach(function(_) {
- var D = _.series;
- _.selected && _ !== s && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(T.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, h.prototype.onMouseOver = function(o) {
- var t = this.series.chart, s = t.pointer;
- o = o ? s.normalize(o) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
- o,
- this
- );
- }, h.prototype.onMouseOut = function() {
- var o = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (o.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), o.hoverPoints = o.hoverPoint = null;
- }, h.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var o = this, t = w(o.series.options.point, o.options).events;
- o.events = t, x(t, function(s, n) {
- B(s) && R(o, n, s);
- }), this.hasImportedEvents = !0;
- }
- }, h.prototype.setState = function(o, t) {
- var s = this.series, n = this.state, T = s.options.states[o || "normal"] || {}, _ = F.plotOptions[s.type].marker && s.options.marker, D = _ && _.enabled === !1, W = _ && _.states && _.states[o || "normal"] || {}, P = W.enabled === !1, X = this.marker || {}, g = s.chart, m = _ && s.markerAttribs, L = s.halo, Y, V = s.stateMarkerGraphic;
- if (o = o || "", !(o === this.state && !t || this.selected && o !== "select" || T.enabled === !1 || o && (P || D && W.enabled === !1) || o && X.states && X.states[o] && X.states[o].enabled === !1)) {
- if (this.state = o, m && (Y = s.markerAttribs(this, o)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), o && this.graphic.addClass("highcharts-point-" + o), !g.styledMode) {
- var Q = s.pointAttribs(this, o), k = a(g.options.chart.animation, T.animation);
- s.options.inactiveOtherPoints && C(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
- G && G.animate({ opacity: Q.opacity }, k);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
- }
- Y && this.graphic.animate(Y, a(g.options.chart.animation, W.animation, _.animation)), V && V.hide();
- } else
- o && W && (n = X.symbol || s.symbol, V && V.currentSymbol !== n && (V = V.destroy()), Y && (V ? V[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : n && (s.stateMarkerGraphic = V = g.renderer.symbol(n, Y.x, Y.y, Y.width, Y.height).add(s.markerGroup), V.currentSymbol = n)), !g.styledMode && V && this.state !== "inactive" && V.attr(s.pointAttribs(this, o))), V && (V[o && this.isInside ? "show" : "hide"](), V.element.point = this, V.addClass(this.getClassName(), !0));
- T = T.halo, Y = (V = this.graphic || V) && V.visibility || "inherit", T && T.size && V && Y !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add(V.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(T.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, g.styledMode || L.attr(d({ fill: this.color || s.color, "fill-opacity": T.opacity }, y.filterUserAttributes(T.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), u(this, "afterSetState", { state: o });
- }
- }, h.prototype.haloPath = function(o) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - o, this.plotY - o, 2 * o, 2 * o);
- }, h;
- }(), j;
- }), E(l, "Core/Pointer.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Tooltip.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = y.parse, U = j.charts, F = j.noop, N = Z.addEvent, R = Z.attr, S = Z.css, v = Z.defined, d = Z.extend, u = Z.find, A = Z.fireEvent, O = Z.isNumber, B = Z.isObject, C = Z.objectEach, b = Z.offset, w = Z.pick, x = Z.splat;
- return y = function() {
- function a(c, p) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
- }
- return a.prototype.applyInactiveState = function(c) {
- var p = [], i;
- (c || []).forEach(function(h) {
- i = h.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(h) {
- p.indexOf(h) === -1 ? h.setState("inactive", !0) : h.options.inactiveOtherPoints && h.setAllPointsToState("inactive");
- });
- }, a.prototype.destroy = function() {
- var c = this;
- this.eventsToUnbind.forEach(function(p) {
- return p();
- }), this.eventsToUnbind = [], j.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), C(c, function(p, i) {
- c[i] = void 0;
- });
- }, a.prototype.drag = function(c) {
- var p = this.chart, i = p.options.chart, h = this.zoomHor, o = this.zoomVert, t = p.plotLeft, s = p.plotTop, n = p.plotWidth, T = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, W = B(i.panning) ? i.panning && i.panning.enabled : i.panning, P = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + T && (g = s + T), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - g, 2)), 10 < this.hasDragged)) {
- var L = p.isInsidePlot(_ - t, D - s, { visiblePlotOnly: !0 });
- !p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || P || m || (this.selectionMarker = m = p.renderer.rect(t, s, h ? 1 : n, o ? 1 : T, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && h && (h = X - _, m.attr({ width: Math.abs(h), x: (0 < h ? 0 : h) + _ })), m && o && (h = g - D, m.attr({ height: Math.abs(h), y: (0 < h ? 0 : h) + D })), L && !m && W && p.pan(c, i.panning);
- }
- }, a.prototype.dragStart = function(c) {
- var p = this.chart;
- p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
- }, a.prototype.drop = function(c) {
- var p = this, i = this.chart, h = this.hasPinched;
- if (this.selectionMarker) {
- var o = this.selectionMarker, t = o.attr ? o.attr("x") : o.x, s = o.attr ? o.attr("y") : o.y, n = o.attr ? o.attr("width") : o.width, T = o.attr ? o.attr("height") : o.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: s, width: n, height: T }, D = !!i.mapView;
- (this.hasDragged || h) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && v(W.min) && (h || p[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
- var P = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((P ? t : s) + X);
- P = W.toValue((P ? t + n : s + T) - X), _[W.coll].push({ axis: W, min: Math.min(g, P), max: Math.max(g, P) }), D = !0;
- }
- }), D && A(i, "selection", _, function(W) {
- i.zoom(d(
- W,
- h ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), h && this.scaleGroups();
- }
- i && O(i.index) && (S(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, a.prototype.findNearestKDPoint = function(c, p, i) {
- var h = this.chart, o = h.hoverPoint;
- if (h = h.tooltip, o && h && h.isStickyOnContact())
- return o;
- var t;
- return c.forEach(function(s) {
- var n = !(s.noSharedTooltip && p) && 0 > s.options.findNearestPointBy.indexOf("y");
- if (s = s.searchPoint(i, n), (n = B(s, !0) && s.series) && !(n = !B(t, !0))) {
- n = t.distX - s.distX;
- var T = t.dist - s.dist, _ = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && p ? n : T !== 0 ? T : _ !== 0 ? _ : t.series.index > s.series.index ? -1 : 1);
- }
- n && (t = s);
- }), t;
- }, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
- var i = c.series, h = i.xAxis;
- i = i.yAxis;
- var o = c.shapeArgs;
- if (h && i) {
- var t = w(c.clientX, c.plotX), s = c.plotY || 0;
- return c.isNode && o && O(o.x) && O(o.y) && (t = o.x, s = o.y), p ? { chartX: i.len + i.pos - s, chartY: h.len + h.pos - t } : { chartX: t + h.pos, chartY: s + i.pos };
- }
- if (o && o.x && o.y)
- return { chartX: o.x, chartY: o.y };
- }, a.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var c = this.chart.container, p = b(c);
- this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
- var i = c.offsetWidth;
- return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
- }, a.prototype.getCoordinates = function(c) {
- var p = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
- }), p;
- }, a.prototype.getHoverData = function(c, p, i, h, o, t) {
- var s = [];
- h = !(!h || !c);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: o };
- A(this, "beforeGetHoverData", n);
- var T = p && !p.stickyTracking ? [p] : i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!o && D.directTouch) && w(D.options.enableMouseTracking, !0) && D.stickyTracking;
- }), _ = h || !t ? c : this.findNearestKDPoint(T, o, t);
- return p = _ && _.series, _ && (o && !p.noSharedTooltip ? (T = i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!o && D.directTouch) && w(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
- }), T.forEach(function(D) {
- var W = u(D.points, function(P) {
- return P.x === _.x && !P.isNull;
- });
- B(W) && (D.chart.isBoosting && (W = D.getPoint(W)), s.push(W));
- })) : s.push(_)), n = { hoverPoint: _ }, A(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: p, hoverPoints: s };
- }, a.prototype.getPointFromEvent = function(c) {
- c = c.target;
- for (var p; c && !p; )
- p = c.point, c = c.parentNode;
- return p;
- }, a.prototype.onTrackerMouseOut = function(c) {
- c = c.relatedTarget || c.toElement;
- var p = this.chart.hoverSeries;
- this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
- }, a.prototype.inClass = function(c, p) {
- for (var i; c; ) {
- if (i = R(c, "class")) {
- if (i.indexOf(p) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- c = c.parentNode;
- }
- }, a.prototype.init = function(c, p) {
- this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = w(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, a.prototype.normalize = function(c, p) {
- var i = c.touches, h = i ? i.length ? i.item(0) : w(i.changedTouches, c.changedTouches)[0] : c;
- return p || (p = this.getChartPosition()), i = h.pageX - p.left, h = h.pageY - p.top, i /= p.scaleX, h /= p.scaleY, d(c, { chartX: Math.round(i), chartY: Math.round(h) });
- }, a.prototype.onContainerClick = function(c) {
- var p = this.chart, i = p.hoverPoint;
- c = this.normalize(c);
- var h = p.plotLeft, o = p.plotTop;
- p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (A(i.series, "click", d(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (d(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - h, c.chartY - o, { visiblePlotOnly: !0 }) && A(p, "click", c)));
- }, a.prototype.onContainerMouseDown = function(c) {
- var p = ((c.buttons || c.button) & 1) === 1;
- c = this.normalize(c), j.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
- }, a.prototype.onContainerMouseLeave = function(c) {
- var p = U[w(a.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, a.prototype.onContainerMouseEnter = function(c) {
- delete this.chartPosition;
- }, a.prototype.onContainerMouseMove = function(c) {
- var p = this.chart;
- c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
- }, a.prototype.onDocumentTouchEnd = function(c) {
- var p = U[w(
- a.hoverChartIndex,
- -1
- )];
- p && p.pointer.drop(c);
- }, a.prototype.onContainerTouchMove = function(c) {
- this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
- }, a.prototype.onContainerTouchStart = function(c) {
- this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
- }, a.prototype.onDocumentMouseMove = function(c) {
- var p = this.chart, i = this.chartPosition;
- c = this.normalize(c, i);
- var h = p.tooltip;
- !i || h && h.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
- }, a.prototype.onDocumentMouseUp = function(c) {
- var p = U[w(a.hoverChartIndex, -1)];
- p && p.pointer.drop(c);
- }, a.prototype.pinch = function(c) {
- var p = this, i = p.chart, h = p.pinchDown, o = c.touches || [], t = o.length, s = p.lastValidTouch, n = p.hasZoom, T = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, W = p.selectionMarker;
- 1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), n && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(o, function(P) {
- return p.normalize(P);
- }), c.type === "touchstart" ? ([].forEach.call(o, function(P, X) {
- h[X] = { chartX: P.chartX, chartY: P.chartY };
- }), s.x = [h[0].chartX, h[1] && h[1].chartX], s.y = [h[0].chartY, h[1] && h[1].chartY], i.axes.forEach(function(P) {
- if (P.zoomEnabled) {
- var X = i.bounds[P.horiz ? "h" : "v"], g = P.minPixelPadding, m = P.toPixels(Math.min(w(P.options.min, P.dataMin), P.dataMin)), L = P.toPixels(Math.max(w(P.options.max, P.dataMax), P.dataMax)), Y = Math.max(m, L);
- X.min = Math.min(P.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(P.pos + P.len, Y + g);
- }
- }), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : h.length && (A(i, "touchpan", { originalEvent: c }, function() {
- W || (p.selectionMarker = W = d({ destroy: F, touch: !0 }, i.plotBox)), p.pinchTranslate(h, o, T, W, D, s), p.hasPinched = n, p.scaleGroups(T, D);
- }), p.res && (p.res = !1, this.reset(!1, 0)));
- }, a.prototype.pinchTranslate = function(c, p, i, h, o, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, h, o, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, h, o, t);
- }, a.prototype.pinchTranslateDirection = function(c, p, i, h, o, t, s, n) {
- var T = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", W = "chart" + D, P = c ? "width" : "height", X = T["plot" + (c ? "Left" : "Top")], g = T.inverted, m = T.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][W], V = !L && p[1][W];
- p = function() {
- typeof $ == "number" && 20 < Math.abs(Y - V) && (G = n || Math.abs(z - $) / Math.abs(Y - V)), k = (X - z) / G + Y, Q = T["plot" + (c ? "Width" : "Height")] / G;
- };
- var Q, k, G = n || 1, z = i[0][W], $ = !L && i[1][W];
- if (p(), i = k, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (z -= 0.8 * (z - s[_][0]), typeof $ == "number" && ($ -= 0.8 * ($ - s[_][1])), p()) : s[_] = [z, $], g || (t[_] = k - X, t[P] = Q), t = g ? 1 / G : G, o[P] = Q, o[_] = i, h[g ? c ? "scaleY" : "scaleX" : "scale" + D] = G, h["translate" + D] = t * X + (z - t * Y);
- }, a.prototype.reset = function(c, p) {
- var i = this.chart, h = i.hoverSeries, o = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : o;
- c && n && x(n).forEach(function(T) {
- T.series.isCartesian && typeof T.plotX > "u" && (c = !1);
- }), c ? s && n && x(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(T) {
- T.setState(T.state, !0), T.series.isCartesian && (T.series.xAxis.crosshair && T.series.xAxis.drawCrosshair(
- null,
- T
- ), T.series.yAxis.crosshair && T.series.yAxis.drawCrosshair(null, T));
- }) : o && (o.setState(o.state, !0), i.axes.forEach(function(T) {
- T.crosshair && o.series[T.coll] === T && T.drawCrosshair(null, o);
- }))) : (o && o.onMouseOut(), t && t.forEach(function(T) {
- T.setState();
- }), h && h.onMouseOut(), s && s.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(T) {
- T.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, a.prototype.runPointActions = function(c, p) {
- var i = this.chart, h = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, o = h ? h.shared : !1, t = p || i.hoverPoint, s = t && t.series || i.hoverSeries;
- p = this.getHoverData(t, s, i.series, (!c || c.type !== "touchmove") && (!!p || s && s.directTouch && this.isDirectTouch), o, c), t = p.hoverPoint, s = p.hoverSeries;
- var n = p.hoverPoints;
- if (p = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, o = o && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || h && h.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(T) {
- n.indexOf(T) === -1 && T.setState();
- }), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(T) {
- T.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), h && h.refresh(o ? n : t, c);
- } else
- p && h && !h.isHidden && (t = h.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && h.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = N(i.container.ownerDocument, "mousemove", function(T) {
- var _ = U[a.hoverChartIndex];
- _ && _.pointer.onDocumentMouseMove(T);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(T) {
- var _ = w((T.crosshair || {}).snap, !0), D;
- _ && ((D = i.hoverPoint) && D.series[T.coll] === T || (D = u(n, function(W) {
- return W.series[T.coll] === T;
- }))), D || !_ ? T.drawCrosshair(c, D) : T.hideCrosshair();
- });
- }, a.prototype.scaleGroups = function(c, p) {
- var i = this.chart;
- i.series.forEach(function(h) {
- var o = c || h.getPlotBox();
- h.group && (h.xAxis && h.xAxis.zoomEnabled || i.mapView) && (h.group.attr(o), h.markerGroup && (h.markerGroup.attr(o), h.markerGroup.clip(p ? i.clipRect : null)), h.dataLabelsGroup && h.dataLabelsGroup.attr(o));
- }), i.clipRect.attr(p || i.clipBox);
- }, a.prototype.setDOMEvents = function() {
- var c = this, p = this.chart.container, i = p.ownerDocument;
- p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(N(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(N(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = N(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var h = this.chart.renderTo.parentElement; h && h.tagName !== "BODY"; )
- this.eventsToUnbind.push(N(h, "scroll", function() {
- delete c.chartPosition;
- })), h = h.parentElement;
- j.hasTouch && (this.eventsToUnbind.push(N(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(N(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = N(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, a.prototype.setHoverChartIndex = function() {
- var c = this.chart, p = j.charts[w(a.hoverChartIndex, -1)];
- p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
- }, a.prototype.touch = function(c, p) {
- var i = this.chart;
- if (this.setHoverChartIndex(), c.touches.length === 1)
- if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (p && this.runPointActions(c), c.type === "touchmove") {
- p = this.pinchDown;
- var h = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
- }
- w(h, !0) && this.pinch(c);
- } else
- p && this.reset();
- else
- c.touches.length === 2 && this.pinch(c);
- }, a.prototype.touchSelect = function(c) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
- }, a.prototype.zoomOption = function(c) {
- var p = this.chart, i = p.options.chart;
- p = p.inverted;
- var h = i.zoomType || "";
- /touch/.test(c.type) && (h = w(i.pinchType, h)), this.zoomX = c = /x/.test(h), this.zoomY = i = /y/.test(h), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
- }, a;
- }(), y;
- }), E(l, "Core/MSPointer.js", [l["Core/Globals.js"], l["Core/Pointer.js"], l["Core/Utilities.js"]], function(y, j, I) {
- function Z() {
- var C = [];
- return C.item = function(b) {
- return this[b];
- }, u(O, function(b) {
- C.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
- }), C;
- }
- function H(C, b, w, x) {
- var a = F[j.hoverChartIndex || NaN];
- C.pointerType !== "touch" && C.pointerType !== C.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, x(C), a[b]({ type: w, target: C.currentTarget, preventDefault: R, touches: Z() }));
- }
- var U = this && this.__extends || function() {
- var C = function(b, w) {
- return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
- x.__proto__ = a;
- } || function(x, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (x[c] = a[c]);
- }, C(b, w);
- };
- return function(b, w) {
- function x() {
- this.constructor = b;
- }
- C(b, w), b.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }(), F = y.charts, N = y.doc, R = y.noop, S = y.win, v = I.addEvent, d = I.css, u = I.objectEach, A = I.removeEvent, O = {}, B = !!S.PointerEvent;
- return function(C) {
- function b() {
- return C !== null && C.apply(this, arguments) || this;
- }
- return U(b, C), b.isRequired = function() {
- return !(y.hasTouch || !S.PointerEvent && !S.MSPointerEvent);
- }, b.prototype.batchMSEvents = function(w) {
- w(this.chart.container, B ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, B ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(N, B ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, b.prototype.destroy = function() {
- this.batchMSEvents(A), C.prototype.destroy.call(this);
- }, b.prototype.init = function(w, x) {
- C.prototype.init.call(this, w, x), this.hasZoom && d(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, b.prototype.onContainerPointerDown = function(w) {
- H(w, "onContainerTouchStart", "touchstart", function(x) {
- O[x.pointerId] = { pageX: x.pageX, pageY: x.pageY, target: x.currentTarget };
- });
- }, b.prototype.onContainerPointerMove = function(w) {
- H(w, "onContainerTouchMove", "touchmove", function(x) {
- O[x.pointerId] = {
- pageX: x.pageX,
- pageY: x.pageY
- }, O[x.pointerId].target || (O[x.pointerId].target = x.currentTarget);
- });
- }, b.prototype.onDocumentPointerUp = function(w) {
- H(w, "onDocumentTouchEnd", "touchend", function(x) {
- delete O[x.pointerId];
- });
- }, b.prototype.setDOMEvents = function() {
- C.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(v);
- }, b;
- }(j);
- }), E(l, "Core/Legend/Legend.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Series/Point.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U) {
- var F = y.animObject, N = y.setAnimation, R = j.format;
- y = I.isFirefox;
- var S = I.marginNames;
- I = I.win;
- var v = H.distribute, d = U.addEvent, u = U.createElement, A = U.css, O = U.defined, B = U.discardElement, C = U.find, b = U.fireEvent, w = U.isNumber, x = U.merge, a = U.pick, c = U.relativeLength, p = U.stableSort, i = U.syncTimeout;
- return H = U.wrap, U = function() {
- function h(o, t) {
- this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = o, this.init(o, t);
- }
- return h.prototype.init = function(o, t) {
- this.chart = o, this.setOptions(t), t.enabled && (this.render(), d(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = d(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, h.prototype.setOptions = function(o) {
- var t = a(o.padding, 8);
- this.options = o, this.chart.styledMode || (this.itemStyle = o.itemStyle, this.itemHiddenStyle = x(this.itemStyle, o.itemHiddenStyle)), this.itemMarginTop = o.itemMarginTop || 0, this.itemMarginBottom = o.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
- o.symbolWidth,
- 16
- ), this.pages = [], this.proximate = o.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, h.prototype.update = function(o, t) {
- var s = this.chart;
- this.setOptions(x(!0, this.options, o)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, a(t, !0) && s.redraw(), b(this, "afterUpdate");
- }, h.prototype.colorizeItem = function(o, t) {
- if (o.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var s = this.options, n = o.legendItem, T = o.legendLine, _ = o.legendSymbol, D = this.itemHiddenStyle.color;
- s = t ? s.itemStyle.color : D;
- var W = t && o.color || D, P = o.options && o.options.marker, X = { fill: W };
- n && n.css({ fill: s, color: s }), T && T.attr({ stroke: W }), _ && (P && _.isMarker && (X = o.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
- }
- b(this, "afterColorizeItem", { item: o, visible: t });
- }, h.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, h.prototype.positionItem = function(o) {
- var t = this, s = this.options, n = s.symbolPadding, T = !s.rtl, _ = o._legendItemPos;
- s = _[0], _ = _[1];
- var D = o.checkbox, W = o.legendGroup;
- W && W.element && (n = { translateX: T ? s : this.legendWidth - s - 2 * n - 4, translateY: _ }, T = function() {
- b(t, "afterPositionItem", { item: o });
- }, O(W.translateY) ? W.animate(n, void 0, T) : (W.attr(n), T())), D && (D.x = s, D.y = _);
- }, h.prototype.destroyItem = function(o) {
- var t = o.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
- o[s] && (o[s] = o[s].destroy());
- }), t && B(o.checkbox);
- }, h.prototype.destroy = function() {
- function o(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(o, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(o, this), this.display = null;
- }, h.prototype.positionCheckboxes = function() {
- var o = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
- if (o) {
- var n = o.translateY;
- this.allItems.forEach(function(T) {
- var _ = T.checkbox;
- if (_) {
- var D = n + s + _.y + (this.scrollOffset || 0) + 3;
- A(_, { left: o.translateX + T.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > n - 6 && D < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, h.prototype.renderTitle = function() {
- var o = this.options, t = this.padding, s = o.title, n = 0;
- s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, o.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), o = this.title.getBBox(), n = o.height, this.offsetWidth = o.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, h.prototype.setText = function(o) {
- var t = this.options;
- o.legendItem.attr({ text: t.labelFormat ? R(t.labelFormat, o, this.chart) : t.labelFormatter.call(o) });
- }, h.prototype.renderItem = function(o) {
- var t = this.chart, s = t.renderer, n = this.options, T = this.symbolWidth, _ = n.symbolPadding || 0, D = this.itemStyle, W = this.itemHiddenStyle, P = n.layout === "horizontal" ? a(n.itemDistance, 20) : 0, X = !n.rtl, g = !o.series, m = !g && o.series.drawLegendSymbol ? o.series : o, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, V = n.useHTML, Q = o.options.className, k = o.legendItem;
- L = T + _ + P + (Y ? 20 : 0), k || (o.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + o.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + o.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), o.legendItem = k = s.text("", X ? T + _ : -_, this.baseline || 0, V), t.styledMode || k.css(x(o.visible ? D : W)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(o.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = a(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + P + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, o), this.setItemEvents && this.setItemEvents(o, k, V)), Y && !o.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(o), this.colorizeItem(o, o.visible), !t.styledMode && D.width || k.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(o), t = k.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, o.itemWidth = o.checkboxOffset = n.itemWidth || o.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, o.itemWidth), this.totalItemWidth += o.itemWidth, this.itemHeight = o.itemHeight = Math.round(o.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
- }, h.prototype.layoutItem = function(o) {
- var t = this.options, s = this.padding, n = t.layout === "horizontal", T = o.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, W = n ? a(t.itemDistance, 20) : 0, P = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > P ? this.maxItemWidth : o.itemWidth, n && this.itemX - s + t > P && (this.itemX = s, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(T, this.lastLineHeight), o._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += D + T + _, this.lastLineHeight = T), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (o.checkbox ? 0 : W) : t) + s, this.offsetWidth);
- }, h.prototype.getAllItems = function() {
- var o = [];
- return this.chart.series.forEach(function(t) {
- var s = t && t.options;
- t && a(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (o = o.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
- }), b(this, "afterGetAllItems", { allItems: o }), o;
- }, h.prototype.getAlignment = function() {
- var o = this.options;
- return this.proximate ? o.align.charAt(0) + "tv" : o.floating ? "" : o.align.charAt(0) + o.verticalAlign.charAt(0) + o.layout.charAt(0);
- }, h.prototype.adjustMargins = function(o, t) {
- var s = this.chart, n = this.options, T = this.getAlignment();
- T && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
- _.test(T) && !O(o[D]) && (s[S[D]] = Math.max(s[S[D]], s.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * n[D % 2 ? "x" : "y"] + a(n.margin, 12) + t[D] + (s.titleOffset[D] || 0)));
- });
- }, h.prototype.proximatePositions = function() {
- var o = this.chart, t = [], s = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var T, _ = s;
- if (n.yAxis) {
- n.xAxis.options.reversed && (_ = !_), n.points && (T = C(_ ? n.points : n.points.slice(0).reverse(), function(W) {
- return w(W.plotY);
- })), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var D = n.yAxis.top - o.plotTop;
- n.visible ? (T = T ? T.plotY : n.yAxis.height, T += D - 0.3 * _) : T = D + n.yAxis.height, t.push({ target: T, size: _, item: n });
- }
- }, this), v(t, o.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = o.plotTop - o.spacing[0] + n.pos);
- });
- }, h.prototype.render = function() {
- var o = this.chart, t = o.renderer, s = this.options, n = this.padding, T = this.getAllItems(), _ = this.group, D = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(s.width, o.spacingBox.width - n);
- var W = o.spacingBox.width - 2 * n - s.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, _ || (this.group = _ = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(T, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), s.reversed && T.reverse(), this.allItems = T, this.display = W = !!T.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, T.forEach(this.renderItem, this), T.forEach(this.layoutItem, this), T = (this.widthOption || this.offsetWidth) + n;
- var P = this.lastItemY + this.lastLineHeight + this.titleHeight;
- P = this.handleOverflow(P), P += n, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(_), D.isNew = !0), o.styledMode || D.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < T && 0 < P && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: T, height: P }, D.strokeWidth())), D.isNew = !1), D[W ? "show" : "hide"](), o.styledMode && _.getStyle("display") === "none" && (T = P = 0), this.legendWidth = T, this.legendHeight = P, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
- }, h.prototype.align = function(o) {
- o === void 0 && (o = this.chart.spacingBox);
- var t = this.chart, s = this.options, n = o.y;
- /(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== o.y && (o = x(o, { y: n })), this.group.align(x(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, o);
- }, h.prototype.handleOverflow = function(o) {
- var t = this, s = this.chart, n = s.renderer, T = this.options, _ = T.y, D = T.verticalAlign === "top", W = this.padding, P = T.maxHeight, X = T.navigation, g = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, V = function(q) {
- typeof q == "number" ? $.attr({ height: q }) : $ && (t.clipRect = $.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
- }, Q = function(q) {
- return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(z), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, k, G;
- _ = s.spacingBox.height + (D ? -_ : _) - W;
- var z = this.nav, $ = this.clipRect;
- return T.layout !== "horizontal" || T.verticalAlign === "middle" || T.floating || (_ /= 2), P && (_ = Math.min(_, P)), L.length = 0, o && 0 < _ && o > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - W, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = o, Y.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
- }), $ || ($ = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip($)), V(k), z || (this.nav = z = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = n.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), o = _) : z && (V(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), o;
- }, h.prototype.scroll = function(o, t) {
- var s = this, n = this.chart, T = this.pages, _ = T.length, D = this.clipHeight, W = this.options.navigation, P = this.pager, X = this.padding, g = this.currentPage + o;
- g > _ && (g = _), 0 < g && (typeof t < "u" && N(t, n), this.nav.attr({ translateX: X, translateY: D + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
- m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- }), P.attr({ text: g + "/" + _ }), [this.down, this.downTracker].forEach(
- function(m) {
- m.attr({ x: 18 + this.pager.getBBox().width, class: g === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- },
- this
- ), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === _ ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === _ ? "default" : "pointer" })), this.scrollOffset = -T[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), o = F(a(t, n.renderer.globalAnimation, !0)), i(function() {
- b(s, "afterScroll", { currentPage: g });
- }, o.duration));
- }, h.prototype.setItemEvents = function(o, t, s) {
- var n = this, T = n.chart.renderer.boxWrapper, _ = o instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", W = n.chart.styledMode, P = function(X) {
- n.allItems.forEach(function(g) {
- o !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !_);
- });
- });
- };
- (s ? [t, o.legendSymbol] : [o.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- o.visible && P("inactive"), o.setState("hover"), o.visible && T.addClass(D), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(x(o.visible ? n.itemStyle : n.itemHiddenStyle)), P(""), T.removeClass(D), o.setState();
- }).on("click", function(g) {
- var m = function() {
- o.setVisible && o.setVisible(), P(o.visible ? "inactive" : "");
- };
- T.removeClass(D), g = { browserEvent: g }, o.firePointEvent ? o.firePointEvent("legendItemClick", g, m) : b(o, "legendItemClick", g, m);
- });
- });
- }, h.prototype.createCheckboxForItem = function(o) {
- o.checkbox = u(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: o.selected, defaultChecked: o.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), d(o.checkbox, "click", function(t) {
- b(o.series || o, "checkboxClick", { checked: t.target.checked, item: o }, function() {
- o.select();
- });
- });
- }, h;
- }(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && H(U.prototype, "positionItem", function(h, o) {
- var t = this, s = function() {
- o._legendItemPos && h.call(t, o);
- };
- s(), t.bubbleLegend || setTimeout(s);
- }), U;
- }), E(
- l,
- "Core/Series/SeriesRegistry.js",
- [l["Core/Globals.js"], l["Core/DefaultOptions.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = j.defaultOptions, U = Z.error, F = Z.extendClass, N = Z.merge, R;
- return function(S) {
- function v(d, u) {
- var A = H.plotOptions || {}, O = u.defaultOptions;
- u.prototype.pointClass || (u.prototype.pointClass = I), u.prototype.type = d, O && (A[d] = O), S.seriesTypes[d] = u;
- }
- S.seriesTypes = y.seriesTypes, S.getSeries = function(d, u) {
- u === void 0 && (u = {});
- var A = d.options.chart;
- A = u.type || A.type || A.defaultSeriesType || "";
- var O = S.seriesTypes[A];
- return S || U(17, !0, d, { missingModuleFor: A }), A = new O(), typeof A.init == "function" && A.init(d, u), A;
- }, S.registerSeriesType = v, S.seriesType = function(d, u, A, O, B) {
- var C = H.plotOptions || {};
- return u = u || "", C[d] = N(C[u], A), v(d, F(S.seriesTypes[u] || function() {
- }, O)), S.seriesTypes[d].prototype.type = d, B && (S.seriesTypes[d].prototype.pointClass = F(I, B)), S.seriesTypes[d];
- };
- }(R || (R = {})), R;
- }
- ), E(l, "Core/Chart/Chart.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/Axis.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/Legend.js"],
- l["Core/MSPointer.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Pointer.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Time.js"],
- l["Core/Utilities.js"],
- l["Core/Renderer/HTML/AST.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S, v, d, u, A, O) {
- var B = y.animate, C = y.animObject, b = y.setAnimation, w = I.numberFormat, x = Z.registerEventOptions, a = H.charts, c = H.doc, p = H.marginNames, i = H.svg, h = H.win, o = N.defaultOptions, t = N.defaultTime, s = v.seriesTypes, n = A.addEvent, T = A.attr, _ = A.cleanRecursively, D = A.createElement, W = A.css, P = A.defined, X = A.discardElement, g = A.erase, m = A.error, L = A.extend, Y = A.find, V = A.fireEvent, Q = A.getStyle, k = A.isArray, G = A.isNumber, z = A.isObject, $ = A.isString, q = A.merge, it = A.objectEach, et = A.pick, nt = A.pInt, rt = A.relativeLength, ct = A.removeEvent, gt = A.splat, dt = A.syncTimeout, ht = A.uniqueKey;
- return y = function() {
- function at(J, tt, ot) {
- this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
- }
- return at.chart = function(J, tt, ot) {
- return new at(J, tt, ot);
- }, at.prototype.getArgs = function(J, tt, ot) {
- $(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var ot = J.plotOptions || {};
- V(this, "init", { args: arguments }, function() {
- var lt = q(o, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- z(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
- }), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new u(J.time) : H.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), H.chartCount++, x(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, V(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var ot = s[tt];
- return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
- }, at.prototype.setSeriesData = function() {
- this.getSeriesOrderByLinks().forEach(function(J) {
- J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
- });
- }, at.prototype.getSeriesOrderByLinks = function() {
- return this.series.concat().sort(function(J, tt) {
- return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
- });
- }, at.prototype.orderSeries = function(J) {
- var tt = this.series;
- J = J || 0;
- for (var ot = tt.length; J < ot; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, ot) {
- ot === void 0 && (ot = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, At = 0;
- ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = ot.series;
- if (pt = ot.visiblePlotOnly && Ct || pt, Ct = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Ct = ot.paneCoordinates ? Dt.pos + Ct : yt + Ct, Ct >= Math.max(Pt + yt, Dt.pos) && Ct <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
- }
- return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), V(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- V(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
- for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
- var Dt = ot[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var Lt = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = ot.length; J--; )
- Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
- ot.forEach(function(Et) {
- Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && V(Et, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
- Et.updateNames(), Et.setScale();
- }), this.getMargins(), tt.forEach(function(Et) {
- Et.isDirty && (At = !0);
- }), tt.forEach(function(Et) {
- var Kt = Et.min + "," + Et.max;
- Et.extKey !== Kt && (Et.extKey = Kt, Pt.push(function() {
- V(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
- })), (At || Lt) && Et.redraw();
- }), At && this.drawChartBox(), V(this, "predraw"), ot.forEach(function(Et) {
- (At || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), V(this, "redraw"), V(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Et) {
- Et.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var ot = this.series, lt = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
- lt = Y(ot[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), V(this, "getAxes"), ot.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), ot.concat(tt).forEach(function(lt) {
- new j(J, lt);
- }), V(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(ot) {
- et(ot.selectedStaging, ot.selected) && J.push(ot);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, ot) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(ot);
- }, at.prototype.applyDescription = function(J, tt) {
- var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
- lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
- var pt = this[J];
- pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
- ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
- }, this.styledMode || pt.css(lt.style), this[J] = pt);
- }, at.prototype.layOutTitles = function(J) {
- var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
- ["title", "subtitle", "caption"].forEach(function(yt) {
- var vt = this[yt], Ct = this.options[yt], Pt = Ct.verticalAlign || "top";
- yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
- var At;
- if (vt) {
- this.styledMode || (At = Ct.style && Ct.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Ct.width || lt.width + (Ct.widthAdjust || 0)) + "px" });
- var St = Math.round(vt.getBBox(Ct.useHTML).height);
- vt.align(
- L({ y: Pt === "bottom" ? At : yt + At, height: St }, Ct),
- !1,
- "spacingBox"
- ), Ct.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
- }
- }, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
- var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
- this.titleOffset = tt, V(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
- }, at.prototype.getChartSize = function() {
- var J = this.options.chart, tt = J.width;
- J = J.height;
- var ot = this.renderTo;
- P(tt) || (this.containerWidth = Q(ot, "width")), P(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
- }, at.prototype.temporaryDisplay = function(J) {
- var tt = this.renderTo;
- if (J)
- for (; tt && tt.style; )
- tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), $(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(T(pt, "data-highcharts-chart"));
- G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), T(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
- var vt = this.chartHeight;
- if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = D("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? S.getRendererType(tt.renderer) : d)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
- void 0,
- this
- ), this.setClassName(tt.className), this.styledMode)
- for (var Ct in J.defs)
- this.renderer.definition(J.defs[Ct]);
- else
- this.renderer.setStyle(tt.style);
- this.renderer.chartIndex = this.index, V(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !P(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !P(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- ot,
- tt
- ), V(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), p.forEach(function(yt, vt) {
- P(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = P(ot.width) && P(ot.height), yt = ot.width || Q(lt, "width");
- ot = ot.height || Q(lt, "height"), lt = J ? J.target : h, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === h || lt === c) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (A.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(h, "resize", function(ot) {
- tt.options && tt.reflow(ot);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, ot) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? B : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, V(lt, "resize"), dt(function() {
- lt && V(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, C(ot).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, At, St, Dt;
- this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(Lt) {
- Lt.setAxisSize(), Lt.setAxisTranslation();
- }), ot.alignElements()), V(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- V(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(ot) {
- var lt = tt[ot], pt = z(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[ot][vt] = et(tt[ot + yt], pt[vt]);
- });
- }), p.forEach(function(ot, lt) {
- J[ot] = et(J.margin[lt], J.spacing[lt]);
- }), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
- }, at.prototype.drawChartBox = function() {
- var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "attr"), pt)
- var Vt = be = Gt.strokeWidth();
- else
- Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
- Gt[zt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[zt](Jt.crisp({ x: At, y: St, width: Dt, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, V(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
- (pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(ot) {
- ot.linkedSeries.length = 0;
- }), tt.forEach(function(ot) {
- var lt = ot.options.linkedTo;
- $(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
- }), V(this, "afterLinkSeries");
- }, at.prototype.renderSeries = function() {
- this.series.forEach(function(J) {
- J.translate(), J.render();
- });
- }, at.prototype.renderLabels = function() {
- var J = this, tt = J.options.labels;
- tt.items && tt.items.forEach(function(ot) {
- var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new U(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
- if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
- return yt = 21, !0;
- });
- var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
- J.forEach(function(At) {
- At.setScale();
- }), this.getAxisMargins();
- var Ct = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
- (Ct || Pt) && (J.forEach(function(At) {
- (At.horiz && Ct || !At.horiz && Pt) && At.setTickInterval(!0);
- }), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
- }, at.prototype.addCredits = function(J) {
- var tt = this, ot = q(!0, this.options.credits, J);
- ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- ot.href && (h.location.href = ot.href);
- }).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for (V(J, "destroy"), J.renderer.forExport ? g(a, J) : a[J.index] = void 0, H.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
- tt[yt] = tt[yt].destroy();
- for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
- ot[yt] = ot[yt].destroy();
- "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
- var Ct = J[vt];
- Ct && Ct.destroy && (J[vt] = Ct.destroy());
- }), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Ct) {
- delete J[Ct];
- });
- }, at.prototype.firstRender = function() {
- var J = this, tt = J.options;
- (!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (k(tt.series) ? tt.series : []).forEach(function(ot) {
- J.initSeries(ot);
- }), J.linkSeries(), J.setSeriesData(), V(J, "beforeRender"), R && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new R(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
- }, at.prototype.onload = function() {
- this.callbacks.concat([this.callback]).forEach(function(J) {
- J && typeof this.index < "u" && J.apply(this, [this]);
- }, this), V(this, "load"), V(this, "render"), P(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, ot) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), V(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), V(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, ot, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, ot) {
- return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: ot });
- }, at.prototype.createAxis = function(J, tt) {
- return J = new j(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
- }, at.prototype.showLoading = function(J) {
- var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
- yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
- }, yt = tt.loadingDiv, vt = tt.loadingSpan;
- yt || (tt.loadingDiv = yt = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D(
- "span",
- { className: "highcharts-loading-inner" },
- null,
- yt
- ), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), B(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
- }, at.prototype.hideLoading = function() {
- var J = this.options, tt = this.loadingDiv;
- tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || B(tt, { opacity: 0 }, {
- duration: J.loading.hideDuration || 100,
- complete: function() {
- W(tt, { display: "none" });
- }
- })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, ot, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, At;
- V(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(J, pt.options), pt.userOptions = q(pt.userOptions, J);
- var St = J.chart;
- if (St) {
- if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
- pt.propFromSeries();
- var Dt = !0;
- }
- "alignTicks" in St && (Dt = !0), "events" in St && x(this, St), it(St, function(Lt, Nt) {
- pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
- }), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
- }
- !pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new u(J.time)), q(!0, pt.options.time, J.time)), it(J, function(Lt, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
- }), this.collectionsWithUpdate.forEach(function(Lt) {
- if (J[Lt]) {
- var Nt = [];
- pt[Lt].forEach(function(Et, Kt) {
- Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
- }), gt(J[Lt]).forEach(function(Et, Kt) {
- var Gt = P(Et.id), Wt;
- Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && P(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
- }), ot && pt[Lt].forEach(function(Et) {
- Et.touched || Et.options.isInternal ? delete Et.touched : Ct.push(Et);
- });
- }
- }), Ct.forEach(function(Lt) {
- Lt.chart && Lt.remove && Lt.remove(!1);
- }), Dt && pt.axes.forEach(function(Lt) {
- Lt.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
- Lt.chart && Lt.update({}, !1);
- }, this), Dt = St && St.width, St = St && ($(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || G(Dt) && Dt !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), V(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
- }, at.prototype.setSubtitle = function(J, tt) {
- this.applyDescription("subtitle", J), this.layOutTitles(tt);
- }, at.prototype.setCaption = function(J, tt) {
- this.applyDescription("caption", J), this.layOutTitles(tt);
- }, at.prototype.showResetZoom = function() {
- function J() {
- tt.zoomOut();
- }
- var tt = this, ot = o.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- V(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), V(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- V(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
- yt = Ct.zoom();
- }), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
- var Pt = Ct.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, Lt = !1;
- (!Dt && lt >= At && lt <= St || Dt || !P(lt)) && (Lt = !0), ot[Dt ? "zoomX" : "zoomY"] && Lt && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && z(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
- tt.options.chart.animation,
- J && J.animation,
- 100 > tt.pointCount
- ));
- }, at.prototype.pan = function(J, tt) {
- var ot = this, lt = ot.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Ct;
- V(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = ot.xAxis;
- vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, Lt = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = ot[Dt], Et = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var zt = St.panningState;
- !Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
- var Me = Vt.getProcessedData(!0);
- Me = Vt.getExtremes(Me.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Me.dataMin) && G(Me.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, zt.startMax));
- }), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Ct = !0), At[Dt] = Lt);
- }
- }), it(At, function(St, Dt) {
- ot[Dt] = St;
- }), Ct && ot.redraw(!1), W(ot.container, { cursor: "move" });
- });
- }, at;
- }(), L(y.prototype, {
- callbacks: [],
- collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
- collectionsWithUpdate: ["xAxis", "yAxis", "series"],
- propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
- propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
- propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
- }), y;
- }), E(l, "Core/Legend/LegendSymbol.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.merge, I = y.pick, Z;
- return function(H) {
- H.drawLineMarker = function(U) {
- var F = this.options, N = U.symbolWidth, R = U.symbolHeight, S = R / 2, v = this.chart.renderer, d = this.legendGroup;
- U = U.baseline - Math.round(0.3 * U.fontMetrics.b);
- var u = {}, A = F.marker;
- this.chart.styledMode || (u = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (u.dashstyle = F.dashStyle)), this.legendLine = v.path([["M", 0, U], ["L", N, U]]).addClass("highcharts-graph").attr(u).add(d), A && A.enabled !== !1 && N && (F = Math.min(I(A.radius, S), S), this.symbol.indexOf("url") === 0 && (A = j(A, { width: R, height: R }), F = 0), this.legendSymbol = N = v.symbol(this.symbol, N / 2 - F, U - F, 2 * F, 2 * F, A).addClass("highcharts-point").add(d), N.isMarker = !0);
- }, H.drawRectangle = function(U, F) {
- var N = U.symbolHeight, R = U.options.squareSymbol;
- F.legendSymbol = this.chart.renderer.rect(R ? (U.symbolWidth - N) / 2 : 0, U.baseline - N + 1, R ? N : U.symbolWidth, N, I(U.options.symbolRadius, N / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
- };
- }(Z || (Z = {})), Z;
- }), E(l, "Core/Series/SeriesDefaults.js", [], function() {
- return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
- select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
- } }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
- var y = this.series.chart.numberFormatter;
- return typeof this.y != "number" ? "" : y(this.y, -1);
- }, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
- select: { animation: { duration: 0 } },
- inactive: { animation: { duration: 50 }, opacity: 0.2 }
- }, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
- }), E(l, "Core/Series/Series.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Point.js"],
- l["Core/Series/SeriesDefaults.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S) {
- var v = y.animObject, d = y.setAnimation, u = j.defaultOptions, A = I.registerEventOptions, O = Z.hasTouch, B = Z.svg, C = Z.win, b = N.seriesTypes, w = S.addEvent, x = S.arrayMax, a = S.arrayMin, c = S.clamp, p = S.cleanRecursively, i = S.correctFloat, h = S.defined, o = S.erase, t = S.error, s = S.extend, n = S.find, T = S.fireEvent, _ = S.getNestedProperty, D = S.isArray, W = S.isNumber, P = S.isString, X = S.merge, g = S.objectEach, m = S.pick, L = S.removeEvent, Y = S.splat, V = S.syncTimeout;
- return y = function() {
- function Q() {
- this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
- }
- return Q.prototype.init = function(k, G) {
- T(this, "init", { options: G });
- var z = this, $ = k.series;
- this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), s(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), A(this, G);
- var q = G.events;
- (q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
- z[et + "Data"] || (z[et + "Data"] = []);
- }), z.isCartesian && (k.hasCartesianSeries = !0);
- var it;
- $.length && (it = $[$.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert($)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), T(this, "afterInit");
- }, Q.prototype.is = function(k) {
- return b[k] && this instanceof b[k];
- }, Q.prototype.insert = function(k) {
- var G = this.options.index, z;
- if (W(G)) {
- for (z = k.length; z--; )
- if (G >= m(k[z].options.index, k[z]._i)) {
- k.splice(z + 1, 0, this);
- break;
- }
- z === -1 && k.unshift(this), z += 1;
- } else
- k.push(this);
- return m(z, k.length - 1);
- }, Q.prototype.bindAxes = function() {
- var k = this, G = k.options, z = k.chart, $;
- T(this, "bindAxes", null, function() {
- (k.axisTypes || []).forEach(function(q) {
- var it = 0;
- z[q].forEach(function(et) {
- $ = et.options, (G[q] === it && !$.isInternal || typeof G[q] < "u" && G[q] === $.id || typeof G[q] > "u" && $.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), $.isInternal || it++;
- }), k[q] || k.optionalAxis === q || t(18, !0, z);
- });
- }), T(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(k, G) {
- var z = k.series, $ = arguments, q = W(G) ? function(it) {
- var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
- z[it + "Data"][G] = et;
- } : function(it) {
- Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call($, 2));
- };
- z.parallelArrays.forEach(q);
- }, Q.prototype.hasData = function() {
- return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
- }, Q.prototype.autoIncrement = function(k) {
- var G = this.options, z = G.pointIntervalUnit, $ = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), $ && W(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), $ && W(k) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var k = this.options;
- s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), h(k.pointRange) || (k.pointRange = 1);
- }, Q.prototype.setOptions = function(k) {
- var G = this.chart, z = G.options, $ = z.plotOptions, q = G.userOptions || {};
- k = X(k), G = G.styledMode;
- var it = { plotOptions: $, userOptions: k };
- T(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, $.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(u.tooltip, u.plotOptions.series && u.plotOptions.series.tooltip, u.plotOptions[this.type].tooltip, z.tooltip.userOptions, $.series && $.series.tooltip, $[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, $ = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), $.push(z)), $.length && h($[$.length - 1].value) && $.push(G ? {} : { color: this.color, fillColor: this.fillColor }), T(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(k, G, z) {
- var $ = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m($.options.chart[k + "Count"], $[k + "Count"]);
- if (!G) {
- var rt = m(q[it], q["_" + it]);
- h(rt) || ($.series.length || ($[et] = 0), q["_" + it] = rt = $[et] % nt, $[et] += 1), z && (G = z[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[k] = G;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || u.plotOptions[this.type].color, this.chart.options.colors);
- }, Q.prototype.getPointsCollection = function() {
- return (this.hasGroupedData ? this.points : this.data) || [];
- }, Q.prototype.getSymbol = function() {
- this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
- }, Q.prototype.findPointIndex = function(k, G) {
- var z = k.id, $ = k.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (z)
- it = this.chart.get(z), it instanceof U && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === k.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === k.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === k.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W($) && (rt = this.xData.indexOf($, G)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
- }, Q.prototype.updateData = function(k, G) {
- var z = this.options, $ = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, k.forEach(function(ht, at) {
- var J = h(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
- J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== z.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || $ && $.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (k = q.length; k--; )
- (ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
- else
- !nt || $ && $.enabled ? dt = !1 : (k.forEach(function(ht, at) {
- ht !== q[at].y && q[at].update && q[at].update(
- ht,
- !1,
- null,
- !1
- );
- }), it.length = 0);
- return q.forEach(function(ht) {
- ht && (ht.touched = !1);
- }), dt ? (it.forEach(function(ht) {
- this.addPoint(ht, !1, null, null, !1);
- }, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = x(this.xData), this.autoIncrement()), !0) : !1;
- }, Q.prototype.setData = function(k, G, z, $) {
- var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
- J = J && J.length;
- var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
- k = k || [];
- var vt = k.length;
- if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), $ !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(k, z)), !ot) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
- q[Ct + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(k), W(yt))
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else if (D(yt))
- if (J)
- if (yt.length === J)
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[0], at[z] = $.slice(
- 1,
- J + 1
- );
- else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z][pt];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[lt], at[z] = $[pt];
- else
- t(12, !1, rt);
- else
- for (z = 0; z < vt; z++)
- typeof k[z] < "u" && ($ = { series: q }, q.pointClass.prototype.applyOptions.apply($, [k[z]]), q.updateParallelArrays($, z));
- for (at && P(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
- it[z] && it[z].destroy && it[z].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
- }, Q.prototype.sortData = function(k) {
- var G = this, z = G.options.dataSorting.sortKey || "y", $ = function(q, it) {
- return h(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return k.forEach(function(q, it) {
- k[it] = $(G, q), k[it].index = it;
- }, this), k.concat().sort(function(q, it) {
- return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = $(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), k;
- }, Q.prototype.getProcessedData = function(k) {
- var G = this.xAxis, z = this.options, $ = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
- k = G && G.val2lin, z = !(!G || !G.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (G) {
- gt = G.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = G.categories && !G.names.length;
- }
- if (it && this.sorted && !q && (!$ || dt > $ || this.forceCrop)) {
- if (nt[dt - 1] < ht || nt[0] > at)
- nt = [], rt = [];
- else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
- var J = this.cropData(this.xData, this.yData, ht, at);
- nt = J.xData, rt = J.yData, et = J.start, J = !0;
- }
- }
- for ($ = nt.length || 1; --$; )
- if (G = z ? k(nt[$]) - k(nt[$ - 1]) : nt[$] - nt[$ - 1], 0 < G && (typeof tt > "u" || G < tt))
- var tt = G;
- else
- 0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(k) {
- var G = this.xAxis;
- if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
- return !1;
- k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, T(this, "afterProcessData");
- }, Q.prototype.cropData = function(k, G, z, $, q) {
- var it = k.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (k[et] >= z) {
- nt = Math.max(0, et - q);
- break;
- }
- for (z = et; z < it; z++)
- if (k[z] > $) {
- rt = z + q;
- break;
- }
- return { xData: k.slice(nt, rt), yData: G.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var k = this.options, G = k.data, z = this.processedXData, $ = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
- k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = G.length, ht = this.data = at;
- }
- for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
- if (at = et + dt, nt) {
- var J = new q().init(this, [z[dt]].concat(Y($[dt])));
- J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof G[at] > "u" || (ht[at] = J = new q().init(this, G[at], z[dt]));
- J && (J.index = nt ? k + dt : at, ct[dt] = J);
- }
- if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
- for (dt = 0; dt < gt; dt++)
- dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
- this.data = ht, this.points = ct, T(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(k) {
- return { min: a(k), max: x(k) };
- }, Q.prototype.getExtremes = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- $ = $ ? $.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- k = k || this.stackedYData || this.processedYData || [];
- var dt = k.length;
- if (z) {
- var ht = z.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = k[nt];
- var J = (W(ht) || D(ht)) && (ht.length || 0 < ht || !$);
- if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
- if (J = ht.length)
- for (; J--; )
- W(ht[J]) && (it[gt++] = ht[J]);
- else
- it[gt++] = ht;
- }
- return k = { activeYData: it, dataMin: a(it), dataMax: x(it) }, T(this, "afterGetExtremes", { dataExtremes: k }), k;
- }, Q.prototype.applyExtremes = function() {
- var k = this.getExtremes();
- return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
- }, Q.prototype.getFirstValidPoint = function(k) {
- for (var G = k.length, z = 0, $ = null; $ === null && z < G; )
- $ = k[z], z++;
- return $;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var k = this.options, G = k.stacking, z = this.xAxis, $ = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Ct = ot.low, Pt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(c(z.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (D(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && At.key === Pt[lt].base && (Ct = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = h(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = c(
- pt,
- -1e5,
- 1e5
- ))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(z.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (k[ht + "Threshold"] || gt || 0), ot.category = $ && typeof $[ot.x] < "u" ? $[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
- }
- this.closestPointRangePx = tt, T(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(k, G, z) {
- var $ = this.chart;
- return (k || this.points || []).filter(function(q) {
- return G && !$.isInsidePlot(q.plotX, q.plotY, { inverted: $.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis, $ = X(k.clipBox);
- return G && G.len !== k.plotSizeX && ($.width = G.len), z && z.len !== k.plotSizeY && ($.height = z.len), $;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var k = this.chart, G = this.group, z = this.markerGroup, $ = k.sharedClips;
- k = k.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = $[it];
- et ? et.animate(q) : $[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
- }, Q.prototype.animate = function(k) {
- var G = this.chart, z = this.group, $ = this.markerGroup, q = G.inverted, it = v(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
- if (k && z)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), $ && $.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- G = this.getClipBox();
- var ct = it.step;
- $ && $.element.childNodes.length && (it.step = function(gt, dt) {
- ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
- }), nt.addClass("highcharts-animating").animate(G, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var k = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(G, z, $) {
- G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete $[z]);
- }
- ), this.finishedAnimating = !0, T(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var k = this.points, G = this.chart, z = this.options.marker, $ = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
- if (z.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < k.length; et++) {
- var rt = k[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
- if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
- var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
- this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
- var J = rt.isInside !== !1;
- nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = G.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : z).add($), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
- } else
- nt && (rt.graphic = nt.destroy());
- }
- }, Q.prototype.markerAttribs = function(k, G) {
- var z = this.options, $ = z.marker, q = k.marker || {}, it = q.symbol || $.symbol, et = m(q.radius, $.radius);
- return G && ($ = $.states[G], G = q.states && q.states[G], et = m(G && G.radius, $ && $.radius, et + ($ && $.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
- }, Q.prototype.pointAttribs = function(k, G) {
- var z = this.options.marker, $ = k && k.options, q = $ && $.marker || {}, it = $ && $.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
- return k = m(q.lineWidth, z.lineWidth), $ = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, $ = m(G.opacity, z.opacity, $), { stroke: et, "stroke-width": k, fill: it, opacity: $ };
- }, Q.prototype.destroy = function(k) {
- var G = this, z = G.chart, $ = /AppleWebKit\/533/.test(C.navigator.userAgent), q = G.data || [], it, et, nt, rt;
- for (T(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
- (rt = G[ct]) && rt.series && (o(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
- }), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- G.clips && G.clips.forEach(function(ct) {
- return ct.destroy();
- }), S.clearTimeout(G.animationTimeout), g(G, function(ct, gt) {
- ct instanceof R && !ct.survive && (it = $ && gt === "group" ? "hide" : "destroy", ct[it]());
- }), z.hoverSeries === G && (z.hoverSeries = void 0), o(z.series, G), z.orderSeries(), g(G, function(ct, gt) {
- k && gt === "hcEvents" || delete G[gt];
- });
- }, Q.prototype.applyZones = function() {
- var k = this, G = this.chart, z = G.renderer, $ = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
- if ($.length && (it || et) && rt && typeof rt.min < "u") {
- var yt = rt.reversed, vt = rt.horiz;
- it && !this.showLine && it.hide(), et && et.hide();
- var Ct = rt.getExtremes();
- $.forEach(function(Pt, At) {
- gt = yt ? vt ? G.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Pt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = G.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = G.plotWidth - ht.y)), ct && z.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: G.chartWidth
- } : { x: ht.y - G.plotLeft - G.spacingBox.x, y: 0, width: ht.height, height: G.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = z.clipRect(ht), ot = k["zone-area-" + At], lt = k["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Ct.max, k.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- k.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(k) {
- function G() {
- ["group", "markerGroup"].forEach(function(q) {
- z[q] && ($.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
- });
- }
- var z = this, $ = z.chart;
- z.xAxis && (z.eventsToUnbind.push(w($, "resize", G)), G(), z.invertGroups = G);
- }, Q.prototype.plotGroup = function(k, G, z, $, q) {
- var it = this[k], et = !it;
- return z = { visibility: z, zIndex: $ || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (h(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis;
- return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(k) {
- k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
- G();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var k = this, G = k.chart, z = k.options, $ = v(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
- G = !k.finishedAnimating && G.renderer.isSVG ? $.duration : 0, T(this, "render");
- var ct = k.plotGroup("group", "series", q, it, nt);
- k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && $.defer && (G += $.defer), k.animationTimeout = V(function() {
- k.afterAnimate();
- }, G || 0)), k.isDirty = !1, k.hasRendered = !0, T(k, "afterRender");
- }, Q.prototype.redraw = function() {
- var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, $ = this.xAxis, q = this.yAxis;
- z && (k.inverted && z.attr({
- width: k.plotWidth,
- height: k.plotHeight
- }), z.animate({ translateX: m($ && $.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
- }, Q.prototype.searchPoint = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? $.len - k.chartX + $.pos : k.chartY - $.pos }, G, k);
- }, Q.prototype.buildKDTree = function(k) {
- function G(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = z.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var z = this, $ = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete z.kdTree, V(function() {
- z.kdTree = G(z.getValidPoints(null, !z.directTouch), $, $), z.buildingKdTree = !1;
- }, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(k, G, z) {
- function $(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = h(rt[it]) && h(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = h(rt[et]) && h(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return ot = (tt || 0) + (ot || 0), ht.dist = h(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = h(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = $(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = $(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
- }
- var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = G ? "distX" : "dist";
- if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
- return $(
- k,
- this.kdTree,
- G,
- G
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var k = this.options, G = k.pointRange, z = this.xAxis;
- return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), W(k) ? k * (G || z.pointRange) : 0;
- }, Q.prototype.isPointInside = function(k) {
- var G = this.chart, z = this.xAxis, $ = this.yAxis;
- return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= ($ ? $.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var k = this, G = k.options, z = G.trackByArea, $ = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
- q.hoverSeries !== k && k.onMouseOver();
- }, gt = "rgba(192,192,192," + (B ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: $ }) : k.graph && (k.tracker = et.path($).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
- })), T(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(k, G, z, $, q) {
- var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
- rt = rt && rt.hasNames && rt.names;
- var ct = it.data, gt = this.xData, dt;
- G = m(G, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [k]
- );
- var at = ht.x, J = gt.length;
- if (this.requireSorting && at < gt[J - 1])
- for (dt = !0; J && gt[J - 1] > at; )
- J--;
- this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && T(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, G && nt.redraw($);
- }, Q.prototype.removePoint = function(k, G, z) {
- var $ = this, q = $.data, it = q[k], et = $.points, nt = $.chart, rt = function() {
- et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), $.options.data.splice(k, 1), $.updateParallelArrays(it || { series: $ }, "splice", k, 1), it && it.destroy(), $.isDirty = !0, $.isDirtyData = !0, G && nt.redraw();
- };
- d(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(k, G, z, $) {
- function q() {
- it.destroy($), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
- }
- var it = this, et = it.chart;
- z !== !1 ? T(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(k, G) {
- k = p(k, this.userOptions), T(this, "update", { options: k });
- var z = this, $ = z.chart, q = z.userOptions, it = z.initialType || z.type, et = $.options.plotOptions, nt = b[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = k.type || q.type || $.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.hasOptionChanged("keys"));
- if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), k.data && (k.dataSorting && s(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = z[tt], delete z[tt];
- }), et = !1, b[ht]) {
- if (et = ht !== z.type, z.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(z, b[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
- for (gt in nt)
- z[gt] = void 0;
- s(z, b[ht].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
- }
- } else
- t(17, !0, $, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- z[tt] = dt[tt];
- }), z.init($, k), at && this.points) {
- var J = z.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
- tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && $.legend.destroyItem(tt));
- }, this);
- }
- z.initialType = it, $.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), T(this, "afterUpdate"), m(G, !0) && $.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(k) {
- this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(k) {
- var G = this.options[k], z = this.chart.options.plotOptions, $ = this.userOptions[k];
- return $ ? G !== $ : G !== m(
- z && z[this.type] && z[this.type][k],
- z && z.series && z.series[k],
- G
- );
- }, Q.prototype.onMouseOver = function() {
- var k = this.chart, G = k.hoverSeries;
- k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && T(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var k = this.options, G = this.chart, z = G.tooltip, $ = G.hoverPoint;
- G.hoverSeries = null, $ && $.onMouseOut(), this && k.events.mouseOut && T(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(k, G) {
- var z = this, $ = z.options, q = z.graph, it = $.inactiveOtherPoints, et = $.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = $.lineWidth, ct = 0, gt = $.opacity;
- if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
- dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
- }), z.state = k, !z.chart.styledMode)) {
- if (et[k] && et[k].enabled === !1)
- return;
- if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
- for ($ = { "stroke-width": rt }, q.animate($, nt); z["zone-graph-" + ct]; )
- z["zone-graph-" + ct].animate($, nt), ct += 1;
- it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- G && it && z.points && z.setAllPointsToState(k || void 0);
- }, Q.prototype.setAllPointsToState = function(k) {
- this.points.forEach(function(G) {
- G.setState && G.setState(k);
- });
- }, Q.prototype.setVisible = function(k, G) {
- var z = this, $ = z.chart, q = z.legendItem, it = $.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- z[rt] && z[rt][nt]();
- }), ($.hoverSeries === z || ($.hoverPoint && $.hoverPoint.series) === z) && z.onMouseOut(), q && $.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && $.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), z.linkedSeries.forEach(function(rt) {
- rt.setVisible(k, !1);
- }), it && ($.isDirtyBox = !0), T(z, nt), G !== !1 && $.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(k) {
- this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), T(this, k ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(k, G, z) {
- return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
- }, Q.defaultOptions = F, Q;
- }(), s(y.prototype, { axisTypes: [
- "xAxis",
- "yAxis"
- ], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: H.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: U, requireSorting: !0, sorted: !0 }), N.series = y, y;
- }), E(l, "Extensions/ScrollablePlotArea.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/Series/Series.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- var F = y.stop, N = U.addEvent, R = U.createElement, S = U.merge, v = U.pick;
- N(I, "afterSetChartSize", function(d) {
- var u = this.options.chart.scrollablePlotArea, A = u && u.minWidth;
- if (u = u && u.minHeight, !this.renderer.forExport) {
- if (A) {
- if (this.scrollablePixelsX = A = Math.max(0, A - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.width = this.plotWidth += A, this.inverted ? this.clipBox.height += A : this.clipBox.width += A;
- var O = { 1: { name: "right", value: A } };
- }
- } else
- u && (this.scrollablePixelsY = A = Math.max(
- 0,
- u - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.height = this.plotHeight += A, this.inverted ? this.clipBox.width += A : this.clipBox.height += A, O = { 2: { name: "bottom", value: A } });
- O && !d.skipAxes && this.axes.forEach(function(B) {
- O[B.side] ? B.getPlotLinePath = function() {
- var C = O[B.side].name, b = this[C];
- this[C] = b - O[B.side].value;
- var w = j.prototype.getPlotLinePath.apply(this, arguments);
- return this[C] = b, w;
- } : (B.setAxisSize(), B.setAxisTranslation());
- });
- }
- }), N(I, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), I.prototype.setUpScrolling = function() {
- var d = this, u = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (u.overflowX = "auto"), this.scrollablePixelsY && (u.overflowY = "auto"), this.scrollingParent = R("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = R(
- "div",
- { className: "highcharts-scrolling" },
- u,
- this.scrollingParent
- ), N(this.scrollingContainer, "scroll", function() {
- d.pointer && delete d.pointer.chartPosition;
- }), this.innerContainer = R("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, I.prototype.moveFixedElements = function() {
- var d = this.container, u = this.fixedRenderer, A = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
- this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && A.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), A.forEach(function(B) {
- [].forEach.call(d.querySelectorAll(B), function(C) {
- (C.namespaceURI === u.SVG_NS ? u.box : u.box.parentNode).appendChild(C), C.style.pointerEvents = "auto";
- });
- });
- }, I.prototype.applyFixed = function() {
- var d = !this.fixedDiv, u = this.options.chart, A = u.scrollablePlotArea, O = H.getRendererType();
- d ? (this.fixedDiv = R("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (u.style && u.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = u = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = u.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": v(A.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), N(this, "afterShowResetZoom", this.moveFixedElements), N(this, "afterDrilldown", this.moveFixedElements), N(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || d) && (this.scrollableDirty = !1, this.moveFixedElements()), u = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = u + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: u, height: O, viewBox: [0, 0, u, O].join(" ") }), this.chartBackground.attr({ width: u, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", d && (A.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * A.scrollPositionX), A.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * A.scrollPositionY)), O = this.axisOffset, d = this.plotTop - O[0] - 1, A = this.plotLeft - O[3] - 1, u = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var B = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), C = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- d = this.scrollablePixelsX ? [["M", 0, d], ["L", this.plotLeft - 1, d], ["L", this.plotLeft - 1, u], ["L", 0, u], ["Z"], ["M", B, d], ["L", this.chartWidth, d], ["L", this.chartWidth, u], ["L", B, u], ["Z"]] : this.scrollablePixelsY ? [["M", A, 0], ["L", A, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", A, C], ["L", A, this.chartHeight], ["L", O, this.chartHeight], ["L", O, C], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d });
- }, N(j, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), N(Z, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), E(l, "Core/Axis/StackingAxis.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = I.addEvent, U = I.destroyObjectProperties, F = I.fireEvent, N = I.isNumber, R = I.objectEach, S;
- return function(v) {
- function d() {
- var B = this.stacking;
- if (B) {
- var C = B.stacks;
- R(C, function(b, w) {
- U(b), C[w] = null;
- }), B && B.stackTotalGroup && B.stackTotalGroup.destroy();
- }
- }
- function u() {
- this.stacking || (this.stacking = new O(this));
- }
- var A = [];
- v.compose = function(B) {
- return A.indexOf(B) === -1 && (A.push(B), H(B, "init", u), H(B, "destroy", d)), B;
- };
- var O = function() {
- function B(C) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = C;
- }
- return B.prototype.buildStacks = function() {
- var C = this.axis, b = C.series, w = C.options.reversedStacks, x = b.length, a;
- if (!C.isXAxis) {
- for (this.usePercentage = !1, a = x; a--; ) {
- var c = b[w ? a : x - a - 1];
- c.setStackedPoints(), c.setGroupedPoints();
- }
- for (a = 0; a < x; a++)
- b[a].modifyStacks();
- F(C, "afterBuildStacks");
- }
- }, B.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var C = this.stacks = this.oldStacks;
- R(C, function(b) {
- R(b, function(w) {
- w.cumulative = w.total;
- });
- });
- }
- }, B.prototype.resetStacks = function() {
- var C = this, b = C.stacks;
- C.axis.isXAxis || R(b, function(w) {
- R(
- w,
- function(x, a) {
- N(x.touched) && x.touched < C.stacksTouched ? (x.destroy(), delete w[a]) : (x.total = null, x.cumulative = null);
- }
- );
- });
- }, B.prototype.renderStackTotals = function() {
- var C = this.axis, b = C.chart, w = b.renderer, x = this.stacks;
- C = Z(b, C.options.stackLabels && C.options.stackLabels.animation || !1);
- var a = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- a.translate(b.plotLeft, b.plotTop), R(x, function(c) {
- R(c, function(p) {
- p.render(a);
- });
- }), a.animate(
- { opacity: 1 },
- C
- );
- }, B;
- }();
- v.Additions = O;
- }(S || (S = {})), S;
- }), E(l, "Extensions/Stacking.js", [l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Axis/StackingAxis.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F) {
- var N = I.format, R = F.correctFloat, S = F.defined, v = F.destroyObjectProperties, d = F.isArray, u = F.isNumber, A = F.objectEach, O = F.pick, B = function() {
- function C(b, w, x, a, c) {
- var p = b.chart.inverted;
- this.axis = b, this.isNegative = x, this.options = w = w || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (p ? x ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (p ? "middle" : x ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (p ? x ? "right" : "left" : "center");
- }
- return C.prototype.destroy = function() {
- v(this, this.axis);
- }, C.prototype.render = function(b) {
- var w = this.axis.chart, x = this.options, a = x.format;
- a = a ? N(a, this, w) : x.formatter.call(this), this.label ? this.label.attr({
- text: a,
- visibility: "hidden"
- }) : (this.label = w.renderer.label(a, null, null, x.shape, null, null, x.useHTML, !1, "stack-labels"), a = { r: x.borderRadius || 0, text: a, rotation: x.rotation, padding: O(x.padding, 5), visibility: "hidden" }, w.styledMode || (a.fill = x.backgroundColor, a.stroke = x.borderColor, a["stroke-width"] = x.borderWidth, this.label.css(x.style)), this.label.attr(a), this.label.added || this.label.add(b)), this.label.labelrank = w.plotSizeY;
- }, C.prototype.setOffset = function(b, w, x, a, c) {
- var p = this.axis, i = p.chart;
- a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), x = p.translate(x || 0), x = S(a) && Math.abs(a - x), b = O(c, i.xAxis[0].translate(this.x)) + b, p = S(a) && this.getStackBox(i, this, b, a, w, x, p), w = this.label, x = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
- var h = this.textAlign;
- w && p && (c = w.getBBox(), a = w.padding, h = h === "left" ? i.inverted ? -a : a : h === "right" ? c.width : i.inverted && h === "center" ? c.width / 2 : i.inverted ? x ? c.width + a : -a : c.width / 2, x = i.inverted ? c.height / 2 : x ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= h, p.y -= x, w.align(this.alignOptions, null, p), i.isInsidePlot(w.alignAttr.x + h - this.alignOptions.x, w.alignAttr.y + x - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, b = !1), b && H.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, c, p), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = u(w.x) && u(w.y) && i.isInsidePlot(w.x - a + w.width, w.y) && i.isInsidePlot(w.x + a, w.y)) || w.hide()));
- }, C.prototype.getStackBox = function(b, w, x, a, c, p, i) {
- var h = w.axis.reversed, o = b.inverted, t = i.height + i.pos - (o ? b.plotLeft : b.plotTop);
- return w = w.isNegative && !h || !w.isNegative && h, { x: o ? w ? a - i.right : a - p + i.pos - b.plotLeft : x + b.xAxis[0].transB - b.plotLeft, y: o ? i.height - x - c : w ? t - a - p : t - a, width: o ? p : c, height: o ? c : p };
- }, C;
- }();
- return j.prototype.getStacks = function() {
- var C = this, b = C.inverted;
- C.yAxis.forEach(function(w) {
- w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
- }), C.series.forEach(function(w) {
- var x = w.xAxis && w.xAxis.options || {};
- !w.options.stacking || w.visible !== !0 && C.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), b ? x.top : x.left, b ? x.height : x.width].join());
- });
- }, U.compose(y), H.prototype.setGroupedPoints = function() {
- var C = this.yAxis.stacking;
- this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? H.prototype.setStackedPoints.call(this, "group") : C && A(C.stacks, function(b, w) {
- w.slice(-5) === "group" && (A(b, function(x) {
- return x.destroy();
- }), delete C.stacks[w]);
- });
- }, H.prototype.setStackedPoints = function(C) {
- var b = C || this.options.stacking;
- if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var w = this.processedXData, x = this.processedYData, a = [], c = x.length, p = this.options, i = p.threshold, h = O(p.startFromThreshold && i, 0);
- p = p.stack, C = C ? this.type + "," + b : this.stackKey;
- var o = "-" + C, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, T = s.stacking.oldStacks, _, D;
- for (s.stacking.stacksTouched += 1, D = 0; D < c; D++) {
- var W = w[D], P = x[D], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (_ = t && P < (h ? 0 : i)) ? o : C;
- n[m] || (n[m] = {}), n[m][W] || (T[m] && T[m][W] ? (n[m][W] = T[m][W], n[m][W].total = null) : n[m][W] = new B(s, s.options.stackLabels, _, W, p)), m = n[m][W], P !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, h)], S(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (_ = _ ? C : o, t && n[_] && n[_][W] ? (_ = n[_][W], m.total = _.total = Math.max(_.total, m.total) + Math.abs(P) || 0) : m.total = R(m.total + (Math.abs(P) || 0))) : b === "group" ? (d(P) && (P = P[0]), P !== null && (m.total = (m.total || 0) + 1)) : m.total = R(m.total + (P || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, h) + (P || 0), P !== null && (m.points[g].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
- }
- b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = a), s.stacking.oldStacks = {};
- }
- }, H.prototype.modifyStacks = function() {
- var C = this, b = C.stackKey, w = C.yAxis.stacking.stacks, x = C.processedXData, a, c = C.options.stacking;
- C[c + "Stacker"] && [b, "-" + b].forEach(function(p) {
- for (var i = x.length, h, o; i--; )
- h = x[i], a = C.getStackIndicator(a, h, C.index, p), (o = (h = w[p] && w[p][h]) && h.points[a.key]) && C[c + "Stacker"](o, h, i);
- });
- }, H.prototype.percentStacker = function(C, b, w) {
- b = b.total ? 100 / b.total : 0, C[0] = R(C[0] * b), C[1] = R(C[1] * b), this.stackedYData[w] = C[1];
- }, H.prototype.getStackIndicator = function(C, b, w, x) {
- return !S(C) || C.x !== b || x && C.key !== x ? C = { x: b, index: 0, key: x } : C.index++, C.key = [w, b, C.index].join(), C;
- }, Z.StackItem = B, Z.StackItem;
- }), E(l, "Series/Line/LineSeries.js", [l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), H = I.defined, U = I.merge;
- return I = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.data = void 0, R.options = void 0, R.points = void 0, R;
- }
- return Z(N, F), N.prototype.drawGraph = function() {
- var R = this, S = this.options, v = (this.gappedPath || this.getGraphPath).call(this), d = this.chart.styledMode, u = [["graph", "highcharts-graph"]];
- d || u[0].push(S.lineColor || this.color || "#cccccc", S.dashStyle), u = R.getZonesGraphs(u), u.forEach(function(A, O) {
- var B = A[0], C = R[B], b = C ? "animate" : "attr";
- C ? (C.endX = R.preventGraphAnimation ? null : v.xMap, C.animate({ d: v })) : v.length && (R[B] = C = R.chart.renderer.path(v).addClass(A[1]).attr({ zIndex: 1 }).add(R.group)), C && !d && (B = { stroke: A[2], "stroke-width": S.lineWidth, fill: R.fillGraph && R.color || "none" }, A[3] ? B.dashstyle = A[3] : S.linecap !== "square" && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), C[b](B).shadow(2 > O && S.shadow)), C && (C.startX = v.xMap, C.isArea = v.isArea);
- });
- }, N.prototype.getGraphPath = function(R, S, v) {
- var d = this, u = d.options, A = [], O = [], B, C = u.step;
- R = R || d.points;
- var b = R.reversed;
- return b && R.reverse(), (C = { right: 1, center: 2 }[C] || C && 3) && b && (C = 4 - C), R = this.getValidPoints(R, !1, !(u.connectNulls && !S && !v)), R.forEach(function(w, x) {
- var a = w.plotX, c = w.plotY, p = R[x - 1];
- (w.leftCliff || p && p.rightCliff) && !v && (B = !0), w.isNull && !H(S) && 0 < x ? B = !u.connectNulls : w.isNull && !S ? B = !0 : (x === 0 || B ? x = [["M", w.plotX, w.plotY]] : d.getPointSpline ? x = [d.getPointSpline(R, w, x)] : C ? (x = C === 1 ? [["L", p.plotX, c]] : C === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], x.push(["L", a, c])) : x = [["L", a, c]], O.push(w.x), C && (O.push(w.x), C === 2 && O.push(w.x)), A.push.apply(A, x), B = !1);
- }), A.xMap = O, d.graphPath = A;
- }, N.prototype.getZonesGraphs = function(R) {
- return this.zones.forEach(function(S, v) {
- v = ["zone-graph-" + v, "highcharts-graph highcharts-zone-graph-" + v + " " + (S.className || "")], this.chart.styledMode || v.push(S.color || this.color, S.dashStyle || this.options.dashStyle), R.push(v);
- }, this), R;
- }, N.defaultOptions = U(y.defaultOptions, {}), N;
- }(y), j.registerSeriesType("line", I), I;
- }), E(l, "Series/Area/AreaSeries.js", [
- l["Core/Color/Color.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var v = function(d, u) {
- return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, O) {
- A.__proto__ = O;
- } || function(A, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (A[B] = O[B]);
- }, v(d, u);
- };
- return function(d, u) {
- function A() {
- this.constructor = d;
- }
- v(d, u), d.prototype = u === null ? Object.create(u) : (A.prototype = u.prototype, new A());
- };
- }(), U = y.parse, F = I.seriesTypes.line;
- y = Z.extend;
- var N = Z.merge, R = Z.objectEach, S = Z.pick;
- return Z = function(v) {
- function d() {
- var u = v !== null && v.apply(this, arguments) || this;
- return u.data = void 0, u.options = void 0, u.points = void 0, u;
- }
- return H(d, v), d.prototype.drawGraph = function() {
- this.areaPath = [], v.prototype.drawGraph.apply(this);
- var u = this, A = this.areaPath, O = this.options, B = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(C, b) {
- B.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + C.className, C.color || u.color, C.fillColor || O.fillColor]);
- }), B.forEach(function(C) {
- var b = C[0], w = u[b], x = w ? "animate" : "attr", a = {};
- w ? (w.endX = u.preventGraphAnimation ? null : A.xMap, w.animate({ d: A })) : (a.zIndex = 0, w = u[b] = u.chart.renderer.path(A).addClass(C[1]).add(u.group), w.isArea = !0), u.chart.styledMode || (a.fill = S(C[3], U(C[2]).setOpacity(S(O.fillOpacity, 0.75)).get())), w[x](a), w.startX = A.xMap, w.shiftUnit = O.step ? 2 : 1;
- });
- }, d.prototype.getGraphPath = function(u) {
- var A = F.prototype.getGraphPath, O = this.options, B = O.stacking, C = this.yAxis, b, w = [], x = [], a = this.index, c = C.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(C.getThreshold(O.threshold));
- O = S(O.connectNulls, B === "percent");
- var h = function(n, T, _) {
- var D = u[n];
- n = B && c[D.x].points[a];
- var W = D[_ + "Null"] || 0;
- if (_ = D[_ + "Cliff"] || 0, D = !0, _ || W) {
- var P = (W ? n[0] : n[1]) + _, X = n[0] + _;
- D = !!W;
- } else
- !B && u[T] && u[T].isNull && (P = X = p);
- typeof P < "u" && (x.push({ plotX: t, plotY: P === null ? i : C.getThreshold(P), isNull: D, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : C.getThreshold(X), doCurve: !1 }));
- };
- for (u = u || this.points, B && (u = this.getStackPoints(u)), b = 0; b < u.length; b++) {
- B || (u[b].leftCliff = u[b].rightCliff = u[b].leftNull = u[b].rightNull = void 0);
- var o = u[b].isNull, t = S(u[b].rectPlotX, u[b].plotX), s = B ? S(u[b].yBottom, i) : i;
- (!o || O) && (O || h(b, b - 1, "left"), o && !B && O || (x.push(u[b]), w.push({ x: b, plotX: t, plotY: s })), O || h(b, b + 1, "right"));
- }
- return b = A.call(this, x, !0, !0), w.reversed = !0, o = A.call(this, w, !0, !0), (s = o[0]) && s[0] === "M" && (o[0] = ["L", s[1], s[2]]), o = b.concat(o), o.length && o.push(["Z"]), A = A.call(this, x, !1, O), o.xMap = b.xMap, this.areaPath = o, A;
- }, d.prototype.getStackPoints = function(u) {
- var A = this, O = [], B = [], C = this.xAxis, b = this.yAxis, w = b.stacking.stacks[this.stackKey], x = {}, a = b.series, c = a.length, p = b.options.reversedStacks ? 1 : -1, i = a.indexOf(A);
- if (u = u || this.points, this.options.stacking) {
- for (var h = 0; h < u.length; h++)
- u[h].leftNull = u[h].rightNull = void 0, x[u[h].x] = u[h];
- R(w, function(t, s) {
- t.total !== null && B.push(s);
- }), B.sort(function(t, s) {
- return t - s;
- });
- var o = a.map(function(t) {
- return t.visible;
- });
- B.forEach(function(t, s) {
- var n = 0, T, _;
- if (x[t] && !x[t].isNull)
- O.push(x[t]), [-1, 1].forEach(function(W) {
- var P = W === 1 ? "rightNull" : "leftNull", X = 0, g = w[B[s + W]];
- if (g)
- for (var m = i; 0 <= m && m < c; ) {
- var L = a[m].index;
- T = g.points[L], T || (L === A.index ? x[t][P] = !0 : o[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += p;
- }
- x[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var D = i; 0 <= D && D < c; ) {
- if (T = w[t].points[a[D].index]) {
- n = T[1];
- break;
- }
- D += p;
- }
- n = S(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: C.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, d.defaultOptions = N(F.defaultOptions, { threshold: 0 }), d;
- }(F), y(Z.prototype, {
- singleStacks: !1,
- drawLegendSymbol: j.drawRectangle
- }), I.registerSeriesType("area", Z), Z;
- }), E(l, "Series/Spline/SplineSeries.js", [l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), Z = y.seriesTypes.line, H = j.merge, U = j.pick;
- return j = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.data = void 0, R.options = void 0, R.points = void 0, R;
- }
- return I(N, F), N.prototype.getPointSpline = function(R, S, v) {
- var d = S.plotX || 0, u = S.plotY || 0, A = R[v - 1];
- if (v = R[v + 1], A && !A.isNull && A.doCurve !== !1 && !S.isCliff && v && !v.isNull && v.doCurve !== !1 && !S.isCliff) {
- R = A.plotY || 0;
- var O = v.plotX || 0;
- v = v.plotY || 0;
- var B = 0, C = (1.5 * d + (A.plotX || 0)) / 2.5, b = (1.5 * u + R) / 2.5;
- O = (1.5 * d + O) / 2.5;
- var w = (1.5 * u + v) / 2.5;
- O !== C && (B = (w - b) * (O - d) / (O - C) + u - w), b += B, w += B, b > R && b > u ? (b = Math.max(R, u), w = 2 * u - b) : b < R && b < u && (b = Math.min(R, u), w = 2 * u - b), w > v && w > u ? (w = Math.max(v, u), b = 2 * u - w) : w < v && w < u && (w = Math.min(v, u), b = 2 * u - w), S.rightContX = O, S.rightContY = w;
- }
- return S = ["C", U(A.rightContX, A.plotX, 0), U(A.rightContY, A.plotY, 0), U(C, d, 0), U(b, u, 0), d, u], A.rightContX = A.rightContY = void 0, S;
- }, N.defaultOptions = H(Z.defaultOptions), N;
- }(Z), y.registerSeriesType("spline", j), j;
- }), E(
- l,
- "Series/AreaSpline/AreaSplineSeries.js",
- [l["Series/Area/AreaSeries.js"], l["Series/Spline/SplineSeries.js"], l["Core/Legend/LegendSymbol.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H) {
- var U = this && this.__extends || function() {
- var S = function(v, d) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, A) {
- u.__proto__ = A;
- } || function(u, A) {
- for (var O in A)
- A.hasOwnProperty(O) && (u[O] = A[O]);
- }, S(v, d);
- };
- return function(v, d) {
- function u() {
- this.constructor = v;
- }
- S(v, d), v.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
- };
- }(), F = y.prototype, N = H.extend, R = H.merge;
- return H = function(S) {
- function v() {
- var d = S !== null && S.apply(this, arguments) || this;
- return d.data = void 0, d.points = void 0, d.options = void 0, d;
- }
- return U(v, S), v.defaultOptions = R(j.defaultOptions, y.defaultOptions), v;
- }(j), N(H.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", H), H;
- }
- ), E(l, "Series/Column/ColumnSeries.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Color/Color.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F) {
- var N = this && this.__extends || function() {
- var c = function(p, i) {
- return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, o) {
- h.__proto__ = o;
- } || function(h, o) {
- for (var t in o)
- o.hasOwnProperty(t) && (h[t] = o[t]);
- }, c(p, i);
- };
- return function(p, i) {
- function h() {
- this.constructor = p;
- }
- c(p, i), p.prototype = i === null ? Object.create(i) : (h.prototype = i.prototype, new h());
- };
- }(), R = y.animObject, S = j.parse, v = I.hasTouch;
- y = I.noop;
- var d = F.clamp, u = F.css, A = F.defined, O = F.extend, B = F.fireEvent, C = F.isArray, b = F.isNumber, w = F.merge, x = F.pick, a = F.objectEach;
- return F = function(c) {
- function p() {
- var i = c !== null && c.apply(this, arguments) || this;
- return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
- }
- return N(p, c), p.prototype.animate = function(i) {
- var h = this, o = this.yAxis, t = h.options, s = this.chart.inverted, n = {}, T = s ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = d(o.toPixels(t.threshold), o.pos, o.pos + o.len), s ? n.translateX = i - o.len : n.translateY = i, h.clipBox && h.setClip(), h.group.attr(n);
- else {
- var _ = Number(h.group.attr(T));
- h.group.animate({ scaleY: 1 }, O(R(h.options.animation), { step: function(D, W) {
- h.group && (n[T] = _ + W.pos * (o.pos - _), h.group.attr(n));
- } }));
- }
- }, p.prototype.init = function(i, h) {
- c.prototype.init.apply(this, arguments);
- var o = this;
- i = o.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === o.type && (t.isDirty = !0);
- });
- }, p.prototype.getColumnMetrics = function() {
- var i = this, h = i.options, o = i.xAxis, t = i.yAxis, s = o.options.reversedStacks;
- s = o.reversed && !s || !o.reversed && s;
- var n = {}, T, _ = 0;
- h.grouping === !1 ? _ = 1 : i.chart.series.forEach(function(X) {
- var g = X.yAxis, m = X.options;
- if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
- if (m.stacking && m.stacking !== "group") {
- T = X.stackKey, typeof n[T] > "u" && (n[T] = _++);
- var L = n[T];
- } else
- m.grouping !== !1 && (L = _++);
- X.columnIndex = L;
- }
- });
- var D = Math.min(Math.abs(o.transA) * (o.ordinal && o.ordinal.slope || h.pointRange || o.closestPointRange || o.tickInterval || 1), o.len), W = D * h.groupPadding, P = (D - 2 * W) / (_ || 1);
- return h = Math.min(h.maxPointWidth || o.len, x(h.pointWidth, P * (1 - 2 * h.pointPadding))), i.columnMetrics = { width: h, offset: (P - h) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * P - D / 2) * (s ? -1 : 1), paddedWidth: P, columnCount: _ }, i.columnMetrics;
- }, p.prototype.crispCol = function(i, h, o, t) {
- var s = this.chart, n = this.borderWidth, T = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (o = Math.round(i + o) + T, i = Math.round(i) + T, o -= i), t = Math.round(h + t) + n, T = 0.5 >= Math.abs(h) && 0.5 < t, h = Math.round(h) + n, t -= h, T && t && (--h, t += 1), { x: i, y: h, width: o, height: t };
- }, p.prototype.adjustForMissingColumns = function(i, h, o, t) {
- var s = this, n = this.options.stacking;
- if (!o.isNull && 1 < t.columnCount) {
- var T = 0, _ = 0;
- a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
- if (typeof o.x == "number" && (D = D[o.x.toString()])) {
- var W = D.points[s.index], P = D.total;
- n ? (W && (T = _), D.hasValidPoints && _++) : C(W) && (T = W[1], _ = P || 0);
- }
- }), i = (o.plotX || 0) + ((_ - 1) * t.paddedWidth + h) / 2 - h - T * t.paddedWidth;
- }
- return i;
- }, p.prototype.translate = function() {
- var i = this, h = i.chart, o = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = x(o.borderWidth, t ? 0 : 1);
- var s = i.xAxis, n = i.yAxis, T = o.threshold, _ = i.translatedThreshold = n.getThreshold(T), D = x(o.minPointLength, 5), W = i.getColumnMetrics(), P = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(P, 1 + 2 * t);
- h.inverted && (_ -= 0.5), o.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(Y) {
- var V = x(Y.yBottom, _), Q = 999 + Math.abs(V), k = Y.plotX || 0;
- Q = d(Y.plotY, -Q, n.len + Q);
- var G = Math.min(Q, V), z = Math.max(Q, V) - G, $ = P, q = k + X, it = L;
- D && Math.abs(z) < D && (z = D, k = !n.reversed && !Y.negative || n.reversed && Y.negative, b(T) && b(m) && Y.y === T && m <= T && (n.min || 0) < T && (g !== m || (n.max || 0) <= T) && (k = !k), G = Math.abs(G - _) > D ? V - D : _ - (k ? D : 0)), A(Y.options.pointWidth) && ($ = it = Math.ceil(Y.options.pointWidth), q -= Math.round(($ - P) / 2)), o.centerInCategory && (q = i.adjustForMissingColumns(q, $, Y, W)), Y.barX = q, Y.pointWidth = $, Y.tooltipPos = h.inverted ? [d(n.len + n.pos - h.plotLeft - Q, n.pos - h.plotLeft, n.len + n.pos - h.plotLeft), s.len + s.pos - h.plotTop - q - it / 2, z] : [s.left - h.plotLeft + q + it / 2, d(Q + n.pos - h.plotTop, n.pos - h.plotTop, n.len + n.pos - h.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
- });
- }, p.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, p.prototype.pointAttribs = function(i, h) {
- var o = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", T = i && i.color || this.color, _ = i && i[s] || o[s] || T;
- t = i && i.options.dashStyle || o.dashStyle;
- var D = i && i[n] || o[n] || this[n] || 0, W = x(i && i.opacity, o.opacity, 1);
- if (i && this.zones.length) {
- var P = i.getZone();
- T = i.options.color || P && (P.color || i.nonZonedColor) || this.color, P && (_ = P.borderColor || _, t = P.dashStyle || t, D = P.borderWidth || D);
- }
- return h && i && (i = w(o.states[h], i.options.states && i.options.states[h] || {}), h = i.brightness, T = i.color || typeof h < "u" && S(T).brighten(i.brightness).get() || T, _ = i[s] || _, D = i[n] || D, t = i.dashStyle || t, W = x(i.opacity, W)), s = { fill: T, stroke: _, "stroke-width": D, opacity: W }, t && (s.dashstyle = t), s;
- }, p.prototype.drawPoints = function() {
- var i = this, h = this.chart, o = i.options, t = h.renderer, s = o.animationLimit || 250, n;
- i.points.forEach(function(T) {
- var _ = T.graphic, D = !!_, W = _ && h.pointCount < s ? "animate" : "attr";
- b(T.plotY) && T.y !== null ? (n = T.shapeArgs, _ && T.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (T.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (T.graphic = _ = t[T.shapeType](n).add(T.group || i.group)) && i.enabledDataSorting && h.hasRendered && h.pointCount < s && (_.attr({ x: T.startXPos }), D = !0, W = "animate"), _ && D && _[W](w(n)), o.borderRadius && _[W]({ r: o.borderRadius }), h.styledMode || _[W](i.pointAttribs(T, T.selected && "select")).shadow(T.allowShadow !== !1 && o.shadow, null, o.stacking && !o.borderRadius), _ && (_.addClass(T.getClassName(), !0), _.attr({ visibility: T.visible ? "inherit" : "hidden" }))) : _ && (T.graphic = _.destroy());
- });
- }, p.prototype.drawTracker = function() {
- var i = this, h = i.chart, o = h.pointer, t = function(n) {
- var T = o.getPointFromEvent(n);
- typeof T < "u" && (o.isDirectTouch = !0, T.onMouseOver(n));
- }, s;
- i.points.forEach(function(n) {
- s = C(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(T) {
- T.div ? T.div.point = n : T.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(T) {
- o.onTrackerMouseOut(T);
- }), v && i[n].on(
- "touchstart",
- t
- ), !h.styledMode && i.options.cursor && i[n].css(u).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), B(this, "afterDrawTracker");
- }, p.prototype.remove = function() {
- var i = this, h = i.chart;
- h.hasRendered && h.series.forEach(function(o) {
- o.type === i.type && (o.isDirty = !0);
- }), H.prototype.remove.apply(i, arguments);
- }, p.defaultOptions = w(H.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
- hover: { halo: !1, brightness: 0.1 },
- select: { color: "#cccccc", borderColor: "#000000" }
- }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), p;
- }(H), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("column", F), F;
- }), E(l, "Core/Series/DataLabel.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = j.format, U = I.defined, F = I.extend, N = I.fireEvent, R = I.isArray, S = I.merge, v = I.objectEach, d = I.pick, u = I.splat, A;
- return function(O) {
- function B(p, i, h, o, t) {
- var s = this, n = this.chart, T = this.isCartesian && n.inverted, _ = this.enabledDataSorting, D = d(p.dlBox && p.dlBox.centerX, p.plotX, -9999), W = d(p.plotY, -9999), P = i.getBBox(), X = h.rotation, g = h.align, m = n.isInsidePlot(D, Math.round(W), { inverted: T, paneCoordinates: !0, series: s }), L = function(k) {
- _ && s.xAxis && !Y && s.setDataLabelStartPos(
- p,
- i,
- t,
- m,
- k
- );
- }, Y = d(h.overflow, _ ? "none" : "justify") === "justify", V = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || d(h.inside, !!this.options.stacking) && o && n.isInsidePlot(D, T ? o.x + 1 : o.y + o.height - 1, { inverted: T, paneCoordinates: !0, series: s }));
- if (V) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : h.style.fontSize, i).b;
- o = F({ x: T ? this.yAxis.len - W : D, y: Math.round(T ? this.xAxis.len - D : W), width: 0, height: 0 }, o), F(h, { width: P.width, height: P.height }), X ? (Y = !1, D = n.renderer.rotCorr(Q, X), D = { x: o.x + (h.x || 0) + o.width / 2 + D.x, y: o.y + (h.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[h.verticalAlign] * o.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? D.y -= L ? P.height : 0 : g === "center" ? (D.x -= P.width / 2, D.y -= P.height / 2) : g === "right" && (D.x -= P.width, D.y -= L ? 0 : P.height), i.placed = !0, i.alignAttr = D) : (L(o), i.align(h, void 0, o), D = i.alignAttr), Y && 0 <= o.height ? this.justifyDataLabel(i, h, D, P, o, t) : d(h.crop, !0) && (V = n.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(D.x + P.width, D.y + P.height, {
- paneCoordinates: !0,
- series: s
- })), h.shape && !X && i[t ? "attr" : "animate"]({ anchorX: T ? n.plotWidth - p.plotY : p.plotX, anchorY: T ? n.plotHeight - p.plotX : p.plotY });
- }
- t && _ && (i.placed = !1), V || _ && !Y || (i.hide(!0), i.placed = !1);
- }
- function C(p, i) {
- var h = i.filter;
- return h ? (i = h.operator, p = p[h.property], h = h.value, i === ">" && p > h || i === "<" && p < h || i === ">=" && p >= h || i === "<=" && p <= h || i === "==" && p == h || i === "===" && p === h) : !0;
- }
- function b() {
- var p = this, i = p.chart, h = p.options, o = p.points, t = p.hasRendered || 0, s = i.renderer, n = h.dataLabels, T, _ = n.animation;
- if (_ = n.defer ? Z(
- i,
- _,
- p
- ) : { defer: 0, duration: 0 }, n = x(x(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[p.type] && i.options.plotOptions[p.type].dataLabels), n), N(this, "drawDataLabels"), R(n) || n.enabled || p._hasPointLabels) {
- var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[h.animation ? "animate" : "attr"]({ opacity: 1 }, _)), o.forEach(function(W) {
- T = u(x(n, W.dlOptions || W.options && W.options.dataLabels)), T.forEach(function(P, X) {
- var g = P.enabled && (!W.isNull || W.dataLabelOnNull) && C(W, P), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, Y = d(P.distance, W.labelDistance), V = !L;
- if (g) {
- var Q = W.getLabelConfig(), k = d(P[W.formatPrefix + "Format"], P.format);
- Q = U(k) ? H(k, Q, i) : (P[W.formatPrefix + "Formatter"] || P.formatter).call(Q, P), k = P.style;
- var G = P.rotation;
- i.styledMode || (k.color = d(P.color, k.color, p.color, "#000000"), k.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || p.color), k.color = !U(Y) && P.inside || 0 > Y || h.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, h.cursor && (k.cursor = h.cursor));
- var z = { r: P.borderRadius || 0, rotation: G, padding: P.padding, zIndex: 1 };
- i.styledMode || (z.fill = P.backgroundColor, z.stroke = P.borderColor, z["stroke-width"] = P.borderWidth), v(z, function($, q) {
- typeof $ > "u" && delete z[q];
- });
- }
- !L || g && U(Q) && !!L.div == !!P.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && U(Q) && (L ? z.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = G ? s.text(Q, 0, -9999, P.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, P.shape, null, null, P.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (P.className || "") + (P.useHTML ? " highcharts-tracker" : ""))), L.options = P, L.attr(z), i.styledMode || L.css(k).shadow(P.shadow), L.added || L.add(D), P.textPath && !P.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, P.textPath), W.dataLabelPath && !P.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), p.alignDataLabel(W, L, P, null, V));
- });
- });
- }
- N(this, "afterDrawDataLabels");
- }
- function w(p, i, h, o, t, s) {
- var n = this.chart, T = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var P = i.y;
- P = P === void 0 ? 0 : P;
- var X = (h.x || 0) + D;
- if (0 > X) {
- T === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (h.x || 0) + o.width - D, X > n.plotWidth && (T === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = h.y + D, 0 > X && (_ === "bottom" && 0 <= P ? (i.verticalAlign = "top", i.inside = !0) : P -= X, g = !0), X = (h.y || 0) + o.height - D, X > n.plotHeight && (_ === "top" && 0 >= P ? (i.verticalAlign = "bottom", i.inside = !0) : P += n.plotHeight - X, g = !0), g && (i.x = W, i.y = P, p.placed = !s, p.align(i, void 0, t)), g;
- }
- function x(p, i) {
- var h = [], o;
- if (R(p) && !R(i))
- h = p.map(function(t) {
- return S(t, i);
- });
- else if (R(i) && !R(p))
- h = i.map(function(t) {
- return S(p, t);
- });
- else if (R(p) || R(i))
- for (o = Math.max(p.length, i.length); o--; )
- h[o] = S(p[o], i[o]);
- else
- h = S(p, i);
- return h;
- }
- function a(p, i, h, o, t) {
- var s = this.chart, n = s.inverted, T = this.xAxis, _ = T.reversed, D = n ? i.height / 2 : i.width / 2;
- p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = n ? t.x : _ ? -D - p : T.width - D + p, i.startYPos = n ? _ ? this.yAxis.height - D + p : -D - p : t.y, o ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), s.hasRendered && (h && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var c = [];
- O.compose = function(p) {
- if (c.indexOf(p) === -1) {
- var i = p.prototype;
- c.push(p), i.alignDataLabel = B, i.drawDataLabels = b, i.justifyDataLabel = w, i.setDataLabelStartPos = a;
- }
- };
- }(A || (A = {})), A;
- }), E(l, "Series/Column/ColumnDataLabel.js", [l["Core/Series/DataLabel.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.series, H = I.merge, U = I.pick, F;
- return function(N) {
- function R(v, d, u, A, O) {
- var B = this.chart.inverted, C = v.series, b = (C.xAxis ? C.xAxis.len : this.chart.plotSizeX) || 0;
- C = (C.yAxis ? C.yAxis.len : this.chart.plotSizeY) || 0;
- var w = v.dlBox || v.shapeArgs, x = U(v.below, v.plotY > U(this.translatedThreshold, C)), a = U(u.inside, !!this.options.stacking);
- w && (A = H(w), 0 > A.y && (A.height += A.y, A.y = 0), w = A.y + A.height - C, 0 < w && w < A.height && (A.height -= w), B && (A = { x: C - A.y - A.height, y: b - A.x - A.width, width: A.height, height: A.width }), a || (B ? (A.x += x ? 0 : A.width, A.width = 0) : (A.y += x ? A.height : 0, A.height = 0))), u.align = U(u.align, !B || a ? "center" : x ? "right" : "left"), u.verticalAlign = U(u.verticalAlign, B || a ? "middle" : x ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, v, d, u, A, O), u.inside && v.contrastColor && d.css({ color: v.contrastColor });
- }
- var S = [];
- N.compose = function(v) {
- y.compose(Z), S.indexOf(v) === -1 && (S.push(v), v.prototype.alignDataLabel = R);
- };
- }(F || (F = {})), F;
- }), E(l, "Series/Bar/BarSeries.js", [l["Series/Column/ColumnSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), H = I.extend, U = I.merge;
- return I = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.data = void 0, R.options = void 0, R.points = void 0, R;
- }
- return Z(N, F), N.defaultOptions = U(
- y.defaultOptions,
- {}
- ), N;
- }(y), H(I.prototype, { inverted: !0 }), j.registerSeriesType("bar", I), I;
- }), E(l, "Series/Scatter/ScatterSeries.js", [l["Series/Column/ColumnSeries.js"], l["Series/Line/LineSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var R = function(S, v) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, u) {
- d.__proto__ = u;
- } || function(d, u) {
- for (var A in u)
- u.hasOwnProperty(A) && (d[A] = u[A]);
- }, R(S, v);
- };
- return function(S, v) {
- function d() {
- this.constructor = S;
- }
- R(S, v), S.prototype = v === null ? Object.create(v) : (d.prototype = v.prototype, new d());
- };
- }(), U = Z.addEvent, F = Z.extend, N = Z.merge;
- return Z = function(R) {
- function S() {
- var v = R !== null && R.apply(this, arguments) || this;
- return v.data = void 0, v.options = void 0, v.points = void 0, v;
- }
- return H(S, R), S.prototype.applyJitter = function() {
- var v = this, d = this.options.jitter, u = this.points.length;
- d && this.points.forEach(function(A, O) {
- ["x", "y"].forEach(function(B, C) {
- var b = "plot" + B.toUpperCase();
- if (d[B] && !A.isNull) {
- var w = v[B + "Axis"], x = d[B] * w.transA;
- if (w && !w.isLog) {
- var a = Math.max(0, A[b] - x);
- w = Math.min(w.len, A[b] + x), C = 1e4 * Math.sin(O + C * u), A[b] = a + (w - a) * (C - Math.floor(C)), B === "x" && (A.clientX = A.plotX);
- }
- }
- });
- });
- }, S.prototype.drawGraph = function() {
- this.options.lineWidth ? R.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, S.defaultOptions = N(j.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
- headerFormat: '<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',
- pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
- } }), S;
- }(j), F(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), U(Z, "afterTranslate", function() {
- this.applyJitter();
- }), I.registerSeriesType("scatter", Z), Z;
- }), E(l, "Series/CenteredUtilities.js", [l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.deg2rad, H = I.isNumber, U = I.pick, F = I.relativeLength, N;
- return function(R) {
- R.getCenter = function() {
- var S = this.options, v = this.chart, d = 2 * (S.slicedOffset || 0), u = v.plotWidth - 2 * d, A = v.plotHeight - 2 * d, O = S.center, B = Math.min(u, A), C = S.size, b = S.innerSize || 0;
- for (typeof C == "string" && (C = parseFloat(C)), typeof b == "string" && (b = parseFloat(b)), S = [U(O[0], "50%"), U(O[1], "50%"), U(C && 0 > C ? void 0 : S.size, "100%"), U(b && 0 > b ? void 0 : S.innerSize || 0, "0%")], !v.angular || this instanceof j || (S[3] = 0), O = 0; 4 > O; ++O)
- C = S[O], v = 2 > O || O === 2 && /%$/.test(C), S[O] = F(C, [u, A, B, S[2]][O]) + (v ? d : 0);
- return S[3] > S[2] && (S[3] = S[2]), S;
- }, R.getStartAndEndRadians = function(S, v) {
- return S = H(S) ? S : 0, v = H(v) && v > S && 360 > v - S ? v : S + 360, { start: Z * (S + -90), end: Z * (v + -90) };
- };
- }(N || (N = {})), N;
- }), E(l, "Series/Pie/PiePoint.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var v = function(d, u) {
- return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, O) {
- A.__proto__ = O;
- } || function(A, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (A[B] = O[B]);
- }, v(d, u);
- };
- return function(d, u) {
- function A() {
- this.constructor = d;
- }
- v(d, u), d.prototype = u === null ? Object.create(u) : (A.prototype = u.prototype, new A());
- };
- }(), H = y.setAnimation, U = I.addEvent, F = I.defined;
- y = I.extend;
- var N = I.isNumber, R = I.pick, S = I.relativeLength;
- return j = function(v) {
- function d() {
- var u = v !== null && v.apply(this, arguments) || this;
- return u.labelDistance = void 0, u.options = void 0, u.series = void 0, u;
- }
- return Z(d, v), d.prototype.getConnectorPath = function() {
- var u = this.labelPosition, A = this.series.options.dataLabels, O = this.connectorShapes, B = A.connectorShape;
- return O[B] && (B = O[B]), B.call(this, { x: u.final.x, y: u.final.y, alignment: u.alignment }, u.connectorPosition, A);
- }, d.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, d.prototype.haloPath = function(u) {
- var A = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(A.x, A.y, A.r + u, A.r + u, { innerR: A.r - 1, start: A.start, end: A.end });
- }, d.prototype.init = function() {
- var u = this;
- v.prototype.init.apply(
- this,
- arguments
- ), this.name = R(this.name, "Slice");
- var A = function(O) {
- u.slice(O.type === "select");
- };
- return U(this, "select", A), U(this, "unselect", A), this;
- }, d.prototype.isValid = function() {
- return N(this.y) && 0 <= this.y;
- }, d.prototype.setVisible = function(u, A) {
- var O = this, B = this.series, C = B.chart, b = B.options.ignoreHiddenPoint;
- A = R(A, b), u !== this.visible && (this.visible = this.options.visible = u = typeof u > "u" ? !this.visible : u, B.options.data[B.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
- O[w] && O[w][u ? "show" : "hide"](u);
- }), this.legendItem && C.legend.colorizeItem(this, u), u || this.state !== "hover" || this.setState(""), b && (B.isDirty = !0), A && C.redraw());
- }, d.prototype.slice = function(u, A, O) {
- var B = this.series;
- H(O, B.chart), R(A, !0), this.sliced = this.options.sliced = F(u) ? u : !this.sliced, B.options.data[B.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, d;
- }(j), y(j.prototype, { connectorShapes: { fixedOffset: function(v, d, u) {
- var A = d.breakAt;
- return d = d.touchingSliceAt, [["M", v.x, v.y], u.softConnector ? ["C", v.x + (v.alignment === "left" ? -5 : 5), v.y, 2 * A.x - d.x, 2 * A.y - d.y, A.x, A.y] : ["L", A.x, A.y], ["L", d.x, d.y]];
- }, straight: function(v, d) {
- return d = d.touchingSliceAt, [["M", v.x, v.y], ["L", d.x, d.y]];
- }, crookedLine: function(v, d, u) {
- d = d.touchingSliceAt;
- var A = this.series, O = A.center[0], B = A.chart.plotWidth, C = A.chart.plotLeft;
- A = v.alignment;
- var b = this.shapeArgs.r;
- return u = S(u.crookDistance, 1), B = A === "left" ? O + b + (B + C - O - b) * (1 - u) : C + (O - b) * u, u = ["L", B, v.y], O = !0, (A === "left" ? B > v.x || B < d.x : B < v.x || B > d.x) && (O = !1), v = [["M", v.x, v.y]], O && v.push(u), v.push(["L", d.x, d.y]), v;
- } } }), j;
- }), E(l, "Series/Pie/PieSeries.js", [l["Series/CenteredUtilities.js"], l["Series/Column/ColumnSeries.js"], l["Core/Globals.js"], l["Core/Legend/LegendSymbol.js"], l["Series/Pie/PiePoint.js"], l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, N, R) {
- var S = this && this.__extends || function() {
- var b = function(w, x) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
- a.__proto__ = c;
- } || function(a, c) {
- for (var p in c)
- c.hasOwnProperty(p) && (a[p] = c[p]);
- }, b(w, x);
- };
- return function(w, x) {
- function a() {
- this.constructor = w;
- }
- b(w, x), w.prototype = x === null ? Object.create(x) : (a.prototype = x.prototype, new a());
- };
- }(), v = y.getStartAndEndRadians;
- I = I.noop;
- var d = R.clamp, u = R.extend, A = R.fireEvent, O = R.merge, B = R.pick, C = R.relativeLength;
- return R = function(b) {
- function w() {
- var x = b !== null && b.apply(this, arguments) || this;
- return x.center = void 0, x.data = void 0, x.maxLabelDistance = void 0, x.options = void 0, x.points = void 0, x;
- }
- return S(w, b), w.prototype.animate = function(x) {
- var a = this, c = a.points, p = a.startAngleRad;
- x || c.forEach(function(i) {
- var h = i.graphic, o = i.shapeArgs;
- h && o && (h.attr({ r: B(i.startR, a.center && a.center[3] / 2), start: p, end: p }), h.animate({ r: o.r, start: o.start, end: o.end }, a.options.animation));
- });
- }, w.prototype.drawEmpty = function() {
- var x = this.startAngleRad, a = this.endAngleRad, c = this.options;
- if (this.total === 0 && this.center) {
- var p = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, x, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: N.arc(p, i, this.center[2] / 2, 0, { start: x, end: a, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, w.prototype.drawPoints = function() {
- var x = this.chart.renderer;
- this.points.forEach(function(a) {
- a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = x[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
- });
- }, w.prototype.generatePoints = function() {
- b.prototype.generatePoints.call(this), this.updateTotals();
- }, w.prototype.getX = function(x, a, c) {
- var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
- return x = Math.asin(d((x - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(x) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, w.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, w.prototype.redrawPoints = function() {
- var x = this, a = x.chart, c = a.renderer, p = x.options.shadow, i, h, o, t;
- this.drawEmpty(), !p || x.shadowGroup || a.styledMode || (x.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(x.group)), x.points.forEach(function(s) {
- var n = {};
- if (h = s.graphic, !s.isNull && h) {
- var T = void 0;
- t = s.shapeArgs, i = s.getTranslate(), a.styledMode || (T = s.shadowGroup, p && !T && (T = s.shadowGroup = c.g("shadow").add(x.shadowGroup)), T && T.attr(i), o = x.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (h.setRadialReference(x.center).attr(t).attr(i), a.styledMode || h.attr(o).attr({ "stroke-linejoin": "round" }).shadow(p, T), s.delayedRendering = !1) : (h.setRadialReference(x.center), a.styledMode || O(!0, n, o), O(!0, n, t, i), h.animate(n)), h.attr({ visibility: s.visible ? "inherit" : "hidden" }), h.addClass(s.getClassName(), !0);
- } else
- h && (s.graphic = h.destroy());
- });
- }, w.prototype.sortByAngle = function(x, a) {
- x.sort(function(c, p) {
- return typeof c.angle < "u" && (p.angle - c.angle) * a;
- });
- }, w.prototype.translate = function(x) {
- this.generatePoints();
- var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = v(a.startAngle, a.endAngle), h = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - h;
- var o = this.points, t = a.dataLabels.distance;
- a = a.ignoreHiddenPoint;
- var s = o.length, n, T = 0;
- for (x || (this.center = x = this.getCenter()), n = 0; n < s; n++) {
- var _ = o[n], D = h + T * i;
- !_.isValid() || a && !_.visible || (T += _.percentage / 100);
- var W = h + T * i, P = { x: x[0], y: x[1], r: x[2] / 2, innerR: x[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- _.shapeType = "arc", _.shapeArgs = P, _.labelDistance = B(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = C(_.labelDistance, P.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), W = (W + D) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(W) * c), translateY: Math.round(Math.sin(W) * c) }, P = Math.cos(W) * x[2] / 2;
- var X = Math.sin(W) * x[2] / 2;
- _.tooltipPos = [x[0] + 0.7 * P, x[1] + 0.7 * X], _.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, _.angle = W, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: x[0] + P + Math.cos(W) * _.labelDistance, y: x[1] + X + Math.sin(W) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: x[0] + P + Math.cos(W) * D, y: x[1] + X + Math.sin(W) * D }, touchingSliceAt: { x: x[0] + P, y: x[1] + X } } };
- }
- A(this, "afterTranslate");
- }, w.prototype.updateTotals = function() {
- var x = this.points, a = x.length, c = this.options.ignoreHiddenPoint, p, i = 0;
- for (p = 0; p < a; p++) {
- var h = x[p];
- !h.isValid() || c && !h.visible || (i += h.y);
- }
- for (this.total = i, p = 0; p < a; p++)
- h = x[p], h.percentage = 0 < i && (h.visible || !c) ? h.y / i * 100 : 0, h.total = i;
- }, w.defaultOptions = O(U.defaultOptions, {
- center: [null, null],
- clip: !1,
- colorByPoint: !0,
- dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
- return this.point.isNull ? void 0 : this.point.name;
- }, softConnector: !0, x: 0 },
- fillColor: void 0,
- ignoreHiddenPoint: !0,
- inactiveOtherPoints: !0,
- legendType: "point",
- marker: null,
- size: null,
- showInLegend: !1,
- slicedOffset: 10,
- stickyTracking: !1,
- tooltip: { followPointer: !0 },
- borderColor: "#ffffff",
- borderWidth: 1,
- lineWidth: void 0,
- states: { hover: { brightness: 0.1 } }
- }), w;
- }(U), u(R.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: j.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: j.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", R), R;
- }), E(l, "Series/Pie/PieDataLabel.js", [
- l["Core/Series/DataLabel.js"],
- l["Core/Globals.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H) {
- var U = j.noop, F = I.distribute, N = Z.series, R = H.arrayMax, S = H.clamp, v = H.defined, d = H.merge, u = H.pick, A = H.relativeLength, O;
- return function(B) {
- function C() {
- var c = this, p = c.data, i = c.chart, h = c.options.dataLabels || {}, o = h.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, T = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, W = _[1], P = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, Y, V, Q, k, G, z, $, q, it, et;
- c.visible && (h.enabled || c._hasPointLabels) && (p.forEach(function(nt) {
- nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
- }), N.prototype.drawDataLabels.apply(c), p.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (P[nt.half].push(nt), nt.dataLabel._pos = null, !v(h.style.width) && !v(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > T && (nt.dataLabel.css({ width: Math.round(0.7 * T) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), P.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
- var ht = Math.max(0, W - D - c.maxLabelDistance), at = Math.min(W + D + c.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - D - J.labelDistance), J.bottom = Math.min(W + D + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
- }), ht = at + dt - ht, F(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], k = m.labelPosition, V = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", $ = ht = k.natural.y, gt && v(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, $ = g.radialDistributionY(m))), delete m.positionIndex, h.justify)
- z = g.justify(m, D, _);
- else
- switch (h.alignTo) {
- case "connectors":
- z = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- z = g.alignToPlotEdges(V, rt, t, n);
- break;
- default:
- z = g.radialDistributionX(c, m, $, ht);
- }
- V._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, V._pos = { x: z + u(et.x, h.x) + ({ left: o, right: -o }[k.alignment] || 0), y: $ + u(et.y, h.y) - 10 }, k.final.x = z, k.final.y = $, u(h.crop, !0) && (Q = V.getBBox().width, ht = null, z - Q < o && rt === 1 ? (ht = Math.round(Q - z + o), X[3] = Math.max(ht, X[3])) : z + Q > t - o && rt === 0 && (ht = Math.round(z + Q - t + o), X[1] = Math.max(ht, X[1])), 0 > $ - G / 2 ? X[0] = Math.max(Math.round(-$ + G / 2), X[0]) : $ + G / 2 > s && (X[2] = Math.max(Math.round($ + G / 2 - s), X[2])), V.sideOverflow = ht);
- }
- }
- }), R(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = d(h, nt.options.dataLabels), L = u(et.connectorWidth, 1)) {
- var rt;
- Y = nt.connector, (V = nt.dataLabel) && V._pos && nt.visible && 0 < nt.labelDistance ? (q = V._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
- }
- }));
- }
- function b() {
- this.points.forEach(function(c) {
- var p = c.dataLabel, i;
- p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
- }, this);
- }
- function w(c) {
- var p = this.center, i = this.options, h = i.center, o = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (h[0] !== null)
- var s = Math.max(p[2] - Math.max(c[1], c[3]), o);
- else
- s = Math.max(p[2] - c[1] - c[3], o), p[0] += (c[3] - c[1]) / 2;
- h[1] !== null ? s = S(s, o, p[2] - Math.max(c[0], c[2])) : (s = S(s, o, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), s < p[2] ? (p[2] = s, p[3] = Math.min(A(i.innerSize || 0, s), s), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var x = [], a = { radialDistributionY: function(c) {
- return c.top + c.distributeBox.pos;
- }, radialDistributionX: function(c, p, i, h) {
- return c.getX(i < p.top + 2 || i > p.bottom - 2 ? h : i, p.half, p);
- }, justify: function(c, p, i) {
- return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
- }, alignToPlotEdges: function(c, p, i, h) {
- return c = c.getBBox().width, p ? c + h : i - c - h;
- }, alignToConnectors: function(c, p, i, h) {
- var o = 0, t;
- return c.forEach(function(s) {
- t = s.dataLabel.getBBox().width, t > o && (o = t);
- }), p ? o + h : i - o - h;
- } };
- B.compose = function(c) {
- y.compose(N), x.indexOf(c) === -1 && (x.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = U, c.drawDataLabels = C, c.placeDataLabels = b, c.verifyDataLabelOverflow = w);
- };
- }(O || (O = {})), O;
- }), E(l, "Extensions/OverlappingDataLabels.js", [l["Core/Chart/Chart.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(S, v) {
- var d = !1;
- if (S) {
- var u = S.newOpacity;
- S.oldOpacity !== u && (S.alignAttr && S.placed ? (S[u ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), d = !0, S.alignAttr.opacity = u, S[S.isOld ? "animate" : "attr"](S.alignAttr, null, function() {
- v.styledMode || S.css({ pointerEvents: u ? "auto" : "none" });
- }), H(v, "afterHideOverlappingLabel")) : S.attr({ opacity: u })), S.isOld = !0;
- }
- return d;
- }
- var Z = j.addEvent, H = j.fireEvent, U = j.isArray, F = j.isNumber, N = j.objectEach, R = j.pick;
- Z(y, "render", function() {
- var S = this, v = [];
- (this.labelCollectors || []).forEach(function(d) {
- v = v.concat(d());
- }), (this.yAxis || []).forEach(function(d) {
- d.stacking && d.options.stackLabels && !d.options.stackLabels.allowOverlap && N(d.stacking.stacks, function(u) {
- N(u, function(A) {
- A.label && A.label.visibility !== "hidden" && v.push(A.label);
- });
- });
- }), (this.series || []).forEach(function(d) {
- var u = d.options.dataLabels;
- d.visible && (u.enabled !== !1 || d._hasPointLabels) && (u = function(A) {
- return A.forEach(function(O) {
- O.visible && (U(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(B) {
- var C = B.options;
- B.labelrank = R(C.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), C.allowOverlap ? (B.oldOpacity = B.opacity, B.newOpacity = 1, I(B, S)) : v.push(B);
- });
- });
- }, u(d.nodes || []), u(d.points));
- }), this.hideOverlappingLabels(v);
- }), y.prototype.hideOverlappingLabels = function(S) {
- var v = this, d = S.length, u = v.renderer, A, O, B, C = !1, b = function(a) {
- var c, p = a.box ? 0 : a.padding || 0, i = c = 0, h;
- if (a && (!a.alignAttr || a.placed)) {
- var o = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
- a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = u.fontMetrics(null, a.element).h);
- var s = a.width - 2 * p;
- return (h = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +h * s : F(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: o.x + (t.translateX || 0) + p - (i || 0), y: o.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
- }
- };
- for (O = 0; O < d; O++)
- (A = S[O]) && (A.oldOpacity = A.opacity, A.newOpacity = 1, A.absoluteBox = b(A));
- for (S.sort(function(a, c) {
- return (c.labelrank || 0) - (a.labelrank || 0);
- }), O = 0; O < d; O++) {
- var w = (b = S[O]) && b.absoluteBox;
- for (A = O + 1; A < d; ++A) {
- var x = (B = S[A]) && B.absoluteBox;
- !w || !x || b === B || b.newOpacity === 0 || B.newOpacity === 0 || x.x >= w.x + w.width || x.x + x.width <= w.x || x.y >= w.y + w.height || x.y + x.height <= w.y || ((b.labelrank < B.labelrank ? b : B).newOpacity = 0);
- }
- }
- S.forEach(function(a) {
- I(a, v) && (C = !0);
- }), C && H(v, "afterHideAllOverlappingLabels");
- };
- }), E(
- l,
- "Core/Responsive.js",
- [l["Core/Utilities.js"]],
- function(y) {
- var j = y.extend, I = y.find, Z = y.isArray, H = y.isObject, U = y.merge, F = y.objectEach, N = y.pick, R = y.splat, S = y.uniqueKey, v;
- return function(d) {
- var u = [];
- d.compose = function(O) {
- return u.indexOf(O) === -1 && (u.push(O), j(O.prototype, A.prototype)), O;
- };
- var A = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(B) {
- function C(x, a, c, p) {
- var i;
- F(x, function(h, o) {
- if (!p && -1 < b.collectionsWithUpdate.indexOf(o) && a[o])
- for (h = R(h), c[o] = [], i = 0; i < Math.max(h.length, a[o].length); i++)
- a[o][i] && (h[i] === void 0 ? c[o][i] = a[o][i] : (c[o][i] = {}, C(h[i], a[o][i], c[o][i], p + 1)));
- else
- H(h) ? (c[o] = Z(h) ? [] : {}, C(h, a[o] || {}, c[o], p + 1)) : c[o] = typeof a[o] > "u" ? null : a[o];
- });
- }
- var b = this, w = {};
- return C(B, this.options, w, 0), w;
- }, O.prototype.matchResponsiveRule = function(B, C) {
- var b = B.condition;
- (b.callback || function() {
- return this.chartWidth <= N(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= N(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= N(b.minWidth, 0) && this.chartHeight >= N(b.minHeight, 0);
- }).call(this) && C.push(B._id);
- }, O.prototype.setResponsive = function(B, C) {
- var b = this, w = this.options.responsive, x = this.currentResponsive, a = [];
- !C && w && w.rules && w.rules.forEach(function(c) {
- typeof c._id > "u" && (c._id = S()), b.matchResponsiveRule(c, a);
- }, this), C = U.apply(void 0, a.map(function(c) {
- return I((w || {}).rules || [], function(p) {
- return p._id === c;
- });
- }).map(function(c) {
- return c && c.chartOptions;
- })), C.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (x && x.ruleIds) && (x && this.update(x.undoOptions, B, !0), a ? (x = this.currentOptions(C), x.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: C, undoOptions: x }, this.update(C, B, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(v || (v = {})), v;
- }
- ), E(l, "masters/highcharts.src.js", [
- l["Core/Globals.js"],
- l["Core/Utilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Animation/Fx.js"],
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Renderer/HTML/AST.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Renderer/HTML/HTMLElement.js"],
- l["Core/Renderer/HTML/HTMLRenderer.js"],
- l["Core/Axis/Axis.js"],
- l["Core/Axis/DateTimeAxis.js"],
- l["Core/Axis/LogarithmicAxis.js"],
- l["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Tooltip.js"],
- l["Core/Series/Point.js"],
- l["Core/Pointer.js"],
- l["Core/MSPointer.js"],
- l["Core/Legend/Legend.js"],
- l["Core/Chart/Chart.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Series/Column/ColumnSeries.js"],
- l["Series/Column/ColumnDataLabel.js"],
- l["Series/Pie/PieSeries.js"],
- l["Series/Pie/PieDataLabel.js"],
- l["Core/Series/DataLabel.js"],
- l["Core/Responsive.js"],
- l["Core/Color/Color.js"],
- l["Core/Time.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S, v, d, u, A, O, B, C, b, w, x, a, c, p, i, h, o, t, s, n, T, _, D, W) {
- return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = Z.timers, y.AST = U, y.Axis = u, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = B, y.Point = w, y.Pointer = a.isRequired() ? a : x, y.Series = i, y.SVGElement = R, y.SVGRenderer = S, y.Tick = C, y.Time = W, y.Tooltip = b, y.Color = D, y.color = D.parse, d.compose(S), v.compose(R), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = j.addEvent, y.arrayMax = j.arrayMax, y.arrayMin = j.arrayMin, y.attr = j.attr, y.clearTimeout = j.clearTimeout, y.correctFloat = j.correctFloat, y.createElement = j.createElement, y.css = j.css, y.defined = j.defined, y.destroyObjectProperties = j.destroyObjectProperties, y.discardElement = j.discardElement, y.distribute = N.distribute, y.erase = j.erase, y.error = j.error, y.extend = j.extend, y.extendClass = j.extendClass, y.find = j.find, y.fireEvent = j.fireEvent, y.getMagnitude = j.getMagnitude, y.getStyle = j.getStyle, y.inArray = j.inArray, y.isArray = j.isArray, y.isClass = j.isClass, y.isDOMElement = j.isDOMElement, y.isFunction = j.isFunction, y.isNumber = j.isNumber, y.isObject = j.isObject, y.isString = j.isString, y.keys = j.keys, y.merge = j.merge, y.normalizeTickInterval = j.normalizeTickInterval, y.objectEach = j.objectEach, y.offset = j.offset, y.pad = j.pad, y.pick = j.pick, y.pInt = j.pInt, y.relativeLength = j.relativeLength, y.removeEvent = j.removeEvent, y.seriesType = h.seriesType, y.splat = j.splat, y.stableSort = j.stableSort, y.syncTimeout = j.syncTimeout, y.timeUnits = j.timeUnits, y.uniqueKey = j.uniqueKey, y.useSerialIds = j.useSerialIds, y.wrap = j.wrap, t.compose(o), T.compose(i), A.compose(u), O.compose(u), n.compose(s), B.compose(u), _.compose(p), y;
- }), E(l, "Core/Axis/OrdinalAxis.js", [
- l["Core/Axis/Axis.js"],
- l["Core/Globals.js"],
- l["Core/Series/Series.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z) {
- var H = Z.addEvent, U = Z.correctFloat, F = Z.css, N = Z.defined, R = Z.error, S = Z.pick, v = Z.timeUnits, d = [], u;
- return function(A) {
- function O(t, s, n, T, _, D, W) {
- _ === void 0 && (_ = []), D === void 0 && (D = 0);
- var P = {}, X = this.options.tickPixelInterval, g = this.chart.time, m = [], L, Y, V = 0, Q = [], k = -Number.MAX_VALUE;
- if (!this.options.ordinal && !this.options.breaks || !_ || 3 > _.length || typeof s > "u")
- return g.getTimeTicks.apply(g, arguments);
- var G = _.length;
- for (L = 0; L < G; L++) {
- var z = L && _[L - 1] > n;
- if (_[L] < s && (V = L), L === G - 1 || _[L + 1] - _[L] > 5 * D || z) {
- if (_[L] > k) {
- for (Y = g.getTimeTicks(t, _[V], _[L], T); Y.length && Y[0] <= k; )
- Y.shift();
- Y.length && (k = Y[Y.length - 1]), m.push(Q.length), Q = Q.concat(Y);
- }
- V = L + 1;
- }
- if (z)
- break;
- }
- if (Y) {
- if (Y = Y.info, W && Y.unitRange <= v.hour) {
- for (L = Q.length - 1, V = 1; V < L; V++)
- if (g.dateFormat("%d", Q[V]) !== g.dateFormat("%d", Q[V - 1])) {
- P[Q[V]] = "day";
- var $ = !0;
- }
- $ && (P[Q[0]] = "day"), Y.higherRanks = P;
- }
- Y.segmentStarts = m, Q.info = Y;
- } else
- R(12, !1, this.chart);
- if (W && N(X)) {
- for (Y = Q.length, g = [], V = [], L = void 0, $ = Y; $--; )
- m = this.translate(Q[$]), L && (V[$] = L - m), g[$] = L = m;
- for (V.sort(), V = V[Math.floor(V.length / 2)], V < 0.6 * X && (V = null), $ = Q[Y - 1] > n ? Y - 1 : Y, L = void 0; $--; )
- m = g[$], Y = Math.abs(L - m), L && Y < 0.8 * X && (V === null || Y < 0.8 * V) ? (P[Q[$]] && !P[Q[$ + 1]] ? (Y = $ + 1, L = m) : Y = $, Q.splice(Y, 1)) : L = m;
- }
- return Q;
- }
- function B(t) {
- var s = this.ordinal.positions;
- if (!s)
- return t;
- var n = s.length - 1;
- if (0 > t)
- t = s[0];
- else if (t > n)
- t = s[n];
- else {
- n = Math.floor(t);
- var T = t - n;
- }
- return typeof T < "u" && typeof s[n] < "u" ? s[n] + (T ? T * (s[n + 1] - s[n]) : 0) : t;
- }
- function C(t) {
- var s = this.ordinal, n = s.positions;
- if (!n)
- return t;
- var T = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
- if (0 < T && T < this.left + this.len || (s.extendedOrdinalPositions || (s.extendedOrdinalPositions = s.getExtendedPositions()), n = s.extendedOrdinalPositions), n && n.length) {
- if (t = s.getIndexOfPoint(T, n), s = U(t % 1), 0 <= t && t < n.length - 1)
- return n[Math.floor(t)] + s * (n[Math.ceil(t)] - n[Math.floor(t)]);
- s = n.length, T = n[0], n = n[s - 1];
- var _ = (n - T) / (s - 1);
- return 0 > t ? T + _ * t : n + _ * (t - s);
- }
- return t;
- }
- function b(t, s) {
- var n = A.Additions.findIndexOf(t, s, !0);
- return t[n] === s ? n : n + (s - t[n]) / (t[n + 1] - t[n]);
- }
- function w() {
- this.ordinal || (this.ordinal = new A.Additions(this));
- }
- function x() {
- this.isXAxis && N(this.options.overscroll) && this.max === this.dataMax && (!this.chart.mouseIsDown || this.isInternal) && (!this.eventArgs || this.eventArgs && this.eventArgs.trigger !== "navigator") && (this.max += this.options.overscroll, !this.isInternal && N(this.userMin) && (this.min += this.options.overscroll));
- }
- function a() {
- this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
- }
- function c() {
- this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
- }
- function p(t) {
- var s = this.xAxis[0], n = s.options.overscroll, T = t.originalEvent.chartX, _ = this.options.chart.panning, D = !1;
- if (_ && _.type !== "y" && s.options.ordinal && s.series.length) {
- var W = this.mouseDownX, P = s.getExtremes(), X = P.dataMax, g = P.min, m = P.max, L = this.hoverPoints, Y = s.closestPointRange || s.ordinal && s.ordinal.overscrollPointsRange;
- W = (W - T) / (s.translationSlope * (s.ordinal.slope || Y)), Y = { ordinal: { positions: s.ordinal.getExtendedPositions() } };
- var V = s.index2val, Q = s.val2lin, k = void 0, G = k = void 0, z = void 0;
- Y.ordinal.positions ? 1 < Math.abs(W) && (L && L.forEach(function($) {
- $.setState();
- }), 0 > W ? (G = Y, z = s.ordinal.positions ? s : Y) : (G = s.ordinal.positions ? s : Y, z = Y), k = z.ordinal.positions, X > k[k.length - 1] && k.push(X), this.fixedRange = m - g, k = s.navigatorAxis.toFixedRange(void 0, void 0, V.apply(G, [Q.apply(G, [g, !0]) + W]), V.apply(z, [Q.apply(z, [m, !0]) + W])), k.min >= Math.min(
- P.dataMin,
- g
- ) && k.max <= Math.max(X, m) + n && s.setExtremes(k.min, k.max, !0, !1, { trigger: "pan" }), this.mouseDownX = T, F(this.container, { cursor: "move" })) : D = !0;
- } else
- D = !0;
- D || _ && /y/.test(_.type) ? n && (s.max = s.dataMax + n) : t.preventDefault();
- }
- function i() {
- var t = this.xAxis;
- t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
- }
- function h(t, s) {
- var n = this.ordinal, T = n.positions, _ = n.slope, D = n.extendedOrdinalPositions;
- if (!T)
- return t;
- var W = T.length;
- if (T[0] <= t && T[W - 1] >= t)
- t = b(T, t);
- else {
- if (D || (D = n.getExtendedPositions && n.getExtendedPositions(), n.extendedOrdinalPositions = D), !D || !D.length)
- return t;
- W = D.length, _ || (_ = (D[W - 1] - D[0]) / W), T = b(D, T[0]), t >= D[0] && t <= D[W - 1] ? t = b(D, t) - T : t < D[0] ? (t = D[0] - t, t = -T - t / _) : (t -= D[W - 1], t = t / _ + W - T);
- }
- return s ? t : _ * (t || 0) + n.offset;
- }
- A.compose = function(t, s, n) {
- if (d.indexOf(t) === -1) {
- d.push(t);
- var T = t.prototype;
- T.getTimeTicks = O, T.index2val = B, T.lin2val = C, T.val2lin = h, T.ordinal2lin = T.val2lin, H(t, "afterInit", w), H(t, "foundExtremes", x), H(t, "afterSetScale", a), H(t, "initialAxisTranslation", c);
- }
- return d.indexOf(n) === -1 && (d.push(n), H(n, "pan", p)), d.indexOf(s) === -1 && (d.push(s), H(s, "updatedData", i)), t;
- };
- var o = function() {
- function t(s) {
- this.index = {}, this.axis = s;
- }
- return t.prototype.beforeSetTickPositions = function() {
- var s = this.axis, n = s.ordinal, T = s.getExtremes(), _ = T.min, D = T.max, W = s.isXAxis && !!s.options.breaks;
- T = s.options.ordinal;
- var P = s.chart.options.chart.ignoreHiddenSeries, X, g, m = [], L = Number.MAX_VALUE, Y = !1;
- if (T || W) {
- s.series.forEach(function(k, G) {
- if (X = [], !(P && k.visible === !1 || k.takeOrdinalPosition === !1 && !W) && (m = m.concat(k.processedXData), V = m.length, m.sort(function(z, $) {
- return z - $;
- }), L = Math.min(L, S(k.closestPointRange, L)), V)) {
- for (G = 0; G < V - 1; )
- m[G] !== m[G + 1] && X.push(m[G + 1]), G++;
- X[0] !== m[0] && X.unshift(m[0]), m = X;
- }
- });
- var V = m.length;
- if (2 < V) {
- var Q = m[1] - m[0];
- for (g = V - 1; g-- && !Y; )
- m[g + 1] - m[g] !== Q && (Y = !0);
- !s.options.keepOrdinalPadding && (m[0] - _ > Q || D - m[m.length - 1] > Q) && (Y = !0);
- } else
- s.options.overscroll && (V === 2 ? L = m[1] - m[0] : V === 1 ? (L = s.options.overscroll, m = [m[0], m[0] + L]) : L = n.overscrollPointsRange);
- Y || s.forceOrdinal ? (s.options.overscroll && (n.overscrollPointsRange = L, m = m.concat(n.getOverscrollPositions())), n.positions = m, Q = s.ordinal2lin(Math.max(_, m[0]), !0), g = Math.max(s.ordinal2lin(Math.min(D, m[m.length - 1]), !0), 1), n.slope = D = (D - _) / (g - Q), n.offset = _ - Q * D) : (n.overscrollPointsRange = S(s.closestPointRange, n.overscrollPointsRange), n.positions = s.ordinal.slope = n.offset = void 0);
- }
- s.isOrdinal = T && Y, n.groupIntervalFactor = null;
- }, t.findIndexOf = function(s, n, T) {
- for (var _ = 0, D = s.length - 1, W; _ < D; )
- W = Math.ceil((_ + D) / 2), s[W] <= n ? _ = W : D = W - 1;
- return s[_] === n || T ? _ : -1;
- }, t.prototype.getExtendedPositions = function() {
- var s = this, n = s.axis, T = n.constructor.prototype, _ = n.chart, D = n.series[0].currentDataGrouping, W = D ? D.count + D.unitName : "raw", P = n.options.overscroll, X = n.getExtremes(), g = void 0, m = s.index;
- if (m || (m = s.index = {}), !m[W]) {
- var L = {
- series: [],
- chart: _,
- forceOrdinal: !1,
- getExtremes: function() {
- return { min: X.dataMin, max: X.dataMax + P };
- },
- getGroupPixelWidth: T.getGroupPixelWidth,
- getTimeTicks: T.getTimeTicks,
- options: { ordinal: !0 },
- ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
- ordinal2lin: T.ordinal2lin,
- getIndexOfPoint: T.getIndexOfPoint,
- val2lin: T.val2lin
- };
- L.ordinal.axis = L, n.series.forEach(function(Y) {
- g = { xAxis: L, xData: Y.xData.slice(), chart: _, destroyGroupedData: j.noop, getProcessedData: I.prototype.getProcessedData, applyGrouping: I.prototype.applyGrouping }, g.xData = g.xData.concat(s.getOverscrollPositions()), g.options = { dataGrouping: D ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[D.unitName, [D.count]]] } : { enabled: !1 } }, L.series.push(g), Y.processData.apply(g);
- }), g.closestPointRange !== g.basePointRange && g.currentDataGrouping && (L.forceOrdinal = !0), n.ordinal.beforeSetTickPositions.apply({ axis: L }), m[W] = L.ordinal.positions;
- }
- return m[W];
- }, t.prototype.getGroupIntervalFactor = function(s, n, T) {
- T = T.processedXData;
- var _ = T.length, D = [], W = this.groupIntervalFactor;
- if (!W) {
- for (W = 0; W < _ - 1; W++)
- D[W] = T[W + 1] - T[W];
- D.sort(function(P, X) {
- return P - X;
- }), D = D[Math.floor(_ / 2)], s = Math.max(s, T[0]), n = Math.min(n, T[_ - 1]), this.groupIntervalFactor = W = _ * D / (n - s);
- }
- return W;
- }, t.prototype.getIndexOfPoint = function(s, n) {
- var T = this.axis, _ = this.positions ? this.positions[0] : 0, D = T.series[0].points && T.series[0].points[0] && T.series[0].points[0].plotX || T.minPixelPadding;
- return 1 < T.series.length && T.series.forEach(function(W) {
- W.points && N(W.points[0]) && N(W.points[0].plotX) && W.points[0].plotX < D && (D = W.points[0].plotX);
- }), s = (s - D) / (T.translationSlope * (this.slope || T.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(n, _) + s;
- }, t.prototype.getOverscrollPositions = function() {
- var s = this.axis, n = s.options.overscroll, T = this.overscrollPointsRange, _ = [], D = s.dataMax;
- if (N(T))
- for (; D <= s.dataMax + n; )
- D += T, _.push(D);
- return _;
- }, t.prototype.postProcessTickInterval = function(s) {
- var n = this.axis, T = this.slope;
- return T ? n.options.breaks ? n.closestPointRange || s : s / (T / n.closestPointRange) : s;
- }, t;
- }();
- A.Additions = o;
- }(u || (u = {})), u;
- }), E(l, "Series/DataModifyComposition.js", [l["Core/Axis/Axis.js"], l["Core/Series/Point.js"], l["Core/Series/Series.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = j.prototype.tooltipFormatter, U = Z.addEvent, F = Z.arrayMax, N = Z.arrayMin, R = Z.correctFloat, S = Z.defined, v = Z.isArray, d = Z.isNumber, u = Z.isString, A = Z.pick, O;
- return function(B) {
- function C(s, n, T) {
- this.isXAxis || (this.series.forEach(function(_) {
- s === "compare" && typeof n != "boolean" ? _.setCompare(n, !1) : s !== "cumulative" || u(n) || _.setCumulative(n, !1);
- }), A(T, !0) && this.chart.redraw());
- }
- function b(s) {
- var n = this, T = n.series.chart.numberFormatter, _ = function(D) {
- s = s.replace("{point." + D + "}", (0 < n[D] && D === "change" ? "+" : "") + T(n[D], A(n.series.tooltipOptions.changeDecimals, 2)));
- };
- return S(n.change) && _("change"), S(n.cumulativeSum) && _("cumulativeSum"), H.apply(this, [s]);
- }
- function w() {
- var s = this.options.compare;
- if (s === "percent" || s === "value" || this.options.cumulative) {
- var n = new t(this);
- s === "percent" || s === "value" ? n.initCompare(s) : n.initCumulative();
- }
- this.dataModify = n;
- }
- function x(s) {
- s = s.dataExtremes;
- var n = s.activeYData;
- if (this.dataModify && s) {
- var T = void 0;
- this.options.compare ? T = [this.dataModify.modifyValue(s.dataMin), this.dataModify.modifyValue(s.dataMax)] : this.options.cumulative && v(n) && 2 <= n.length && (T = t.getCumulativeExtremes(n)), T && (s.dataMin = N(T), s.dataMax = F(T));
- }
- }
- function a(s, n) {
- this.options.compare = this.userOptions.compare = s, this.update({}, A(n, !0)), !this.dataModify || s !== "value" && s !== "percent" ? this.points.forEach(function(T) {
- delete T.change;
- }) : this.dataModify.initCompare(s);
- }
- function c() {
- if (this.xAxis && this.processedYData && this.dataModify) {
- var s = this.processedXData, n = this.processedYData, T = n.length, _ = this.options.compareStart === !0 ? 0 : 1, D = -1, W;
- for (this.pointArrayMap && (D = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), W = 0; W < T - _; W++) {
- var P = n[W] && -1 < D ? n[W][D] : n[W];
- if (d(P) && P !== 0 && s[W + _] >= (this.xAxis.min || 0)) {
- this.dataModify.compareValue = P;
- break;
- }
- }
- }
- }
- function p(s, n) {
- this.setModifier("compare", s, n);
- }
- function i(s, n) {
- s = A(s, !1), this.options.cumulative = this.userOptions.cumulative = s, this.update({}, A(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(T) {
- delete T.cumulativeSum;
- });
- }
- function h(s, n) {
- this.setModifier("cumulative", s, n);
- }
- var o = [];
- B.compose = function(s, n, T) {
- if (o.indexOf(s) === -1) {
- o.push(s);
- var _ = s.prototype;
- _.setCompare = a, _.setCumulative = i, U(s, "afterInit", w), U(s, "afterGetExtremes", x), U(s, "afterProcessData", c);
- }
- return o.indexOf(n) === -1 && (o.push(n), n = n.prototype, n.setCompare = p, n.setModifier = C, n.setCumulative = h), o.indexOf(T) === -1 && (o.push(T), T.prototype.tooltipFormatter = b), s;
- };
- var t = function() {
- function s(n) {
- this.series = n;
- }
- return s.prototype.modifyValue = function() {
- return 0;
- }, s.getCumulativeExtremes = function(n) {
- var T = 1 / 0, _ = -1 / 0;
- return n.reduce(function(D, W) {
- return W = D + W, T = Math.min(T, W, D), _ = Math.max(
- _,
- W,
- D
- ), W;
- }), [T, _];
- }, s.prototype.initCompare = function(n) {
- this.modifyValue = function(T, _) {
- T === null && (T = 0);
- var D = this.compareValue;
- return typeof T < "u" && typeof D < "u" ? (T = n === "value" ? T - D : T / D * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof _ < "u" && (_ = this.series.points[_]) && (_.change = T), T) : 0;
- };
- }, s.prototype.initCumulative = function() {
- this.modifyValue = function(n, T) {
- if (n === null && (n = 0), n !== void 0 && T !== void 0) {
- var _ = 0 < T ? this.series.points[T - 1] : null;
- return _ && _.cumulativeSum && (n = R(_.cumulativeSum + n)), (T = this.series.points[T]) && (T.cumulativeSum = n), n;
- }
- return 0;
- };
- }, s;
- }();
- B.Additions = t;
- }(O || (O = {})), O;
- }), E(l, "Core/Axis/BrokenAxis.js", [l["Extensions/Stacking.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.addEvent, Z = j.find, H = j.fireEvent, U = j.isArray, F = j.isNumber, N = j.pick, R;
- return function(S) {
- function v() {
- typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
- }
- function d() {
- this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
- }
- function u() {
- var a = this.brokenAxis;
- if (a && a.hasBreaks) {
- for (var c = this.tickPositions, p = this.tickPositions.info, i = [], h = 0; h < c.length; h++)
- a.isInAnyBreak(c[h]) || i.push(c[h]);
- this.tickPositions = i, this.tickPositions.info = p;
- }
- }
- function A() {
- this.brokenAxis || (this.brokenAxis = new x(this));
- }
- function O() {
- var a = this.options.connectNulls, c = this.points, p = this.xAxis, i = this.yAxis;
- if (this.isDirty)
- for (var h = c.length; h--; ) {
- var o = c[h], t = !(o.y === null && a === !1) && (p && p.brokenAxis && p.brokenAxis.isInAnyBreak(o.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(o.y, !0));
- o.visible = t ? !1 : o.options.visible !== !1;
- }
- }
- function B() {
- this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, N(this.pointArrayMap, ["y"]));
- }
- function C(a, c) {
- var p = this, i = p.points, h, o, t, s;
- if (a && a.brokenAxis && a.brokenAxis.hasBreaks) {
- var n = a.brokenAxis;
- c.forEach(function(T) {
- h = n && n.breakArray || [], o = a.isXAxis ? a.min : N(p.options.threshold, a.min), i.forEach(function(_) {
- s = N(_["stack" + T.toUpperCase()], _[T]), h.forEach(function(D) {
- F(o) && F(s) && (t = !1, o < D.from && s > D.to || o > D.from && s < D.from ? t = "pointBreak" : (o < D.from && s > D.from && s < D.to || o > D.from && s > D.to && s < D.from) && (t = "pointInBreak"), t && H(a, t, { point: _, brk: D }));
- });
- });
- });
- }
- }
- function b() {
- var a = this.currentDataGrouping, c = a && a.gapSize;
- a = this.points.slice();
- var p = this.yAxis, i = this.options.gapSize, h = a.length - 1, o;
- if (i && 0 < h)
- for (this.options.gapUnit !== "value" && (i *= this.basePointRange), c && c > i && c >= this.basePointRange && (i = c), o = void 0; h--; )
- o && o.visible !== !1 || (o = a[h + 1]), c = a[h], o.visible !== !1 && c.visible !== !1 && (o.x - c.x > i && (o = (c.x + o.x) / 2, a.splice(h + 1, 0, { isNull: !0, x: o }), p.stacking && this.options.stacking && (o = p.stacking.stacks[this.stackKey][o] = new y(p, p.options.stackLabels, !1, o, this.stack), o.total = 0)), o = c);
- return this.getGraphPath(a);
- }
- var w = [];
- S.compose = function(a, c) {
- if (w.indexOf(a) === -1 && (w.push(a), a.keepProps.push("brokenAxis"), I(a, "init", A), I(a, "afterInit", v), I(a, "afterSetTickPositions", u), I(a, "afterSetOptions", d)), w.indexOf(c) === -1) {
- w.push(c);
- var p = c.prototype;
- p.drawBreaks = C, p.gappedPath = b, I(c, "afterGeneratePoints", O), I(
- c,
- "afterRender",
- B
- );
- }
- return a;
- };
- var x = function() {
- function a(c) {
- this.hasBreaks = !1, this.axis = c;
- }
- return a.isInBreak = function(c, p) {
- var i = c.repeat || 1 / 0, h = c.from, o = c.to - c.from;
- return p = p >= h ? (p - h) % i : i - (h - p) % i, c.inclusive ? p <= o : p < o && p !== 0;
- }, a.lin2Val = function(c) {
- var p = this.brokenAxis;
- if (p = p && p.breakArray, !p || !F(c))
- return c;
- var i;
- for (i = 0; i < p.length; i++) {
- var h = p[i];
- if (h.from >= c)
- break;
- (h.to < c || a.isInBreak(h, c)) && (c += h.len);
- }
- return c;
- }, a.val2Lin = function(c) {
- var p = this.brokenAxis;
- if (p = p && p.breakArray, !p || !F(c))
- return c;
- var i = c, h;
- for (h = 0; h < p.length; h++) {
- var o = p[h];
- if (o.to <= c)
- i -= o.len;
- else {
- if (o.from >= c)
- break;
- if (a.isInBreak(o, c)) {
- i -= c - o.from;
- break;
- }
- }
- }
- return i;
- }, a.prototype.findBreakAt = function(c, p) {
- return Z(p, function(i) {
- return i.from < c && c < i.to;
- });
- }, a.prototype.isInAnyBreak = function(c, p) {
- var i = this.axis, h = i.options.breaks || [], o = h.length, t;
- if (o && F(c)) {
- for (; o--; )
- if (a.isInBreak(h[o], c)) {
- var s = !0;
- t || (t = N(h[o].showPoints, !i.isXAxis));
- }
- var n = s && p ? s && !t : s;
- }
- return n;
- }, a.prototype.setBreaks = function(c, p) {
- var i = this, h = i.axis, o = U(c) && !!c.length;
- h.isDirty = i.hasBreaks !== o, i.hasBreaks = o, h.options.breaks = h.userOptions.breaks = c, h.forceRedraw = !0, h.series.forEach(function(t) {
- t.isDirty = !0;
- }), o || h.val2lin !== a.val2Lin || (delete h.val2lin, delete h.lin2val), o && (h.userOptions.ordinal = !1, h.lin2val = a.lin2Val, h.val2lin = a.val2Lin, h.setExtremes = function(t, s, n, T, _) {
- if (i.hasBreaks) {
- for (var D = this.options.breaks || [], W; W = i.findBreakAt(t, D); )
- t = W.to;
- for (; W = i.findBreakAt(s, D); )
- s = W.from;
- s < t && (s = t);
- }
- h.constructor.prototype.setExtremes.call(this, t, s, n, T, _);
- }, h.setAxisTranslation = function() {
- if (h.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
- var t = h.options.breaks || [], s = [], n = [], T = N(h.pointRangePadding, 0), _ = 0, D, W = h.userMin || h.min, P = h.userMax || h.max, X;
- t.forEach(function(L) {
- D = L.repeat || 1 / 0, F(W) && F(P) && (a.isInBreak(L, W) && (W += L.to % D - W % D), a.isInBreak(L, P) && (P -= P % D - L.from % D));
- }), t.forEach(function(L) {
- if (m = L.from, D = L.repeat || 1 / 0, F(W) && F(P)) {
- for (; m - D > W; )
- m -= D;
- for (; m < W; )
- m += D;
- for (X = m; X < P; X += D)
- s.push({ value: X, move: "in" }), s.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
- }
- }), s.sort(function(L, Y) {
- return L.value === Y.value ? (L.move === "in" ? 0 : 1) - (Y.move === "in" ? 0 : 1) : L.value - Y.value;
- });
- var g = 0, m = W;
- s.forEach(function(L) {
- g += L.move === "in" ? 1 : -1, g === 1 && L.move === "in" && (m = L.value), g === 0 && F(m) && (n.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), _ += L.value - m - (L.size || 0));
- }), i.breakArray = n, F(W) && F(P) && F(h.min) && (i.unitLength = P - W - _ + T, H(h, "afterBreaks"), h.staticScale ? h.transA = h.staticScale : i.unitLength && (h.transA *= (P - h.min + T) / i.unitLength), T && (h.minPixelPadding = h.transA * (h.minPointOffset || 0)), h.min = W, h.max = P);
- }
- }), N(p, !0) && h.chart.redraw();
- }, a;
- }();
- S.Additions = x;
- }(R || (R = {})), R;
- }), E(l, "masters/modules/broken-axis.src.js", [l["Core/Globals.js"], l["Core/Axis/BrokenAxis.js"]], function(y, j) {
- j.compose(y.Axis, y.Series);
- }), E(l, "Extensions/DataGrouping.js", [
- l["Core/Axis/Axis.js"],
- l["Core/Axis/DateTimeAxis.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Series/Point.js"],
- l["Core/Series/Series.js"],
- l["Core/Tooltip.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, N, R) {
- var S = I.format, v = U.prototype;
- I = R.addEvent;
- var d = R.arrayMax, u = R.arrayMin, A = R.correctFloat, O = R.defined, B = R.error, C = R.extend, b = R.isNumber, w = R.merge, x = R.pick, a = Z.approximations = {
- sum: function(t) {
- var s = t.length;
- if (!s && t.hasNulls)
- var n = null;
- else if (s)
- for (n = 0; s--; )
- n += t[s];
- return n;
- },
- average: function(t) {
- var s = t.length;
- return t = a.sum(t), b(t) && s && (t = A(t / s)), t;
- },
- averages: function() {
- var t = [];
- return [].forEach.call(arguments, function(s) {
- t.push(a.average(s));
- }), typeof t[0] > "u" ? void 0 : t;
- },
- open: function(t) {
- return t.length ? t[0] : t.hasNulls ? null : void 0;
- },
- high: function(t) {
- return t.length ? d(t) : t.hasNulls ? null : void 0;
- },
- low: function(t) {
- return t.length ? u(t) : t.hasNulls ? null : void 0;
- },
- close: function(t) {
- return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
- },
- hlc: function(t, s, n) {
- if (t = a.high(t), s = a.low(s), n = a.close(n), b(t) || b(s) || b(n))
- return [t, s, n];
- },
- ohlc: function(t, s, n, T) {
- if (t = a.open(t), s = a.high(s), n = a.low(n), T = a.close(T), b(t) || b(s) || b(n) || b(T))
- return [t, s, n, T];
- },
- range: function(t, s) {
- if (t = a.low(t), s = a.high(s), b(t) || b(s))
- return [t, s];
- if (t === null && s === null)
- return null;
- }
- };
- R = function(t, s, n, T) {
- var _ = this, D = _.data, W = _.options && _.options.data, P = [], X = [], g = [], m = t.length, L = !!s, Y = [], V = _.pointArrayMap, Q = V && V.length, k = ["x"].concat(V || ["y"]), G = this.options.dataGrouping && this.options.dataGrouping.groupAll, z = 0, $ = 0, q;
- T = typeof T == "function" ? T : a[T] ? a[T] : a[_.getDGApproximation && _.getDGApproximation() || "average"], Q ? V.forEach(function() {
- Y.push([]);
- }) : Y.push([]);
- var it = Q || 1;
- for (q = 0; q <= m && !(t[q] >= n[0]); q++)
- ;
- for (q; q <= m; q++) {
- for (; typeof n[z + 1] < "u" && t[q] >= n[z + 1] || q === m; ) {
- var et = n[z];
- _.dataGroupInfo = { start: G ? $ : _.cropStart + $, length: Y[0].length };
- var nt = T.apply(_, Y);
- for (_.pointClass && !O(_.dataGroupInfo.options) && (_.dataGroupInfo.options = w(_.pointClass.prototype.optionsToObject.call({ series: _ }, _.options.data[_.cropStart + $])), k.forEach(function(ct) {
- delete _.dataGroupInfo.options[ct];
- })), typeof nt < "u" && (P.push(et), X.push(nt), g.push(_.dataGroupInfo)), $ = q, et = 0; et < it; et++)
- Y[et].length = 0, Y[et].hasNulls = !1;
- if (z += 1, q === m)
- break;
- }
- if (q === m)
- break;
- if (V) {
- et = _.options.dataGrouping && _.options.dataGrouping.groupAll ? q : _.cropStart + q, nt = D && D[et] || _.pointClass.prototype.applyOptions.apply({ series: _ }, [W[et]]);
- var rt = void 0;
- for (et = 0; et < Q; et++)
- rt = nt[V[et]], b(rt) ? Y[et].push(rt) : rt === null && (Y[et].hasNulls = !0);
- } else
- et = L ? s[q] : null, b(et) ? Y[0].push(et) : et === null && (Y[0].hasNulls = !0);
- }
- return { groupedXData: P, groupedYData: X, groupMap: g };
- };
- var c = { approximations: a, groupData: R }, p = v.generatePoints, i = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: [
- "%A, %b %e, %H:%M:%S.%L",
- "%A, %b %e, %H:%M:%S.%L",
- "-%H:%M:%S.%L"
- ], second: ["%A, %b %e, %H:%M:%S", "%A, %b %e, %H:%M:%S", "-%H:%M:%S"], minute: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], hour: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], day: ["%A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], week: ["Week from %A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], month: ["%B %Y", "%B", "-%B %Y"], year: ["%Y", "%Y", "-%Y"] } }, h = {
- line: {},
- spline: {},
- area: {},
- areaspline: {},
- arearange: {},
- column: { groupPixelWidth: 10 },
- columnrange: { groupPixelWidth: 10 },
- candlestick: { groupPixelWidth: 10 },
- ohlc: { groupPixelWidth: 5 },
- hlc: { groupPixelWidth: 5 },
- heikinashi: { groupPixelWidth: 10 }
- }, o = Z.defaultDataGroupingUnits = [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1]], ["week", [1]], ["month", [1, 3, 6]], ["year", null]];
- return v.getDGApproximation = function() {
- return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") ? "sum" : "average";
- }, v.groupData = R, v.applyGrouping = function(t) {
- var s = this.chart, n = this.options.dataGrouping, T = this.allowDG !== !1 && n && x(n.enabled, s.options.isStock), _ = this.visible || !s.options.chart.ignoreHiddenSeries, D, W = this.currentDataGrouping, P = !1;
- if (T && !this.requireSorting && (this.requireSorting = P = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !T, P && (this.requireSorting = !1), !t) {
- this.destroyGroupedData(), T = n.groupAll ? this.xData : this.processedXData;
- var X = n.groupAll ? this.yData : this.processedYData;
- t = s.plotSizeX, P = this.xAxis;
- var g = P.options.ordinal, m = this.groupPixelWidth;
- if (m && T && T.length) {
- this.isDirty = D = !0, this.points = null;
- var L = P.getExtremes(), Y = L.min;
- L = L.max, g = g && P.ordinal && P.ordinal.getGroupIntervalFactor(Y, L, this) || 1, t = P.getTimeTicks(j.Additions.prototype.normalizeTimeTickInterval(m * (L - Y) / t * g, n.units || o), Math.min(Y, T[0]), Math.max(L, T[T.length - 1]), P.options.startOfWeek, T, this.closestPointRange), m = v.groupData.apply(this, [T, X, t, n.approximation]), T = m.groupedXData, X = m.groupedYData, g = 0, n && n.smoothed && T.length && (n.firstAnchor = "firstPoint", n.anchor = "middle", n.lastAnchor = "lastPoint", B(32, !1, s, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), s = T;
- var V = this.options.dataGrouping;
- if (Y = this.currentDataGrouping && this.currentDataGrouping.gapSize, V && this.xData && Y && this.groupMap) {
- var Q = s.length - 1, k = V.anchor, G = x(V.firstAnchor, k);
- if (V = x(V.lastAnchor, k), k && k !== "start") {
- var z = Y * { middle: 0.5, end: 1 }[k];
- for (k = s.length - 1; k-- && 0 < k; )
- s[k] += z;
- }
- if (G && G !== "start" && this.xData[0] >= s[0]) {
- k = this.groupMap[0].start, z = this.groupMap[0].length;
- var $ = void 0;
- b(k) && b(z) && ($ = k + (z - 1)), s[0] = { middle: s[0] + 0.5 * Y, end: s[0] + Y, firstPoint: this.xData[0], lastPoint: $ && this.xData[$] }[G];
- }
- V && V !== "start" && Y && s[Q] >= L - Y && (L = this.groupMap[this.groupMap.length - 1].start, s[Q] = { middle: s[Q] + 0.5 * Y, end: s[Q] + Y, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[V]);
- }
- for (L = 1; L < t.length; L++)
- t.info.segmentStarts && t.info.segmentStarts.indexOf(L) !== -1 || (g = Math.max(t[L] - t[L - 1], g));
- L = t.info, L.gapSize = g, this.closestPointRange = t.info.totalRange, this.groupMap = m.groupMap, _ && (_ = T, O(_[0]) && b(P.min) && b(P.dataMin) && _[0] < P.min && ((!O(P.options.min) && P.min <= P.dataMin || P.min === P.dataMin) && (P.min = Math.min(_[0], P.min)), P.dataMin = Math.min(_[0], P.dataMin)), O(_[_.length - 1]) && b(P.max) && b(P.dataMax) && _[_.length - 1] > P.max && ((!O(P.options.max) && b(P.dataMax) && P.max >= P.dataMax || P.max === P.dataMax) && (P.max = Math.max(_[_.length - 1], P.max)), P.dataMax = Math.max(_[_.length - 1], P.dataMax))), n.groupAll && (this.allGroupedData = X, n = this.cropData(T, X, P.min, P.max, 1), T = n.xData, X = n.yData, this.cropStart = n.start), this.processedXData = T, this.processedYData = X;
- } else
- this.groupMap = null;
- this.hasGroupedData = D, this.currentDataGrouping = L, this.preventGraphAnimation = (W && W.totalRange) !== (L && L.totalRange);
- }
- }, v.destroyGroupedData = function() {
- this.groupedData && (this.groupedData.forEach(function(t, s) {
- t && (this.groupedData[s] = t.destroy ? t.destroy() : null);
- }, this), this.groupedData.length = 0);
- }, v.generatePoints = function() {
- p.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
- }, y.prototype.applyGrouping = function(t) {
- var s = this;
- s.series.forEach(function(n) {
- n.groupPixelWidth = void 0, n.groupPixelWidth = s.getGroupPixelWidth && s.getGroupPixelWidth(), n.groupPixelWidth && (n.hasProcessed = !0), n.applyGrouping(!!t.hasExtemesChanged);
- });
- }, y.prototype.getGroupPixelWidth = function() {
- var t = this.series, s = t.length, n, T = 0, _ = !1, D;
- for (n = s; n--; )
- (D = t[n].options.dataGrouping) && (T = Math.max(T, x(D.groupPixelWidth, i.groupPixelWidth)));
- for (n = s; n--; )
- (D = t[n].options.dataGrouping) && (s = (t[n].processedXData || t[n].data).length, (t[n].groupPixelWidth || s > this.chart.plotSizeX / T || s && D.forced) && (_ = !0));
- return _ ? T : 0;
- }, y.prototype.setDataGrouping = function(t, s) {
- var n;
- if (s = x(s, !0), t || (t = { forced: !1, units: null }), this instanceof y)
- for (n = this.series.length; n--; )
- this.series[n].update({ dataGrouping: t }, !1);
- else
- this.chart.options.series.forEach(function(T) {
- T.dataGrouping = t;
- }, !1);
- this.ordinal && (this.ordinal.slope = void 0), s && this.chart.redraw();
- }, I(y, "postProcessData", y.prototype.applyGrouping), I(H, "update", function() {
- if (this.dataGroup)
- return B(
- 24,
- !1,
- this.series.chart
- ), !1;
- }), I(F, "headerFormatter", function(t) {
- var s = this.chart, n = s.time, T = t.labelConfig, _ = T.series, D = _.tooltipOptions, W = _.options.dataGrouping, P = D.xDateFormat, X = _.xAxis, g = D[t.isFooter ? "footerFormat" : "headerFormat"];
- if (X && X.options.type === "datetime" && W && b(T.key)) {
- var m = _.currentDataGrouping;
- if (W = W.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
- if (D = W[m.unitName], m.count === 1)
- P = D[0];
- else {
- P = D[1];
- var L = D[2];
- }
- else
- !P && W && X.dateTime && (P = X.dateTime.getXDateFormat(T.x, D.dateTimeLabelFormats));
- P = n.dateFormat(P, T.key), L && (P += n.dateFormat(L, T.key + m.totalRange - 1)), _.chart.styledMode && (g = this.styledModeFormat(g)), t.text = S(g, { point: C(T.point, { key: P }), series: _ }, s), t.preventDefault();
- }
- }), I(U, "destroy", v.destroyGroupedData), I(U, "afterSetOptions", function(t) {
- t = t.options;
- var s = this.type, n = this.chart.options.plotOptions, T = N.defaultOptions.plotOptions[s].dataGrouping, _ = this.useCommonDataGrouping && i;
- if (n && (h[s] || _)) {
- T || (T = w(i, h[s]));
- var D = this.chart.rangeSelector;
- t.dataGrouping = w(
- _,
- T,
- n.series && n.series.dataGrouping,
- n[s].dataGrouping,
- this.userOptions.dataGrouping,
- !t.isInternal && D && b(D.selected) && D.buttonOptions[D.selected].dataGrouping
- );
- }
- }), I(y, "afterSetScale", function() {
- this.series.forEach(function(t) {
- t.hasProcessed = !1;
- });
- }), Z.dataGrouping = c, c;
- }), E(l, "Series/HLC/HLCPoint.js", [l["Core/Series/SeriesRegistry.js"]], function(y) {
- var j = this && this.__extends || function() {
- var I = function(Z, H) {
- return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, F) {
- U.__proto__ = F;
- } || function(U, F) {
- for (var N in F)
- F.hasOwnProperty(N) && (U[N] = F[N]);
- }, I(Z, H);
- };
- return function(Z, H) {
- function U() {
- this.constructor = Z;
- }
- I(Z, H), Z.prototype = H === null ? Object.create(H) : (U.prototype = H.prototype, new U());
- };
- }();
- return function(I) {
- function Z() {
- var H = I !== null && I.apply(this, arguments) || this;
- return H.close = void 0, H.high = void 0, H.low = void 0, H.options = void 0, H.plotClose = void 0, H.series = void 0, H;
- }
- return j(Z, I), Z;
- }(y.seriesTypes.column.prototype.pointClass);
- }), E(
- l,
- "Series/HLC/HLCSeries.js",
- [l["Series/HLC/HLCPoint.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = this && this.__extends || function() {
- var N = function(R, S) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, d) {
- v.__proto__ = d;
- } || function(v, d) {
- for (var u in d)
- d.hasOwnProperty(u) && (v[u] = d[u]);
- }, N(R, S);
- };
- return function(R, S) {
- function v() {
- this.constructor = R;
- }
- N(R, S), R.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }(), H = j.seriesTypes.column, U = I.extend, F = I.merge;
- return I = function(N) {
- function R() {
- var S = N !== null && N.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S.yData = void 0, S;
- }
- return Z(R, N), R.prototype.extendStem = function(S, v, d) {
- var u = S[0];
- S = S[1], typeof u[2] == "number" && (u[2] = Math.max(d + v, u[2])), typeof S[2] == "number" && (S[2] = Math.min(d - v, S[2]));
- }, R.prototype.getPointPath = function(S, v) {
- v = v.strokeWidth();
- var d = S.series, u = v % 2 / 2, A = Math.round(S.plotX) - u, O = Math.round(S.shapeArgs.width / 2), B = [["M", A, Math.round(S.yBottom)], ["L", A, Math.round(S.plotHigh)]];
- return S.close !== null && (S = Math.round(S.plotClose) + u, B.push(["M", A, S], ["L", A + O, S]), d.extendStem(B, v / 2, S)), B;
- }, R.prototype.drawSinglePoint = function(S) {
- var v = S.series, d = v.chart, u = S.graphic, A = !u;
- typeof S.plotY < "u" && (u || (S.graphic = u = d.renderer.path().add(v.group)), d.styledMode || u.attr(v.pointAttribs(S, S.selected && "select")), v = v.getPointPath(S, u), u[A ? "attr" : "animate"]({ d: v }).addClass(S.getClassName(), !0));
- }, R.prototype.drawPoints = function() {
- this.points.forEach(this.drawSinglePoint);
- }, R.prototype.init = function() {
- N.prototype.init.apply(this, arguments), this.options.stacking = void 0;
- }, R.prototype.pointAttribs = function(S, v) {
- return S = N.prototype.pointAttribs.call(this, S, v), delete S.fill, S;
- }, R.prototype.toYData = function(S) {
- return [S.high, S.low, S.close];
- }, R.prototype.translate = function() {
- var S = this, v = S.yAxis, d = this.pointArrayMap && this.pointArrayMap.slice() || [], u = d.map(function(A) {
- return "plot" + (A.charAt(0).toUpperCase() + A.slice(1));
- });
- u.push("yBottom"), d.push("low"), N.prototype.translate.apply(S), S.points.forEach(function(A) {
- d.forEach(function(O, B) {
- O = A[O], O !== null && (S.dataModify && (O = S.dataModify.modifyValue(O)), A[u[B]] = v.toPixels(O, !0));
- }), A.tooltipPos[1] = A.plotHigh + v.pos - S.chart.plotTop;
- });
- }, R.defaultOptions = F(H.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), R;
- }(H), U(I.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
- stroke: "color",
- "stroke-width": "lineWidth"
- }, pointValKey: "close" }), I.prototype.pointClass = y, j.registerSeriesType("hlc", I), I;
- }
- ), E(l, "Series/OHLC/OHLCPoint.js", [l["Core/Series/SeriesRegistry.js"]], function(y) {
- var j = this && this.__extends || function() {
- var I = function(Z, H) {
- return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, F) {
- U.__proto__ = F;
- } || function(U, F) {
- for (var N in F)
- F.hasOwnProperty(N) && (U[N] = F[N]);
- }, I(Z, H);
- };
- return function(Z, H) {
- function U() {
- this.constructor = Z;
- }
- I(Z, H), Z.prototype = H === null ? Object.create(H) : (U.prototype = H.prototype, new U());
- };
- }();
- return function(I) {
- function Z() {
- var H = I !== null && I.apply(this, arguments) || this;
- return H.open = void 0, H.options = void 0, H.plotOpen = void 0, H.series = void 0, H;
- }
- return j(Z, I), Z.prototype.getClassName = function() {
- return I.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
- }, Z.prototype.resolveUpColor = function() {
- this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
- }, Z.prototype.resolveColor = function() {
- I.prototype.resolveColor.call(this), this.resolveUpColor();
- }, Z.prototype.getZone = function() {
- var H = I.prototype.getZone.call(this);
- return this.resolveUpColor(), H;
- }, Z.prototype.applyOptions = function() {
- return I.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
- }, Z;
- }(y.seriesTypes.hlc.prototype.pointClass);
- }), E(
- l,
- "Series/OHLC/OHLCSeries.js",
- [l["Series/OHLC/OHLCPoint.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = this && this.__extends || function() {
- var v = function(d, u) {
- return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, O) {
- A.__proto__ = O;
- } || function(A, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (A[B] = O[B]);
- }, v(d, u);
- };
- return function(d, u) {
- function A() {
- this.constructor = d;
- }
- v(d, u), d.prototype = u === null ? Object.create(u) : (A.prototype = u.prototype, new A());
- };
- }(), H = j.series, U = j.seriesTypes.hlc, F = I.addEvent, N = I.extend, R = I.merge, S = function(v) {
- function d() {
- var u = v !== null && v.apply(this, arguments) || this;
- return u.data = void 0, u.options = void 0, u.points = void 0, u;
- }
- return Z(d, v), d.prototype.getPointPath = function(u, A) {
- var O = v.prototype.getPointPath.call(this, u, A);
- A = A.strokeWidth();
- var B = A % 2 / 2, C = Math.round(u.plotX) - B, b = Math.round(u.shapeArgs.width / 2);
- return u.open !== null && (u = Math.round(u.plotOpen) + B, O.push(["M", C, u], ["L", C - b, u]), v.prototype.extendStem.call(this, O, A / 2, u)), O;
- }, d.prototype.pointAttribs = function(u, A) {
- A = v.prototype.pointAttribs.call(this, u, A);
- var O = this.options;
- return delete A.fill, !u.options.color && O.upColor && u.open < u.close && (A.stroke = O.upColor), A;
- }, d.prototype.toYData = function(u) {
- return [u.open, u.high, u.low, u.close];
- }, d.defaultOptions = R(U.defaultOptions, { tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>' } }), d;
- }(U);
- return N(S.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), S.prototype.pointClass = y, j.registerSeriesType("ohlc", S), F(H, "init", function(v) {
- v = v.options, v.useOhlcData && v.id !== "highcharts-navigator-series" && N(this, { pointValKey: S.prototype.pointValKey, pointArrayMap: S.prototype.pointArrayMap, toYData: S.prototype.toYData });
- }), F(H, "afterSetOptions", function(v) {
- v = v.options;
- var d = v.dataGrouping;
- d && v.useOhlcData && v.id !== "highcharts-navigator-series" && (d.approximation = "ohlc");
- }), S;
- }
- ), E(l, "Series/Candlestick/CandlestickSeries.js", [l["Core/DefaultOptions.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var R = function(S, v) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, u) {
- d.__proto__ = u;
- } || function(d, u) {
- for (var A in u)
- u.hasOwnProperty(A) && (d[A] = u[A]);
- }, R(S, v);
- };
- return function(S, v) {
- function d() {
- this.constructor = S;
- }
- R(S, v), S.prototype = v === null ? Object.create(v) : (d.prototype = v.prototype, new d());
- };
- }(), H = y.defaultOptions;
- y = j.seriesTypes;
- var U = y.column, F = y.ohlc, N = I.merge;
- return I = function(R) {
- function S() {
- var v = R !== null && R.apply(this, arguments) || this;
- return v.data = void 0, v.options = void 0, v.points = void 0, v;
- }
- return Z(S, R), S.prototype.pointAttribs = function(v, d) {
- var u = U.prototype.pointAttribs.call(this, v, d), A = this.options, O = v.open < v.close, B = A.lineColor || this.color, C = v.color || this.color;
- return u["stroke-width"] = A.lineWidth, u.fill = v.options.color || O && A.upColor || C, u.stroke = v.options.lineColor || O && A.upLineColor || B, d && (v = A.states[d], u.fill = v.color || u.fill, u.stroke = v.lineColor || u.stroke, u["stroke-width"] = v.lineWidth || u["stroke-width"]), u;
- }, S.prototype.drawPoints = function() {
- var v = this, d = v.chart, u = v.yAxis.reversed;
- v.points.forEach(function(A) {
- var O = A.graphic, B = !O;
- if (typeof A.plotY < "u") {
- O || (A.graphic = O = d.renderer.path().add(v.group)), v.chart.styledMode || O.attr(v.pointAttribs(A, A.selected && "select")).shadow(v.options.shadow);
- var C = O.strokeWidth() % 2 / 2, b = Math.round(A.plotX) - C, w = A.plotOpen, x = A.plotClose, a = Math.min(w, x);
- w = Math.max(w, x);
- var c = Math.round(A.shapeArgs.width / 2);
- x = u ? w !== A.yBottom : Math.round(a) !== Math.round(A.plotHigh);
- var p = u ? Math.round(a) !== Math.round(A.plotHigh) : w !== A.yBottom;
- a = Math.round(a) + C, w = Math.round(w) + C, C = [], C.push(["M", b - c, w], ["L", b - c, a], ["L", b + c, a], ["L", b + c, w], ["Z"], ["M", b, a], ["L", b, x ? Math.round(u ? A.yBottom : A.plotHigh) : a], ["M", b, w], ["L", b, p ? Math.round(u ? A.plotHigh : A.yBottom) : w]), O[B ? "attr" : "animate"]({ d: C }).addClass(A.getClassName(), !0);
- }
- });
- }, S.defaultOptions = N(F.defaultOptions, H.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: H.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), S;
- }(F), j.registerSeriesType("candlestick", I), I;
- }), E(l, "Series/Flags/FlagsPoint.js", [l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = this && this.__extends || function() {
- var H = function(U, F) {
- return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(N, R) {
- N.__proto__ = R;
- } || function(N, R) {
- for (var S in R)
- R.hasOwnProperty(S) && (N[S] = R[S]);
- }, H(U, F);
- };
- return function(U, F) {
- function N() {
- this.constructor = U;
- }
- H(U, F), U.prototype = F === null ? Object.create(F) : (N.prototype = F.prototype, new N());
- };
- }(), Z = j.isNumber;
- return function(H) {
- function U() {
- var F = H !== null && H.apply(this, arguments) || this;
- return F.options = void 0, F.series = void 0, F;
- }
- return I(U, H), U.prototype.isValid = function() {
- return Z(this.y) || typeof this.y > "u";
- }, U.prototype.hasNewShapeType = function() {
- var F = this.options.shape || this.series.options.shape;
- return this.graphic && F && F !== this.graphic.symbolKey;
- }, U;
- }(y.seriesTypes.column.prototype.pointClass);
- }), E(l, "Series/OnSeriesComposition.js", [
- l["Series/Column/ColumnSeries.js"],
- l["Core/Series/Series.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I) {
- var Z = y.prototype, H = j.prototype, U = I.defined, F = I.stableSort, N;
- return function(R) {
- function S() {
- return H.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
- }
- function v() {
- Z.translate.apply(this);
- var u = this, A = u.options, O = u.chart, B = u.points, C = A.onSeries, b = (C = C && O.get(C)) && C.options.step, w = C && C.points, x = O.inverted, a = u.xAxis, c = u.yAxis;
- O = B.length - 1;
- var p;
- A = A.onKey || "y";
- var i = w && w.length, h = 0, o;
- if (C && C.visible && i) {
- h = (C.pointXOffset || 0) + (C.barW || 0) / 2;
- var t = C.currentDataGrouping, s = w[i - 1].x + (t ? t.totalRange : 0);
- for (F(B, function(_, D) {
- return _.x - D.x;
- }), A = "plot" + A[0].toUpperCase() + A.substr(1); i-- && B[O]; ) {
- var n = w[i];
- if (t = B[O], t.y = n.y, n.x <= t.x && typeof n[A] < "u") {
- if (t.x <= s && (t.plotY = n[A], n.x < t.x && !b && (o = w[i + 1]) && typeof o[A] < "u")) {
- var T = (t.x - n.x) / (o.x - n.x);
- t.plotY += T * (o[A] - n[A]), t.y += T * (o.y - n.y);
- }
- if (O--, i++, 0 > O)
- break;
- }
- }
- }
- B.forEach(function(_, D) {
- if (_.plotX += h, (typeof _.plotY > "u" || x) && (0 <= _.plotX && _.plotX <= a.len ? x ? (_.plotY = a.translate(_.x, 0, 1, 0, 1), _.plotX = U(_.y) ? c.translate(_.y, 0, 0, 0, 1) : 0) : _.plotY = (a.opposite ? 0 : u.yAxis.len) + a.offset : _.shapeArgs = {}), (p = B[D - 1]) && p.plotX === _.plotX) {
- typeof p.stackIndex > "u" && (p.stackIndex = 0);
- var W = p.stackIndex + 1;
- }
- _.stackIndex = W;
- }), this.onSeries = C;
- }
- var d = [];
- R.compose = function(u) {
- if (d.indexOf(u) === -1) {
- d.push(u);
- var A = u.prototype;
- A.getPlotBox = S, A.translate = v;
- }
- return u;
- }, R.getPlotBox = S, R.translate = v;
- }(N || (N = {})), N;
- }), E(
- l,
- "Series/Flags/FlagsSymbols.js",
- [l["Core/Renderer/RendererRegistry.js"], l["Core/Renderer/SVG/SVGRenderer.js"]],
- function(y, j) {
- function I(H) {
- Z[H + "pin"] = function(U, F, N, R, S) {
- var v = S && S.anchorX;
- S = S && S.anchorY, H === "circle" && R > N && (U -= Math.round((R - N) / 2), N = R);
- var d = Z[H](U, F, N, R);
- if (v && S) {
- var u = v;
- H === "circle" ? u = U + N / 2 : (U = d[0], N = d[1], U[0] === "M" && N[0] === "L" && (u = (U[1] + N[1]) / 2)), d.push(["M", u, F > S ? F : F + R], ["L", v, S]), d = d.concat(Z.circle(v - 1, S - 1, 2, 2));
- }
- return d;
- };
- }
- var Z = j.prototype.symbols;
- return Z.flag = function(H, U, F, N, R) {
- var S = R && R.anchorX || H;
- R = R && R.anchorY || U;
- var v = Z.circle(S - 1, R - 1, 2, 2);
- return v.push(["M", S, R], ["L", H, U + N], ["L", H, U], ["L", H + F, U], ["L", H + F, U + N], ["L", H, U + N], ["Z"]), v;
- }, I("circle"), I("square"), y = y.getRendererType(), y !== j && (y.prototype.symbols.circlepin = Z.circlepin, y.prototype.symbols.flag = Z.flag, y.prototype.symbols.squarepin = Z.squarepin), Z;
- }
- ), E(l, "Series/Flags/FlagsSeries.js", [
- l["Series/Flags/FlagsPoint.js"],
- l["Core/Globals.js"],
- l["Series/OnSeriesComposition.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F) {
- var N = this && this.__extends || function() {
- var C = function(b, w) {
- return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
- x.__proto__ = a;
- } || function(x, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (x[c] = a[c]);
- }, C(b, w);
- };
- return function(b, w) {
- function x() {
- this.constructor = b;
- }
- C(b, w), b.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }();
- j = j.noop;
- var R = Z.distribute, S = H.series, v = H.seriesTypes.column, d = F.addEvent, u = F.defined;
- Z = F.extend;
- var A = F.merge, O = F.objectEach, B = F.wrap;
- return F = function(C) {
- function b() {
- var w = C !== null && C.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w;
- }
- return N(b, C), b.prototype.animate = function(w) {
- w && this.setClip();
- }, b.prototype.drawPoints = function() {
- var w = this.points, x = this.chart, a = x.renderer, c = x.inverted, p = this.options, i = p.y, h, o = this.yAxis, t = {}, s = [];
- for (h = w.length; h--; ) {
- var n = w[h], T = (c ? n.plotY : n.plotX) > this.xAxis.len, _ = n.plotX, D = n.stackIndex, W = n.options.shape || p.shape, P = n.plotY;
- typeof P < "u" && (P = n.plotY + i - (typeof D < "u" && D * p.stackDistance)), n.anchorX = D ? void 0 : n.plotX;
- var X = D ? void 0 : n.plotY, g = W !== "flag";
- D = n.graphic, typeof P < "u" && 0 <= _ && !T ? (D && n.hasNewShapeType() && (D = D.destroy()), D || (D = n.graphic = a.label("", null, null, W, null, null, p.useHTML).addClass("highcharts-point").add(this.markerGroup), n.graphic.div && (n.graphic.div.point = n), D.isNew = !0), D.attr({
- align: g ? "center" : "left",
- width: p.width,
- height: p.height,
- "text-align": p.textAlign
- }), x.styledMode || D.attr(this.pointAttribs(n)).css(A(p.style, n.style)).shadow(p.shadow), 0 < _ && (_ -= D.strokeWidth() % 2), W = { y: P, anchorY: X }, p.allowOverlapX && (W.x = _, W.anchorX = n.anchorX), D.attr({ text: n.options.title || p.title || "A" })[D.isNew ? "attr" : "animate"](W), p.allowOverlapX || (t[n.plotX] ? t[n.plotX].size = Math.max(t[n.plotX].size, D.width) : t[n.plotX] = { align: g ? 0.5 : 0, size: D.width, target: _, anchorX: _ }), n.tooltipPos = [_, P + o.pos - x.plotTop]) : D && (n.graphic = D.destroy());
- }
- if (!p.allowOverlapX) {
- var m = 100;
- O(t, function(L) {
- L.plotX = L.anchorX, s.push(L), m = Math.max(L.size, m);
- }), R(s, c ? o.len : this.xAxis.len, m), w.forEach(function(L) {
- var Y = L.graphic && t[L.plotX];
- Y && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: Y.pos + Y.align * Y.size, anchorX: L.anchorX }), u(Y.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
- });
- }
- p.useHTML && B(this.markerGroup, "on", function(L) {
- return U.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
- });
- }, b.prototype.drawTracker = function() {
- var w = this.points;
- C.prototype.drawTracker.call(this), w.forEach(function(x) {
- var a = x.graphic;
- a && (x.unbindMouseOver && x.unbindMouseOver(), x.unbindMouseOver = d(a.element, "mouseover", function() {
- 0 < x.stackIndex && !x.raised && (x._y = a.y, a.attr({ y: x._y - 8 }), x.raised = !0), w.forEach(function(c) {
- c !== x && c.raised && c.graphic && (c.graphic.attr({ y: c._y }), c.raised = !1);
- });
- }));
- });
- }, b.prototype.pointAttribs = function(w, x) {
- var a = this.options, c = w && w.color || this.color, p = a.lineColor, i = w && w.lineWidth;
- return w = w && w.fillColor || a.fillColor, x && (w = a.states[x].fillColor, p = a.states[x].lineColor, i = a.states[x].lineWidth), { fill: w || c, stroke: p || c, "stroke-width": i || a.lineWidth || 0 };
- }, b.prototype.setClip = function() {
- S.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
- }, b.defaultOptions = A(v.defaultOptions, {
- pointRange: 0,
- allowOverlapX: !1,
- shape: "flag",
- stackDistance: 12,
- textAlign: "center",
- tooltip: { pointFormat: "{point.text}" },
- threshold: null,
- y: -30,
- fillColor: "#ffffff",
- lineWidth: 1,
- states: { hover: { lineColor: "#000000", fillColor: "#ccd6eb" } },
- style: { fontSize: "11px", fontWeight: "bold" }
- }), b;
- }(v), I.compose(F), Z(F.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: j, init: S.prototype.init, invertGroups: j }), H.registerSeriesType("flags", F), F;
- }), E(l, "Core/Axis/ScrollbarAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.defined, Z = y.pick;
- return function() {
- function H() {
- }
- return H.compose = function(U, F) {
- if (H.composed.indexOf(U) === -1)
- H.composed.push(U);
- else
- return U;
- var N = function(R) {
- var S = Z(R.options && R.options.min, R.min), v = Z(R.options && R.options.max, R.max);
- return { axisMin: S, axisMax: v, scrollMin: I(R.dataMin) ? Math.min(S, R.min, R.dataMin, Z(R.threshold, 1 / 0)) : S, scrollMax: I(R.dataMax) ? Math.max(v, R.max, R.dataMax, Z(R.threshold, -1 / 0)) : v };
- };
- return j(U, "afterInit", function() {
- var R = this;
- R.options && R.options.scrollbar && R.options.scrollbar.enabled && (R.options.scrollbar.vertical = !R.horiz, R.options.startOnTick = R.options.endOnTick = !1, R.scrollbar = new F(R.chart.renderer, R.options.scrollbar, R.chart), j(R.scrollbar, "changed", function(S) {
- var v = N(R), d = v.axisMax, u = v.scrollMin, A = v.scrollMax - u;
- I(v.axisMin) && I(d) && (R.horiz && !R.reversed || !R.horiz && R.reversed ? (v = u + A * this.to, u += A * this.from) : (v = u + A * (1 - this.from), u += A * (1 - this.to)), this.shouldUpdateExtremes(S.DOMType) ? R.setExtremes(u, v, !0, S.DOMType !== "mousemove" && S.DOMType !== "touchmove", S) : this.setRange(
- this.from,
- this.to
- ));
- }));
- }), j(U, "afterRender", function() {
- var R = N(this), S = R.scrollMin, v = R.scrollMax;
- R = this.scrollbar;
- var d = this.axisTitleMargin + (this.titleOffset || 0), u = this.chart.scrollbarsOffsets, A = this.options.margin || 0;
- R && (this.horiz ? (this.opposite || (u[1] += d), R.position(this.left, this.top + this.height + 2 + u[1] - (this.opposite ? A : 0), this.width, this.height), this.opposite || (u[1] += A), d = 1) : (this.opposite && (u[0] += d), R.position(
- R.options.opposite ? this.left + this.width + 2 + u[0] - (this.opposite ? 0 : A) : this.opposite ? 0 : A,
- this.top,
- this.width,
- this.height
- ), this.opposite && (u[0] += A), d = 0), u[d] += R.size + R.options.margin, isNaN(S) || isNaN(v) || !I(this.min) || !I(this.max) || this.min === this.max ? R.setRange(0, 1) : (u = (this.min - S) / (v - S), S = (this.max - S) / (v - S), this.horiz && !this.reversed || !this.horiz && this.reversed ? R.setRange(u, S) : R.setRange(1 - S, 1 - u)));
- }), j(U, "afterGetOffset", function() {
- var R = this.scrollbar && !this.scrollbar.options.opposite;
- R = this.horiz ? 2 : R ? 3 : 1;
- var S = this.scrollbar;
- S && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[R] += S.size + S.options.margin);
- }), U;
- }, H.composed = [], H;
- }();
- }), E(l, "Core/ScrollbarDefaults.js", [l["Core/Globals.js"]], function(y) {
- return {
- height: y.isTouchDevice ? 20 : 14,
- barBorderRadius: 0,
- buttonBorderRadius: 0,
- liveRedraw: void 0,
- margin: 10,
- minWidth: 6,
- opposite: !0,
- step: 0.2,
- zIndex: 3,
- barBackgroundColor: "#cccccc",
- barBorderWidth: 1,
- barBorderColor: "#cccccc",
- buttonArrowColor: "#333333",
- buttonBackgroundColor: "#e6e6e6",
- buttonBorderColor: "#cccccc",
- buttonBorderWidth: 1,
- rifleColor: "#333333",
- trackBackgroundColor: "#f2f2f2",
- trackBorderColor: "#f2f2f2",
- trackBorderWidth: 1
- };
- }), E(l, "Core/Scrollbar.js", [l["Core/DefaultOptions.js"], l["Core/Globals.js"], l["Core/Axis/ScrollbarAxis.js"], l["Core/ScrollbarDefaults.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = y.defaultOptions, F = H.addEvent, N = H.correctFloat, R = H.defined, S = H.destroyObjectProperties, v = H.fireEvent, d = H.merge, u = H.pick, A = H.removeEvent;
- return y = function() {
- function O(B, C, b) {
- this._events = [], this.chart = void 0, this.from = this.chartY = this.chartX = 0, this.scrollbar = this.renderer = this.options = this.group = void 0, this.scrollbarButtons = [], this.scrollbarGroup = void 0, this.scrollbarLeft = 0, this.scrollbarRifles = void 0, this.scrollbarStrokeWidth = 1, this.to = this.size = this.scrollbarTop = 0, this.track = void 0, this.trackBorderWidth = 1, this.userOptions = void 0, this.y = this.x = 0, this.init(B, C, b);
- }
- return O.compose = function(B) {
- I.compose(B, O);
- }, O.swapXY = function(B, C) {
- return C && B.forEach(function(b) {
- for (var w = b.length, x, a = 0; a < w; a += 2)
- x = b[a + 1], typeof x == "number" && (b[a + 1] = b[a + 2], b[a + 2] = x);
- }), B;
- }, O.prototype.addEvents = function() {
- var B = this.options.inverted ? [1, 0] : [0, 1], C = this.scrollbarButtons, b = this.scrollbarGroup.element, w = this.track.element, x = this.mouseDownHandler.bind(this), a = this.mouseMoveHandler.bind(this), c = this.mouseUpHandler.bind(this);
- B = [[C[B[0]].element, "click", this.buttonToMinClick.bind(this)], [C[B[1]].element, "click", this.buttonToMaxClick.bind(this)], [w, "click", this.trackClick.bind(this)], [b, "mousedown", x], [b.ownerDocument, "mousemove", a], [b.ownerDocument, "mouseup", c]], j.hasTouch && B.push(
- [b, "touchstart", x],
- [b.ownerDocument, "touchmove", a],
- [b.ownerDocument, "touchend", c]
- ), B.forEach(function(p) {
- F.apply(null, p);
- }), this._events = B;
- }, O.prototype.buttonToMaxClick = function(B) {
- var C = (this.to - this.from) * u(this.options.step, 0.2);
- this.updatePosition(this.from + C, this.to + C), v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: B });
- }, O.prototype.buttonToMinClick = function(B) {
- var C = N(this.to - this.from) * u(this.options.step, 0.2);
- this.updatePosition(N(this.from - C), N(this.to - C)), v(this, "changed", {
- from: this.from,
- to: this.to,
- trigger: "scrollbar",
- DOMEvent: B
- });
- }, O.prototype.cursorToScrollbarPosition = function(B) {
- var C = this.options;
- return C = C.minWidth > this.calculatedWidth ? C.minWidth : 0, { chartX: (B.chartX - this.x - this.xOffset) / (this.barWidth - C), chartY: (B.chartY - this.y - this.yOffset) / (this.barWidth - C) };
- }, O.prototype.destroy = function() {
- var B = this, C = B.chart.scroller;
- B.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(b) {
- B[b] && B[b].destroy && (B[b] = B[b].destroy());
- }), C && B === C.scrollbar && (C.scrollbar = null, S(C.scrollbarButtons));
- }, O.prototype.drawScrollbarButton = function(B) {
- var C = this.renderer, b = this.scrollbarButtons, w = this.options, x = this.size, a = C.g().add(this.group);
- b.push(a), a = C.rect().addClass("highcharts-scrollbar-button").add(a), this.chart.styledMode || a.attr({ stroke: w.buttonBorderColor, "stroke-width": w.buttonBorderWidth, fill: w.buttonBackgroundColor }), a.attr(a.crisp({ x: -0.5, y: -0.5, width: x + 1, height: x + 1, r: w.buttonBorderRadius }, a.strokeWidth())), a = C.path(O.swapXY([["M", x / 2 + (B ? -1 : 1), x / 2 - 3], ["L", x / 2 + (B ? -1 : 1), x / 2 + 3], ["L", x / 2 + (B ? 2 : -2), x / 2]], w.vertical)).addClass("highcharts-scrollbar-arrow").add(b[B]), this.chart.styledMode || a.attr({ fill: w.buttonArrowColor });
- }, O.prototype.init = function(B, C, b) {
- this.scrollbarButtons = [], this.renderer = B, this.userOptions = C, this.options = d(Z, U.scrollbar, C), this.chart = b, this.size = u(this.options.size, this.options.height), C.enabled && (this.render(), this.addEvents());
- }, O.prototype.mouseDownHandler = function(B) {
- B = this.chart.pointer.normalize(B), B = this.cursorToScrollbarPosition(B), this.chartX = B.chartX, this.chartY = B.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
- }, O.prototype.mouseMoveHandler = function(B) {
- var C = this.chart.pointer.normalize(B), b = this.options.vertical ? "chartY" : "chartX", w = this.initPositions || [];
- !this.grabbedCenter || B.touches && B.touches[0][b] === 0 || (C = this.cursorToScrollbarPosition(C)[b], b = this[b], b = C - b, this.hasDragged = !0, this.updatePosition(w[0] + b, w[1] + b), this.hasDragged && v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: B.type, DOMEvent: B }));
- }, O.prototype.mouseUpHandler = function(B) {
- this.hasDragged && v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: B.type, DOMEvent: B }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
- }, O.prototype.position = function(B, C, b, w) {
- var x = this.options.vertical, a = this.rendered ? "animate" : "attr", c = 0;
- this.x = B, this.y = C + this.trackBorderWidth, this.width = b, this.xOffset = this.height = w, this.yOffset = c, x ? (this.width = this.yOffset = b = c = this.size, this.xOffset = C = 0, this.barWidth = w - 2 * b, this.x = B += this.options.margin) : (this.height = this.xOffset = w = C = this.size, this.barWidth = b - 2 * w, this.y += this.options.margin), this.group[a]({ translateX: B, translateY: this.y }), this.track[a]({ width: b, height: w }), this.scrollbarButtons[1][a]({ translateX: x ? 0 : b - C, translateY: x ? w - c : 0 });
- }, O.prototype.removeEvents = function() {
- this._events.forEach(function(B) {
- A.apply(null, B);
- }), this._events.length = 0;
- }, O.prototype.render = function() {
- var B = this.renderer, C = this.options, b = this.size, w = this.chart.styledMode, x = B.g("scrollbar").attr({ zIndex: C.zIndex, translateY: -99999 }).add();
- this.group = x, this.track = B.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: C.trackBorderRadius || 0, height: b, width: b }).add(x), w || this.track.attr({ fill: C.trackBackgroundColor, stroke: C.trackBorderColor, "stroke-width": C.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = B.g().add(x), this.scrollbar = B.rect().addClass("highcharts-scrollbar-thumb").attr({ height: b, width: b, r: C.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = B.path(O.swapXY([["M", -3, b / 4], ["L", -3, 2 * b / 3], ["M", 0, b / 4], ["L", 0, 2 * b / 3], ["M", 3, b / 4], ["L", 3, 2 * b / 3]], C.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), w || (this.scrollbar.attr({ fill: C.barBackgroundColor, stroke: C.barBorderColor, "stroke-width": C.barBorderWidth }), this.scrollbarRifles.attr({ stroke: C.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-this.scrollbarStrokeWidth % 2 / 2, -this.scrollbarStrokeWidth % 2 / 2), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
- }, O.prototype.setRange = function(B, C) {
- var b = this.options, w = b.vertical, x = b.minWidth, a = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
- if (R(a)) {
- var p = a * Math.min(C, 1);
- B = Math.max(B, 0);
- var i = Math.ceil(a * B);
- this.calculatedWidth = p = N(p - i), p < x && (i = (a - x + p) * B, p = x), x = Math.floor(i + this.xOffset + this.yOffset), a = p / 2 - 0.5, this.from = B, this.to = C, w ? (this.scrollbarGroup[c]({ translateY: x }), this.scrollbar[c]({ height: p }), this.scrollbarRifles[c]({ translateY: a }), this.scrollbarTop = x, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: x }), this.scrollbar[c]({ width: p }), this.scrollbarRifles[c]({ translateX: a }), this.scrollbarLeft = x, this.scrollbarTop = 0), 12 >= p ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), b.showFull === !1 && (0 >= B && 1 <= C ? this.group.hide() : this.group.show()), this.rendered = !0;
- }
- }, O.prototype.shouldUpdateExtremes = function(B) {
- return u(this.options.liveRedraw, j.svg && !j.isTouchDevice && !this.chart.isBoosting) || B === "mouseup" || B === "touchend" || !R(B);
- }, O.prototype.trackClick = function(B) {
- var C = this.chart.pointer.normalize(B), b = this.to - this.from, w = this.y + this.scrollbarTop, x = this.x + this.scrollbarLeft;
- this.options.vertical && C.chartY > w || !this.options.vertical && C.chartX > x ? this.updatePosition(this.from + b, this.to + b) : this.updatePosition(this.from - b, this.to - b), v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: B });
- }, O.prototype.update = function(B) {
- this.destroy(), this.init(this.chart.renderer, d(
- !0,
- this.options,
- B
- ), this.chart);
- }, O.prototype.updatePosition = function(B, C) {
- 1 < C && (B = N(1 - N(C - B)), C = 1), 0 > B && (C = N(C - B), B = 0), this.from = B, this.to = C;
- }, O.defaultOptions = Z, O;
- }(), U.scrollbar = d(!0, y.defaultOptions, U.scrollbar), y;
- }), E(l, "Core/Axis/NavigatorAxis.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.isTouchDevice, Z = j.addEvent, H = j.correctFloat, U = j.defined, F = j.isNumber, N = j.pick, R = function() {
- function S(v) {
- this.axis = v;
- }
- return S.prototype.destroy = function() {
- this.axis = void 0;
- }, S.prototype.toFixedRange = function(v, d, u, A) {
- var O = this.axis, B = O.chart;
- B = B && B.fixedRange;
- var C = (O.pointRange || 0) / 2;
- return v = N(u, O.translate(v, !0, !O.horiz)), d = N(A, O.translate(d, !0, !O.horiz)), O = B && (d - v) / B, U(u) || (v = H(v + C)), U(A) || (d = H(d - C)), 0.7 < O && 1.3 > O && (A ? v = d - B : d = v + B), F(v) && F(d) || (v = d = void 0), { min: v, max: d };
- }, S;
- }();
- return function() {
- function S() {
- }
- return S.compose = function(v) {
- v.keepProps.push("navigatorAxis"), Z(v, "init", function() {
- this.navigatorAxis || (this.navigatorAxis = new R(this));
- }), Z(v, "zoom", function(d) {
- var u = this.chart.options, A = u.navigator, O = this.navigatorAxis, B = u.chart.pinchType, C = u.rangeSelector;
- u = u.chart.zoomType, this.isXAxis && (A && A.enabled || C && C.enabled) && (u === "y" ? d.zoomed = !1 : (!I && u === "xy" || I && B === "xy") && this.options.range && (A = O.previousZoom, U(d.newMin) ? O.previousZoom = [this.min, this.max] : A && (d.newMin = A[0], d.newMax = A[1], O.previousZoom = void 0))), typeof d.zoomed < "u" && d.preventDefault();
- });
- }, S.AdditionsClass = R, S;
- }();
- }), E(l, "Core/Navigator.js", [
- l["Core/Axis/Axis.js"],
- l["Core/Chart/Chart.js"],
- l["Core/Color/Color.js"],
- l["Core/Globals.js"],
- l["Core/Axis/NavigatorAxis.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Scrollbar.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S, v) {
- I = I.parse;
- var d = Z.hasTouch, u = Z.isTouchDevice, A = U.defaultOptions, O = v.addEvent, B = v.clamp, C = v.correctFloat, b = v.defined, w = v.destroyObjectProperties, x = v.erase, a = v.extend, c = v.find, p = v.isArray, i = v.isNumber, h = v.merge, o = v.pick, t = v.removeEvent, s = v.splat, n = function(_) {
- for (var D = [], W = 1; W < arguments.length; W++)
- D[W - 1] = arguments[W];
- if (D = [].filter.call(D, i), D.length)
- return Math[_].apply(0, D);
- };
- U = typeof S.seriesTypes.areaspline > "u" ? "line" : "areaspline", a(A, { navigator: { height: 40, margin: 25, maskInside: !0, handles: { width: 7, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: I("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
- type: U,
- fillOpacity: 0.05,
- lineWidth: 1,
- compare: null,
- dataGrouping: { approximation: "average", enabled: !0, groupPixelWidth: 2, firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", units: [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2, 3, 4]], ["week", [1, 2, 3]], ["month", [1, 3, 6]], ["year", null]] },
- dataLabels: { enabled: !1, zIndex: 2 },
- id: "highcharts-navigator-series",
- className: "highcharts-navigator-series",
- lineColor: null,
- marker: { enabled: !1 },
- threshold: null
- }, xAxis: { overscroll: 0, className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#999999" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: null }, tickLength: 0, tickWidth: 0 } } }), F.getRendererType().prototype.symbols["navigator-handle"] = function(_, D, W, P, X) {
- return _ = (X && X.width || 0) / 2, D = Math.round(_ / 3) + 0.5, X = X && X.height || 0, [["M", -_ - 1, 0.5], ["L", _, 0.5], ["L", _, X + 0.5], ["L", -_ - 1, X + 0.5], ["L", -_ - 1, 0.5], ["M", -D, 4], ["L", -D, X - 3], ["M", D - 1, 4], ["L", D - 1, X - 3]];
- };
- var T = function() {
- function _(D) {
- this.zoomedMin = this.zoomedMax = this.yAxis = this.xAxis = this.top = this.size = this.shades = this.rendered = this.range = this.outlineHeight = this.outline = this.opposite = this.navigatorSize = this.navigatorSeries = this.navigatorOptions = this.navigatorGroup = this.navigatorEnabled = this.left = this.height = this.handles = this.chart = this.baseSeries = void 0, this.init(D);
- }
- return _.prototype.drawHandle = function(D, W, P, X) {
- var g = this.navigatorOptions.handles.height;
- this.handles[W][X](P ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(D, 10) + 0.5 - g) } : { translateX: Math.round(this.left + parseInt(D, 10)), translateY: Math.round(this.top + this.height / 2 - g / 2 - 1) });
- }, _.prototype.drawOutline = function(D, W, P, X) {
- var g = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, Y = m % 2 / 2;
- m = this.outlineHeight;
- var V = this.scrollbarHeight || 0, Q = this.size, k = this.left - V, G = this.top;
- P ? (k -= L, P = G + W + Y, W = G + D + Y, Y = [["M", k + m, G - V - Y], ["L", k + m, P], ["L", k, P], ["L", k, W], ["L", k + m, W], ["L", k + m, G + Q + V]], g && Y.push(["M", k + m, P - L], ["L", k + m, W + L])) : (D += k + V - Y, W += k + V - Y, G += L, Y = [["M", k, G], ["L", D, G], ["L", D, G + m], ["L", W, G + m], ["L", W, G], ["L", k + Q + 2 * V, G]], g && Y.push(["M", D - L, G], ["L", W + L, G])), this.outline[X]({ d: Y });
- }, _.prototype.drawMasks = function(D, W, P, X) {
- var g = this.left, m = this.top, L = this.height;
- if (P)
- var Y = [g, g, g], V = [m, m + D, m + W], Q = [L, L, L], k = [D, W - D, this.size - W];
- else
- Y = [g, g + D, g + W], V = [m, m, m], Q = [D, W - D, this.size - W], k = [L, L, L];
- this.shades.forEach(function(G, z) {
- G[X]({ x: Y[z], y: V[z], width: Q[z], height: k[z] });
- });
- }, _.prototype.renderElements = function() {
- var D = this, W = D.navigatorOptions, P = W.maskInside, X = D.chart, g = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
- D.navigatorGroup = m = g.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!P, P, !P].forEach(function(Y, V) {
- D.shades[V] = g.rect().addClass("highcharts-navigator-mask" + (V === 1 ? "-inside" : "-outside")).add(m), X.styledMode || D.shades[V].attr({ fill: Y ? W.maskFill : "rgba(0,0,0,0)" }).css(V === 1 && L);
- }), D.outline = g.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || D.outline.attr({ "stroke-width": W.outlineWidth, stroke: W.outlineColor }), W.handles.enabled && [0, 1].forEach(function(Y) {
- if (W.handles.inverted = X.inverted, D.handles[Y] = g.symbol(W.handles.symbols[Y], -W.handles.width / 2 - 1, 0, W.handles.width, W.handles.height, W.handles), D.handles[Y].attr({ zIndex: 7 - Y }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][Y]).add(m), !X.styledMode) {
- var V = W.handles;
- D.handles[Y].attr({ fill: V.backgroundColor, stroke: V.borderColor, "stroke-width": V.lineWidth }).css(L);
- }
- });
- }, _.prototype.update = function(D) {
- (this.series || []).forEach(function(W) {
- W.baseSeries && delete W.baseSeries.navigatorSeries;
- }), this.destroy(), h(!0, this.chart.options.navigator, this.options, D), this.init(this.chart);
- }, _.prototype.render = function(D, W, P, X) {
- var g = this.chart, m = this.scrollbarHeight, L, Y = this.xAxis, V = Y.pointRange || 0, Q = Y.navigatorAxis.fake ? g.xAxis[0] : Y, k = this.navigatorEnabled, G, z = this.rendered, $ = g.inverted, q = g.xAxis[0].minRange, it = g.xAxis[0].options.maxRange;
- if (!this.hasDragged || b(P)) {
- if (D = C(D - V / 2), W = C(W + V / 2), !i(D) || !i(W))
- if (z)
- P = 0, X = o(Y.width, Q.width);
- else
- return;
- this.left = o(Y.left, g.plotLeft + m + ($ ? g.plotWidth : 0)), this.size = G = L = o(Y.len, ($ ? g.plotHeight : g.plotWidth) - 2 * m), g = $ ? m : L + 2 * m, P = o(P, Y.toPixels(D, !0)), X = o(X, Y.toPixels(W, !0)), i(P) && Math.abs(P) !== 1 / 0 || (P = 0, X = g), D = Y.toValue(P, !0), W = Y.toValue(X, !0);
- var et = Math.abs(C(W - D));
- et < q ? this.grabbedLeft ? P = Y.toPixels(W - q - V, !0) : this.grabbedRight && (X = Y.toPixels(D + q + V, !0)) : b(it) && C(et - V) > it && (this.grabbedLeft ? P = Y.toPixels(W - it - V, !0) : this.grabbedRight && (X = Y.toPixels(D + it + V, !0))), this.zoomedMax = B(Math.max(P, X), 0, G), this.zoomedMin = B(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(P, X), 0, G), this.range = this.zoomedMax - this.zoomedMin, G = Math.round(this.zoomedMax), P = Math.round(this.zoomedMin), k && (this.navigatorGroup.attr({ visibility: "visible" }), z = z && !this.hasDragged ? "animate" : "attr", this.drawMasks(P, G, $, z), this.drawOutline(P, G, $, z), this.navigatorOptions.handles.enabled && (this.drawHandle(P, 0, $, z), this.drawHandle(G, 1, $, z))), this.scrollbar && ($ ? ($ = this.top - m, Q = this.left - m + (k || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : ($ = this.top + (k ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, $, g, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
- }
- }, _.prototype.addMouseEvents = function() {
- var D = this, W = D.chart, P = W.container, X = [], g, m;
- D.mouseMoveHandler = g = function(L) {
- D.onMouseMove(L);
- }, D.mouseUpHandler = m = function(L) {
- D.onMouseUp(L);
- }, X = D.getPartsEvents("mousedown"), X.push(O(W.renderTo, "mousemove", g), O(P.ownerDocument, "mouseup", m)), d && (X.push(O(W.renderTo, "touchmove", g), O(P.ownerDocument, "touchend", m)), X.concat(D.getPartsEvents("touchstart"))), D.eventsToUnbind = X, D.series && D.series[0] && X.push(O(D.series[0].xAxis, "foundExtremes", function() {
- W.navigator.modifyNavigatorAxisExtremes();
- }));
- }, _.prototype.getPartsEvents = function(D) {
- var W = this, P = [];
- return ["shades", "handles"].forEach(function(X) {
- W[X].forEach(function(g, m) {
- P.push(O(g.element, D, function(L) {
- W[X + "Mousedown"](L, m);
- }));
- });
- }), P;
- }, _.prototype.shadesMousedown = function(D, W) {
- D = this.chart.pointer.normalize(D);
- var P = this.chart, X = this.xAxis, g = this.zoomedMin, m = this.left, L = this.size, Y = this.range, V = D.chartX;
- if (P.inverted && (V = D.chartY, m = this.top), W === 1)
- this.grabbedCenter = V, this.fixedWidth = Y, this.dragOffset = V - g;
- else {
- if (D = V - m - Y / 2, W === 0)
- D = Math.max(0, D);
- else if (W === 2 && D + Y >= L)
- if (D = L - Y, this.reversedExtremes) {
- D -= Y;
- var Q = this.getUnionExtremes().dataMin;
- } else
- var k = this.getUnionExtremes().dataMax;
- D !== g && (this.fixedWidth = Y, W = X.navigatorAxis.toFixedRange(D, D + Y, Q, k), b(W.min) && P.xAxis[0].setExtremes(Math.min(W.min, W.max), Math.max(W.min, W.max), !0, null, { trigger: "navigator" }));
- }
- }, _.prototype.handlesMousedown = function(D, W) {
- this.chart.pointer.normalize(D), D = this.chart;
- var P = D.xAxis[0], X = this.reversedExtremes;
- W === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? P.min : P.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? P.max : P.min), D.fixedRange = null;
- }, _.prototype.onMouseMove = function(D) {
- var W = this, P = W.chart, X = W.left, g = W.navigatorSize, m = W.range, L = W.dragOffset, Y = P.inverted;
- D.touches && D.touches[0].pageX === 0 || (D = P.pointer.normalize(D), P = D.chartX, Y && (X = W.top, P = D.chartY), W.grabbedLeft ? (W.hasDragged = !0, W.render(0, 0, P - X, W.otherHandlePos)) : W.grabbedRight ? (W.hasDragged = !0, W.render(0, 0, W.otherHandlePos, P - X)) : W.grabbedCenter && (W.hasDragged = !0, P < L ? P = L : P > g + L - m && (P = g + L - m), W.render(0, 0, P - L, P - L + m)), W.hasDragged && W.scrollbar && o(W.scrollbar.options.liveRedraw, Z.svg && !u && !this.chart.isBoosting) && (D.DOMType = D.type, setTimeout(function() {
- W.onMouseUp(D);
- }, 0)));
- }, _.prototype.onMouseUp = function(D) {
- var W = this.chart, P = this.xAxis, X = this.scrollbar, g = D.DOMEvent || D, m = W.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
- if (this.hasDragged && (!X || !X.hasDragged) || D.trigger === "scrollbar") {
- if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
- var Y = this.fixedExtreme;
- else if (this.zoomedMax === this.otherHandlePos)
- var V = this.fixedExtreme;
- this.zoomedMax === this.size && (V = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (Y = this.reversedExtremes ? X.dataMax : X.dataMin), P = P.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, Y, V), b(P.min) && W.xAxis[0].setExtremes(Math.min(P.min, P.max), Math.max(P.min, P.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: g });
- }
- D.DOMType !== "mousemove" && D.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && i(this.zoomedMin) && i(this.zoomedMax) && (W = Math.round(this.zoomedMin), D = Math.round(this.zoomedMax), this.shades && this.drawMasks(W, D, m, L), this.outline && this.drawOutline(W, D, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(W, 0, m, L), this.drawHandle(D, 1, m, L)));
- }, _.prototype.removeEvents = function() {
- this.eventsToUnbind && (this.eventsToUnbind.forEach(function(D) {
- D();
- }), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
- }, _.prototype.removeBaseSeriesEvents = function() {
- var D = this.baseSeries || [];
- this.navigatorEnabled && D[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && D.forEach(function(W) {
- t(W, "updatedData", this.updatedDataHandler);
- }, this), D[0].xAxis && t(D[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
- }, _.prototype.init = function(D) {
- var W = D.options, P = W.navigator, X = P.enabled, g = W.scrollbar, m = g.enabled;
- W = X ? P.height : 0;
- var L = m ? g.height : 0;
- this.handles = [], this.shades = [], this.chart = D, this.setBaseSeries(), this.height = W, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = P, this.scrollbarOptions = g, this.outlineHeight = W + L, this.opposite = o(P.opposite, !(X || !D.inverted));
- var Y = this;
- X = Y.baseSeries, g = D.xAxis.length, m = D.yAxis.length;
- var V = X && X[0] && X[0].xAxis || D.xAxis[0] || { options: {} };
- D.isDirtyBox = !0, Y.navigatorEnabled ? (Y.xAxis = new y(D, h(
- { breaks: V.options.breaks, ordinal: V.options.ordinal },
- P.xAxis,
- { id: "navigator-x-axis", yAxis: "navigator-y-axis", isX: !0, type: "datetime", index: g, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: 0, maxPadding: 0, zoomEnabled: !1 },
- D.inverted ? { offsets: [L, 0, -L, 0], width: W } : { offsets: [0, -L, 0, L], height: W }
- )), Y.yAxis = new y(D, h(P.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: o(P.yAxis && P.yAxis.reversed, D.yAxis[0] && D.yAxis[0].reversed, !1), zoomEnabled: !1 }, D.inverted ? { width: W } : { height: W })), X || P.series.data ? Y.updateNavigatorSeries(!1) : D.series.length === 0 && (Y.unbindRedraw = O(D, "beforeRedraw", function() {
- 0 < D.series.length && !Y.series && (Y.setBaseSeries(), Y.unbindRedraw());
- })), Y.reversedExtremes = D.inverted && !Y.xAxis.reversed || !D.inverted && Y.xAxis.reversed, Y.renderElements(), Y.addMouseEvents()) : (Y.xAxis = {
- chart: D,
- navigatorAxis: { fake: !0 },
- translate: function(Q, k) {
- var G = D.xAxis[0], z = G.getExtremes(), $ = G.len - 2 * L, q = n("min", G.options.min, z.dataMin);
- return G = n("max", G.options.max, z.dataMax) - q, k ? Q * G / $ + q : $ * (Q - q) / G;
- },
- toPixels: function(Q) {
- return this.translate(Q);
- },
- toValue: function(Q) {
- return this.translate(Q, !0);
- }
- }, Y.xAxis.navigatorAxis.axis = Y.xAxis, Y.xAxis.navigatorAxis.toFixedRange = H.AdditionsClass.prototype.toFixedRange.bind(Y.xAxis.navigatorAxis)), D.options.scrollbar.enabled && (D.scrollbar = Y.scrollbar = new N(D.renderer, h(D.options.scrollbar, { margin: Y.navigatorEnabled ? 0 : 10, vertical: D.inverted }), D), O(Y.scrollbar, "changed", function(Q) {
- var k = Y.size, G = k * this.to;
- k *= this.from, Y.hasDragged = Y.scrollbar.hasDragged, Y.render(0, 0, k, G), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
- Y.onMouseUp(Q);
- });
- })), Y.addBaseSeriesEvents(), Y.addChartEvents();
- }, _.prototype.getUnionExtremes = function(D) {
- var W = this.chart.xAxis[0], P = this.xAxis, X = P.options, g = W.options, m;
- return D && W.dataMin === null || (m = { dataMin: o(X && X.min, n("min", g.min, W.dataMin, P.dataMin, P.min)), dataMax: o(X && X.max, n("max", g.max, W.dataMax, P.dataMax, P.max)) }), m;
- }, _.prototype.setBaseSeries = function(D, W) {
- var P = this.chart, X = this.baseSeries = [];
- D = D || P.options && P.options.navigator.baseSeries || (P.series.length ? c(
- P.series,
- function(g) {
- return !g.options.isInternal;
- }
- ).index : 0), (P.series || []).forEach(function(g, m) {
- g.options.isInternal || !g.options.showInNavigator && (m !== D && g.options.id !== D || g.options.showInNavigator === !1) || X.push(g);
- }), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, W);
- }, _.prototype.updateNavigatorSeries = function(D, W) {
- var P = this, X = P.chart, g = P.baseSeries, m, L, Y = P.navigatorOptions.series, V, Q = {
- enableMouseTracking: !1,
- index: null,
- linkedTo: null,
- group: "nav",
- padXAxis: !1,
- xAxis: "navigator-x-axis",
- yAxis: "navigator-y-axis",
- showInLegend: !1,
- stacking: void 0,
- isInternal: !0,
- states: { inactive: { opacity: 1 } }
- }, k = P.series = (P.series || []).filter(function(G) {
- var z = G.baseSeries;
- return 0 > g.indexOf(z) ? (z && (t(z, "updatedData", P.updatedDataHandler), delete z.navigatorSeries), G.chart && G.destroy(), !1) : !0;
- });
- g && g.length && g.forEach(function(G) {
- var z = G.navigatorSeries, $ = a({ color: G.color, visible: G.visible }, p(Y) ? A.navigator.series : Y);
- z && P.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + g.length, m = G.options || {}, V = m.navigatorOptions || {}, $.dataLabels = s($.dataLabels), L = h(m, Q, $, V), L.pointRange = o($.pointRange, V.pointRange, A.plotOptions[L.type || "line"].pointRange), $ = V.data || $.data, P.hasNavigatorData = P.hasNavigatorData || !!$, L.data = $ || m.data && m.data.slice(0), z && z.options ? z.update(L, W) : (G.navigatorSeries = X.initSeries(L), G.navigatorSeries.baseSeries = G, k.push(G.navigatorSeries)));
- }), (Y.data && (!g || !g.length) || p(Y)) && (P.hasNavigatorData = !1, Y = s(Y), Y.forEach(function(G, z) {
- Q.name = "Navigator " + (k.length + 1), L = h(
- A.navigator.series,
- { color: X.series[z] && !X.series[z].options.isInternal && X.series[z].color || X.options.colors[z] || X.options.colors[0] },
- Q,
- G
- ), L.data = G.data, L.data && (P.hasNavigatorData = !0, k.push(X.initSeries(L)));
- })), D && this.addBaseSeriesEvents();
- }, _.prototype.addBaseSeriesEvents = function() {
- var D = this, W = D.baseSeries || [];
- W[0] && W[0].xAxis && W[0].eventsToUnbind.push(O(W[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), W.forEach(function(P) {
- P.eventsToUnbind.push(O(P, "show", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(
- !0,
- !1
- );
- })), P.eventsToUnbind.push(O(P, "hide", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
- })), this.navigatorOptions.adaptToUpdatedData !== !1 && P.xAxis && P.eventsToUnbind.push(O(P, "updatedData", this.updatedDataHandler)), P.eventsToUnbind.push(O(P, "remove", function() {
- this.navigatorSeries && (x(D.series, this.navigatorSeries), b(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
- }));
- }, this);
- }, _.prototype.getBaseSeriesMin = function(D) {
- return this.baseSeries.reduce(function(W, P) {
- return Math.min(W, P.xData ? P.xData[0] : W);
- }, D);
- }, _.prototype.modifyNavigatorAxisExtremes = function() {
- var D = this.xAxis, W;
- typeof D.getExtremes < "u" && (!(W = this.getUnionExtremes(!0)) || W.dataMin === D.min && W.dataMax === D.max || (D.min = W.dataMin, D.max = W.dataMax));
- }, _.prototype.modifyBaseAxisExtremes = function() {
- var D = this.chart.navigator, W = this.getExtremes(), P = W.dataMin, X = W.dataMax;
- W = W.max - W.min;
- var g = D.stickToMin, m = D.stickToMax, L = o(this.options.overscroll, 0), Y = D.series && D.series[0], V = !!this.setExtremes;
- if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
- if (g)
- var Q = P, k = Q + W;
- m && (k = X + L, g || (Q = Math.max(P, k - W, D.getBaseSeriesMin(Y && Y.xData ? Y.xData[0] : -Number.MAX_VALUE)))), V && (g || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = k);
- }
- D.stickToMin = D.stickToMax = null;
- }, _.prototype.updatedDataHandler = function() {
- var D = this.chart.navigator, W = this.navigatorSeries;
- D.stickToMax = D.reversedExtremes ? Math.round(D.zoomedMin) === 0 : Math.round(D.zoomedMax) >= Math.round(D.size), D.stickToMin = D.shouldStickToMin(
- this,
- D
- ), W && !D.hasNavigatorData && (W.options.pointStart = this.xData[0], W.setData(this.options.data, !1, null, !1));
- }, _.prototype.shouldStickToMin = function(D, W) {
- W = W.getBaseSeriesMin(D.xData[0]);
- var P = D.xAxis;
- D = P.max;
- var X = P.min;
- return P = P.options.range, i(D) && i(X) ? P && 0 < D - W ? D - W < P : X <= W : !1;
- }, _.prototype.addChartEvents = function() {
- this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
- var D = this.navigator, W = D && (D.baseSeries && D.baseSeries[0] && D.baseSeries[0].xAxis || this.xAxis[0]);
- W && D.render(W.min, W.max);
- }), O(this.chart, "getMargins", function() {
- var D = this.navigator, W = D.opposite ? "plotTop" : "marginBottom";
- this.inverted && (W = D.opposite ? "marginRight" : "plotLeft"), this[W] = (this[W] || 0) + (D.navigatorEnabled || !this.inverted ? D.outlineHeight : 0) + D.navigatorOptions.margin;
- }));
- }, _.prototype.destroy = function() {
- this.removeEvents(), this.xAxis && (x(this.chart.xAxis, this.xAxis), x(this.chart.axes, this.xAxis)), this.yAxis && (x(this.chart.yAxis, this.yAxis), x(this.chart.axes, this.yAxis)), (this.series || []).forEach(function(D) {
- D.destroy && D.destroy();
- }), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(D) {
- this[D] && this[D].destroy && this[D].destroy(), this[D] = null;
- }, this), [this.handles].forEach(function(D) {
- w(D);
- }, this);
- }, _;
- }();
- return Z.Navigator || (Z.Navigator = T, H.compose(y), O(j, "beforeShowResetZoom", function() {
- var _ = this.options, D = _.navigator, W = _.rangeSelector;
- if ((D && D.enabled || W && W.enabled) && (!u && _.chart.zoomType === "x" || u && _.chart.pinchType === "x"))
- return !1;
- }), O(j, "beforeRender", function() {
- var _ = this.options;
- (_.navigator.enabled || _.scrollbar.enabled) && (this.scroller = this.navigator = new T(this));
- }), O(j, "afterSetChartSize", function() {
- var _ = this.legend, D = this.navigator;
- if (D) {
- var W = _ && _.options, P = D.xAxis, X = D.yAxis, g = D.scrollbarHeight;
- this.inverted ? (D.left = D.opposite ? this.chartWidth - g - D.height : this.spacing[3] + g, D.top = this.plotTop + g) : (D.left = o(P.left, this.plotLeft + g), D.top = D.navigatorOptions.top || this.chartHeight - D.height - g - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (W && W.verticalAlign === "bottom" && W.layout !== "proximate" && W.enabled && !W.floating ? _.legendHeight + o(W.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), P && X && (this.inverted ? P.options.left = X.options.left = D.left : P.options.top = X.options.top = D.top, P.setAxisSize(), X.setAxisSize());
- }
- }), O(j, "update", function(_) {
- var D = _.options.navigator || {}, W = _.options.scrollbar || {};
- this.navigator || this.scroller || !D.enabled && !W.enabled || (h(
- !0,
- this.options.navigator,
- D
- ), h(!0, this.options.scrollbar, W), delete _.options.navigator, delete _.options.scrollbar);
- }), O(j, "afterUpdate", function(_) {
- this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new T(this), o(_.redraw, !0) && this.redraw(_.animation));
- }), O(j, "afterAddSeries", function() {
- this.navigator && this.navigator.setBaseSeries(null, !1);
- }), O(R, "afterUpdate", function() {
- this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
- null,
- !1
- );
- }), j.prototype.callbacks.push(function(_) {
- var D = _.navigator;
- D && _.xAxis[0] && (_ = _.xAxis[0].getExtremes(), D.render(_.min, _.max));
- })), Z.Navigator = T, Z.Navigator;
- }), E(l, "Extensions/RangeSelector.js", [l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/Globals.js"], l["Core/DefaultOptions.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- function F(s) {
- if (s.indexOf("%L") !== -1)
- return "text";
- var n = "aAdewbBmoyY".split("").some(function(_) {
- return s.indexOf("%" + _) !== -1;
- }), T = "HkIlMS".split("").some(function(_) {
- return s.indexOf("%" + _) !== -1;
- });
- return n && T ? "datetime-local" : n ? "date" : T ? "time" : "text";
- }
- var N = Z.defaultOptions, R = U.addEvent, S = U.createElement, v = U.css, d = U.defined, u = U.destroyObjectProperties, A = U.discardElement, O = U.extend, B = U.find, C = U.fireEvent, b = U.isNumber, w = U.merge, x = U.objectEach, a = U.pad, c = U.pick, p = U.pInt, i = U.splat;
- O(N, { rangeSelector: { allButtonsEnabled: !1, buttons: void 0, buttonSpacing: 5, dropdown: "responsive", enabled: void 0, verticalAlign: "top", buttonTheme: {
- width: 28,
- height: 18,
- padding: 2,
- zIndex: 7
- }, floating: !1, x: 0, y: 0, height: void 0, inputBoxBorderColor: "none", inputBoxHeight: 17, inputBoxWidth: void 0, inputDateFormat: "%b %e, %Y", inputDateParser: void 0, inputEditDateFormat: "%Y-%m-%d", inputEnabled: !0, inputPosition: { align: "right", x: 0, y: 0 }, inputSpacing: 5, selected: void 0, buttonPosition: { align: "left", x: 0, y: 0 }, inputStyle: { color: "#335cad", cursor: "pointer" }, labelStyle: { color: "#666666" } } }), O(N.lang, { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→" });
- var h = function() {
- function s(n) {
- this.buttons = void 0, this.buttonOptions = s.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = n, this.init(n);
- }
- return s.prototype.clickButton = function(n, T) {
- var _ = this.chart, D = this.buttonOptions[n], W = _.xAxis[0], P = _.scroller && _.scroller.getUnionExtremes() || W || {}, X = P.dataMin, g = P.dataMax, m = W && Math.round(Math.min(W.max, c(g, W.max))), L = D.type;
- P = D._range;
- var Y, V = D.dataGrouping;
- if (X !== null && g !== null) {
- if (_.fixedRange = P, this.setSelected(n), V && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(W || { chart: this.chart }, V, !1), this.frozenStates = D.preserveDataGrouping), L === "month" || L === "year")
- if (W) {
- L = { range: D, max: m, chart: _, dataMin: X, dataMax: g };
- var Q = W.minFromRange.call(L);
- b(L.newMax) && (m = L.newMax);
- } else
- P = D;
- else if (P)
- Q = Math.max(m - P, X), m = Math.min(Q + P, g);
- else if (L === "ytd")
- if (W)
- typeof g > "u" && (X = Number.MAX_VALUE, g = Number.MIN_VALUE, _.series.forEach(function($) {
- $ = $.xData, X = Math.min($[0], X), g = Math.max($[$.length - 1], g);
- }), T = !1), m = this.getYTDExtremes(
- g,
- X,
- _.time.useUTC
- ), Q = Y = m.min, m = m.max;
- else {
- this.deferredYTDClick = n;
- return;
- }
- else
- L === "all" && W && (_.navigator && _.navigator.baseSeries[0] && (_.navigator.baseSeries[0].xAxis.options.range = void 0), Q = X, m = g);
- if (d(Q) && (Q += D._offsetMin), d(m) && (m += D._offsetMax), this.dropdown && (this.dropdown.selectedIndex = n + 1), W)
- W.setExtremes(Q, m, c(T, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: D });
- else {
- var k = i(_.options.xAxis)[0], G = k.range;
- k.range = P;
- var z = k.min;
- k.min = Y, R(_, "load", function() {
- k.range = G, k.min = z;
- });
- }
- C(
- this,
- "afterBtnClick"
- );
- }
- }, s.prototype.setSelected = function(n) {
- this.selected = this.options.selected = n;
- }, s.prototype.init = function(n) {
- var T = this, _ = n.options.rangeSelector, D = _.buttons || T.defaultButtons.slice(), W = _.selected, P = function() {
- var X = T.minInput, g = T.maxInput;
- X && X.blur && C(X, "blur"), g && g.blur && C(g, "blur");
- };
- T.chart = n, T.options = _, T.buttons = [], T.buttonOptions = D, this.eventsToUnbind = [], this.eventsToUnbind.push(R(n.container, "mousedown", P)), this.eventsToUnbind.push(R(n, "resize", P)), D.forEach(T.computeButtonRange), typeof W < "u" && D[W] && this.clickButton(W, !1), this.eventsToUnbind.push(R(n, "load", function() {
- n.xAxis && n.xAxis[0] && R(n.xAxis[0], "setExtremes", function(X) {
- this.max - this.min !== n.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && T.forcedDataGrouping && !T.frozenStates && this.setDataGrouping(!1, !1);
- });
- }));
- }, s.prototype.updateButtonStates = function() {
- var n = this, T = this.chart, _ = this.dropdown, D = T.xAxis[0], W = Math.round(D.max - D.min), P = !D.hasVisibleSeries, X = T.scroller && T.scroller.getUnionExtremes() || D, g = X.dataMin, m = X.dataMax;
- T = n.getYTDExtremes(m, g, T.time.useUTC);
- var L = T.min, Y = T.max, V = n.selected, Q = b(V), k = n.options.allButtonsEnabled, G = n.buttons;
- n.buttonOptions.forEach(function(z, $) {
- var q = z._range, it = z.type, et = z.count || 1, nt = G[$], rt = 0, ct = z._offsetMax - z._offsetMin;
- z = $ === V;
- var gt = q > m - g, dt = q < D.minRange, ht = !1, at = !1;
- q = q === W, (it === "month" || it === "year") && W + 36e5 >= 864e5 * { month: 28, year: 365 }[it] * et - ct && W - 36e5 <= 864e5 * { month: 31, year: 366 }[it] * et + ct ? q = !0 : it === "ytd" ? (q = Y - L + ct === W, ht = !z) : it === "all" && (q = D.max - D.min >= m - g, at = !z && Q && q), it = !k && (gt || dt || at || P), et = z && q || q && !Q && !ht || z && n.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), _ && (_.options[$ + 1].disabled = it, rt === 2 && (_.selectedIndex = $ + 1)), rt === 0 && V === $ && n.setSelected());
- });
- }, s.prototype.computeButtonRange = function(n) {
- var T = n.type, _ = n.count || 1, D = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
- D[T] ? n._range = D[T] * _ : (T === "month" || T === "year") && (n._range = 864e5 * { month: 30, year: 365 }[T] * _), n._offsetMin = c(n.offsetMin, 0), n._offsetMax = c(n.offsetMax, 0), n._range += n._offsetMax - n._offsetMin;
- }, s.prototype.getInputValue = function(n) {
- n = n === "min" ? this.minInput : this.maxInput;
- var T = this.chart.options.rangeSelector, _ = this.chart.time;
- return n ? (n.type === "text" && T.inputDateParser || this.defaultInputDateParser)(n.value, _.useUTC, _) : 0;
- }, s.prototype.setInputValue = function(n, T) {
- var _ = this.options, D = this.chart.time, W = n === "min" ? this.minInput : this.maxInput;
- if (n = n === "min" ? this.minDateBox : this.maxDateBox, W) {
- var P = W.getAttribute("data-hc-time");
- P = d(P) ? Number(P) : void 0, d(T) && (d(P) && W.setAttribute("data-hc-time-previous", P), W.setAttribute("data-hc-time", T), P = T), W.value = D.dateFormat(this.inputTypeFormats[W.type] || _.inputEditDateFormat, P), n && n.attr({ text: D.dateFormat(_.inputDateFormat, P) });
- }
- }, s.prototype.setInputExtremes = function(n, T, _) {
- if (n = n === "min" ? this.minInput : this.maxInput) {
- var D = this.inputTypeFormats[n.type], W = this.chart.time;
- D && (T = W.dateFormat(D, T), n.min !== T && (n.min = T), _ = W.dateFormat(D, _), n.max !== _ && (n.max = _));
- }
- }, s.prototype.showInput = function(n) {
- var T = n === "min" ? this.minDateBox : this.maxDateBox;
- if ((n = n === "min" ? this.minInput : this.maxInput) && T && this.inputGroup) {
- var _ = n.type === "text", D = this.inputGroup, W = D.translateX;
- D = D.translateY;
- var P = this.options.inputBoxWidth;
- v(n, { width: _ ? T.width + (P ? -2 : 20) + "px" : "auto", height: _ ? T.height - 2 + "px" : "auto", border: "2px solid silver" }), _ && P ? v(n, { left: W + T.x + "px", top: D + "px" }) : v(n, { left: Math.min(Math.round(T.x + W - (n.offsetWidth - T.width) / 2), this.chart.chartWidth - n.offsetWidth) + "px", top: D - (n.offsetHeight - T.height) / 2 + "px" });
- }
- }, s.prototype.hideInput = function(n) {
- (n = n === "min" ? this.minInput : this.maxInput) && v(n, { top: "-9999em", border: 0, width: "1px", height: "1px" });
- }, s.prototype.defaultInputDateParser = function(n, T, _) {
- var D = n.split("/").join("-").split(" ").join("T");
- if (D.indexOf("T") === -1 && (D += "T00:00"), T)
- D += "Z";
- else {
- var W;
- (W = I.isSafari) && (W = D, W = !(6 < W.length && (W.lastIndexOf("-") === W.length - 6 || W.lastIndexOf("+") === W.length - 6))), W && (W = new Date(D).getTimezoneOffset() / 60, D += 0 >= W ? "+" + a(-W) + ":00" : "-" + a(W) + ":00");
- }
- return D = Date.parse(D), b(D) || (n = n.split("-"), D = Date.UTC(p(n[0]), p(n[1]) - 1, p(n[2]))), _ && T && b(D) && (D += _.getTimezoneOffset(D)), D;
- }, s.prototype.drawInput = function(n) {
- function T() {
- var k = P.getInputValue(n), G = _.xAxis[0], z = _.scroller && _.scroller.xAxis ? _.scroller.xAxis : G, $ = z.dataMin;
- z = z.dataMax;
- var q = P.maxInput, it = P.minInput;
- k !== Number(V.getAttribute("data-hc-time-previous")) && b(k) && (V.setAttribute("data-hc-time-previous", k), L && q && b($) ? k > Number(q.getAttribute("data-hc-time")) ? k = void 0 : k < $ && (k = $) : it && b(z) && (k < Number(it.getAttribute("data-hc-time")) ? k = void 0 : k > z && (k = z)), typeof k < "u" && G.setExtremes(L ? k : G.min, L ? G.max : k, void 0, void 0, { trigger: "rangeSelectorInput" }));
- }
- var _ = this.chart, D = this.div, W = this.inputGroup, P = this, X = _.renderer.style || {}, g = _.renderer, m = _.options.rangeSelector, L = n === "min", Y = N.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
- Y = g.label(Y, 0).addClass("highcharts-range-label").attr({ padding: Y ? 2 : 0, height: Y ? m.inputBoxHeight : 0 }).add(W), g = g.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: m.inputBoxWidth, height: m.inputBoxHeight, "text-align": "center" }).on(
- "click",
- function() {
- P.showInput(n), P[n + "Input"].focus();
- }
- ), _.styledMode || g.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), g.add(W);
- var V = S("input", { name: n, className: "highcharts-range-selector" }, void 0, D);
- V.setAttribute("type", F(m.inputDateFormat || "%b %e, %Y")), _.styledMode || (Y.css(w(X, m.labelStyle)), g.css(w({ color: "#333333" }, X, m.inputStyle)), v(V, O({
- position: "absolute",
- border: 0,
- boxShadow: "0 0 15px rgba(0,0,0,0.3)",
- width: "1px",
- height: "1px",
- padding: 0,
- textAlign: "center",
- fontSize: X.fontSize,
- fontFamily: X.fontFamily,
- top: "-9999em"
- }, m.inputStyle))), V.onfocus = function() {
- P.showInput(n);
- }, V.onblur = function() {
- V === I.doc.activeElement && T(), P.hideInput(n), P.setInputValue(n), V.blur();
- };
- var Q = !1;
- return V.onchange = function() {
- Q || (T(), P.hideInput(n), V.blur());
- }, V.onkeypress = function(k) {
- k.keyCode === 13 && T();
- }, V.onkeydown = function(k) {
- Q = !0, k.keyCode !== 38 && k.keyCode !== 40 || T();
- }, V.onkeyup = function() {
- Q = !1;
- }, { dateBox: g, input: V, label: Y };
- }, s.prototype.getPosition = function() {
- var n = this.chart, T = n.options.rangeSelector;
- return n = T.verticalAlign === "top" ? n.plotTop - n.axisOffset[0] : 0, { buttonTop: n + T.buttonPosition.y, inputTop: n + T.inputPosition.y - 10 };
- }, s.prototype.getYTDExtremes = function(n, T, _) {
- var D = this.chart.time, W = new D.Date(n), P = D.get("FullYear", W);
- return _ = _ ? D.Date.UTC(P, 0, 1) : +new D.Date(P, 0, 1), T = Math.max(T, _), W = W.getTime(), { max: Math.min(n || W, W), min: T };
- }, s.prototype.render = function(n, T) {
- var _ = this.chart, D = _.renderer, W = _.container, P = _.options, X = P.rangeSelector, g = c(P.chart.style && P.chart.style.zIndex, 0) + 1;
- if (P = X.inputEnabled, X.enabled !== !1) {
- if (this.rendered || (this.group = D.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = S("div", void 0, { position: "relative", height: 0, zIndex: g }), this.buttonOptions.length && this.renderButtons(), W.parentNode && W.parentNode.insertBefore(this.div, W), P && (this.inputGroup = D.g("input-group").add(this.group), D = this.drawInput("min"), this.minDateBox = D.dateBox, this.minLabel = D.label, this.minInput = D.input, D = this.drawInput("max"), this.maxDateBox = D.dateBox, this.maxLabel = D.label, this.maxInput = D.input)), P && (this.setInputValue(
- "min",
- n
- ), this.setInputValue("max", T), n = _.scroller && _.scroller.getUnionExtremes() || _.xAxis[0] || {}, d(n.dataMin) && d(n.dataMax) && (_ = _.xAxis[0].minRange || 0, this.setInputExtremes("min", n.dataMin, Math.min(n.dataMax, this.getInputValue("max")) - _), this.setInputExtremes("max", Math.max(n.dataMin, this.getInputValue("min")) + _, n.dataMax)), this.inputGroup)) {
- var m = 0;
- [this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach(function(L) {
- if (L) {
- var Y = L.getBBox().width;
- Y && (L.attr({ x: m }), m += Y + X.inputSpacing);
- }
- });
- }
- this.alignElements(), this.rendered = !0;
- }
- }, s.prototype.renderButtons = function() {
- var n = this, T = this.buttons, _ = this.options, D = N.lang, W = this.chart.renderer, P = w(_.buttonTheme), X = P && P.states, g = P.width || 28;
- delete P.width, delete P.states, this.buttonGroup = W.g("range-selector-buttons").add(this.group);
- var m = this.dropdown = S("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
- R(m, "touchstart", function() {
- m.style.fontSize = "16px";
- }), [[I.isMS ? "mouseover" : "mouseenter"], [I.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
- var Y = L[0], V = L[1];
- R(m, Y, function() {
- var Q = T[n.currentButtonIndex()];
- Q && C(Q.element, V || Y);
- });
- }), this.zoomText = W.label(D && D.rangeSelectorZoom || "", 0).attr({ padding: _.buttonTheme.padding, height: _.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(_.labelStyle), P["stroke-width"] = c(P["stroke-width"], 0)), S(
- "option",
- { textContent: this.zoomText.textStr, disabled: !0 },
- void 0,
- m
- ), this.buttonOptions.forEach(function(L, Y) {
- S("option", { textContent: L.title || L.text }, void 0, m), T[Y] = W.button(L.text, 0, 0, function(V) {
- var Q = L.events && L.events.click, k;
- Q && (k = Q.call(L, V)), k !== !1 && n.clickButton(Y), n.isActive = !0;
- }, P, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: g }).add(n.buttonGroup), L.title && T[Y].attr("title", L.title);
- });
- }, s.prototype.alignElements = function() {
- var n = this, T = this.buttonGroup, _ = this.buttons, D = this.chart, W = this.group, P = this.inputGroup, X = this.options, g = this.zoomText, m = D.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
- m = X.buttonPosition;
- var Y = X.inputPosition, V = X.verticalAlign, Q = function($, q) {
- return L && n.titleCollision(D) && V === "top" && q.align === "right" && q.y - $.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + D.spacing[0] ? -40 : 0;
- }, k = D.plotLeft;
- if (W && m && Y) {
- var G = m.x - D.spacing[3];
- if (T) {
- if (this.positionButtons(), !this.initialButtonGroupWidth) {
- var z = 0;
- g && (z += g.getBBox().width + 5), _.forEach(function($, q) {
- z += $.width, q !== _.length - 1 && (z += X.buttonSpacing);
- }), this.initialButtonGroupWidth = z;
- }
- k -= D.spacing[3], this.updateButtonStates(), g = Q(T, m), this.alignButtonGroup(g), W.placed = T.placed = D.hasLoaded;
- }
- T = 0, P && (T = Q(P, Y), Y.align === "left" ? G = k : Y.align === "right" && (G = -Math.max(D.axisOffset[1], -T)), P.align({ y: Y.y, width: P.getBBox().width, align: Y.align, x: Y.x + G - 2 }, !0, D.spacingBox), P.placed = D.hasLoaded), this.handleCollision(T), W.align({ verticalAlign: V }, !0, D.spacingBox), P = W.alignAttr.translateY, T = W.getBBox().height + 20, Q = 0, V === "bottom" && (Q = (Q = D.legend && D.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? D.legend.legendHeight + c(Q.margin, 10) : 0, T = T + Q - 20, Q = P - T - (X.floating ? 0 : X.y) - (D.titleOffset ? D.titleOffset[2] : 0) - 10), V === "top" ? (X.floating && (Q = 0), D.titleOffset && D.titleOffset[0] && (Q = D.titleOffset[0]), Q += D.margin[0] - D.spacing[0] || 0) : V === "middle" && (Y.y === m.y ? Q = P : (Y.y || m.y) && (Q = 0 > Y.y || 0 > m.y ? Q - Math.min(Y.y, m.y) : P - T)), W.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, Y = this.maxInput, P = this.dropdown, X.inputEnabled && m && Y && (m.style.marginTop = W.translateY + "px", Y.style.marginTop = W.translateY + "px"), P && (P.style.marginTop = W.translateY + "px");
- }
- }, s.prototype.alignButtonGroup = function(n, T) {
- var _ = this.chart, D = this.buttonGroup, W = this.options.buttonPosition, P = _.plotLeft - _.spacing[3], X = W.x - _.spacing[3];
- W.align === "right" ? X += n - P : W.align === "center" && (X -= P / 2), D && D.align({ y: W.y, width: c(T, this.initialButtonGroupWidth), align: W.align, x: X }, !0, _.spacingBox);
- }, s.prototype.positionButtons = function() {
- var n = this.buttons, T = this.chart, _ = this.options, D = this.zoomText, W = T.hasLoaded ? "animate" : "attr", P = _.buttonPosition, X = T.plotLeft, g = X;
- D && D.visibility !== "hidden" && (D[W]({ x: c(X + P.x, X) }), g += P.x + D.getBBox().width + 5), this.buttonOptions.forEach(function(m, L) {
- n[L].visibility !== "hidden" ? (n[L][W]({ x: g }), g += n[L].width + _.buttonSpacing) : n[L][W]({ x: X });
- });
- }, s.prototype.handleCollision = function(n) {
- var T = this, _ = this.chart, D = this.buttonGroup, W = this.inputGroup, P = this.options, X = P.buttonPosition, g = P.dropdown, m = P.inputPosition;
- P = function() {
- var V = 0;
- return T.buttons.forEach(function(Q) {
- Q = Q.getBBox(), Q.width > V && (V = Q.width);
- }), V;
- };
- var L = function(V) {
- if (W && D) {
- var Q = W.alignAttr.translateX + W.alignOptions.x - n + W.getBBox().x + 2, k = W.alignOptions.width, G = D.alignAttr.translateX + D.getBBox().x;
- return G + V > Q && Q + k > G && X.y < m.y + W.getBBox().height;
- }
- return !1;
- }, Y = function() {
- W && D && W.attr({ translateX: W.alignAttr.translateX + (_.axisOffset[1] >= -n ? 0 : -n), translateY: W.alignAttr.translateY + D.getBBox().height + 10 });
- };
- if (D) {
- if (g === "always") {
- this.collapseButtons(n), L(P()) && Y();
- return;
- }
- g === "never" && this.expandButtons();
- }
- W && D ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? g === "responsive" ? (this.collapseButtons(n), L(P()) && Y()) : Y() : g === "responsive" && this.expandButtons() : D && g === "responsive" && (this.initialButtonGroupWidth > _.plotWidth ? this.collapseButtons(n) : this.expandButtons());
- }, s.prototype.collapseButtons = function(n) {
- var T = this.buttons, _ = this.buttonOptions, D = this.chart, W = this.dropdown, P = this.options, X = this.zoomText, g = D.userOptions.rangeSelector && D.userOptions.rangeSelector.buttonTheme || {}, m = function(Y) {
- return { text: Y ? Y + " ▾" : "▾", width: "auto", paddingLeft: c(P.buttonTheme.paddingLeft, g.padding, 8), paddingRight: c(P.buttonTheme.paddingRight, g.padding, 8) };
- };
- X && X.hide();
- var L = !1;
- _.forEach(function(Y, V) {
- V = T[V], V.state !== 2 ? V.hide() : (V.show(), V.attr(m(Y.text)), L = !0);
- }), L || (W && (W.selectedIndex = 0), T[0].show(), T[0].attr(m(this.zoomText && this.zoomText.textStr))), _ = P.buttonPosition.align, this.positionButtons(), _ !== "right" && _ !== "center" || this.alignButtonGroup(n, T[this.currentButtonIndex()].getBBox().width), this.showDropdown();
- }, s.prototype.expandButtons = function() {
- var n = this.buttons, T = this.buttonOptions, _ = this.options, D = this.zoomText;
- this.hideDropdown(), D && D.show(), T.forEach(function(W, P) {
- P = n[P], P.show(), P.attr({ text: W.text, width: _.buttonTheme.width || 28, paddingLeft: c(_.buttonTheme.paddingLeft, "unset"), paddingRight: c(_.buttonTheme.paddingRight, "unset") }), 2 > P.state && P.setState(0);
- }), this.positionButtons();
- }, s.prototype.currentButtonIndex = function() {
- var n = this.dropdown;
- return n && 0 < n.selectedIndex ? n.selectedIndex - 1 : 0;
- }, s.prototype.showDropdown = function() {
- var n = this.buttonGroup, T = this.buttons, _ = this.chart, D = this.dropdown;
- if (n && D) {
- var W = n.translateX;
- n = n.translateY, T = T[this.currentButtonIndex()].getBBox(), v(D, { left: _.plotLeft + W + "px", top: n + 0.5 + "px", width: T.width + "px", height: T.height + "px" }), this.hasVisibleDropdown = !0;
- }
- }, s.prototype.hideDropdown = function() {
- var n = this.dropdown;
- n && (v(n, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
- }, s.prototype.getHeight = function() {
- var n = this.options, T = this.group, _ = n.y, D = n.buttonPosition.y, W = n.inputPosition.y;
- return n.height ? n.height : (this.alignElements(), n = T ? T.getBBox(!0).height + 13 + _ : 0, T = Math.min(W, D), (0 > W && 0 > D || 0 < W && 0 < D) && (n += Math.abs(T)), n);
- }, s.prototype.titleCollision = function(n) {
- return !(n.options.title.text || n.options.subtitle.text);
- }, s.prototype.update = function(n) {
- var T = this.chart;
- w(!0, T.options.rangeSelector, n), this.destroy(), this.init(T), this.render();
- }, s.prototype.destroy = function() {
- var n = this, T = n.minInput, _ = n.maxInput;
- n.eventsToUnbind && (n.eventsToUnbind.forEach(function(D) {
- return D();
- }), n.eventsToUnbind = void 0), u(n.buttons), T && (T.onfocus = T.onblur = T.onchange = null), _ && (_.onfocus = _.onblur = _.onchange = null), x(n, function(D, W) {
- D && W !== "chart" && (D instanceof H ? D.destroy() : D instanceof window.HTMLElement && A(D)), D !== s.prototype[W] && (n[W] = null);
- }, this);
- }, s;
- }();
- if (h.prototype.defaultButtons = [
- { type: "month", count: 1, text: "1m", title: "View 1 month" },
- { type: "month", count: 3, text: "3m", title: "View 3 months" },
- { type: "month", count: 6, text: "6m", title: "View 6 months" },
- { type: "ytd", text: "YTD", title: "View year to date" },
- { type: "year", count: 1, text: "1y", title: "View 1 year" },
- { type: "all", text: "All", title: "View all" }
- ], h.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
- var s = this.range, n = s.type, T = this.max, _ = this.chart.time, D = function(g, m) {
- var L = n === "year" ? "FullYear" : "Month", Y = new _.Date(g), V = _.get(L, Y);
- return _.set(L, Y, V + m), V === _.get(L, Y) && _.set("Date", Y, 0), Y.getTime() - g;
- };
- if (b(s))
- var W = T - s, P = s;
- else
- W = T + D(T, -s.count), this.chart && (this.chart.fixedRange = T - W);
- var X = c(this.dataMin, Number.MIN_VALUE);
- return b(W) || (W = X), W <= X && (W = X, typeof P > "u" && (P = D(W, s.count)), this.newMax = Math.min(W + P, this.dataMax)), b(T) || (W = void 0), W;
- }, !I.RangeSelector) {
- var o = [], t = function(s) {
- function n() {
- _ && (T = s.xAxis[0].getExtremes(), D = s.legend, P = _ && _.options.verticalAlign, b(T.min) && _.render(T.min, T.max), D.display && P === "top" && P === D.options.verticalAlign && (W = w(s.spacingBox), W.y = D.options.layout === "vertical" ? s.plotTop : W.y + _.getHeight(), D.group.placed = !1, D.align(W)));
- }
- var T, _ = s.rangeSelector, D, W, P;
- _ && (B(o, function(X) {
- return X[0] === s;
- }) || o.push([s, [R(s.xAxis[0], "afterSetExtremes", function(X) {
- _ && _.render(X.min, X.max);
- }), R(s, "redraw", n)]]), n());
- };
- R(j, "afterGetContainer", function() {
- this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new h(this));
- }), R(j, "beforeRender", function() {
- var s = this.axes, n = this.rangeSelector;
- n && (b(n.deferredYTDClick) && (n.clickButton(n.deferredYTDClick), delete n.deferredYTDClick), s.forEach(function(T) {
- T.updateNames(), T.setScale();
- }), this.getAxisMargins(), n.render(), s = n.options.verticalAlign, n.options.floating || (s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0)));
- }), R(j, "update", function(s) {
- var n = s.options.rangeSelector;
- s = this.rangeSelector;
- var T = this.extraBottomMargin, _ = this.extraTopMargin;
- n && n.enabled && !d(s) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = s = new h(this)), this.extraTopMargin = this.extraBottomMargin = !1, s && (t(this), n = n && n.verticalAlign || s.options && s.options.verticalAlign, s.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== T || this.extraTopMargin !== _) && (this.isDirtyBox = !0);
- }), R(j, "render", function() {
- var s = this.rangeSelector;
- s && !s.options.floating && (s.render(), s = s.options.verticalAlign, s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0));
- }), R(j, "getMargins", function() {
- var s = this.rangeSelector;
- s && (s = s.getHeight(), this.extraTopMargin && (this.plotTop += s), this.extraBottomMargin && (this.marginBottom += s));
- }), j.prototype.callbacks.push(t), R(j, "destroy", function() {
- for (var s = 0; s < o.length; s++) {
- var n = o[s];
- if (n[0] === this) {
- n[1].forEach(function(T) {
- return T();
- }), o.splice(s, 1);
- break;
- }
- }
- }), I.RangeSelector = h;
- }
- return h;
- }), E(
- l,
- "Core/Chart/StockChart.js",
- [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/FormatUtilities.js"], l["Core/DefaultOptions.js"], l["Core/Series/Series.js"], l["Core/Renderer/SVG/SVGRenderer.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H, U, F, N) {
- function R(p, i) {
- return p === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : p === "yAxis" ? { labels: { y: -2 }, opposite: a(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
- }
- function S(p, i) {
- if (p === "xAxis") {
- p = u();
- var h = { type: "datetime", categories: void 0 };
- return a(i.navigator && i.navigator.enabled, p.navigator.enabled, !0) && (h.startOnTick = !1, h.endOnTick = !1), h;
- }
- return {};
- }
- var v = this && this.__extends || function() {
- var p = function(i, h) {
- return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, t) {
- o.__proto__ = t;
- } || function(o, t) {
- for (var s in t)
- t.hasOwnProperty(s) && (o[s] = t[s]);
- }, p(i, h);
- };
- return function(i, h) {
- function o() {
- this.constructor = i;
- }
- p(i, h), i.prototype = h === null ? Object.create(h) : (o.prototype = h.prototype, new o());
- };
- }(), d = Z.format, u = H.getOptions;
- y = N.addEvent;
- var A = N.clamp, O = N.defined, B = N.extend, C = N.find, b = N.isNumber, w = N.isString, x = N.merge, a = N.pick, c = N.splat;
- return N = function(p) {
- function i() {
- return p !== null && p.apply(this, arguments) || this;
- }
- return v(i, p), i.prototype.init = function(h, o) {
- var t = u(), s = h.xAxis, n = h.yAxis, T = a(h.navigator && h.navigator.enabled, t.navigator.enabled, !0);
- h.xAxis = h.yAxis = void 0, T = x({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: T }, scrollbar: { enabled: a(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: a(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: a(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, h, { isStock: !0 }), h.xAxis = s, h.yAxis = n, T.xAxis = c(h.xAxis || {}).map(function(_, D) {
- return x(R("xAxis", _), t.xAxis, t.xAxis && t.xAxis[D], _, S("xAxis", h));
- }), T.yAxis = c(h.yAxis || {}).map(function(_, D) {
- return x(R("yAxis", _), t.yAxis, t.yAxis && t.yAxis[D], _);
- }), p.prototype.init.call(this, T, o);
- }, i.prototype.createAxis = function(h, o) {
- return o.axis = x(R(h, o.axis), o.axis, S(h, this.userOptions)), p.prototype.createAxis.call(this, h, o);
- }, i;
- }(I), function(p) {
- p.stockChart = function(i, h, o) {
- return new p(i, h, o);
- };
- }(N || (N = {})), y(U, "setOptions", function(p) {
- var i;
- this.chart.options.isStock && (this.is("column") || this.is("columnrange") ? i = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (i = { marker: { enabled: !1, radius: 2 } }), i && (p.plotOptions[this.type] = x(p.plotOptions[this.type], i)));
- }), y(j, "autoLabelAlign", function(p) {
- var i = this.chart, h = this.options;
- i = i._labelPanes = i._labelPanes || {};
- var o = this.options.labels;
- this.chart.options.isStock && this.coll === "yAxis" && (h = h.top + "," + h.height, !i[h] && o.enabled && (o.x === 15 && (o.x = 0), typeof o.align > "u" && (o.align = "right"), i[h] = this, p.align = "right", p.preventDefault()));
- }), y(j, "destroy", function() {
- var p = this.chart, i = this.options && this.options.top + "," + this.options.height;
- i && p._labelPanes && p._labelPanes[i] === this && delete p._labelPanes[i];
- }), y(j, "getPlotLinePath", function(p) {
- function i(G) {
- var z = G === "xAxis" ? "yAxis" : "xAxis";
- return G = h.options[z], b(G) ? [t[z][G]] : w(G) ? [t.get(G)] : o.map(function($) {
- return $[z];
- });
- }
- var h = this, o = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = h.chart, s = t.renderer, n = h.left, T = h.top, _, D, W, P, X = [], g = [], m = p.translatedValue, L = p.value, Y = p.force;
- if (t.options.isStock && p.acrossPanes !== !1 && h.coll === "xAxis" || h.coll === "yAxis") {
- p.preventDefault(), g = i(h.coll);
- var V = h.isXAxis ? t.yAxis : t.xAxis;
- V.forEach(function(G) {
- if (!O(G.options.id) || G.options.id.indexOf("navigator") === -1) {
- var z = G.isXAxis ? "yAxis" : "xAxis";
- z = O(G.options[z]) ? t[z][G.options[z]] : t[z][0], h === z && g.push(G);
- }
- });
- var Q = g.length ? [] : [h.isXAxis ? t.yAxis[0] : t.xAxis[0]];
- g.forEach(function(G) {
- Q.indexOf(G) !== -1 || C(Q, function(z) {
- return z.pos === G.pos && z.len === G.len;
- }) || Q.push(G);
- });
- var k = a(m, h.translate(L, null, null, p.old));
- b(k) && (h.horiz ? Q.forEach(function(G) {
- var z;
- D = G.pos, P = D + G.len, _ = W = Math.round(k + h.transB), Y !== "pass" && (_ < n || _ > n + h.width) && (Y ? _ = W = A(_, n, n + h.width) : z = !0), z || X.push(["M", _, D], ["L", W, P]);
- }) : Q.forEach(function(G) {
- var z;
- _ = G.pos, W = _ + G.len, D = P = Math.round(T + h.height - k), Y !== "pass" && (D < T || D > T + h.height) && (Y ? D = P = A(D, T, T + h.height) : z = !0), z || X.push(["M", _, D], ["L", W, P]);
- })), p.path = 0 < X.length ? s.crispPolyLine(X, p.lineWidth || 1) : null;
- }
- }), F.prototype.crispPolyLine = function(p, i) {
- for (var h = 0; h < p.length; h += 2) {
- var o = p[h], t = p[h + 1];
- o[1] === t[1] && (o[1] = t[1] = Math.round(o[1]) - i % 2 / 2), o[2] === t[2] && (o[2] = t[2] = Math.round(o[2]) + i % 2 / 2);
- }
- return p;
- }, y(j, "afterHideCrosshair", function() {
- this.crossLabel && (this.crossLabel = this.crossLabel.hide());
- }), y(j, "afterDrawCrosshair", function(p) {
- var i, h;
- if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && b(this.min) && b(this.max)) {
- var o = this.chart, t = this.logarithmic, s = this.crosshair.label, n = this.horiz, T = this.opposite, _ = this.left, D = this.top, W = this.crossLabel, P = s.format, X = "", g = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, Y = p.e || this.cross && this.cross.e;
- p = p.point;
- var V = this.min, Q = this.max;
- t && (V = t.lin2log(V), Q = t.lin2log(Q)), t = n ? "center" : T ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", W || (W = this.crossLabel = o.renderer.label("", 0, void 0, s.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (p ? p.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: s.align || t, padding: a(s.padding, 8), r: a(s.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), o.styledMode || W.attr({ fill: s.backgroundColor || p && p.series && p.series.color || "#666666", stroke: s.borderColor || "", "stroke-width": s.borderWidth || 0 }).css(B({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, s.style || {}))), n ? (t = m ? (p.plotX || 0) + _ : Y.chartX, D += T ? 0 : this.height) : (t = T ? this.width + _ : 0, D = m ? (p.plotY || 0) + D : Y.chartY), P || s.formatter || (this.dateTime && (X = "%b %d, %Y"), P = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? p.x : p.y : this.toValue(n ? Y.chartX : Y.chartY), m = p ? p.series.isPointInside(p) : b(X) && X > V && X < Q, Y = "", P ? Y = d(P, { value: X }, o) : s.formatter && b(X) && (Y = s.formatter.call(this, X)), W.attr({ text: Y, x: t, y: D, visibility: m ? "visible" : "hidden" }), s = W.getBBox(), b(W.y) && (n ? (g && !T || !g && T) && (D = W.y - s.height) : D = W.y - s.height / 2), n ? (i = _ - s.x, h = _ + this.width - s.x) : (i = this.labelAlign === "left" ? _ : 0, h = this.labelAlign === "right" ? _ + this.width : o.chartWidth), W.translateX < i && (L = i - W.translateX), W.translateX + s.width >= h && (L = -(W.translateX + s.width - h)), W.attr({ x: t + L, y: D, anchorX: n ? t : this.opposite ? 0 : o.chartWidth, anchorY: n ? this.opposite ? o.chartHeight : 0 : D + s.height / 2 });
- }
- }), U.prototype.forceCropping = function() {
- var p = this.chart, i = this.options.dataGrouping;
- return this.allowDG !== !1 && i && a(i.enabled, p.options.isStock);
- }, y(I, "update", function(p) {
- p = p.options, "scrollbar" in p && this.navigator && (x(!0, this.options.scrollbar, p.scrollbar), this.navigator.update({}, !1), delete p.scrollbar);
- }), N;
- }
- ), E(l, "masters/modules/stock.src.js", [
- l["Core/Globals.js"],
- l["Core/Axis/OrdinalAxis.js"],
- l["Series/DataModifyComposition.js"],
- l["Core/Scrollbar.js"],
- l["Core/Chart/StockChart.js"]
- ], function(y, j, I, Z, H) {
- y.Scrollbar = Z, y.StockChart = y.stockChart = H.stockChart, Z.compose(y.Axis), j.compose(y.Axis, y.Series, y.Chart), I.compose(y.Series, y.Axis, y.Point);
- }), E(l, "masters/highstock.src.js", [l["masters/highcharts.src.js"]], function(y) {
- return y.product = "Highstock", y;
- }), l["masters/highstock.src.js"]._modules = l, l["masters/highstock.src.js"];
- });
- })(E0);
- const $r = ul;
- var dl = {}, O0 = {
- get exports() {
- return dl;
- },
- set exports(r) {
- dl = r;
- }
- };
- (function(r) {
- (function(f, E) {
- r.exports ? (E.default = E, r.exports = f.document ? E(f) : E) : (f.Highcharts && f.Highcharts.error(16, !0), f.Highcharts = E(f));
- })(typeof window < "u" ? window : Fr, function(f) {
- function E(y, j, I, Z) {
- y.hasOwnProperty(j) || (y[j] = Z.apply(null, I));
- }
- var l = {};
- return E(l, "Core/Globals.js", [], function() {
- var y = typeof f < "u" ? f : typeof window < "u" ? window : {}, j;
- return function(I) {
- I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
- }, I.supportsPassiveEvents = function() {
- var Z = !1;
- if (!I.isMS) {
- var H = Object.defineProperty({}, "passive", { get: function() {
- Z = !0;
- } });
- I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
- "testPassive",
- I.noop,
- H
- ), I.win.removeEventListener("testPassive", I.noop, H));
- }
- return Z;
- }(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
- }(j || (j = {})), j;
- }), E(l, "Core/Utilities.js", [l["Core/Globals.js"]], function(y) {
- function j(t, s, n, T) {
- var _ = s ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = _ + ": Deprecated member");
- var D = S(t), W = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof T < "u") {
- var P = "";
- D && (W += "?"), b(T, function(X, g) {
- P += `
- - ` + g + ": " + X, D && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += P;
- }
- x(y, "displayError", { chart: n, code: t, message: W, params: T }, function() {
- if (s)
- throw Error(W);
- p.console && j.messages.indexOf(W) === -1 && console.warn(W);
- }), j.messages.push(W);
- }
- function I(t, s) {
- var n = {};
- return b(t, function(T, _) {
- F(t[_], !0) && !t.nodeType && s[_] ? (T = I(t[_], s[_]), Object.keys(T).length && (n[_] = T)) : (F(t[_]) || t[_] !== s[_]) && (n[_] = t[_]);
- }), n;
- }
- function Z(t, s) {
- return parseInt(t, s || 10);
- }
- function H(t) {
- return typeof t == "string";
- }
- function U(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function F(t, s) {
- return !!t && typeof t == "object" && (!s || !U(t));
- }
- function N(t) {
- return F(t) && typeof t.nodeType == "number";
- }
- function R(t) {
- var s = t && t.constructor;
- return !(!F(t, !0) || N(t) || !s || !s.name || s.name === "Object");
- }
- function S(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function v(t) {
- return typeof t < "u" && t !== null;
- }
- function d(t, s, n) {
- var T;
- return H(s) ? v(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((T = t.getAttribute(s)) || s !== "class" || (T = t.getAttribute(s + "Name"))) : b(s, function(_, D) {
- v(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
- }), T;
- }
- function u(t, s) {
- var n;
- t || (t = {});
- for (n in s)
- t[n] = s[n];
- return t;
- }
- function A() {
- for (var t = arguments, s = t.length, n = 0; n < s; n++) {
- var T = t[n];
- if (typeof T < "u" && T !== null)
- return T;
- }
- }
- function O(t, s) {
- y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), u(t.style, s);
- }
- function B(t, s) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
- }
- function C(t, s, n) {
- var T = y.getStyle || C;
- if (s === "width")
- return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (T(t, "padding-left", !0) || 0) - (T(t, "padding-right", !0) || 0));
- if (s === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (T(t, "padding-top", !0) || 0) - (T(t, "padding-bottom", !0) || 0));
- if (p.getComputedStyle || j(27, !0), t = p.getComputedStyle(t, void 0)) {
- var _ = t.getPropertyValue(s);
- A(n, s !== "opacity") && (_ = Z(_));
- }
- return _;
- }
- function b(t, s, n) {
- for (var T in t)
- Object.hasOwnProperty.call(t, T) && s.call(n || t[T], t[T], T, t);
- }
- function w(t, s, n) {
- function T(P, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, P, X, !1);
- }
- function _(P) {
- var X;
- if (t.nodeName) {
- if (s) {
- var g = {};
- g[s] = !0;
- } else
- g = P;
- b(g, function(m, L) {
- if (P[L])
- for (X = P[L].length; X--; )
- T(L, P[L][X].fn);
- });
- }
- }
- var D = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(D, "hcEvents")) {
- var W = D.hcEvents;
- s ? (D = W[s] || [], n ? (W[s] = D.filter(function(P) {
- return n !== P.fn;
- }), T(s, n)) : (_(W), W[s] = [])) : (_(W), delete D.hcEvents);
- }
- }
- function x(t, s, n, T) {
- if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var _ = c.createEvent("Events");
- _.initEvent(s, !0, !0), n = u(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
- } else if (t.hcEvents) {
- n.target || u(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: s }), _ = [];
- for (var D = t, W = !1; D.hcEvents; )
- Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[s] && (_.length && (W = !0), _.unshift.apply(_, D.hcEvents[s])), D = Object.getPrototypeOf(D);
- W && _.sort(function(P, X) {
- return P.order - X.order;
- }), _.forEach(function(P) {
- P.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- T && !n.defaultPrevented && T.call(t, n);
- }
- var a = y.charts, c = y.doc, p = y.win;
- (j || (j = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, s) {
- return t.find(s);
- } : function(t, s) {
- var n, T = t.length;
- for (n = 0; n < T; n++)
- if (s(t[n], n))
- return t[n];
- };
- b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
- y[s] = function(n) {
- var T;
- return j(32, !1, void 0, (T = {}, T["Highcharts." + s] = "use Array." + t, T)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var h, o = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
- return function() {
- return "highcharts-" + (h ? "" : t) + s++;
- };
- }();
- return p.jQuery && (p.jQuery.fn.highcharts = function() {
- var t = [].slice.call(arguments);
- if (this[0])
- return t[0] ? (new y[H(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : a[d(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, s, n, T) {
- T === void 0 && (T = {});
- var _ = typeof t == "function" && t.prototype || t;
- Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
- var D = t.addEventListener || y.addEventListenerPolyfill;
- return D && D.call(t, s, n, y.supportsPassiveEvents ? { passive: T.passive === void 0 ? s.indexOf("touch") !== -1 : T.passive, capture: !1 } : !1), _[s] || (_[s] = []), _[s].push({ fn: n, order: typeof T.order == "number" ? T.order : 1 / 0 }), _[s].sort(function(W, P) {
- return W.order - P.order;
- }), function() {
- w(t, s, n);
- };
- }, arrayMax: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] > n && (n = t[s]);
- return n;
- }, arrayMin: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] < n && (n = t[s]);
- return n;
- }, attr: d, clamp: function(t, s, n) {
- return t > s ? t < n ? t : n : s;
- }, cleanRecursively: I, clearTimeout: function(t) {
- v(t) && clearTimeout(t);
- }, correctFloat: B, createElement: function(t, s, n, T, _) {
- return t = c.createElement(t), s && u(t, s), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), T && T.appendChild(t), t;
- }, css: O, defined: v, destroyObjectProperties: function(t, s) {
- b(t, function(n, T) {
- n && n !== s && n.destroy && n.destroy(), delete t[T];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, s) {
- for (var n = t.length; n--; )
- if (t[n] === s) {
- t.splice(n, 1);
- break;
- }
- }, error: j, extend: u, extendClass: function(t, s) {
- var n = function() {
- };
- return n.prototype = new t(), u(n.prototype, s), n;
- }, find: i, fireEvent: x, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, s) {
- for (t = t.split("."); t.length && v(s); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (s = s[n], !v(s) || typeof s == "function" || typeof s.nodeType == "number" || s === p))
- return;
- }
- return s;
- }, getStyle: C, inArray: function(t, s, n) {
- return j(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
- }, isArray: U, isClass: R, isDOMElement: N, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: S, isObject: F, isString: H, keys: function(t) {
- return j(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, s = arguments, n = {}, T = function(D, W) {
- return typeof D != "object" && (D = {}), b(W, function(P, X) {
- X !== "__proto__" && X !== "constructor" && (!F(P, !0) || R(P) || N(P) ? D[X] = W[X] : D[X] = T(D[X] || {}, P));
- }), D;
- };
- s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
- var _ = s.length;
- for (t = 0; t < _; t++)
- n = T(n, s[t]);
- return n;
- }, normalizeTickInterval: function(t, s, n, T, _) {
- var D = t;
- n = A(n, 1);
- var W = t / n;
- for (s || (s = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], T === !1 && (n === 1 ? s = s.filter(function(P) {
- return P % 1 === 0;
- }) : 0.1 >= n && (s = [1 / n]))), T = 0; T < s.length && (D = s[T], !(_ && D * n >= t || !_ && W <= (s[T] + (s[T + 1] || s[T])) / 2)); T++)
- ;
- return D = B(D * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: b, offset: function(t) {
- var s = c.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (p.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, s, n) {
- return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: A, pInt: Z, relativeLength: function(t, s, n) {
- return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: w, splat: function(t) {
- return U(t) ? t : [t];
- }, stableSort: function(t, s) {
- var n = t.length, T, _;
- for (_ = 0; _ < n; _++)
- t[_].safeI = _;
- for (t.sort(function(D, W) {
- return T = s(D, W), T === 0 ? D.safeI - W.safeI : T;
- }), _ = 0; _ < n; _++)
- delete t[_].safeI;
- }, syncTimeout: function(t, s, n) {
- return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: o, useSerialIds: function(t) {
- return h = A(t, h);
- }, wrap: function(t, s, n) {
- var T = t[s];
- t[s] = function() {
- var _ = Array.prototype.slice.call(arguments), D = arguments, W = this;
- return W.proceed = function() {
- T.apply(W, arguments.length ? arguments : D);
- }, _.unshift(T), _ = n.apply(this, _), W.proceed = null, _;
- };
- } }, i;
- }), E(l, "Core/Chart/ChartDefaults.js", [], function() {
- return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
- 10,
- 10,
- 15,
- 10
- ], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
- }), E(l, "Core/Color/Color.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.isNumber, Z = j.merge, H = j.pInt;
- return j = function() {
- function U(F) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
- var N = y.Color;
- if (N && N !== U)
- return new N(F);
- if (!(this instanceof U))
- return new U(F);
- this.init(F);
- }
- return U.parse = function(F) {
- return F ? new U(F) : U.None;
- }, U.prototype.init = function(F) {
- var N;
- if (typeof F == "object" && typeof F.stops < "u")
- this.stops = F.stops.map(function(d) {
- return new U(d[1]);
- });
- else if (typeof F == "string") {
- if (this.input = F = U.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
- var R = F.length, S = parseInt(F.substr(1), 16);
- R === 7 ? N = [(S & 16711680) >> 16, (S & 65280) >> 8, S & 255, 1] : R === 4 && (N = [(S & 3840) >> 4 | (S & 3840) >> 8, (S & 240) >> 4 | S & 240, (S & 15) << 4 | S & 15, 1]);
- }
- if (!N)
- for (S = U.parsers.length; S-- && !N; ) {
- var v = U.parsers[S];
- (R = v.regex.exec(F)) && (N = v.parse(R));
- }
- }
- N && (this.rgba = N);
- }, U.prototype.get = function(F) {
- var N = this.input, R = this.rgba;
- if (typeof N == "object" && typeof this.stops < "u") {
- var S = Z(N);
- return S.stops = [].slice.call(S.stops), this.stops.forEach(function(v, d) {
- S.stops[d] = [S.stops[d][0], v.get(F)];
- }), S;
- }
- return R && I(R[0]) ? F === "rgb" || !F && R[3] === 1 ? "rgb(" + R[0] + "," + R[1] + "," + R[2] + ")" : F === "a" ? "" + R[3] : "rgba(" + R.join(",") + ")" : N;
- }, U.prototype.brighten = function(F) {
- var N = this.rgba;
- if (this.stops)
- this.stops.forEach(function(S) {
- S.brighten(F);
- });
- else if (I(F) && F !== 0)
- for (var R = 0; 3 > R; R++)
- N[R] += H(255 * F), 0 > N[R] && (N[R] = 0), 255 < N[R] && (N[R] = 255);
- return this;
- }, U.prototype.setOpacity = function(F) {
- return this.rgba[3] = F, this;
- }, U.prototype.tweenTo = function(F, N) {
- var R = this.rgba, S = F.rgba;
- return !I(R[0]) || !I(S[0]) ? F.input || "none" : (F = S[3] !== 1 || R[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(S[0] + (R[0] - S[0]) * (1 - N)) + "," + Math.round(S[1] + (R[1] - S[1]) * (1 - N)) + "," + Math.round(S[2] + (R[2] - S[2]) * (1 - N)) + (F ? "," + (S[3] + (R[3] - S[3]) * (1 - N)) : "") + ")");
- }, U.names = { white: "#ffffff", black: "#000000" }, U.parsers = [{
- regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
- parse: function(F) {
- return [H(F[1]), H(F[2]), H(F[3]), parseFloat(F[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
- return [H(F[1]), H(F[2]), H(F[3]), 1];
- } }], U.None = new U(""), U;
- }(), j;
- }), E(l, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), E(l, "Core/Time.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.win, Z = j.defined, H = j.error, U = j.extend, F = j.isObject, N = j.merge, R = j.objectEach, S = j.pad, v = j.pick, d = j.splat, u = j.timeUnits, A = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
- return j = function() {
- function B(C) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(C);
- }
- return B.prototype.get = function(C, b) {
- if (this.variableTimezone || this.timezoneOffset) {
- var w = b.getTime(), x = w - this.getTimezoneOffset(b);
- return b.setTime(x), C = b["getUTC" + C](), b.setTime(w), C;
- }
- return this.useUTC ? b["getUTC" + C]() : b["get" + C]();
- }, B.prototype.set = function(C, b, w) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (C === "Milliseconds" || C === "Seconds" || C === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
- return b["setUTC" + C](w);
- var x = this.getTimezoneOffset(b);
- return x = b.getTime() - x, b.setTime(x), b["setUTC" + C](w), C = this.getTimezoneOffset(b), x = b.getTime() + C, b.setTime(x);
- }
- return this.useUTC || A && C === "FullYear" ? b["setUTC" + C](w) : b["set" + C](w);
- }, B.prototype.update = function(C) {
- var b = v(C && C.useUTC, !0);
- this.options = C = N(!0, this.options || {}, C), this.Date = C.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = b) && C.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!C.getTimezoneOffset && !C.timezone);
- }, B.prototype.makeTime = function(C, b, w, x, a, c) {
- if (this.useUTC) {
- var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
- p += i;
- var h = this.getTimezoneOffset(p);
- i !== h ? p += h - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
- } else
- p = new this.Date(C, b, v(w, 1), v(x, 0), v(a, 0), v(c, 0)).getTime();
- return p;
- }, B.prototype.timezoneOffsetFunction = function() {
- var C = this, b = this.options, w = b.getTimezoneOffset, x = b.moment || I.moment;
- if (!this.useUTC)
- return function(a) {
- return 6e4 * new Date(a.toString()).getTimezoneOffset();
- };
- if (b.timezone) {
- if (x)
- return function(a) {
- return 6e4 * -x.tz(a, b.timezone).utcOffset();
- };
- H(25);
- }
- return this.useUTC && w ? function(a) {
- return 6e4 * w(a.valueOf());
- } : function() {
- return 6e4 * (C.timezoneOffset || 0);
- };
- }, B.prototype.dateFormat = function(C, b, w) {
- if (!Z(b) || isNaN(b))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- C = v(C, "%Y-%m-%d %H:%M:%S");
- var x = this, a = new this.Date(b), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), h = this.get("Month", a), o = this.get("FullYear", a), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
- return a = U({ a: n ? n[p] : s[p].substr(0, 3), A: s[p], d: S(i), e: S(i, 2, " "), w: p, b: t.shortMonths[h], B: t.months[h], m: S(h + 1), o: h + 1, y: o.toString().substr(2, 2), Y: o, H: S(c), k: c, I: S(c % 12 || 12), l: c % 12 || 12, M: S(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: S(a.getSeconds()), L: S(Math.floor(b % 1e3), 3) }, y.dateFormats), R(a, function(T, _) {
- for (; C.indexOf("%" + _) !== -1; )
- C = C.replace("%" + _, typeof T == "function" ? T.call(x, b) : T);
- }), w ? C.substr(0, 1).toUpperCase() + C.substr(1) : C;
- }, B.prototype.resolveDTLFormat = function(C) {
- return F(C, !0) ? C : (C = d(C), { main: C[0], from: C[1], to: C[2] });
- }, B.prototype.getTimeTicks = function(C, b, w, x) {
- var a = this, c = [], p = {}, i = new a.Date(b), h = C.unitRange, o = C.count || 1, t;
- if (x = v(x, 1), Z(b)) {
- if (a.set(
- "Milliseconds",
- i,
- h >= u.second ? 0 : o * Math.floor(a.get("Milliseconds", i) / o)
- ), h >= u.second && a.set("Seconds", i, h >= u.minute ? 0 : o * Math.floor(a.get("Seconds", i) / o)), h >= u.minute && a.set("Minutes", i, h >= u.hour ? 0 : o * Math.floor(a.get("Minutes", i) / o)), h >= u.hour && a.set("Hours", i, h >= u.day ? 0 : o * Math.floor(a.get("Hours", i) / o)), h >= u.day && a.set("Date", i, h >= u.month ? 1 : Math.max(1, o * Math.floor(a.get("Date", i) / o))), h >= u.month) {
- a.set("Month", i, h >= u.year ? 0 : o * Math.floor(a.get("Month", i) / o));
- var s = a.get("FullYear", i);
- }
- h >= u.year && a.set(
- "FullYear",
- i,
- s - s % o
- ), h === u.week && (s = a.get("Day", i), a.set("Date", i, a.get("Date", i) - s + x + (s < x ? -7 : 0))), s = a.get("FullYear", i), x = a.get("Month", i);
- var n = a.get("Date", i), T = a.get("Hours", i);
- for (b = i.getTime(), !a.variableTimezone && a.useUTC || !Z(w) || (t = w - b > 4 * u.month || a.getTimezoneOffset(b) !== a.getTimezoneOffset(w)), b = i.getTime(), i = 1; b < w; )
- c.push(b), b = h === u.year ? a.makeTime(s + i * o, 0) : h === u.month ? a.makeTime(s, x + i * o) : !t || h !== u.day && h !== u.week ? t && h === u.hour && 1 < o ? a.makeTime(s, x, n, T + i * o) : b + h * o : a.makeTime(s, x, n + i * o * (h === u.day ? 1 : 7)), i++;
- c.push(b), h <= u.hour && 1e4 > c.length && c.forEach(function(_) {
- _ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
- });
- }
- return c.info = U(C, { higherRanks: p, totalRange: h * o }), c;
- }, B.prototype.getDateFormat = function(C, b, w, x) {
- var a = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
- for (i in u) {
- if (C === u.week && +this.dateFormat("%w", b) === w && a.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (u[i] > C) {
- i = p;
- break;
- }
- if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
- break;
- i !== "week" && (p = i);
- }
- if (i)
- var h = this.resolveDTLFormat(x[i]).main;
- return h;
- }, B;
- }(), j;
- }), E(l, "Core/DefaultOptions.js", [l["Core/Chart/ChartDefaults.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Color/Palettes.js"], l["Core/Time.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- j = j.parse;
- var F = U.merge, N = {
- colors: Z.colors,
- symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
- lang: {
- loading: "Loading...",
- months: "January February March April May June July August September October November December".split(" "),
- shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
- weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
- decimalPoint: ".",
- numericSymbols: "kMGTPE".split(""),
- resetZoom: "Reset zoom",
- resetZoomTitle: "Reset zoom level 1:1",
- thousandsSep: " "
- },
- global: {},
- time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
- chart: y,
- title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
- subtitle: { text: "", align: "center", widthAdjust: -44 },
- caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
- plotOptions: {},
- labels: { style: { position: "absolute", color: "#333333" } },
- legend: {
- enabled: !0,
- align: "center",
- alignColumns: !0,
- className: "highcharts-no-tooltip",
- layout: "horizontal",
- labelFormatter: function() {
- return this.name;
- },
- borderColor: "#999999",
- borderRadius: 0,
- navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
- itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
- itemHoverStyle: { color: "#000000" },
- itemHiddenStyle: { color: "#cccccc" },
- shadow: !1,
- itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
- squareSymbol: !0,
- symbolPadding: 5,
- verticalAlign: "bottom",
- x: 0,
- y: 0,
- title: { style: { fontWeight: "bold" } }
- },
- loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
- tooltip: {
- enabled: !0,
- animation: I.svg,
- borderRadius: 3,
- dateTimeLabelFormats: {
- millisecond: "%A, %b %e, %H:%M:%S.%L",
- second: "%A, %b %e, %H:%M:%S",
- minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M",
- day: "%A, %b %e, %Y",
- week: "Week from %A, %b %e, %Y",
- month: "%B %Y",
- year: "%Y"
- },
- footerFormat: "",
- headerShape: "callout",
- hideDelay: 500,
- padding: 8,
- shape: "callout",
- shared: !1,
- snap: I.isTouchDevice ? 25 : 10,
- headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
- pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
- backgroundColor: j("#f7f7f7").setOpacity(0.85).get(),
- borderWidth: 1,
- shadow: !0,
- stickOnContact: !1,
- style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
- useHTML: !1
- },
- credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
- };
- N.chart.styledMode = !1;
- var R = new H(F(N.global, N.time));
- return y = { defaultOptions: N, defaultTime: R, getOptions: function() {
- return N;
- }, setOptions: function(S) {
- return F(!0, N, S), (S.time || S.global) && (I.time ? I.time.update(F(
- N.global,
- N.time,
- S.global,
- S.time
- )) : I.time = R), N;
- } }, y;
- }), E(l, "Core/Animation/Fx.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.parse, H = j.win, U = I.isNumber, F = I.objectEach;
- return function() {
- function N(R, S, v) {
- this.pos = NaN, this.options = S, this.elem = R, this.prop = v;
- }
- return N.prototype.dSetter = function() {
- var R = this.paths, S = R && R[0];
- R = R && R[1];
- var v = this.now || 0, d = [];
- if (v !== 1 && S && R)
- if (S.length === R.length && 1 > v)
- for (var u = 0; u < R.length; u++) {
- for (var A = S[u], O = R[u], B = [], C = 0; C < O.length; C++) {
- var b = A[C], w = O[C];
- U(b) && U(w) && (O[0] !== "A" || C !== 4 && C !== 5) ? B[C] = b + v * (w - b) : B[C] = w;
- }
- d.push(B);
- }
- else
- d = R;
- else
- d = this.toD || [];
- this.elem.attr("d", d, void 0, !0);
- }, N.prototype.update = function() {
- var R = this.elem, S = this.prop, v = this.now, d = this.options.step;
- this[S + "Setter"] ? this[S + "Setter"]() : R.attr ? R.element && R.attr(S, v, null, !0) : R.style[S] = v + this.unit, d && d.call(R, v, this);
- }, N.prototype.run = function(R, S, v) {
- var d = this, u = d.options, A = function(C) {
- return A.stopped ? !1 : d.step(C);
- }, O = H.requestAnimationFrame || function(C) {
- setTimeout(
- C,
- 13
- );
- }, B = function() {
- for (var C = 0; C < N.timers.length; C++)
- N.timers[C]() || N.timers.splice(C--, 1);
- N.timers.length && O(B);
- };
- R !== S || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = R, this.end = S, this.unit = v, this.now = this.start, this.pos = 0, A.elem = this.elem, A.prop = this.prop, A() && N.timers.push(A) === 1 && O(B)) : (delete u.curAnim[this.prop], u.complete && Object.keys(u.curAnim).length === 0 && u.complete.call(this.elem));
- }, N.prototype.step = function(R) {
- var S = +/* @__PURE__ */ new Date(), v = this.options, d = this.elem, u = v.complete, A = v.duration, O = v.curAnim;
- if (d.attr && !d.element)
- R = !1;
- else if (R || S >= A + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var B = O[this.prop] = !0;
- F(O, function(C) {
- C !== !0 && (B = !1);
- }), B && u && u.call(d), R = !1;
- } else
- this.pos = v.easing((S - this.startTime) / A), this.now = this.start + (this.end - this.start) * this.pos, this.update(), R = !0;
- return R;
- }, N.prototype.initPath = function(R, S, v) {
- function d(a, c) {
- for (; a.length < x; ) {
- var p = a[0], i = c[x - a.length];
- i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
- "L",
- p[1],
- p[2]
- ]), a.unshift(p), B && (p = a.pop(), a.push(a[a.length - 1], p));
- }
- }
- function u(a, c) {
- for (; a.length < x; )
- if (c = a[Math.floor(a.length / C) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), B) {
- var p = a[Math.floor(a.length / C)].slice();
- a.splice(a.length / 2, 0, c, p);
- } else
- a.push(c);
- }
- var A = R.startX, O = R.endX;
- v = v.slice();
- var B = R.isArea, C = B ? 2 : 1;
- if (S = S && S.slice(), !S)
- return [v, v];
- if (A && O && O.length) {
- for (R = 0; R < A.length; R++)
- if (A[R] === O[0]) {
- var b = R;
- break;
- } else if (A[0] === O[O.length - A.length + R]) {
- b = R;
- var w = !0;
- break;
- } else if (A[A.length - 1] === O[O.length - A.length + R]) {
- b = A.length - R;
- break;
- }
- typeof b > "u" && (S = []);
- }
- if (S.length && U(b)) {
- var x = v.length + b * C;
- w ? (d(S, v), u(v, S)) : (d(v, S), u(S, v));
- }
- return [S, v];
- }, N.prototype.fillSetter = function() {
- N.prototype.strokeSetter.apply(this, arguments);
- }, N.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
- }, N.timers = [], N;
- }();
- }), E(l, "Core/Animation/AnimationUtilities.js", [l["Core/Animation/Fx.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(u) {
- return R(u) ? S({ duration: 500, defer: 0 }, u) : { duration: u ? 500 : 0, defer: 0 };
- }
- function Z(u, A) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== u || A && A !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var H = j.defined, U = j.getStyle, F = j.isArray, N = j.isNumber, R = j.isObject, S = j.merge, v = j.objectEach, d = j.pick;
- return { animate: function(u, A, O) {
- var B, C = "", b, w;
- if (!R(O)) {
- var x = arguments;
- O = { duration: x[2], easing: x[3], complete: x[4] };
- }
- N(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = S(A), v(A, function(a, c) {
- Z(u, c), w = new y(u, O, c), b = void 0, c === "d" && F(A.d) ? (w.paths = w.initPath(u, u.pathArray, A.d), w.toD = A.d, B = 0, b = 1) : u.attr ? B = u.attr(c) : (B = parseFloat(U(u, c)) || 0, c !== "opacity" && (C = "px")), b || (b = a), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), w.run(B, b, C);
- });
- }, animObject: I, getDeferredAnimation: function(u, A, O) {
- var B = I(A), C = 0, b = 0;
- return (O ? [O] : u.series).forEach(function(w) {
- w = I(w.options.animation), C = A && H(A.defer) ? B.defer : Math.max(C, w.duration + w.defer), b = Math.min(B.duration, w.duration);
- }), u.renderer.forExport && (C = 0), { defer: Math.max(0, C - b), duration: Math.min(C, b) };
- }, setAnimation: function(u, A) {
- A.renderer.globalAnimation = d(u, A.options.chart.animation, !0);
- }, stop: Z };
- }), E(l, "Core/Renderer/HTML/AST.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.SVG_NS, Z = j.attr, H = j.createElement, U = j.error, F = j.isFunction, N = j.isString, R = j.objectEach, S = j.splat, v = (j = y.win.trustedTypes) && F(j.createPolicy) && j.createPolicy("highcharts", { createHTML: function(A) {
- return A;
- } }), d = v ? v.createHTML("") : "";
- try {
- var u = !!new DOMParser().parseFromString(d, "text/html");
- } catch {
- u = !1;
- }
- return F = function() {
- function A(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return A.filterUserAttributes = function(O) {
- return R(O, function(B, C) {
- var b = !0;
- A.allowedAttributes.indexOf(C) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(C) !== -1 && (b = N(B) && A.allowedReferences.some(function(w) {
- return B.indexOf(w) === 0;
- })), b || (U("Highcharts warning: Invalid attribute '" + C + "' in config"), delete O[C]);
- }), O;
- }, A.setElementHTML = function(O, B) {
- O.innerHTML = A.emptyHTML, B && new A(B).addToDOM(O);
- }, A.prototype.addToDOM = function(O) {
- function B(C, b) {
- var w;
- return S(C).forEach(function(x) {
- var a = x.tagName, c = x.textContent ? y.doc.createTextNode(x.textContent) : void 0;
- if (a)
- if (a === "#text")
- var p = c;
- else if (A.allowedTags.indexOf(a) !== -1) {
- a = y.doc.createElementNS(a === "svg" ? I : b.namespaceURI || I, a);
- var i = x.attributes || {};
- R(x, function(h, o) {
- o !== "tagName" && o !== "attributes" && o !== "children" && o !== "textContent" && (i[o] = h);
- }), Z(a, A.filterUserAttributes(i)), c && a.appendChild(c), B(x.children || [], a), p = a;
- } else
- U("Highcharts warning: Invalid tagName " + a + " in config");
- p && b.appendChild(p), w = p;
- }), w;
- }
- return B(this.nodes, O);
- }, A.prototype.parseMarkup = function(O) {
- var B = [];
- if (O = O.trim(), u)
- O = new DOMParser().parseFromString(v ? v.createHTML(O) : O, "text/html");
- else {
- var C = H("div");
- C.innerHTML = O, O = { body: C };
- }
- var b = function(w, x) {
- var a = w.nodeName.toLowerCase(), c = { tagName: a };
- if (a === "#text" && (c.textContent = w.textContent || ""), a = w.attributes) {
- var p = {};
- [].forEach.call(a, function(h) {
- p[h.name] = h.value;
- }), c.attributes = p;
- }
- if (w.childNodes.length) {
- var i = [];
- [].forEach.call(w.childNodes, function(h) {
- b(h, i);
- }), i.length && (c.children = i);
- }
- x.push(c);
- };
- return [].forEach.call(O.body.childNodes, function(w) {
- return b(w, B);
- }), B;
- }, A.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), A.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), A.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), A.emptyHTML = d, A;
- }(), F;
- }), E(
- l,
- "Core/FormatUtilities.js",
- [l["Core/DefaultOptions.js"], l["Core/Utilities.js"]],
- function(y, j) {
- function I(S, v, d, u) {
- S = +S || 0, v = +v;
- var A = Z.lang, O = (S.toString().split(".")[1] || "").split("e")[0].length, B = S.toString().split("e"), C = v;
- if (v === -1)
- v = Math.min(O, 20);
- else if (!F(v))
- v = 2;
- else if (v && B[1] && 0 > B[1]) {
- var b = v + +B[1];
- 0 <= b ? (B[0] = (+B[0]).toExponential(b).split("e")[0], v = b) : (B[0] = B[0].split(".")[0] || 0, S = 20 > v ? (B[0] * Math.pow(10, B[1])).toFixed(v) : 0, B[1] = 0);
- }
- b = (Math.abs(B[1] ? B[0] : S) + Math.pow(10, -Math.max(v, O) - 1)).toFixed(v), O = String(R(b));
- var w = 3 < O.length ? O.length % 3 : 0;
- return d = N(d, A.decimalPoint), u = N(u, A.thousandsSep), S = (0 > S ? "-" : "") + (w ? O.substr(0, w) + u : ""), S = 0 > +B[1] && !C ? "0" : S + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + u), v && (S += d + b.slice(-v)), B[1] && +S != 0 && (S += "e" + B[1]), S;
- }
- var Z = y.defaultOptions, H = y.defaultTime, U = j.getNestedProperty, F = j.isNumber, N = j.pick, R = j.pInt;
- return { dateFormat: function(S, v, d) {
- return H.dateFormat(S, v, d);
- }, format: function(S, v, d) {
- var u = "{", A = !1, O = /f$/, B = /\.([0-9])/, C = Z.lang, b = d && d.time || H;
- d = d && d.numberFormatter || I;
- for (var w = []; S; ) {
- var x = S.indexOf(u);
- if (x === -1)
- break;
- var a = S.slice(0, x);
- if (A) {
- if (a = a.split(":"), u = U(a.shift() || "", v), a.length && typeof u == "number")
- if (a = a.join(":"), O.test(a)) {
- var c = parseInt((a.match(B) || ["", "-1"])[1], 10);
- u !== null && (u = d(u, c, C.decimalPoint, -1 < a.indexOf(",") ? C.thousandsSep : ""));
- } else
- u = b.dateFormat(a, u);
- w.push(u);
- } else
- w.push(a);
- S = S.slice(x + 1), u = (A = !A) ? "}" : "{";
- }
- return w.push(S), w.join("");
- }, numberFormat: I };
- }
- ), E(l, "Core/Renderer/RendererUtilities.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.clamp, I = y.pick, Z = y.stableSort, H;
- return function(U) {
- function F(N, R, S) {
- var v = N, d = v.reducedLen || R, u = function(w, x) {
- return (x.rank || 0) - (w.rank || 0);
- }, A = function(w, x) {
- return w.target - x.target;
- }, O, B = !0, C = [], b = 0;
- for (O = N.length; O--; )
- b += N[O].size;
- if (b > d) {
- for (Z(N, u), b = O = 0; b <= d; )
- b += N[O].size, O++;
- C = N.splice(O - 1, N.length);
- }
- for (Z(N, A), N = N.map(function(w) {
- return { size: w.size, targets: [w.target], align: I(w.align, 0.5) };
- }); B; ) {
- for (O = N.length; O--; )
- d = N[O], u = (Math.min.apply(0, d.targets) + Math.max.apply(0, d.targets)) / 2, d.pos = j(
- u - d.size * d.align,
- 0,
- R - d.size
- );
- for (O = N.length, B = !1; O--; )
- 0 < O && N[O - 1].pos + N[O - 1].size > N[O].pos && (N[O - 1].size += N[O].size, N[O - 1].targets = N[O - 1].targets.concat(N[O].targets), N[O - 1].align = 0.5, N[O - 1].pos + N[O - 1].size > R && (N[O - 1].pos = R - N[O - 1].size), N.splice(O, 1), B = !0);
- }
- return v.push.apply(v, C), O = 0, N.some(function(w) {
- var x = 0;
- return (w.targets || []).some(function() {
- return v[O].pos = w.pos + x, typeof S < "u" && Math.abs(v[O].pos - v[O].target) > S ? (v.slice(0, O + 1).forEach(function(a) {
- return delete a.pos;
- }), v.reducedLen = (v.reducedLen || R) - 0.1 * R, v.reducedLen > 0.1 * R && F(v, R, S), !0) : (x += v[O].size, O++, !1);
- });
- }), Z(v, A), v;
- }
- U.distribute = F;
- }(H || (H = {})), H;
- }), E(l, "Core/Renderer/SVG/SVGElement.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = y.animate, F = y.animObject, N = y.stop, R = Z.deg2rad, S = Z.doc, v = Z.noop, d = Z.svg, u = Z.SVG_NS, A = Z.win, O = H.addEvent, B = H.attr, C = H.createElement, b = H.css, w = H.defined, x = H.erase, a = H.extend, c = H.fireEvent, p = H.isArray, i = H.isFunction, h = H.isNumber, o = H.isString, t = H.merge, s = H.objectEach, n = H.pick, T = H.pInt, _ = H.syncTimeout, D = H.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = u, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(P) {
- return P = n(this[P + "Value"], this[P], this.element ? this.element.getAttribute(P) : null, 0), /^[\-0-9\.]+$/.test(P) && (P = parseFloat(P)), P;
- }, W.prototype._defaultSetter = function(P, X, g) {
- g.setAttribute(X, P);
- }, W.prototype.add = function(P) {
- var X = this.renderer, g = this.element;
- if (P && (this.parentGroup = P), this.parentInverted = P && P.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !P || P.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (P ? P.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(P, X) {
- var g = X ? "" : this.attr("class") || "";
- return P = (P || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), P !== g && this.attr("class", P), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(P, X, g) {
- var m = {}, L = this.renderer, Y = L.alignedObjects, V, Q, k;
- P ? (this.alignOptions = P, this.alignByTranslate = X, (!g || o(g)) && (this.alignTo = V = g || "renderer", x(Y, this), Y.push(this), g = void 0)) : (P = this.alignOptions, X = this.alignByTranslate, V = this.alignTo), g = n(g, L[V], V === "scrollablePlotBox" ? L.plotBox : void 0, L), V = P.align;
- var G = P.verticalAlign;
- return L = (g.x || 0) + (P.x || 0), Y = (g.y || 0) + (P.y || 0), V === "right" ? Q = 1 : V === "center" && (Q = 2), Q && (L += (g.width - (P.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (g.height - (P.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(P) {
- var X = { left: "start", center: "middle", right: "end" };
- X[P] && (this.alignValue = P, this.element.setAttribute(
- "text-anchor",
- X[P]
- ));
- }, W.prototype.animate = function(P, X, g) {
- var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(S.hidden, S.msHidden, S.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
- m.element && U(m, P, L);
- }, X)) : (this.attr(P, void 0, g), s(P, function(Y, V) {
- L.step && L.step.call(this, Y, { prop: V, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(P) {
- var X = this.element;
- P.indexOf("contrast") !== -1 && (P = P.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = P.split(" ");
- if (P = g[g.length - 1], (g = g[0]) && g !== "none" && Z.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(Y, V, Q) {
- return 2 * Number(V) + Q;
- }), this.removeTextOutline();
- var m = S.createElementNS(u, "tspan");
- B(m, { class: "highcharts-text-outline", fill: P, stroke: P, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
- var V = Y.cloneNode(!0);
- V.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return V.removeAttribute(Q);
- }), m.appendChild(V);
- });
- var L = S.createElementNS(u, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(Y) {
- var V = X.getAttribute(Y);
- V && L.setAttribute(Y, V);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(P, X, g, m) {
- var L = this.element, Y = this.symbolCustomAttribs, V, Q = this, k, G;
- if (typeof P == "string" && typeof X < "u") {
- var z = P;
- P = {}, P[z] = X;
- }
- return typeof P == "string" ? Q = (this[P + "Getter"] || this._defaultGetter).call(this, P, L) : (s(P, function($, q) {
- k = !1, m || N(this, q), this.symbolName && Y.indexOf(q) !== -1 && (V || (this.symbolAttr(P), V = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, $, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, $, G));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(P) {
- return this.attr("clip-path", P ? "url(" + this.renderer.url + "#" + P.id + ")" : "none");
- }, W.prototype.crisp = function(P, X) {
- X = X || P.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return P.x = Math.floor(P.x || this.x || 0) + g, P.y = Math.floor(P.y || this.y || 0) + g, P.width = Math.floor((P.width || this.width || 0) - 2 * g), P.height = Math.floor((P.height || this.height || 0) - 2 * g), w(P.strokeWidth) && (P.strokeWidth = X), P;
- }, W.prototype.complexColor = function(P, X, g) {
- var m = this.renderer, L, Y, V, Q, k, G, z, $, q, it, et = [], nt;
- c(this.renderer, "complexColor", { args: arguments }, function() {
- if (P.radialGradient ? Y = "radialGradient" : P.linearGradient && (Y = "linearGradient"), Y) {
- if (V = P[Y], k = m.gradients, G = P.stops, q = g.radialReference, p(V) && (P[Y] = V = { x1: V[0], y1: V[1], x2: V[2], y2: V[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !w(V.gradientUnits) && (Q = V, V = t(V, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s(V, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), s(G, function(ct) {
- et.push(ct);
- }), et = et.join(","), k[et])
- it = k[et].attr("id");
- else {
- V.id = it = D();
- var rt = k[et] = m.createElement(Y).attr(V).add(m.defs);
- rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), $ = L.get("a")) : (z = ct[1], $ = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": z,
- "stop-opacity": $
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, P.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(P) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", V = !X;
- if (P && P.color && (P.fill = P.color), X && s(P, function(G, z) {
- X && X[z] !== G && (g[z] = G, V = !0);
- }), V) {
- if (X && (P = a(X, g)), P) {
- if (P.width === null || P.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && P.width)
- var Q = this.textWidth = T(P.width);
- }
- if (this.styles = P, Q && !d && this.renderer.forExport && delete P.width, m.namespaceURI === this.SVG_NS) {
- var k = function(G, z) {
- return "-" + z.toLowerCase();
- };
- s(P, function(G, z) {
- L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
- }), Y && B(m, "style", Y);
- } else
- b(m, P);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), P && P.textOutline && this.applyTextOutline(P.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(P) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), P = P && P.toLowerCase()) {
- var g = P.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (P = g.length; P--; )
- g[P] = "" + T(g[P]) * n(X, NaN);
- P = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", P);
- }
- }, W.prototype.destroy = function() {
- var P = this, X = P.element || {}, g = P.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && P.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, N(P), P.clipPath && m) {
- var Y = P.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(V) {
- -1 < V.getAttribute("clip-path").indexOf(Y.element.id) && V.removeAttribute("clip-path");
- }), P.clipPath = Y.destroy();
- }
- if (P.stops) {
- for (m = 0; m < P.stops.length; m++)
- P.stops[m].destroy();
- P.stops.length = 0, P.stops = void 0;
- }
- for (P.safeRemoveChild(X), g.styledMode || P.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, P.safeRemoveChild(L.div), delete L.div, L = X;
- P.alignTo && x(g.alignedObjects, P), s(P, function(V, Q) {
- P[Q] && P[Q].parentGroup === P && P[Q].destroy && P[Q].destroy(), delete P[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(P) {
- this.safeRemoveChild(P);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(P, X) {
- var g = P.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (P = this.textPathWrapper.element.childNodes; P.length; )
- g.appendChild(P[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (P.getAttribute("dx") || P.getAttribute("dy")) && (P.removeAttribute("dx"), P.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(P, X, g) {
- p(P) && (typeof P[0] == "string" && (P = this.renderer.pathToSegments(P)), this.pathArray = P, P = P.reduce(function(m, L, Y) {
- return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(P) && (P = "M 0 0"), this[X] !== P && (g.setAttribute(X, P), this[X] = P);
- }, W.prototype.fadeOut = function(P) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(P, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(P, X, g) {
- typeof P == "string" ? g.setAttribute(X, P) : P && this.complexColor(P, X, g);
- }, W.prototype.getBBox = function(P, X) {
- var g = this.renderer, m = this.element, L = this.styles, Y = this.textStr, V = g.cache, Q = g.cacheKeys, k = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var G = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
- if (w(Y)) {
- var $ = Y.toString();
- $.indexOf("<") === -1 && ($ = $.replace(/[0-9]/g, "0")), $ += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if ($ && !P && (z = V[$]), !z) {
- if (k || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && b(et, { display: it });
- };
- i(q) && q("none"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!z || 0 > z.width) && (z = {
- width: 0,
- height: 0
- });
- } else
- z = this.htmlGetBBox();
- if (g.isSVG && (P = z.width, g = z.height, k && (z.height = g = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(g)] || g), X && (k = X * R, z.width = Math.abs(g * Math.sin(k)) + Math.abs(P * Math.cos(k)), z.height = Math.abs(g * Math.cos(k)) + Math.abs(P * Math.sin(k)))), $ && (Y === "" || 0 < z.height)) {
- for (; 250 < Q.length; )
- delete V[Q.shift()];
- V[$] || Q.push($), V[$] = z;
- }
- }
- return z;
- }, W.prototype.getStyle = function(P) {
- return A.getComputedStyle(this.element || this, "").getPropertyValue(P);
- }, W.prototype.hasClass = function(P) {
- return ("" + this.attr("class")).split(" ").indexOf(P) !== -1;
- }, W.prototype.hide = function(P) {
- return P ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
- }, W.prototype.htmlGetBBox = function() {
- return { height: 0, width: 0, x: 0, y: 0 };
- }, W.prototype.init = function(P, X) {
- this.element = X === "span" ? C(X) : S.createElementNS(this.SVG_NS, X), this.renderer = P, c(this, "afterInit");
- }, W.prototype.invert = function(P) {
- return this.inverted = P, this.updateTransform(), this;
- }, W.prototype.on = function(P, X) {
- var g = this.onEvents;
- return g[P] && g[P](), g[P] = O(
- this.element,
- P,
- X
- ), this;
- }, W.prototype.opacitySetter = function(P, X, g) {
- this.opacity = P = Number(Number(P).toFixed(3)), g.setAttribute(X, P);
- }, W.prototype.removeClass = function(P) {
- return this.attr("class", ("" + this.attr("class")).replace(o(P) ? new RegExp("(^| )" + P + "( |$)") : P, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var P = this.element.querySelector("tspan.highcharts-text-outline");
- P && this.safeRemoveChild(P);
- }, W.prototype.safeRemoveChild = function(P) {
- var X = P.parentNode;
- X && X.removeChild(P);
- }, W.prototype.setRadialReference = function(P) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = P, X && X.radAttr && X.animate(this.renderer.getRadialAttr(P, X.radAttr)), this;
- }, W.prototype.setTextPath = function(P, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, Y = !1, V = this.textPathWrapper, Q = !V;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var k = j.filterUserAttributes(X.attributes);
- if (P && X && X.enabled) {
- V && V.element.parentNode === null ? (Q = !0, V = V.destroy()) : V && this.removeTextOutline.call(V.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), V || (this.textPathWrapper = V = this.renderer.createElement("textPath"), Y = !0);
- var G = V.element;
- if ((X = P.element.getAttribute("id")) || P.element.setAttribute("id", X = D()), Q)
- for (m.setAttribute("y", 0), h(k.dx) && m.setAttribute("x", -k.dx), P = [].slice.call(m.childNodes), Q = 0; Q < P.length; Q++) {
- var z = P[Q];
- z.nodeType !== A.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
- }
- Y && V && V.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), w(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), s(k, function($, q) {
- G.setAttribute(L[q] || q, $);
- }), g.removeAttribute("transform"), this.removeTextOutline.call(V), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = v;
- } else
- V && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, P), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(P, X, g) {
- var m = [], L = this.element, Y = this.oldShadowOptions, V = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
- if (P === !0 ? k = V : typeof P == "object" && (k = a(V, P)), k && (k && Y && s(k, function(it, et) {
- it !== Y[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
- this.destroyShadows();
- else if (!this.shadows) {
- var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
- for (V = 1; V <= k.width; V++) {
- var $ = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * V;
- B($, { stroke: P.color || "#000000", "stroke-opacity": G * V, "stroke-width": q, transform: z, fill: "none" }), $.setAttribute("class", ($.getAttribute("class") || "") + " highcharts-shadow"), g && (B($, "height", Math.max(B($, "height") - q, 0)), $.cutHeight = q), X ? X.element.appendChild($) : L.parentNode && L.parentNode.insertBefore($, L), m.push($);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(P) {
- return this.attr({ visibility: P ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(P, X, g) {
- this[X] = P, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && P === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
- }, W.prototype.strokeWidth = function() {
- if (!this.renderer.styledMode)
- return this["stroke-width"] || 0;
- var P = this.getStyle("stroke-width"), X = 0;
- if (P.indexOf("px") === P.length - 2)
- X = T(P);
- else if (P !== "") {
- var g = S.createElementNS(u, "rect");
- B(g, { width: P, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(P) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(P[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(P) {
- P !== this.textStr && (delete this.textPxLength, this.textStr = P, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(P) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || S.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(P, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var P = this.element;
- return P.parentNode.appendChild(P), this;
- }, W.prototype.translate = function(P, X) {
- return this.attr({ translateX: P, translateY: X });
- }, W.prototype.updateShadows = function(P, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], P === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : P === "d" ? this.d : X, P, m[L]);
- }, W.prototype.updateTransform = function() {
- var P = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, V = this.translateX || 0, Q = this.translateY || 0;
- g && (V += this.width, Q += this.height), V = ["translate(" + V + "," + Q + ")"], w(L) && V.push("matrix(" + L.join(",") + ")"), g ? V.push("rotate(90) scale(-1,1)") : m && V.push("rotate(" + m + " " + n(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + n(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (w(P) || w(X)) && V.push("scale(" + n(P, 1) + " " + n(X, 1) + ")"), V.length && Y.setAttribute("transform", V.join(" "));
- }, W.prototype.visibilitySetter = function(P, X, g) {
- P === "inherit" ? g.removeAttribute(X) : this[X] !== P && g.setAttribute(
- X,
- P
- ), this[X] = P;
- }, W.prototype.xGetter = function(P) {
- return this.element.nodeName === "circle" && (P === "x" ? P = "cx" : P === "y" && (P = "cy")), this._defaultGetter(P);
- }, W.prototype.zIndexSetter = function(P, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, Y = this.element;
- g = L === g.box;
- var V = !1, Q = this.added, k;
- if (w(P) ? (Y.setAttribute("data-z-index", P), P = +P, this[X] === P && (Q = !1)) : w(this[X]) && Y.removeAttribute("data-z-index"), this[X] = P, Q) {
- for ((P = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !V; k--) {
- m = X[k], Q = m.getAttribute("data-z-index");
- var G = !w(Q);
- m !== Y && (0 > P && G && !g && !k ? (L.insertBefore(Y, X[k]), V = !0) : (T(Q) <= P || G && (!w(P) || 0 <= P)) && (L.insertBefore(Y, X[k + 1] || null), V = !0));
- }
- V || (L.insertBefore(Y, X[g ? 3 : 0] || null), V = !0);
- }
- return V;
- }, W;
- }(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, P) {
- this[P] = W, this.doTransform = !0;
- }, y;
- }), E(l, "Core/Renderer/RendererRegistry.js", [l["Core/Globals.js"]], function(y) {
- var j;
- return function(I) {
- I.rendererTypes = {};
- var Z;
- I.getRendererType = function(H) {
- return H === void 0 && (H = Z), I.rendererTypes[H] || I.rendererTypes[Z];
- }, I.registerRendererType = function(H, U, F) {
- I.rendererTypes[H] = U, (!Z || F) && (Z = H, y.Renderer = U);
- };
- }(j || (j = {})), j;
- }), E(
- l,
- "Core/Renderer/SVG/SVGLabel.js",
- [l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]],
- function(y, j) {
- var I = this && this.__extends || function() {
- var S = function(v, d) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, A) {
- u.__proto__ = A;
- } || function(u, A) {
- for (var O in A)
- A.hasOwnProperty(O) && (u[O] = A[O]);
- }, S(v, d);
- };
- return function(v, d) {
- function u() {
- this.constructor = v;
- }
- S(v, d), v.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
- };
- }(), Z = j.defined, H = j.extend, U = j.isNumber, F = j.merge, N = j.pick, R = j.removeEvent;
- return function(S) {
- function v(d, u, A, O, B, C, b, w, x, a) {
- var c = S.call(this) || this;
- c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(d, "g"), c.textStr = u, c.x = A, c.y = O, c.anchorX = C, c.anchorY = b, c.baseline = x, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = d.text(void 0, 0, 0, w).attr({ zIndex: 1 });
- var p;
- return typeof B == "string" && ((p = /^url\((.*?)\)$/.test(B)) || c.renderer.symbols[B]) && (c.symbolKey = B), c.bBox = v.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = d.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
- }
- return I(v, S), v.prototype.alignSetter = function(d) {
- d = { left: 0, center: 0.5, right: 1 }[d], d !== this.alignFactor && (this.alignFactor = d, this.bBox && U(this.xSetting) && this.attr({ x: this.xSetting }));
- }, v.prototype.anchorXSetter = function(d, u) {
- this.anchorX = d, this.boxAttr(u, Math.round(d) - this.getCrispAdjust() - this.xSetting);
- }, v.prototype.anchorYSetter = function(d, u) {
- this.anchorY = d, this.boxAttr(u, d - this.ySetting);
- }, v.prototype.boxAttr = function(d, u) {
- this.box ? this.box.attr(d, u) : this.deferredAttr[d] = u;
- }, v.prototype.css = function(d) {
- if (d) {
- var u = {};
- d = F(d), v.textProps.forEach(function(O) {
- typeof d[O] < "u" && (u[O] = d[O], delete d[O]);
- }), this.text.css(u);
- var A = "width" in u;
- "fontSize" in u || "fontWeight" in u ? this.updateTextPadding() : A && this.updateBoxSize();
- }
- return y.prototype.css.call(this, d);
- }, v.prototype.destroy = function() {
- R(this.element, "mouseenter"), R(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, v.prototype.fillSetter = function(d, u) {
- d && (this.needsBox = !0), this.fill = d, this.boxAttr(u, d);
- }, v.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var d = this.padding, u = N(this.paddingLeft, d);
- return { width: this.width, height: this.height, x: this.bBox.x - u, y: this.bBox.y - d };
- }, v.prototype.getCrispAdjust = function() {
- return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
- this["stroke-width"],
- 10
- ) : 0) % 2 / 2;
- }, v.prototype.heightSetter = function(d) {
- this.heightSetting = d;
- }, v.prototype.onAdd = function() {
- var d = this.textStr;
- this.text.add(this), this.attr({ text: Z(d) ? d : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, v.prototype.paddingSetter = function(d, u) {
- U(d) ? d !== this[u] && (this[u] = d, this.updateTextPadding()) : this[u] = void 0;
- }, v.prototype.rSetter = function(d, u) {
- this.boxAttr(u, d);
- }, v.prototype.shadow = function(d) {
- return d && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(d)), this;
- }, v.prototype.strokeSetter = function(d, u) {
- this.stroke = d, this.boxAttr(u, d);
- }, v.prototype["stroke-widthSetter"] = function(d, u) {
- d && (this.needsBox = !0), this["stroke-width"] = d, this.boxAttr(u, d);
- }, v.prototype["text-alignSetter"] = function(d) {
- this.textAlign = d;
- }, v.prototype.textSetter = function(d) {
- typeof d < "u" && this.text.attr({ text: d }), this.updateTextPadding();
- }, v.prototype.updateBoxSize = function() {
- var d = this.text.element.style, u = {}, A = this.padding, O = this.bBox = U(this.widthSetting) && U(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? v.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * A, d = this.renderer.fontMetrics(d && d.fontSize, this.text), this.baselineOffset = A + Math.min((this.text.firstLineMetrics || d).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - d.h) / 2), this.needsBox && (this.box || (A = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), A.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), A.add(this)), A = this.getCrispAdjust(), u.x = A, u.y = (this.baseline ? -this.baselineOffset : 0) + A, u.width = Math.round(this.width), u.height = Math.round(this.height), this.box.attr(H(u, this.deferredAttr)), this.deferredAttr = {});
- }, v.prototype.updateTextPadding = function() {
- var d = this.text;
- this.updateBoxSize();
- var u = this.baseline ? 0 : this.baselineOffset, A = N(this.paddingLeft, this.padding);
- Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (A += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (A !== d.x || u !== d.y) && (d.attr("x", A), d.hasBoxWidthChanged && (this.bBox = d.getBBox(!0)), typeof u < "u" && d.attr("y", u)), d.x = A, d.y = u;
- }, v.prototype.widthSetter = function(d) {
- this.widthSetting = U(d) ? d : void 0;
- }, v.prototype.getPaddedWidth = function() {
- var d = this.padding, u = N(this.paddingLeft, d);
- return d = N(this.paddingRight, d), (this.widthSetting || this.bBox.width || 0) + u + d;
- }, v.prototype.xSetter = function(d) {
- this.x = d, this.alignFactor && (d -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(d), this.attr("translateX", this.xSetting);
- }, v.prototype.ySetter = function(d) {
- this.ySetting = this.y = Math.round(d), this.attr("translateY", this.ySetting);
- }, v.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, v.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), v;
- }(y);
- }
- ), E(
- l,
- "Core/Renderer/SVG/Symbols.js",
- [l["Core/Utilities.js"]],
- function(y) {
- function j(N, R, S, v, d) {
- var u = [];
- if (d) {
- var A = d.start || 0, O = F(d.r, S);
- S = F(d.r, v || S);
- var B = (d.end || 0) - 1e-3;
- v = d.innerR;
- var C = F(d.open, 1e-3 > Math.abs((d.end || 0) - A - 2 * Math.PI)), b = Math.cos(A), w = Math.sin(A), x = Math.cos(B), a = Math.sin(B);
- A = F(d.longArc, 1e-3 > B - A - Math.PI ? 0 : 1), u.push(["M", N + O * b, R + S * w], ["A", O, S, 0, A, F(d.clockwise, 1), N + O * x, R + S * a]), H(v) && u.push(C ? ["M", N + v * x, R + v * a] : ["L", N + v * x, R + v * a], ["A", v, v, 0, A, H(d.clockwise) ? 1 - d.clockwise : 0, N + v * b, R + v * w]), C || u.push(["Z"]);
- }
- return u;
- }
- function I(N, R, S, v, d) {
- return d && d.r ? Z(N, R, S, v, d) : [["M", N, R], ["L", N + S, R], ["L", N + S, R + v], ["L", N, R + v], ["Z"]];
- }
- function Z(N, R, S, v, d) {
- return d = d && d.r || 0, [["M", N + d, R], ["L", N + S - d, R], ["C", N + S, R, N + S, R, N + S, R + d], ["L", N + S, R + v - d], ["C", N + S, R + v, N + S, R + v, N + S - d, R + v], ["L", N + d, R + v], ["C", N, R + v, N, R + v, N, R + v - d], ["L", N, R + d], ["C", N, R, N, R, N + d, R]];
- }
- var H = y.defined, U = y.isNumber, F = y.pick;
- return { arc: j, callout: function(N, R, S, v, d) {
- var u = Math.min(d && d.r || 0, S, v), A = u + 6, O = d && d.anchorX;
- d = d && d.anchorY || 0;
- var B = Z(N, R, S, v, { r: u });
- return U(O) && (N + O >= S ? d > R + A && d < R + v - A ? B.splice(3, 1, ["L", N + S, d - 6], ["L", N + S + 6, d], ["L", N + S, d + 6], ["L", N + S, R + v - u]) : B.splice(3, 1, ["L", N + S, v / 2], ["L", O, d], ["L", N + S, v / 2], ["L", N + S, R + v - u]) : 0 >= N + O ? d > R + A && d < R + v - A ? B.splice(7, 1, ["L", N, d + 6], ["L", N - 6, d], ["L", N, d - 6], ["L", N, R + u]) : B.splice(7, 1, ["L", N, v / 2], ["L", O, d], ["L", N, v / 2], ["L", N, R + u]) : d && d > v && O > N + A && O < N + S - A ? B.splice(5, 1, ["L", O + 6, R + v], ["L", O, R + v + 6], ["L", O - 6, R + v], ["L", N + u, R + v]) : d && 0 > d && O > N + A && O < N + S - A && B.splice(1, 1, ["L", O - 6, R], ["L", O, R - 6], ["L", O + 6, R], ["L", S - u, R])), B;
- }, circle: function(N, R, S, v) {
- return j(N + S / 2, R + v / 2, S / 2, v / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(N, R, S, v) {
- return [["M", N + S / 2, R], ["L", N + S, R + v / 2], ["L", N + S / 2, R + v], ["L", N, R + v / 2], ["Z"]];
- }, rect: I, roundedRect: Z, square: I, triangle: function(N, R, S, v) {
- return [["M", N + S / 2, R], ["L", N + S, R + v], ["L", N, R + v], ["Z"]];
- }, "triangle-down": function(N, R, S, v) {
- return [["M", N, R], ["L", N + S, R], ["L", N + S / 2, R + v], ["Z"]];
- } };
- }
- ), E(l, "Core/Renderer/SVG/TextBuilder.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.doc, H = j.SVG_NS, U = j.win, F = I.attr, N = I.isString, R = I.objectEach, S = I.pick;
- return function() {
- function v(d) {
- var u = d.styles;
- this.renderer = d.renderer, this.svgElement = d, this.width = d.textWidth, this.textLineHeight = u && u.lineHeight, this.textOutline = u && u.textOutline, this.ellipsis = !(!u || u.textOverflow !== "ellipsis"), this.noWrap = !(!u || u.whiteSpace !== "nowrap"), this.fontSize = u && u.fontSize;
- }
- return v.prototype.buildSVG = function() {
- var d = this.svgElement, u = d.element, A = d.renderer, O = S(d.textStr, "").toString(), B = O.indexOf("<") !== -1, C = u.childNodes;
- A = this.width && !d.added && A.box;
- var b = /<br.*?>/g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (w !== d.textCache) {
- for (d.textCache = w, delete d.actualWidth, w = C.length; w--; )
- u.removeChild(C[w]);
- B || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (A && A.appendChild(u), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(d.element), this.modifyDOM(), this.ellipsis && (u.textContent || "").indexOf("…") !== -1 && d.attr(
- "title",
- this.unescapeEntities(d.textStr || "", ["<", ">"])
- ), A && A.removeChild(u)) : u.appendChild(Z.createTextNode(this.unescapeEntities(O))), N(this.textOutline) && d.applyTextOutline && d.applyTextOutline(this.textOutline);
- }
- }, v.prototype.modifyDOM = function() {
- var d = this, u = this.svgElement, A = F(u.element, "x");
- u.firstLineMetrics = void 0;
- for (var O; (O = u.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- u.element.removeChild(O);
- [].forEach.call(u.element.querySelectorAll("tspan.highcharts-br"), function(w, x) {
- w.nextSibling && w.previousSibling && (x === 0 && w.previousSibling.nodeType === 1 && (u.firstLineMetrics = u.renderer.fontMetrics(void 0, w.previousSibling)), F(w, { dy: d.getLineHeight(w.nextSibling), x: A }));
- });
- var B = this.width || 0;
- if (B) {
- var C = function(w, x) {
- var a = w.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !d.noWrap && (1 < c.length || 1 < u.element.childNodes.length), i = d.getLineHeight(x), h = 0, o = u.actualWidth;
- if (d.ellipsis)
- a && d.truncate(w, a, void 0, 0, Math.max(0, B - parseInt(d.fontSize || 12, 10)), function(t, s) {
- return t.substring(
- 0,
- s
- ) + "…";
- });
- else if (p) {
- for (a = [], p = []; x.firstChild && x.firstChild !== w; )
- p.push(x.firstChild), x.removeChild(x.firstChild);
- for (; c.length; )
- c.length && !d.noWrap && 0 < h && (a.push(w.textContent || ""), w.textContent = c.join(" ").replace(/- /g, "-")), d.truncate(w, void 0, c, h === 0 && o || 0, B, function(t, s) {
- return c.slice(0, s).join(" ").replace(/- /g, "-");
- }), o = u.actualWidth, h++;
- p.forEach(function(t) {
- x.insertBefore(t, w);
- }), a.forEach(function(t) {
- x.insertBefore(Z.createTextNode(t), w), t = Z.createElementNS(H, "tspan"), t.textContent = "", F(t, { dy: i, x: A }), x.insertBefore(t, w);
- });
- }
- }, b = function(w) {
- [].slice.call(w.childNodes).forEach(function(x) {
- x.nodeType === U.Node.TEXT_NODE ? C(x, w) : (x.className.baseVal.indexOf("highcharts-br") !== -1 && (u.actualWidth = 0), b(x));
- });
- };
- b(u.element);
- }
- }, v.prototype.getLineHeight = function(d) {
- var u;
- return d = d.nodeType === U.Node.TEXT_NODE ? d.parentElement : d, this.renderer.styledMode || (u = d && /(px|em)$/.test(d.style.fontSize) ? d.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(u, d || this.svgElement.element).h;
- }, v.prototype.modifyTree = function(d) {
- var u = this, A = function(O, B) {
- var C = O.attributes;
- C = C === void 0 ? {} : C;
- var b = O.children, w = O.tagName, x = u.renderer.styledMode;
- w === "b" || w === "strong" ? x ? C.class = "highcharts-strong" : C.style = "font-weight:bold;" + (C.style || "") : (w === "i" || w === "em") && (x ? C.class = "highcharts-emphasized" : C.style = "font-style:italic;" + (C.style || "")), N(C.style) && (C.style = C.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (C.class = "highcharts-br", O.textContent = "", (B = d[B + 1]) && B.textContent && (B.textContent = B.textContent.replace(/^ +/gm, ""))) : w === "a" && b && b.some(function(a) {
- return a.tagName === "#text";
- }) && (O.children = [{ children: b, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = C, b && b.filter(function(a) {
- return a.tagName !== "#text";
- }).forEach(A);
- };
- d.forEach(A);
- }, v.prototype.truncate = function(d, u, A, O, B, C) {
- var b = this.svgElement, w = b.renderer, x = b.rotation, a = [], c = A ? 1 : 0, p = (u || A || "").length, i = p, h, o = function(s, n) {
- n = n || s;
- var T = d.parentNode;
- if (T && typeof a[n] > "u")
- if (T.getSubStringLength)
- try {
- a[n] = O + T.getSubStringLength(0, A ? n + 1 : n);
- } catch {
- }
- else
- w.getSpanWidth && (d.textContent = C(u || A, s), a[n] = O + w.getSpanWidth(b, d));
- return a[n];
- };
- b.rotation = 0;
- var t = o(d.textContent.length);
- if (O + t > B) {
- for (; c <= p; )
- i = Math.ceil((c + p) / 2), A && (h = C(A, i)), t = o(i, h && h.length - 1), c === p ? c = p + 1 : t > B ? p = i - 1 : c = i;
- p === 0 ? d.textContent = "" : u && p === u.length - 1 || (d.textContent = h || C(u || A, i));
- }
- A && A.splice(0, i), b.actualWidth = t, b.rotation = x;
- }, v.prototype.unescapeEntities = function(d, u) {
- return R(this.renderer.escapes, function(A, O) {
- u && u.indexOf(A) !== -1 || (d = d.toString().replace(new RegExp(A, "g"), O));
- }), d;
- }, v;
- }();
- }), E(l, "Core/Renderer/SVG/SVGRenderer.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGLabel.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Renderer/SVG/TextBuilder.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, N, R) {
- var S = I.charts, v = I.deg2rad, d = I.doc, u = I.isFirefox, A = I.isMS, O = I.isWebKit, B = I.noop, C = I.SVG_NS, b = I.symbolSizes, w = I.win, x = R.addEvent, a = R.attr, c = R.createElement, p = R.css, i = R.defined, h = R.destroyObjectProperties, o = R.extend, t = R.isArray, s = R.isNumber, n = R.isObject, T = R.isString, _ = R.merge, D = R.pick, W = R.pInt, P = R.uniqueKey, X;
- return I = function() {
- function g(m, L, Y, V, Q, k, G) {
- this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, Y, V, Q, k, G);
- }
- return g.prototype.init = function(m, L, Y, V, Q, k, G) {
- var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), $ = z.element;
- G || z.css(this.getStyle(V)), m.appendChild($), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a($, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = $, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(d.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
- var q;
- u && m.getBoundingClientRect && (L = function() {
- p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
- }, L(), this.unSubPixelFix = x(w, "resize", L));
- }, g.prototype.definition = function(m) {
- return new y([m]).addToDOM(this.defs.element);
- }, g.prototype.getReferenceURL = function() {
- if ((u || O) && d.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = P();
- m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(d.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = d.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", d.body.removeChild(m);
- }
- if (X)
- return w.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
- }
- return "";
- }, g.prototype.getStyle = function(m) {
- return this.style = o({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
- }, g.prototype.setStyle = function(m) {
- this.boxWrapper.css(this.getStyle(m));
- }, g.prototype.isHidden = function() {
- return !this.boxWrapper.getBBox().width;
- }, g.prototype.destroy = function() {
- var m = this.defs;
- return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), h(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
- }, g.prototype.createElement = function(m) {
- var L = new this.Element();
- return L.init(this, m), L;
- }, g.prototype.getRadialAttr = function(m, L) {
- return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
- }, g.prototype.buildText = function(m) {
- new N(m).buildSVG();
- }, g.prototype.getContrast = function(m) {
- return m = j.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
- }, g.prototype.button = function(m, L, Y, V, Q, k, G, z, $, q) {
- var it = this.label(m, L, Y, $, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
- if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
- rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
- var ct = rt.style;
- delete rt.style, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
- var gt = k.style;
- delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
- var dt = G.style;
- delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
- var ht = z.style;
- delete z.style;
- }
- return x(it.element, A ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), x(it.element, A ? "mouseout" : "mouseleave", function() {
- nt !== 3 && it.setState(nt);
- }), it.setState = function(at) {
- at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, k, G, z][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(o({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && V.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, Y) {
- Y === void 0 && (Y = "round");
- var V = m[0], Q = m[1];
- return i(V[1]) && V[1] === Q[1] && (V[1] = Q[1] = Math[Y](V[1]) - L % 2 / 2), i(V[2]) && V[2] === Q[2] && (V[2] = Q[2] = Math[Y](V[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && o(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, Y) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(V, Q, k) {
- k.setAttribute("c" + Q, V);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, Y, V, Q, k) {
- return n(m) ? (V = m, L = V.y, Y = V.r, m = V.x) : V = { innerR: V, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, V), m.r = Y, m;
- }, g.prototype.rect = function(m, L, Y, V, Q, k) {
- Q = n(m) ? m.r : Q;
- var G = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(V, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, $, q) {
- G.r = z, a(q, { rx: z, ry: z });
- }, G.rGetter = function() {
- return G.r || 0;
- }, G.attr(m);
- }, g.prototype.setSize = function(m, L, Y) {
- this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
- this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
- }, duration: D(
- Y,
- !0
- ) ? void 0 : 0 }), this.alignElements();
- }, g.prototype.g = function(m) {
- var L = this.createElement("g");
- return m ? L.attr({ class: "highcharts-" + m }) : L;
- }, g.prototype.image = function(m, L, Y, V, Q, k) {
- var G = { preserveAspectRatio: "none" }, z = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- s(L) && (G.x = L), s(Y) && (G.y = Y), s(V) && (G.width = V), s(Q) && (G.height = Q);
- var $ = this.createElement("image").attr(G);
- return L = function(q) {
- z($.element, m), k.call($, q);
- }, k ? (z(
- $.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), Y = new w.Image(), x(Y, "load", L), Y.src = m, Y.complete && L({})) : z($.element, m), $;
- }, g.prototype.symbol = function(m, L, Y, V, Q, k) {
- var G = this, z = /^url\((.*?)\)$/, $ = z.test(m), q = !$ && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
- if (it) {
- typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(Y || 0), V || 0, Q || 0, k));
- var nt = this.path(et);
- G.styledMode || nt.attr("fill", "none"), o(nt, { symbolName: q || void 0, x: L, y: Y, width: V, height: Q }), k && o(nt, k);
- } else if ($) {
- var rt = m.match(z)[1], ct = nt = this.image(rt);
- ct.imgwidth = D(b[rt] && b[rt].width, k && k.width), ct.imgheight = D(b[rt] && b[rt].height, k && k.height);
- var gt = function(dt) {
- return dt.attr({ width: dt.width, height: dt.height });
- };
- ["width", "height"].forEach(function(dt) {
- ct[dt + "Setter"] = function(ht, at) {
- var J = this["img" + at];
- this[at] = ht, i(J) && (k && k.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
- };
- }), i(L) && ct.attr({ x: L, y: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
- var dt = S[G.chartIndex];
- this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), d.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, Y, V) {
- var Q = P() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, Y, V, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
- }, g.prototype.text = function(m, L, Y, V) {
- var Q = {};
- return V && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!V || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
- for (var $ = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < $.length; it++)
- et = $[it], et.getAttribute(G) === q && et.setAttribute(G, k);
- z.setAttribute(G, k);
- }), m);
- }, g.prototype.fontMetrics = function(m, L) {
- return m = !this.styledMode && /px/.test(m) || !w.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && H.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
- }, g.prototype.rotCorr = function(m, L, Y) {
- var V = m;
- return L && Y && (V = Math.max(V * Math.cos(L * v), 4)), { x: -m / 3 * Math.sin(L * v), y: V };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], Y = [], V = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- T(Y[0]) && s(m[Q]) && Y.length === V[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
- return L.push(Y.slice(0)), L;
- }, g.prototype.label = function(m, L, Y, V, Q, k, G, z, $) {
- return new U(this, m, L, Y, V, Q, k, G, z, $);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), o(I.prototype, { Element: H, SVG_NS: C, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: B }), Z.registerRendererType("svg", I, !0), I;
- }), E(l, "Core/Renderer/HTML/HTMLElement.js", [l["Core/Globals.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var A = function(O, B) {
- return A = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
- C.__proto__ = b;
- } || function(C, b) {
- for (var w in b)
- b.hasOwnProperty(w) && (C[w] = b[w]);
- }, A(O, B);
- };
- return function(O, B) {
- function C() {
- this.constructor = O;
- }
- A(O, B), O.prototype = B === null ? Object.create(B) : (C.prototype = B.prototype, new C());
- };
- }(), H = y.isFirefox, U = y.isMS, F = y.isWebKit, N = y.win, R = I.css, S = I.defined, v = I.extend, d = I.pick, u = I.pInt;
- return function(A) {
- function O() {
- return A !== null && A.apply(this, arguments) || this;
- }
- return Z(O, A), O.compose = function(B) {
- if (O.composedClasses.indexOf(B) === -1) {
- O.composedClasses.push(B);
- var C = O.prototype, b = B.prototype;
- b.getSpanCorrection = C.getSpanCorrection, b.htmlCss = C.htmlCss, b.htmlGetBBox = C.htmlGetBBox, b.htmlUpdateTransform = C.htmlUpdateTransform, b.setSpanRotation = C.setSpanRotation;
- }
- return B;
- }, O.prototype.getSpanCorrection = function(B, C, b) {
- this.xCorr = -B * b, this.yCorr = -C;
- }, O.prototype.htmlCss = function(B) {
- var C = this.element.tagName === "SPAN" && B && "width" in B, b = d(C && B.width, void 0);
- if (C) {
- delete B.width, this.textWidth = b;
- var w = !0;
- }
- return B && B.textOverflow === "ellipsis" && (B.whiteSpace = "nowrap", B.overflow = "hidden"), this.styles = v(this.styles, B), R(this.element, B), w && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var B = this.element;
- return { x: B.offsetLeft, y: B.offsetTop, width: B.offsetWidth, height: B.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var B = this.renderer, C = this.element, b = this.translateX || 0, w = this.translateY || 0, x = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
- if (i = i && i.whiteSpace, R(C, { marginLeft: b, marginTop: w }), !B.styledMode && this.shadows && this.shadows.forEach(function(T) {
- R(T, { marginLeft: b + 1, marginTop: w + 1 });
- }), this.inverted && [].forEach.call(C.childNodes, function(T) {
- B.invertChild(T, C);
- }), C.tagName === "SPAN") {
- var h = this.rotation, o = this.textWidth && u(this.textWidth), t = [h, c, C.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
- if (s = !1, o !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- R(C, { width: "", whiteSpace: i || "nowrap" }), n = C.offsetWidth;
- (o > this.oldTextWidth || n > o) && (/[ \-]/.test(C.textContent || C.innerText) || C.style.textOverflow === "ellipsis") && (R(C, { width: n > o || h ? o + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = o, s = !0);
- }
- this.hasBoxWidthChanged = s, t !== this.cTT && (s = B.fontMetrics(C.style.fontSize, C).b, !S(h) || h === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(h, p, s), this.getSpanCorrection(!S(h) && this.textPxLength || C.offsetWidth, s, p, h, c)), R(C, { left: x + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = h, this.oldAlign = c;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(B, C, b) {
- var w = {}, x = U && !/Edge/.test(N.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : H ? "MozTransform" : N.opera ? "-o-transform" : void 0;
- x && (w[x] = w.transform = "rotate(" + B + "deg)", w[x + (H ? "Origin" : "-origin")] = w.transformOrigin = 100 * C + "% " + b + "px", R(this.element, w));
- }, O.composedClasses = [], O;
- }(j);
- }), E(
- l,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [l["Core/Renderer/HTML/AST.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGRenderer.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var S = function(v, d) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, A) {
- u.__proto__ = A;
- } || function(u, A) {
- for (var O in A)
- A.hasOwnProperty(O) && (u[O] = A[O]);
- }, S(v, d);
- };
- return function(v, d) {
- function u() {
- this.constructor = v;
- }
- S(v, d), v.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
- };
- }(), U = Z.attr, F = Z.createElement, N = Z.extend, R = Z.pick;
- return function(S) {
- function v() {
- return S !== null && S.apply(this, arguments) || this;
- }
- return H(v, S), v.compose = function(d) {
- return v.composedClasses.indexOf(d) === -1 && (v.composedClasses.push(d), d.prototype.html = v.prototype.html), d;
- }, v.prototype.html = function(d, u, A) {
- var O = this.createElement("span"), B = O.element, C = O.renderer, b = C.isSVG, w = function(x, a) {
- ["opacity", "visibility"].forEach(function(c) {
- x[c + "Setter"] = function(p, i, h) {
- var o = x.div ? x.div.style : a;
- j.prototype[c + "Setter"].call(this, p, i, h), o && (o[i] = p);
- };
- }), x.addedSetters = !0;
- };
- return O.textSetter = function(x) {
- x !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, R(x, "")), this.textStr = x, O.doTransform = !0);
- }, b && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(x, a) {
- a === "align" ? O.alignValue = O.textAlign = x : O[a] = x, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: d, x: Math.round(u), y: Math.round(A) }).css({ position: "absolute" }), C.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), B.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(x) {
- var a = C.box.parentNode, c = [];
- if (this.parentGroup = x) {
- var p = x.div;
- if (!p) {
- for (; x; )
- c.push(x), x = x.parentGroup;
- c.reverse().forEach(function(i) {
- function h(n, T) {
- i[T] = n, T === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
- }
- var o = U(i.element, "class"), t = i.styles || {};
- p = i.div = i.div || F("div", o ? { className: o } : void 0, {
- position: "absolute",
- left: (i.translateX || 0) + "px",
- top: (i.translateY || 0) + "px",
- display: i.display,
- opacity: i.opacity,
- cursor: t.cursor,
- pointerEvents: t.pointerEvents,
- visibility: i.visibility
- }, p || a);
- var s = p.style;
- N(i, { classSetter: function(n) {
- return function(T) {
- this.element.setAttribute("class", T), n.className = T;
- };
- }(p), on: function() {
- return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: h, translateYSetter: h }), i.addedSetters || w(i);
- });
- }
- } else
- p = a;
- return p.appendChild(B), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, v.composedClasses = [], v;
- }(I);
- }
- ), E(l, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(j) {
- j.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
- autoRotation: void 0,
- autoRotationLimit: 80,
- distance: void 0,
- enabled: !0,
- indentation: 10,
- overflow: "justify",
- padding: 5,
- reserveSpace: void 0,
- rotation: void 0,
- staggerLines: 0,
- step: 0,
- useHTML: !1,
- x: 0,
- zIndex: 7,
- style: { color: "#666666", cursor: "default", fontSize: "11px" }
- }, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
- align: "middle",
- rotation: 0,
- useHTML: !1,
- x: 0,
- y: 0,
- style: { color: "#666666" }
- }, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, j.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
- animation: {},
- allowOverlap: !1,
- enabled: !1,
- crop: !0,
- overflow: "justify",
- formatter: function() {
- var I = this.axis.chart.numberFormatter;
- return I(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, j.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, j.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, j.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, j.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), E(l, "Core/Foundation.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.isFunction, Z = y.objectEach, H = y.removeEvent, U;
- return function(F) {
- F.registerEventOptions = function(N, R) {
- N.eventOptions = N.eventOptions || {}, Z(R.events, function(S, v) {
- N.eventOptions[v] !== S && (N.eventOptions[v] && (H(N, v, N.eventOptions[v]), delete N.eventOptions[v]), I(S) && (N.eventOptions[v] = S, j(N, v, S)));
- });
- };
- }(U || (U = {})), U;
- }), E(
- l,
- "Core/Axis/Tick.js",
- [l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = j.deg2rad, H = I.clamp, U = I.correctFloat, F = I.defined, N = I.destroyObjectProperties, R = I.extend, S = I.fireEvent, v = I.isNumber, d = I.merge, u = I.objectEach, A = I.pick;
- return j = function() {
- function O(B, C, b, w, x) {
- this.isNewLabel = this.isNew = !0, this.axis = B, this.pos = C, this.type = b || "", this.parameters = x || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, S(this, "init"), b || w || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var B = this, C = B.axis, b = C.options, w = C.chart, x = C.categories, a = C.logarithmic, c = C.names, p = B.pos, i = A(B.options && B.options.labels, b.labels), h = C.tickPositions, o = p === h[0], t = p === h[h.length - 1], s = (!i.step || i.step === 1) && C.tickInterval === 1;
- h = h.info;
- var n = B.label, T;
- if (x = this.parameters.category || (x ? A(x[p], c[p], p) : p), a && v(x) && (x = U(a.lin2log(x))), C.dateTime)
- if (h)
- var _ = w.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && h.higherRanks[p] || h.unitName]), D = _.main;
- else
- v(x) && (D = C.dateTime.getXDateFormat(x, b.dateTimeLabelFormats || {}));
- B.isFirst = o, B.isLast = t;
- var W = {
- axis: C,
- chart: w,
- dateTimeLabelFormat: D,
- isFirst: o,
- isLast: t,
- pos: p,
- tick: B,
- tickPositionInfo: h,
- value: x
- };
- S(this, "labelFormat", W);
- var P = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = C.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : C.defaultLabelFormatter.call(g, g);
- };
- b = P.call(W, W);
- var X = _ && _.list;
- B.shortenLabel = X ? function() {
- for (T = 0; T < X.length; T++)
- if (R(W, { dateTimeLabelFormat: X[T] }), n.attr({ text: P.call(W, W) }), n.getBBox().width < C.getSlotWidth(B) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, s && C._addedPlotLB && B.moveLabel(b, i), F(n) || B.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (B.label = n = B.createLabel({ x: 0, y: 0 }, b, i), B.rotation = 0);
- }, O.prototype.createLabel = function(B, C, b) {
- var w = this.axis, x = w.chart;
- return (B = F(C) && b.enabled ? x.renderer.text(C, B.x, B.y, b.useHTML).add(w.labelGroup) : null) && (x.styledMode || B.css(d(b.style)), B.textPxLength = B.getBBox().width), B;
- }, O.prototype.destroy = function() {
- N(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(B, C, b, w) {
- var x = this.axis, a = x.chart, c = w && a.oldChartHeight || a.chartHeight;
- return B = { x: B ? U(x.translate(C + b, null, null, w) + x.transB) : x.left + x.offset + (x.opposite ? (w && a.oldChartWidth || a.chartWidth) - x.right - x.left : 0), y: B ? c - x.bottom + x.offset - (x.opposite ? x.height : 0) : U(c - x.translate(C + b, null, null, w) - x.transB) }, B.y = H(B.y, -1e5, 1e5), S(this, "afterGetPosition", { pos: B }), B;
- }, O.prototype.getLabelPosition = function(B, C, b, w, x, a, c, p) {
- var i = this.axis, h = i.transA, o = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), T = {}, _ = x.y;
- return F(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * Z) * (s.y - b.getBBox(!1, 0).height / 2)), B = B + x.x + n + s.x - (a && w ? a * h * (o ? -1 : 1) : 0), C = C + _ - (a && !w ? a * h * (o ? 1 : -1) : 0), t && (b = c / (p || 1) % t, i.opposite && (b = t - b - 1), C += i.labelOffset / t * b), T.x = B, T.y = Math.round(C), S(this, "afterGetLabelPosition", { pos: T, tickmarkOffset: a, index: c }), T;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(B, C, b, w, x, a) {
- return a.crispLine([["M", B, C], ["L", B + (x ? 0 : -b), C + (x ? b : 0)]], w);
- }, O.prototype.handleOverflow = function(B) {
- var C = this.axis, b = C.options.labels, w = B.x, x = C.chart.chartWidth, a = C.chart.spacing, c = A(C.labelLeft, Math.min(C.pos, a[3]));
- a = A(C.labelRight, Math.max(C.isRadial ? 0 : C.pos + C.len, x - a[1]));
- var p = this.label, i = this.rotation, h = { left: 0, center: 0.5, right: 1 }[C.labelAlign || p.attr("align")], o = p.getBBox().width, t = C.getSlotWidth(this), s = {}, n = t, T = 1, _;
- i || b.overflow !== "justify" ? 0 > i && w - h * o < c ? _ = Math.round(w / Math.cos(i * Z) - c) : 0 < i && w + h * o > a && (_ = Math.round((x - w) / Math.cos(i * Z))) : (x = w + (1 - h) * o, w - h * o < c ? n = B.x + n * (1 - h) - c : x > a && (n = a - B.x + n * h, T = -1), n = Math.min(t, n), n < t && C.labelAlign === "center" && (B.x += T * (t - n - h * (t - Math.min(o, n)))), (o > n || C.autoRotation && (p.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), p.css(s)));
- }, O.prototype.moveLabel = function(B, C) {
- var b = this, w = b.label, x = b.axis, a = x.reversed, c = !1;
- if (w && w.textStr === B ? (b.movedLabel = w, c = !0, delete b.label) : u(x.ticks, function(i) {
- c || i.isNew || i === b || !i.label || i.label.textStr !== B || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
- }), !c && (b.labelPos || w)) {
- var p = b.labelPos || w.xy;
- w = x.horiz ? a ? 0 : x.width + x.left : p.x, x = x.horiz ? p.y : a ? x.width + x.left : 0, b.movedLabel = b.createLabel({ x: w, y: x }, B, C), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(B, C, b) {
- var w = this.axis, x = w.horiz, a = this.pos, c = A(this.tickmarkOffset, w.tickmarkOffset);
- a = this.getPosition(x, a, c, C), c = a.x;
- var p = a.y;
- w = x && c === w.pos + w.len || !x && p === w.pos ? -1 : 1, x = A(b, this.label && this.label.newOpacity, 1), b = A(b, 1), this.isActive = !0, this.renderGridLine(C, b, w), this.renderMark(a, b, w), this.renderLabel(a, C, x, B), this.isNew = !1, S(this, "afterRender");
- }, O.prototype.renderGridLine = function(B, C, b) {
- var w = this.axis, x = w.options, a = {}, c = this.pos, p = this.type, i = A(
- this.tickmarkOffset,
- w.tickmarkOffset
- ), h = w.chart.renderer, o = this.gridLine, t = x.gridLineWidth, s = x.gridLineColor, n = x.gridLineDashStyle;
- this.type === "minor" && (t = x.minorGridLineWidth, s = x.minorGridLineColor, n = x.minorGridLineDashStyle), o || (w.chart.styledMode || (a.stroke = s, a["stroke-width"] = t || 0, a.dashstyle = n), p || (a.zIndex = 1), B && (C = 0), this.gridLine = o = h.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(w.gridGroup)), o && (b = w.getPlotLinePath({ value: c + i, lineWidth: o.strokeWidth() * b, force: "pass", old: B })) && o[B || this.isNew ? "attr" : "animate"]({ d: b, opacity: C });
- }, O.prototype.renderMark = function(B, C, b) {
- var w = this.axis, x = w.options, a = w.chart.renderer, c = this.type, p = w.tickSize(c ? c + "Tick" : "tick"), i = B.x;
- B = B.y;
- var h = A(x[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && w.isXAxis ? 1 : 0);
- x = x[c !== "minor" ? "tickColor" : "minorTickColor"];
- var o = this.mark, t = !o;
- p && (w.opposite && (p[0] = -p[0]), o || (this.mark = o = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || o.attr({ stroke: x, "stroke-width": h })), o[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- B,
- p[0],
- o.strokeWidth() * b,
- w.horiz,
- a
- ), opacity: C }));
- }, O.prototype.renderLabel = function(B, C, b, w) {
- var x = this.axis, a = x.horiz, c = x.options, p = this.label, i = c.labels, h = i.step;
- x = A(this.tickmarkOffset, x.tickmarkOffset);
- var o = B.x;
- B = B.y;
- var t = !0;
- p && v(o) && (p.xy = B = this.getLabelPosition(o, B, p, a, i, x, w, h), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || C || b === 0 || this.handleOverflow(B), h && w % h && (t = !1), t && v(B.y) ? (B.opacity = b, p[this.isNewLabel ? "attr" : "animate"](B), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var B = this.label, C = this.axis, b = C.reversed;
- if (B && !this.isNew) {
- var w = C.horiz ? b ? C.left : C.width + C.left : B.xy.x;
- b = C.horiz ? B.xy.y : b ? C.width + C.top : C.top, B.animate({ x: w, y: b, opacity: 0 }, void 0, B.destroy), delete this.label;
- }
- C.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), j;
- }
- ), E(l, "Core/Axis/Axis.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/AxisDefaults.js"],
- l["Core/Color/Color.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, N) {
- var R = y.animObject, S = Z.defaultOptions, v = H.registerEventOptions, d = U.deg2rad, u = N.arrayMax, A = N.arrayMin, O = N.clamp, B = N.correctFloat, C = N.defined, b = N.destroyObjectProperties, w = N.erase, x = N.error, a = N.extend, c = N.fireEvent, p = N.getMagnitude, i = N.isArray, h = N.isNumber, o = N.isString, t = N.merge, s = N.normalizeTickInterval, n = N.objectEach, T = N.pick, _ = N.relativeLength, D = N.removeEvent, W = N.splat, P = N.syncTimeout;
- return y = function() {
- function X(g, m) {
- this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
- }
- return X.prototype.init = function(g, m) {
- var L = m.isX;
- this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = T(m.opposite, this.opposite), this.side = T(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var Y = this.options, V = Y.labels, Q = Y.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = T(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = C(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = T(Y.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = h(V.rotation) ? V.rotation : void 0, v(this, Y), c(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(j.defaultXAxisOptions, this.coll === "yAxis" && j.defaultYAxisOptions, [j.defaultTopAxisOptions, j.defaultRightAxisOptions, j.defaultBottomAxisOptions, j.defaultLeftAxisOptions][this.side], t(S[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = h(this.value) ? this.value : NaN, Y = m.chart.time, V = this.dateTimeLabelFormat, Q = S.lang, k = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
- if (m.categories)
- var $ = "" + this.value;
- else if (V)
- $ = Y.dateFormat(V, L);
- else if (z && 1e3 <= G)
- for (; z-- && typeof $ > "u"; )
- m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && ($ = g(L / m, -1) + k[z]);
- return typeof $ > "u" && ($ = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), $;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- c(this, "getSeriesExtremes", null, function() {
- g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(Y) {
- if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
- var V = Y.options, Q = V.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if (V = Y.xData, V.length) {
- V = g.logarithmic ? V.filter(g.validatePositiveValue) : V, L = Y.getXExtremes(V);
- var k = L.min, G = L.max;
- h(k) || k instanceof Date || (V = V.filter(h), L = Y.getXExtremes(V), k = L.min, G = L.max), V.length && (g.dataMin = Math.min(T(g.dataMin, k), k), g.dataMax = Math.max(T(g.dataMax, G), G));
- }
- } else
- Y = Y.applyExtremes(), h(Y.dataMin) && (k = Y.dataMin, g.dataMin = Math.min(T(g.dataMin, k), k)), h(Y.dataMax) && (G = Y.dataMax, g.dataMax = Math.max(T(g.dataMax, G), G)), C(Q) && (g.threshold = Q), (!V.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), c(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, Y, V, Q) {
- var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
- V = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && V) && k.lin2val;
- var $ = 1, q = 0;
- return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && ($ *= -1, q = k.len), k.reversed && ($ *= -1, q -= $ * (k.sector || k.len)), m ? (g = (g * $ + q - z) / Y + G, V && (g = k.lin2val(g))) : (V && (g = k.val2lin(g)), g = h(G) ? $ * (g - G) * Y + q + $ * z + (h(Q) ? Y * Q : 0) : void 0), g;
- }, X.prototype.toPixels = function(g, m) {
- return this.translate(
- g,
- !1,
- !this.horiz,
- null,
- !0
- ) + (m ? 0 : this.pos);
- }, X.prototype.toValue = function(g, m) {
- return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
- }, X.prototype.getPlotLinePath = function(g) {
- function m(at, J, tt) {
- return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
- }
- var L = this, Y = L.chart, V = L.left, Q = L.top, k = g.old, G = g.value, z = g.lineWidth, $ = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: G,
- lineWidth: z,
- old: k,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, c(this, "getPlotLinePath", g, function(at) {
- et = T(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round($ - et - it), h(et) ? L.horiz ? (ct = Q, dt = $ - L.bottom, rt = gt = m(rt, V, V + L.width)) : (rt = V, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var Y = B(Math.floor(m / g) * g);
- L = B(Math.ceil(L / g) * g);
- var V = [], Q;
- if (B(Y + g) === Y && (Q = 20), this.single)
- return [m];
- for (m = Y; m <= L && (V.push(m), m = B(m + g, Q), m !== k); )
- var k = m;
- return V;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? T(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, V = this.min - Y;
- Y = this.max + Y;
- var Q = Y - V, k = [];
- if (Q && Q / L < this.len / 3) {
- var G = this.logarithmic;
- if (G)
- this.paddedTicks.forEach(function(z, $, q) {
- $ && k.push.apply(
- k,
- G.getLogTickPositions(L, q[$ - 1], q[$], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), V, Y, g.startOfWeek));
- else
- for (g = V + (m[0] - V) % L; g <= Y && g !== k[0]; g += L)
- k.push(g);
- }
- return k.length !== 0 && this.trimTicks(k), k;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, Y = this.max, V = 0, Q, k, G, z;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (C(g.min) || C(g.max) || C(g.floor) || C(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
- for (Q = z; 0 < Q; Q--)
- k = G[Q] - G[Q - 1], (!V || k < V) && (V = k);
- }), this.minRange = Math.min(5 * V, this.dataMax - this.dataMin))), Y - L < this.minRange) {
- var $ = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
- it = [L - it, T(g.min, L - it)], $ && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = u(it), Y = [L + q, T(g.max, L + q)], $ && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = A(Y), Y - L < q && (it[0] = Y - q, it[1] = T(g.min, Y - q), L = u(it));
- }
- this.min = L, this.max = Y;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && C(L) && Y && (g = C(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, Y = g.options.x;
- if (g.series.requireSorting = !1, C(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(g.name) : T(L.keys[g.name], -1) : g.series.autoIncrement()), Y === -1) {
- if (!m)
- var V = L.length;
- } else
- V = Y;
- return typeof V < "u" && (this.names[V] = g.name, this.names.keys[g.name] = V), V;
- }, X.prototype.updateNames = function() {
- var g = this, m = this.names;
- 0 < m.length && (Object.keys(m.keys).forEach(function(L) {
- delete m.keys[L];
- }), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
- L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(Y, V) {
- if (Y && Y.options && typeof Y.name < "u") {
- var Q = g.nameToX(Y);
- typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[V] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, Y = !!g.categories, V = g.isXAxis, Q = g.axisPointRange || 0, k = 0, G = 0, z = g.transA;
- if (V || Y || Q) {
- var $ = g.getClosest();
- L ? (k = L.minPointOffset, G = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = Y ? 1 : V ? T(q.options.pointRange, $, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || Y) && (q = q.is("xrange") ? !V : V, k = Math.max(k, q && o(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && $ ? g.ordinal.slope / $ : 1, g.minPointOffset = k *= L, g.pointRangePadding = G *= L, g.pointRange = Math.min(Q, g.single && Y ? 1 : m), V && (g.closestPointRange = $);
- }
- g.translationSlope = g.transA = z = g.staticScale || g.len / (m + G || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, Y = this.options, V = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, $ = Y.maxPadding, q = Y.minPadding, it = h(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = h(this.threshold) ? this.threshold : null;
- this.dateTime || G || Q || this.getTickAmount();
- var nt = T(this.userMin, Y.min), rt = T(this.userMax, Y.max);
- if (Q) {
- this.linkedParent = m[this.coll][Y.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = T(ct.min, ct.dataMin), this.max = T(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && x(11, 1, m);
- } else {
- if (z && C(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- $ = 0;
- }
- }
- this.min = T(nt, ct, this.dataMin), this.max = T(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, T(this.dataMin, this.min)) && x(10, 1, m), this.min = B(L.log2lin(this.min), 16), this.max = B(L.log2lin(this.max), 16)), this.range && C(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && C(this.min) && C(this.max) && (m = this.max - this.min) && (!C(nt) && q && (this.min -= m * q), !C(rt) && $ && (this.max += m * $)), h(this.userMin) || (h(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), h(Y.floor) && (this.min = Math.max(this.min, Y.floor))), h(this.userMax) || (h(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), h(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && C(this.dataMin) && (et = et || 0, !C(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !C(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), h(this.min) && h(this.max) && !this.chart.polar && this.min > this.max && (C(this.options.min) ? this.max = this.min : C(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : T(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), V && !g) {
- var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
- this.series.forEach(function(ht) {
- ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
- }), c(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = T(Y.minTickInterval, this.dateTime && !this.series.some(function(ht) {
- return ht.noSharedTooltip;
- }) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, p(this.tickInterval), T(Y.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
- }, X.prototype.setTickPositions = function() {
- var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), Y = this.hasVerticalPanning(), V = this.coll === "colorAxis", Q = (V || !Y) && g.startOnTick;
- Y = (V || !Y) && g.endOnTick, V = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && C(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
- this.tickInterval,
- this.min,
- this.max
- ) : (L = [this.min, this.max], x(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, V && (V = V.apply(this, [this.min, this.max]))) && (this.tickPositions = L = V), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
- return k.is("heatmap") && k.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || V || this.adjustTickAmount()), c(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var Y = g[0], V = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (c(this, "trimTicks"), !this.isLinked) {
- if (m && Y !== -1 / 0)
- this.min = Y;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = V;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && C(Y) && !this.options.tickPositions && g.push((V + Y) / 2);
- }
- }, X.prototype.alignToOthers = function() {
- var g = {}, m = this.options, L;
- return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(Y) {
- var V = Y.options;
- V = [Y.horiz ? V.left : V.top, V.width, V.height, V.pane].join(), Y.series.length && (g[V] ? L = !0 : g[V] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !C(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
- }, X.prototype.adjustTickAmount = function() {
- var g = this.options, m = this.tickInterval, L = this.tickPositions, Y = this.tickAmount, V = this.finalTickAmt, Q = L && L.length, k = T(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && h(this.min) && h(this.max)) {
- if (Q < Y) {
- for (; L.length < Y; )
- L.length % 2 || this.min === k ? L.push(B(L[L.length - 1] + m)) : L.unshift(B(L[0] - m));
- this.transA *= (Q - 1) / (Y - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
- } else
- Q > Y && (this.tickInterval *= 2, this.setTickPositions());
- if (C(V)) {
- for (m = g = L.length; m--; )
- (V === 3 && m % 2 === 1 || 2 >= V && 0 < m && m < g - 1) && L.splice(m, 1);
- this.finalTickAmt = void 0;
- }
- }
- }, X.prototype.setScale = function() {
- var g = !1, m = !1;
- this.series.forEach(function(Y) {
- g = g || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.xAxis.isDirty || !1;
- }), this.setAxisSize();
- var L = this.len !== (this.old && this.old.len);
- L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, Y, V) {
- var Q = this, k = Q.chart;
- L = T(L, !0), Q.series.forEach(function(G) {
- delete G.kdTree;
- }), V = a(V, { min: g, max: m }), c(Q, "setExtremes", V, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = V, L && k.redraw(Y);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, Y = this.dataMin, V = this.dataMax, Q = this.options, k = Math.min(Y, T(Q.min, Y)), G = Math.max(V, T(Q.max, V));
- return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(z) {
- var $ = z.newMin, q = z.newMax;
- ($ !== L.min || q !== L.max) && (L.allowZoomOutside || (C(Y) && ($ < k && ($ = k), $ > G && ($ = G)), C(V) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof $ < "u" || typeof q < "u", L.setExtremes($, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, V = this.width = Math.round(_(T(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(T(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), k = this.top = Math.round(_(T(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(_(T(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - k, this.right = g.chartWidth - V - m, this.len = Math.max(Y ? V : Q, 0), this.pos = Y ? m : k;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? B(g.lin2log(this.min)) : this.min, max: g ? B(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
- }, X.prototype.getThreshold = function(g) {
- var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
- return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
- }, X.prototype.autoLabelAlign = function(g) {
- var m = (T(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, c(
- this,
- "autoLabelAlign",
- g,
- function(L) {
- 15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
- }
- ), g.align;
- }, X.prototype.tickSize = function(g) {
- var m = this.options, L = T(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && Y) {
- m[g + "Position"] === "inside" && (Y = -Y);
- var V = [Y, L];
- }
- return g = { tickSize: V }, c(this, "afterTickSize", g), g.tickSize;
- }, X.prototype.labelMetrics = function() {
- var g = this.tickPositions && this.tickPositions[0] || 0;
- return this.chart.renderer.fontMetrics(
- this.options.labels.style.fontSize,
- this.ticks[g] && this.ticks[g].label
- );
- }, X.prototype.unsquish = function() {
- var g = this.options.labels, m = this.horiz, L = this.tickInterval, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), V = g.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
- var rt = nt / (Y || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), B(rt * L);
- }, z = L, $, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (h(V))
- var et = [V];
- else
- Y < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === V || nt && -90 <= nt && 90 >= nt) {
- q = G(Math.abs(Q.h / Math.sin(d * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, $ = nt, z = q);
- }
- });
- } else
- g.step || (z = G(Q.h));
- return this.autoRotation = et, this.labelRotation = T($, h(V) ? V : 0), z;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, Y = this.options.labels, V = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && h(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > Y.step)
- return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / V;
- if (!L) {
- if (g = Y.style.width, g !== void 0)
- return parseInt(String(g), 10);
- if (Q)
- return Q - m.spacing[3];
- }
- return 0.33 * m.chartWidth;
- }, X.prototype.renderUnsquish = function() {
- var g = this.chart, m = g.renderer, L = this.tickPositions, Y = this.ticks, V = this.options.labels, Q = V.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * V.padding)), $ = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (o(V.rotation) || ($.rotation = V.rotation || 0), L.forEach(function(gt) {
- gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > z && et > q.h ? $.rotation = this.labelRotation : this.labelRotation = 0;
- else if (G) {
- var nt = z;
- if (!it) {
- var rt = "clip";
- for (z = L.length; !k && z--; ) {
- var ct = L[z];
- (ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- $.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = V.align || this.autoLabelAlign(this.labelRotation)) && ($.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = Y[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr($), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = $.rotation);
- }, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
- }, X.prototype.hasData = function() {
- return this.series.some(function(g) {
- return g.hasData();
- }) || this.options.showEmpty && C(this.min) && C(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, Y = this.opposite, V = this.options.title, Q = this.chart.styledMode, k;
- this.axisTitle || ((k = V.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[V.align]), this.axisTitle = m.text(V.text || "", 0, 0, V.useHTML).attr({ zIndex: 7, rotation: V.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(V.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || V.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
- }, X.prototype.generateTick = function(g) {
- var m = this.ticks;
- m[g] ? m[g].addLabel() : m[g] = new F(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, Y = m.horiz, V = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, $ = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = V.title, rt = V.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = V.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || V.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var ot = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add($);
- };
- m.gridGroup = ot("grid", "-grid", V.gridZIndex), m.axisGroup = ot("axis", "", V.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (G.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, T(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
- tt = Math.max(k[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(k, function(pt, yt) {
- pt.destroy(), delete k[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
- var lt = nt.offset;
- J = C(lt) ? 0 : T(nt.margin, Y ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * T(V.offset, ct[Q] ? ct[Q] + (V.margin || 0) : 0), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (Y ? T(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = T(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), V = !m.axisLine || V.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], V)), c(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, Y = this.offset, V = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
- return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (g *= -1), m.renderer.crispLine([["M", V ? this.left : Q, V ? Y : this.top], ["L", V ? m.chartWidth - this.right : Q, V ? Y : m.chartHeight - this.bottom]], g);
- }, X.prototype.renderLine = function() {
- this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
- }, X.prototype.getTitlePosition = function() {
- var g = this.horiz, m = this.left, L = this.top, Y = this.len, V = this.options.title, Q = g ? m : L, k = this.opposite, G = this.offset, z = V.x, $ = V.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(V.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (g ? 0 : Y), middle: Q + Y / 2, high: Q + (g ? Y : 0) }[V.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], g = { x: g ? Y + z : m + (k ? this.width : 0) + G + z, y: g ? m + $ - (k ? this.height : 0) + G : Y + $ }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new F(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
- }, X.prototype.renderTick = function(g, m, L) {
- var Y = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (Y[g] || (Y[g] = new F(this, g)), L && Y[g].isNew && Y[g].render(
- m,
- !0,
- -1
- ), Y[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, Y = g.options, V = g.isLinked, Q = g.tickPositions, k = g.axisTitle, G = g.ticks, z = g.minorTicks, $ = g.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = R(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [G, z, $].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || V) {
- var ht = g.chart.hasRendered && g.old && h(g.old.min);
- g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
- g.renderMinorTick(at, ht);
- }), Q.length && (Q.forEach(function(at, J) {
- g.renderTick(at, J, ht);
- }), et && (g.min === 0 || g.single) && (G[-1] || (G[-1] = new F(g, -1, null, !0)), G[-1].render(-1))), it && Q.forEach(function(at, J) {
- dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && ($[at] || ($[at] = new U.PlotLineOrBand(g)), gt = at + et, $[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, $[at].render(), $[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [G, z, $].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(ot, lt) {
- ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
- }), P(function() {
- for (var ot = J.length; ot--; )
- at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
- }, at !== $ && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = g.getTitlePosition(), h(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr("y", -9999), k.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, c(this, "afterRender");
- }, X.prototype.redraw = function() {
- this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
- g.render();
- })), this.series.forEach(function(g) {
- g.isDirty = !0;
- });
- }, X.prototype.getKeepProps = function() {
- return this.keepProps || X.keepProps;
- }, X.prototype.destroy = function(g) {
- var m = this, L = m.plotLinesAndBands, Y = this.eventOptions;
- if (c(this, "destroy", { keepEvents: g }), g || D(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- b(Q);
- }), L)
- for (g = L.length; g--; )
- L[g].destroy();
- "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
- m[Q] && (m[Q] = m[Q].destroy());
- });
- for (var V in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[V] = m.plotLinesAndBandsGroups[V].destroy();
- n(m, function(Q, k) {
- m.getKeepProps().indexOf(k) === -1 && delete m[k];
- }), this.eventOptions = Y;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, Y = T(L && L.snap, !0), V = this.chart, Q, k = this.cross;
- if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (C(m) || !Y) !== !1) {
- if (Y ? C(m) && (Q = T(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), C(Q)) {
- var G = { value: m && (this.isXAxis ? m.x : T(m.stackY, m.y)), translatedValue: Q };
- V.polar && a(G, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), G = this.getPlotLinePath(G) || null;
- }
- if (!C(G)) {
- this.hideCrosshair();
- return;
- }
- Y = this.categories && !this.isRadial, k || (this.cross = k = V.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: T(L.zIndex, 2) }).add(), V.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": T(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- c(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
- }, X.prototype.hasVerticalPanning = function() {
- var g = this.chart.options.chart.panning;
- return !!(g && g.enabled && /y/.test(g.type));
- }, X.prototype.validatePositiveValue = function(g) {
- return h(g) && 0 < g;
- }, X.prototype.update = function(g, m) {
- var L = this.chart;
- g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, T(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, Y = this.series, V = Y.length; V--; )
- Y[V] && Y[V].remove(!1);
- w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, k) {
- Q.options.index = Q.userOptions.index = k;
- }), this.destroy(), m.isDirtyBox = !0, T(g, !0) && m.redraw();
- }, X.prototype.setTitle = function(g, m) {
- this.update({ title: g }, m);
- }, X.prototype.setCategories = function(g, m) {
- this.update(
- { categories: g },
- m
- );
- }, X.defaultOptions = j.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), E(l, "Core/Axis/DateTimeAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.timeUnits, U;
- return function(F) {
- function N() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function R(d) {
- d.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new v(this));
- }
- var S = [];
- F.compose = function(d) {
- return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("dateTime"), d.prototype.getTimeTicks = N, j(d, "init", R)), d;
- };
- var v = function() {
- function d(u) {
- this.axis = u;
- }
- return d.prototype.normalizeTimeTickInterval = function(u, A) {
- var O = A || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
- A = O[O.length - 1];
- var B = H[A[0]], C = A[1], b;
- for (b = 0; b < O.length && (A = O[b], B = H[A[0]], C = A[1], !(O[b + 1] && u <= (B * C[C.length - 1] + H[O[b + 1][0]]) / 2)); b++)
- ;
- return B === H.year && u < 5 * B && (C = [1, 2, 5]), u = Z(u / B, C, A[0] === "year" ? Math.max(I(u / B), 1) : 1), { unitRange: B, count: u, unitName: A[0] };
- }, d.prototype.getXDateFormat = function(u, A) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, u, O.options.startOfWeek, A) || A.year : A.day;
- }, d;
- }();
- F.Additions = v;
- }(U || (U = {})), U;
- }), E(l, "Core/Axis/LogarithmicAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.pick, U;
- return function(F) {
- function N(d) {
- var u = this.logarithmic;
- d.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : u || (this.logarithmic = new v(this));
- }
- function R() {
- var d = this.logarithmic;
- d && (this.lin2val = function(u) {
- return d.lin2log(u);
- }, this.val2lin = function(u) {
- return d.log2lin(u);
- });
- }
- var S = [];
- F.compose = function(d) {
- return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("logarithmic"), j(d, "init", N), j(d, "afterInit", R)), d;
- };
- var v = function() {
- function d(u) {
- this.axis = u;
- }
- return d.prototype.getLogTickPositions = function(u, A, O, B) {
- var C = this.axis, b = C.len, w = C.options, x = [];
- if (B || (this.minorAutoInterval = void 0), 0.5 <= u)
- u = Math.round(u), x = C.getLinearTickPositions(u, A, O);
- else if (0.08 <= u) {
- var a = Math.floor(A), c, p = w = void 0;
- for (b = 0.3 < u ? [1, 2, 4] : 0.15 < u ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
- var i = b.length;
- for (c = 0; c < i && !p; c++) {
- var h = this.log2lin(this.lin2log(a) * b[c]);
- h > A && (!B || w <= O) && typeof w < "u" && x.push(w), w > O && (p = !0), w = h;
- }
- }
- } else
- A = this.lin2log(A), O = this.lin2log(O), u = B ? C.getMinorTickInterval() : w.tickInterval, u = H(u === "auto" ? null : u, this.minorAutoInterval, w.tickPixelInterval / (B ? 5 : 1) * (O - A) / ((B ? b / C.tickPositions.length : b) || 1)), u = Z(u, void 0, I(u)), x = C.getLinearTickPositions(u, A, O).map(this.log2lin), B || (this.minorAutoInterval = u / 5);
- return B || (C.tickInterval = u), x;
- }, d.prototype.lin2log = function(u) {
- return Math.pow(10, u);
- }, d.prototype.log2lin = function(u) {
- return Math.log(u) / Math.LN10;
- }, d;
- }();
- F.Additions = v;
- }(U || (U = {})), U;
- }), E(l, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.erase, I = y.extend, Z = y.isNumber, H;
- return function(U) {
- var F = [], N;
- U.compose = function(S, v) {
- return N || (N = S), F.indexOf(v) === -1 && (F.push(v), I(v.prototype, R.prototype)), v;
- };
- var R = function() {
- function S() {
- }
- return S.prototype.getPlotBandPath = function(v, d, u) {
- u === void 0 && (u = this.options);
- var A = this.getPlotLinePath({ value: d, force: !0, acrossPanes: u.acrossPanes }), O = [], B = this.horiz;
- if (d = !Z(this.min) || !Z(this.max) || v < this.min && d < this.min || v > this.max && d > this.max, v = this.getPlotLinePath({ value: v, force: !0, acrossPanes: u.acrossPanes }), u = 1, v && A) {
- if (d) {
- var C = v.toString() === A.toString();
- u = 0;
- }
- for (d = 0; d < v.length; d += 2) {
- var b = v[d], w = v[d + 1], x = A[d], a = A[d + 1];
- b[0] !== "M" && b[0] !== "L" || w[0] !== "M" && w[0] !== "L" || x[0] !== "M" && x[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (B && x[1] === b[1] ? (x[1] += u, a[1] += u) : B || x[2] !== b[2] || (x[2] += u, a[2] += u), O.push(["M", b[1], b[2]], ["L", w[1], w[2]], ["L", a[1], a[2]], ["L", x[1], x[2]], ["Z"])), O.isFlat = C;
- }
- }
- return O;
- }, S.prototype.addPlotBand = function(v) {
- return this.addPlotBandOrLine(v, "plotBands");
- }, S.prototype.addPlotLine = function(v) {
- return this.addPlotBandOrLine(
- v,
- "plotLines"
- );
- }, S.prototype.addPlotBandOrLine = function(v, d) {
- var u = this, A = this.userOptions, O = new N(this, v);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (A.plotLines || []).concat(A.plotBands || []).forEach(function(C) {
- u.addPlotBandOrLine(C);
- })), d) {
- var B = A[d] || [];
- B.push(v), A[d] = B;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, S.prototype.removePlotBandOrLine = function(v) {
- var d = this.plotLinesAndBands, u = this.options, A = this.userOptions;
- if (d) {
- for (var O = d.length; O--; )
- d[O].id === v && d[O].destroy();
- [u.plotLines || [], A.plotLines || [], u.plotBands || [], A.plotBands || []].forEach(function(B) {
- for (O = B.length; O--; )
- (B[O] || {}).id === v && j(B, B[O]);
- });
- }
- }, S.prototype.removePlotBand = function(v) {
- this.removePlotBandOrLine(v);
- }, S.prototype.removePlotLine = function(v) {
- this.removePlotBandOrLine(v);
- }, S;
- }();
- }(H || (H = {})), H;
- }), E(l, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [l["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.arrayMax, Z = j.arrayMin, H = j.defined, U = j.destroyObjectProperties, F = j.erase, N = j.fireEvent, R = j.merge, S = j.objectEach, v = j.pick;
- return j = function() {
- function d(u, A) {
- this.axis = u, A && (this.options = A, this.id = A.id);
- }
- return d.compose = function(u) {
- return y.compose(d, u);
- }, d.prototype.render = function() {
- N(this, "render");
- var u = this, A = u.axis, O = A.horiz, B = A.logarithmic, C = u.options, b = C.color, w = v(C.zIndex, 0), x = C.events, a = {}, c = A.chart.renderer, p = C.label, i = u.label, h = C.to, o = C.from, t = C.value, s = u.svgElem, n = [], T = H(o) && H(h);
- n = H(t);
- var _ = !s, D = { class: "highcharts-plot-" + (T ? "band " : "line ") + (C.className || "") }, W = T ? "bands" : "lines";
- if (B && (o = B.log2lin(o), h = B.log2lin(h), t = B.log2lin(t)), A.chart.styledMode || (n ? (D.stroke = b || "#999999", D["stroke-width"] = v(C.width, 1), C.dashStyle && (D.dashstyle = C.dashStyle)) : T && (D.fill = b || "#e6ebf5", C.borderWidth && (D.stroke = C.borderColor, D["stroke-width"] = C.borderWidth))), a.zIndex = w, W += "-" + w, (B = A.plotLinesAndBandsGroups[W]) || (A.plotLinesAndBandsGroups[W] = B = c.g("plot-" + W).attr(a).add()), _ && (u.svgElem = s = c.path().attr(D).add(B)), n)
- n = A.getPlotLinePath({
- value: t,
- lineWidth: s.strokeWidth(),
- acrossPanes: C.acrossPanes
- });
- else if (T)
- n = A.getPlotBandPath(o, h, C);
- else
- return;
- return !u.eventsAdded && x && (S(x, function(P, X) {
- s.on(X, function(g) {
- x[X].apply(u, [g]);
- });
- }), u.eventsAdded = !0), (_ || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (u.label = i = i.destroy()))), p && (H(p.text) || H(p.formatter)) && n && n.length && 0 < A.width && 0 < A.height && !n.isFlat ? (p = R({ align: O && T && "center", x: O ? !T && 4 : 10, verticalAlign: !O && T && "middle", y: O ? T ? 16 : 10 : T ? 6 : -4, rotation: O && !T && 90 }, p), this.renderLabel(
- p,
- n,
- T,
- w
- )) : i && i.hide(), u;
- }, d.prototype.renderLabel = function(u, A, O, B) {
- var C = this.axis, b = C.chart.renderer, w = this.label;
- w || (this.label = w = b.text(this.getLabelText(u), 0, 0, u.useHTML).attr({ align: u.textAlign || u.align, rotation: u.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (u.className || ""), zIndex: B }).add(), C.chart.styledMode || w.css(R({ textOverflow: "ellipsis" }, u.style))), B = A.xBounds || [A[0][1], A[1][1], O ? A[2][1] : A[0][1]], A = A.yBounds || [A[0][2], A[1][2], O ? A[2][2] : A[0][2]], O = Z(B), b = Z(A), w.align(
- u,
- !1,
- { x: O, y: b, width: I(B) - O, height: I(A) - b }
- ), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? C.height - (w.alignAttr.y - C.top) : C.width - (w.alignAttr.x - C.left)) + "px" }), w.show(!0);
- }, d.prototype.getLabelText = function(u) {
- return H(u.formatter) ? u.formatter.call(this) : u.text;
- }, d.prototype.destroy = function() {
- F(this.axis.plotLinesAndBands, this), delete this.axis, U(this);
- }, d;
- }(), j;
- }), E(l, "Core/Tooltip.js", [
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H) {
- var U = y.format, F = j.doc, N = I.distribute, R = H.addEvent, S = H.clamp, v = H.css, d = H.defined, u = H.discardElement, A = H.extend, O = H.fireEvent, B = H.isArray, C = H.isNumber, b = H.isString, w = H.merge, x = H.pick, a = H.splat, c = H.syncTimeout;
- return y = function() {
- function p(i, h) {
- this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, h);
- }
- return p.prototype.applyFilter = function() {
- var i = this.chart;
- i.renderer.definition({ tagName: "filter", attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 }, children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }] });
- }, p.prototype.bodyFormatter = function(i) {
- return i.map(function(h) {
- var o = h.series.tooltipOptions;
- return (o[(h.point.formatPrefix || "point") + "Formatter"] || h.point.tooltipFormatter).call(h.point, o[(h.point.formatPrefix || "point") + "Format"] || "");
- });
- }, p.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(h) {
- var o = h && h.tt;
- o && (!o.isActive || i ? h.tt = o.destroy() : o.isActive = !1);
- });
- }, p.prototype.defaultFormatter = function(i) {
- var h = this.points || a(this), o = [i.tooltipFooterHeaderFormatter(h[0])];
- return o = o.concat(i.bodyFormatter(h)), o.push(i.tooltipFooterHeaderFormatter(
- h[0],
- !0
- )), o;
- }, p.prototype.destroy = function() {
- this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), u(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
- }, p.prototype.getAnchor = function(i, h) {
- var o = this.chart, t = o.pointer, s = o.inverted, n = o.plotTop, T = o.plotLeft, _, D, W = 0, P = 0;
- return i = a(i), this.followPointer && h ? (typeof h.chartX > "u" && (h = t.normalize(h)), t = [h.chartX - T, h.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- _ = X.series.yAxis, D = X.series.xAxis, W += X.plotX || 0, P += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (s ? (W += n + o.plotHeight - D.len - D.pos, P += T + o.plotWidth - _.len - _.pos) : (W += D.pos - T, P += _.pos - n));
- }), W /= i.length, P /= i.length, t = [s ? o.plotWidth - P : W, s ? o.plotHeight - W : P], this.shared && 1 < i.length && h && (s ? t[0] = h.chartX - T : t[1] = h.chartY - n)), t.map(Math.round);
- }, p.prototype.getLabel = function() {
- var i = this, h = this.chart.styledMode, o = this.options, t = this.split && this.allowShared, s = "tooltip" + (d(o.className) ? " " + o.className : ""), n = o.style.pointerEvents || (!this.followPointer && o.stickOnContact ? "auto" : "none"), T = function() {
- i.inContact = !0;
- }, _ = function(Y) {
- var V = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && V && V.onMouseOut && V.onMouseOut();
- }, D, W = this.chart.renderer;
- if (i.label) {
- var P = !i.label.hasClass("highcharts-label");
- (t && !P || !t && P) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- P = this.chart.options.chart.style;
- var X = Z.getRendererType();
- this.container = D = j.doc.createElement("div"), D.className = "highcharts-tooltip-container", v(D, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (P && P.zIndex || 0) + 3) }), R(D, "mouseenter", T), R(D, "mouseleave", _), j.doc.body.appendChild(D), this.renderer = W = new X(D, 0, 0, P, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, o.shape, void 0, void 0, o.useHTML, void 0, s).attr({ padding: o.padding, r: o.borderRadius }), h || this.label.attr({ fill: o.backgroundColor, "stroke-width": o.borderWidth }).css(o.style).css({ pointerEvents: n }).shadow(o.shadow)), h && o.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
- var g = this.label, m = g.xSetter, L = g.ySetter;
- g.xSetter = function(Y) {
- m.call(g, i.distance), D.style.left = Y + "px";
- }, g.ySetter = function(Y) {
- L.call(g, i.distance), D.style.top = Y + "px";
- };
- }
- this.label.on("mouseenter", T).on("mouseleave", _).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, p.prototype.getPosition = function(i, h, o) {
- var t = this.chart, s = this.distance, n = {}, T = t.inverted && o.h || 0, _ = this.outside, D = _ ? F.documentElement.clientWidth - 2 * s : t.chartWidth, W = _ ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, P = t.pointer.getChartPosition(), X = function(z) {
- var $ = z === "x";
- return [z, $ ? D : W, $ ? i : h].concat(_ ? [$ ? i * P.scaleX : h * P.scaleY, $ ? P.left - s + (o.plotX + t.plotLeft) * P.scaleX : P.top - s + (o.plotY + t.plotTop) * P.scaleY, 0, $ ? D : W] : [$ ? i : h, $ ? o.plotX + t.plotLeft : o.plotY + t.plotTop, $ ? t.plotLeft : t.plotTop, $ ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!o.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var Y = !this.followPointer && x(o.ttBelow, !t.inverted === X), V = function(z, $, q, it, et, nt, rt) {
- var ct = _ ? z === "y" ? s * P.scaleY : s * P.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < $, at = et - ct - q + gt;
- if (et = et + ct - gt, Y && ht)
- n[z] = et;
- else if (!Y && dt)
- n[z] = at;
- else if (dt)
- n[z] = Math.min(rt - it, 0 > at - T ? at : at - T);
- else if (ht)
- n[z] = Math.max(nt, et + T + q > $ ? et : et + T);
- else
- return !1;
- }, Q = function(z, $, q, it, et) {
- var nt;
- return et < s || et > $ - s ? nt = !1 : n[z] = et < q / 2 ? 1 : et > $ - it / 2 ? $ - it - 2 : et - q / 2, nt;
- }, k = function(z) {
- var $ = g;
- g = m, m = $, L = z;
- }, G = function() {
- V.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? n.x = n.y = 0 : (k(!0), G());
- };
- return (t.inverted || 1 < this.len) && k(), G(), n;
- }, p.prototype.hide = function(i) {
- var h = this;
- H.clearTimeout(this.hideTimer), i = x(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
- h.getLabel().fadeOut(i && void 0), h.isHidden = !0;
- }, i));
- }, p.prototype.init = function(i, h) {
- this.chart = i, this.options = h, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = h.split && !i.inverted && !i.polar, this.shared = h.shared || this.split, this.outside = x(h.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, p.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, p.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, p.prototype.move = function(i, h, o, t) {
- var s = this, n = s.now, T = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(h - n.y)), _ = s.followPointer || 1 < s.len;
- A(n, { x: T ? (2 * n.x + i) / 3 : i, y: T ? (n.y + h) / 2 : h, anchorX: _ ? void 0 : T ? (2 * n.anchorX + o) / 3 : o, anchorY: _ ? void 0 : T ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), T && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- s && s.move(i, h, o, t);
- }, 32));
- }, p.prototype.refresh = function(i, h) {
- var o = this.chart, t = this.options, s = a(i), n = s[0], T = [], _ = t.formatter || this.defaultFormatter, D = this.shared, W = o.styledMode, P = {};
- if (t.enabled) {
- H.clearTimeout(this.hideTimer), this.allowShared = !(!B(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, h);
- var X = i[0], g = i[1];
- if (D && this.allowShared ? (o.pointer.applyInactiveState(s), s.forEach(function(Y) {
- Y.setState("hover"), T.push(Y.getLabelConfig());
- }), P = { x: n.category, y: n.y }, P.points = T) : P = n.getLabelConfig(), this.len = T.length, _ = _.call(P, this), D = n.series, this.distance = x(
- D.tooltipOptions.distance,
- 16
- ), _ === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(_, s);
- else {
- var m = X, L = g;
- if (h && o.pointer.isDirectTouch && (m = h.chartX - o.plotLeft, L = h.chartY - o.plotTop), o.polar || D.options.clip === !1 || s.some(function(Y) {
- return Y.series.shouldShowTooltip(m, L);
- }))
- h = this.getLabel(), t.style.width && !W || h.css({ width: this.chart.spacingBox.width + "px" }), h.attr({ text: _ && _.join ? _.join("") : _ }), h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + x(n.colorIndex, D.colorIndex)), W || h.attr({ stroke: t.borderColor || n.color || D.color || "#666666" }), this.updatePosition({ plotX: X, plotY: g, negative: n.negative, ttBelow: n.ttBelow, h: i[2] || 0 });
- else {
- this.hide();
- return;
- }
- }
- this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
- }
- O(this, "refresh");
- }
- }, p.prototype.renderSplit = function(i, h) {
- function o(ht, at, J, tt, ot) {
- return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = S(ht - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = S(ht, ot ? ht : z.left, z.right)), { x: ht, y: at };
- }
- var t = this, s = t.chart, n = t.chart, T = n.chartWidth, _ = n.chartHeight, D = n.plotHeight, W = n.plotLeft, P = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
- g = g === void 0 ? 0 : g;
- var m = n.scrollablePixelsX, L = n.scrollingContainer;
- L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
- var Y = L.scrollLeft;
- L = L.scrollTop;
- var V = n.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: Y, right: Y + T, top: L, bottom: L + _ }, $ = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
- s = X.getChartPosition();
- var et = s.left;
- s = s.top;
- var nt = P + L, rt = 0, ct = D - g;
- b(i) && (i = [!1, i]), i = i.slice(0, h.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = h[J - 1] || { isHeader: !0, plotX: h[0].plotX, plotY: D, series: {} };
- var tt = J.isHeader, ot = tt ? t : J.series;
- at = at.toString();
- var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + x(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: k.padding, r: k.borderRadius }, V || (lt.fill = k.backgroundColor, lt["stroke-width"] = k.borderWidth), lt = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add($)), lt.isActive = !0, lt.attr({ text: at }), V || lt.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
- yt = W + yt;
- var Ct = P + D / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + S(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - P + vt, { ignoreX: !0 }) && (Ct = At.pos + vt);
- }
- yt = S(
- yt,
- z.left - Q,
- z.right + Q
- ), typeof Ct == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : o(yt, Ct, tt, at), ht.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: x(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
- }
- return ht;
- }, []), !G && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < z.left && at + ht.boxWidth < z.right ? !0 : at < et - z.left + ht.boxWidth && z.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = o(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return A(ht, { target: at.y, x: at.x });
- })), t.cleanSplit(), N(i, ct);
- var gt = et, dt = et;
- i.forEach(function(ht) {
- var at = ht.x, J = ht.boxWidth;
- ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
- }), i.forEach(function(ht) {
- var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
- if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
- var lt = et - gt;
- 0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = $.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
- }, p.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, h = this.label, o = this.shared ? i.hoverPoints : i.hoverPoint;
- if (h && o) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- o = this.getAnchor(o);
- var s = h.getBBox();
- o[0] += i.plotLeft - h.translateX, o[1] += i.plotTop - h.translateY, t.x = Math.min(0, o[0]), t.y = Math.min(0, o[1]), t.width = 0 > o[0] ? Math.max(Math.abs(o[0]), s.width - o[0]) : Math.max(
- Math.abs(o[0]),
- s.width
- ), t.height = 0 > o[1] ? Math.max(Math.abs(o[1]), s.height - Math.abs(o[1])) : Math.max(Math.abs(o[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = h.renderer.rect(t).addClass("highcharts-tracker").add(h), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, p.prototype.styledModeFormat = function(i) {
- return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
- }, p.prototype.tooltipFooterHeaderFormatter = function(i, h) {
- var o = i.series, t = o.tooltipOptions, s = o.xAxis, n = s && s.dateTime;
- s = { isFooter: h, labelConfig: i };
- var T = t.xDateFormat, _ = t[h ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", s, function(D) {
- n && !T && C(i.key) && (T = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && T && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- _ = _.replace("{point." + W + "}", "{point." + W + ":" + T + "}");
- }), o.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = U(_, { point: i, series: o }, this.chart);
- }), s.text;
- }, p.prototype.update = function(i) {
- this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
- }, p.prototype.updatePosition = function(i) {
- var h = this.chart, o = this.options, t = h.pointer, s = this.getLabel();
- t = t.getChartPosition();
- var n = (o.positioner || this.getPosition).call(this, s.width, s.height, i), T = i.plotX + h.plotLeft;
- i = i.plotY + h.plotTop, this.outside && (o = o.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + o, s.height + o, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (v(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), T *= t.scaleX, i *= t.scaleY), T += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), T, i);
- }, p;
- }(), y;
- }), E(l, "Core/Series/Point.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Animation/AnimationUtilities.js"], l["Core/DefaultOptions.js"], l["Core/FormatUtilities.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = j.animObject, F = I.defaultOptions, N = Z.format, R = H.addEvent, S = H.defined, v = H.erase, d = H.extend, u = H.fireEvent, A = H.getNestedProperty, O = H.isArray, B = H.isFunction, C = H.isNumber, b = H.isObject, w = H.merge, x = H.objectEach, a = H.pick, c = H.syncTimeout, p = H.removeEvent, i = H.uniqueKey;
- return j = function() {
- function h() {
- this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
- }
- return h.prototype.animateBeforeDestroy = function() {
- var o = this, t = { x: o.startXPos, opacity: 0 }, s = o.getGraphicalProps();
- s.singular.forEach(function(n) {
- o[n] = o[n].animate(n === "dataLabel" ? { x: o[n].startXPos, y: o[n].startYPos, opacity: 0 } : t);
- }), s.plural.forEach(function(n) {
- o[n].forEach(function(T) {
- T.element && T.animate(d({ x: o.startXPos }, T.startYPos ? { x: T.startXPos, y: T.startYPos } : {}));
- });
- });
- }, h.prototype.applyOptions = function(o, t) {
- var s = this.series, n = s.options.pointValKey || s.pointValKey;
- return o = h.prototype.optionsToObject.call(this, o), d(this, o), this.options = this.options ? d(this.options, o) : o, o.group && delete this.group, o.dataLabels && delete this.dataLabels, n && (this.y = h.prototype.getNestedProperty.call(
- this,
- n
- )), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !C(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : C(o.x) && s.options.relativeXValue && (this.x = s.autoIncrement(o.x)), this;
- }, h.prototype.destroy = function() {
- function o() {
- (t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
- for (D in t)
- t[D] = null;
- }
- var t = this, s = t.series, n = s.chart;
- s = s.options.dataSorting;
- var T = n.hoverPoints, _ = U(t.series.chart.renderer.globalAnimation), D;
- t.legendItem && n.legend.destroyItem(t), T && (t.setState(), v(T, t), T.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), c(o, _.duration)) : o(), n.pointCount--;
- }, h.prototype.destroyElements = function(o) {
- var t = this;
- o = t.getGraphicalProps(o), o.singular.forEach(function(s) {
- t[s] = t[s].destroy();
- }), o.plural.forEach(function(s) {
- t[s].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[s];
- });
- }, h.prototype.firePointEvent = function(o, t, s) {
- var n = this, T = this.series.options;
- (T.point.events[o] || n.options && n.options.events && n.options.events[o]) && n.importEvents(), o === "click" && T.allowPointSelect && (s = function(_) {
- n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
- }), u(n, o, t, s);
- }, h.prototype.getClassName = function() {
- return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
- }, h.prototype.getGraphicalProps = function(o) {
- var t = this, s = [], n = { singular: [], plural: [] }, T;
- for (o = o || { graphic: 1, dataLabel: 1 }, o.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), o.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), T = s.length; T--; ) {
- var _ = s[T];
- t[_] && n.singular.push(_);
- }
- return ["dataLabel", "connector"].forEach(function(D) {
- var W = D + "s";
- o[D] && t[W] && n.plural.push(W);
- }), n;
- }, h.prototype.getLabelConfig = function() {
- return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
- }, h.prototype.getNestedProperty = function(o) {
- if (o)
- return o.indexOf("custom.") === 0 ? A(o, this.options) : this[o];
- }, h.prototype.getZone = function() {
- var o = this.series, t = o.zones;
- o = o.zoneAxis || "y";
- var s, n = 0;
- for (s = t[n]; this[o] >= s.value; )
- s = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
- }, h.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, h.prototype.init = function(o, t, s) {
- return this.series = o, this.applyOptions(t, s), this.id = S(this.id) ? this.id : i(), this.resolveColor(), o.chart.pointCount++, u(this, "afterInit"), this;
- }, h.prototype.optionsToObject = function(o) {
- var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], T = n.length, _ = {}, D = 0, W = 0;
- if (C(o) || o === null)
- _[n[0]] = o;
- else if (O(o))
- for (!s && o.length > T && (t = typeof o[0], t === "string" ? _.name = o[0] : t === "number" && (_.x = o[0]), D++); W < T; )
- s && typeof o[D] > "u" || (0 < n[W].indexOf(".") ? h.prototype.setNestedProperty(_, o[D], n[W]) : _[n[W]] = o[D]), D++, W++;
- else
- typeof o == "object" && (_ = o, o.dataLabels && (t._hasPointLabels = !0), o.marker && (t._hasPointMarkers = !0));
- return _;
- }, h.prototype.resolveColor = function() {
- var o = this.series, t = o.chart.styledMode, s = o.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, o.options.colorByPoint) {
- if (!t) {
- s = o.options.colors || o.chart.options.colors;
- var n = s[o.colorCounter];
- s = s.length;
- }
- t = o.colorCounter, o.colorCounter++, o.colorCounter === s && (o.colorCounter = 0);
- } else
- t || (n = o.color), t = o.colorIndex;
- this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, n);
- }, h.prototype.setNestedProperty = function(o, t, s) {
- return s.split(".").reduce(function(n, T, _, D) {
- return n[T] = D.length - 1 === _ ? t : b(n[T], !0) ? n[T] : {}, n[T];
- }, o), o;
- }, h.prototype.tooltipFormatter = function(o) {
- var t = this.series, s = t.tooltipOptions, n = a(s.valueDecimals, ""), T = s.valuePrefix || "", _ = s.valueSuffix || "";
- return t.chart.styledMode && (o = t.chart.tooltip.styledModeFormat(o)), (t.pointArrayMap || ["y"]).forEach(function(D) {
- D = "{point." + D, (T || _) && (o = o.replace(RegExp(D + "}", "g"), T + D + "}" + _)), o = o.replace(RegExp(D + "}", "g"), D + ":,." + n + "f}");
- }), N(o, { point: this, series: this.series }, t.chart);
- }, h.prototype.update = function(o, t, s, n) {
- function T() {
- _.applyOptions(o);
- var m = W && _.hasDummyGraphic;
- m = _.y === null ? !m : m, W && m && (_.graphic = W.destroy(), delete _.hasDummyGraphic), b(o, !0) && (W && W.element && o && o.marker && typeof o.marker.symbol < "u" && (_.graphic = W.destroy()), o && o.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, D.updateParallelArrays(_, g), X.data[g] = b(X.data[g], !0) || b(o, !0) ? _.options : a(o, X.data[g]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (P.isDirtyBox = !0), X.legendType === "point" && (P.isDirtyLegend = !0), t && P.redraw(s);
- }
- var _ = this, D = _.series, W = _.graphic, P = D.chart, X = D.options, g;
- t = a(t, !0), n === !1 ? T() : _.firePointEvent("update", { options: o }, T);
- }, h.prototype.remove = function(o, t) {
- this.series.removePoint(this.series.data.indexOf(this), o, t);
- }, h.prototype.select = function(o, t) {
- var s = this, n = s.series, T = n.chart;
- this.selectedStaging = o = a(o, !s.selected), s.firePointEvent(o ? "select" : "unselect", { accumulate: t }, function() {
- s.selected = s.options.selected = o, n.options.data[n.data.indexOf(s)] = s.options, s.setState(o && "select"), t || T.getSelectedPoints().forEach(function(_) {
- var D = _.series;
- _.selected && _ !== s && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(T.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, h.prototype.onMouseOver = function(o) {
- var t = this.series.chart, s = t.pointer;
- o = o ? s.normalize(o) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
- o,
- this
- );
- }, h.prototype.onMouseOut = function() {
- var o = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (o.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), o.hoverPoints = o.hoverPoint = null;
- }, h.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var o = this, t = w(o.series.options.point, o.options).events;
- o.events = t, x(t, function(s, n) {
- B(s) && R(o, n, s);
- }), this.hasImportedEvents = !0;
- }
- }, h.prototype.setState = function(o, t) {
- var s = this.series, n = this.state, T = s.options.states[o || "normal"] || {}, _ = F.plotOptions[s.type].marker && s.options.marker, D = _ && _.enabled === !1, W = _ && _.states && _.states[o || "normal"] || {}, P = W.enabled === !1, X = this.marker || {}, g = s.chart, m = _ && s.markerAttribs, L = s.halo, Y, V = s.stateMarkerGraphic;
- if (o = o || "", !(o === this.state && !t || this.selected && o !== "select" || T.enabled === !1 || o && (P || D && W.enabled === !1) || o && X.states && X.states[o] && X.states[o].enabled === !1)) {
- if (this.state = o, m && (Y = s.markerAttribs(this, o)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), o && this.graphic.addClass("highcharts-point-" + o), !g.styledMode) {
- var Q = s.pointAttribs(this, o), k = a(g.options.chart.animation, T.animation);
- s.options.inactiveOtherPoints && C(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
- G && G.animate({ opacity: Q.opacity }, k);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
- }
- Y && this.graphic.animate(Y, a(g.options.chart.animation, W.animation, _.animation)), V && V.hide();
- } else
- o && W && (n = X.symbol || s.symbol, V && V.currentSymbol !== n && (V = V.destroy()), Y && (V ? V[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : n && (s.stateMarkerGraphic = V = g.renderer.symbol(n, Y.x, Y.y, Y.width, Y.height).add(s.markerGroup), V.currentSymbol = n)), !g.styledMode && V && this.state !== "inactive" && V.attr(s.pointAttribs(this, o))), V && (V[o && this.isInside ? "show" : "hide"](), V.element.point = this, V.addClass(this.getClassName(), !0));
- T = T.halo, Y = (V = this.graphic || V) && V.visibility || "inherit", T && T.size && V && Y !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add(V.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(T.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, g.styledMode || L.attr(d({ fill: this.color || s.color, "fill-opacity": T.opacity }, y.filterUserAttributes(T.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), u(this, "afterSetState", { state: o });
- }
- }, h.prototype.haloPath = function(o) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - o, this.plotY - o, 2 * o, 2 * o);
- }, h;
- }(), j;
- }), E(l, "Core/Pointer.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Tooltip.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = y.parse, U = j.charts, F = j.noop, N = Z.addEvent, R = Z.attr, S = Z.css, v = Z.defined, d = Z.extend, u = Z.find, A = Z.fireEvent, O = Z.isNumber, B = Z.isObject, C = Z.objectEach, b = Z.offset, w = Z.pick, x = Z.splat;
- return y = function() {
- function a(c, p) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
- }
- return a.prototype.applyInactiveState = function(c) {
- var p = [], i;
- (c || []).forEach(function(h) {
- i = h.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(h) {
- p.indexOf(h) === -1 ? h.setState("inactive", !0) : h.options.inactiveOtherPoints && h.setAllPointsToState("inactive");
- });
- }, a.prototype.destroy = function() {
- var c = this;
- this.eventsToUnbind.forEach(function(p) {
- return p();
- }), this.eventsToUnbind = [], j.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), C(c, function(p, i) {
- c[i] = void 0;
- });
- }, a.prototype.drag = function(c) {
- var p = this.chart, i = p.options.chart, h = this.zoomHor, o = this.zoomVert, t = p.plotLeft, s = p.plotTop, n = p.plotWidth, T = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, W = B(i.panning) ? i.panning && i.panning.enabled : i.panning, P = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + T && (g = s + T), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - g, 2)), 10 < this.hasDragged)) {
- var L = p.isInsidePlot(_ - t, D - s, { visiblePlotOnly: !0 });
- !p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || P || m || (this.selectionMarker = m = p.renderer.rect(t, s, h ? 1 : n, o ? 1 : T, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && h && (h = X - _, m.attr({ width: Math.abs(h), x: (0 < h ? 0 : h) + _ })), m && o && (h = g - D, m.attr({ height: Math.abs(h), y: (0 < h ? 0 : h) + D })), L && !m && W && p.pan(c, i.panning);
- }
- }, a.prototype.dragStart = function(c) {
- var p = this.chart;
- p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
- }, a.prototype.drop = function(c) {
- var p = this, i = this.chart, h = this.hasPinched;
- if (this.selectionMarker) {
- var o = this.selectionMarker, t = o.attr ? o.attr("x") : o.x, s = o.attr ? o.attr("y") : o.y, n = o.attr ? o.attr("width") : o.width, T = o.attr ? o.attr("height") : o.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: s, width: n, height: T }, D = !!i.mapView;
- (this.hasDragged || h) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && v(W.min) && (h || p[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
- var P = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((P ? t : s) + X);
- P = W.toValue((P ? t + n : s + T) - X), _[W.coll].push({ axis: W, min: Math.min(g, P), max: Math.max(g, P) }), D = !0;
- }
- }), D && A(i, "selection", _, function(W) {
- i.zoom(d(
- W,
- h ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), h && this.scaleGroups();
- }
- i && O(i.index) && (S(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, a.prototype.findNearestKDPoint = function(c, p, i) {
- var h = this.chart, o = h.hoverPoint;
- if (h = h.tooltip, o && h && h.isStickyOnContact())
- return o;
- var t;
- return c.forEach(function(s) {
- var n = !(s.noSharedTooltip && p) && 0 > s.options.findNearestPointBy.indexOf("y");
- if (s = s.searchPoint(i, n), (n = B(s, !0) && s.series) && !(n = !B(t, !0))) {
- n = t.distX - s.distX;
- var T = t.dist - s.dist, _ = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && p ? n : T !== 0 ? T : _ !== 0 ? _ : t.series.index > s.series.index ? -1 : 1);
- }
- n && (t = s);
- }), t;
- }, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
- var i = c.series, h = i.xAxis;
- i = i.yAxis;
- var o = c.shapeArgs;
- if (h && i) {
- var t = w(c.clientX, c.plotX), s = c.plotY || 0;
- return c.isNode && o && O(o.x) && O(o.y) && (t = o.x, s = o.y), p ? { chartX: i.len + i.pos - s, chartY: h.len + h.pos - t } : { chartX: t + h.pos, chartY: s + i.pos };
- }
- if (o && o.x && o.y)
- return { chartX: o.x, chartY: o.y };
- }, a.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var c = this.chart.container, p = b(c);
- this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
- var i = c.offsetWidth;
- return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
- }, a.prototype.getCoordinates = function(c) {
- var p = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
- }), p;
- }, a.prototype.getHoverData = function(c, p, i, h, o, t) {
- var s = [];
- h = !(!h || !c);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: o };
- A(this, "beforeGetHoverData", n);
- var T = p && !p.stickyTracking ? [p] : i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!o && D.directTouch) && w(D.options.enableMouseTracking, !0) && D.stickyTracking;
- }), _ = h || !t ? c : this.findNearestKDPoint(T, o, t);
- return p = _ && _.series, _ && (o && !p.noSharedTooltip ? (T = i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!o && D.directTouch) && w(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
- }), T.forEach(function(D) {
- var W = u(D.points, function(P) {
- return P.x === _.x && !P.isNull;
- });
- B(W) && (D.chart.isBoosting && (W = D.getPoint(W)), s.push(W));
- })) : s.push(_)), n = { hoverPoint: _ }, A(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: p, hoverPoints: s };
- }, a.prototype.getPointFromEvent = function(c) {
- c = c.target;
- for (var p; c && !p; )
- p = c.point, c = c.parentNode;
- return p;
- }, a.prototype.onTrackerMouseOut = function(c) {
- c = c.relatedTarget || c.toElement;
- var p = this.chart.hoverSeries;
- this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
- }, a.prototype.inClass = function(c, p) {
- for (var i; c; ) {
- if (i = R(c, "class")) {
- if (i.indexOf(p) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- c = c.parentNode;
- }
- }, a.prototype.init = function(c, p) {
- this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = w(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, a.prototype.normalize = function(c, p) {
- var i = c.touches, h = i ? i.length ? i.item(0) : w(i.changedTouches, c.changedTouches)[0] : c;
- return p || (p = this.getChartPosition()), i = h.pageX - p.left, h = h.pageY - p.top, i /= p.scaleX, h /= p.scaleY, d(c, { chartX: Math.round(i), chartY: Math.round(h) });
- }, a.prototype.onContainerClick = function(c) {
- var p = this.chart, i = p.hoverPoint;
- c = this.normalize(c);
- var h = p.plotLeft, o = p.plotTop;
- p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (A(i.series, "click", d(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (d(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - h, c.chartY - o, { visiblePlotOnly: !0 }) && A(p, "click", c)));
- }, a.prototype.onContainerMouseDown = function(c) {
- var p = ((c.buttons || c.button) & 1) === 1;
- c = this.normalize(c), j.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
- }, a.prototype.onContainerMouseLeave = function(c) {
- var p = U[w(a.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, a.prototype.onContainerMouseEnter = function(c) {
- delete this.chartPosition;
- }, a.prototype.onContainerMouseMove = function(c) {
- var p = this.chart;
- c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
- }, a.prototype.onDocumentTouchEnd = function(c) {
- var p = U[w(
- a.hoverChartIndex,
- -1
- )];
- p && p.pointer.drop(c);
- }, a.prototype.onContainerTouchMove = function(c) {
- this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
- }, a.prototype.onContainerTouchStart = function(c) {
- this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
- }, a.prototype.onDocumentMouseMove = function(c) {
- var p = this.chart, i = this.chartPosition;
- c = this.normalize(c, i);
- var h = p.tooltip;
- !i || h && h.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
- }, a.prototype.onDocumentMouseUp = function(c) {
- var p = U[w(a.hoverChartIndex, -1)];
- p && p.pointer.drop(c);
- }, a.prototype.pinch = function(c) {
- var p = this, i = p.chart, h = p.pinchDown, o = c.touches || [], t = o.length, s = p.lastValidTouch, n = p.hasZoom, T = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, W = p.selectionMarker;
- 1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), n && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(o, function(P) {
- return p.normalize(P);
- }), c.type === "touchstart" ? ([].forEach.call(o, function(P, X) {
- h[X] = { chartX: P.chartX, chartY: P.chartY };
- }), s.x = [h[0].chartX, h[1] && h[1].chartX], s.y = [h[0].chartY, h[1] && h[1].chartY], i.axes.forEach(function(P) {
- if (P.zoomEnabled) {
- var X = i.bounds[P.horiz ? "h" : "v"], g = P.minPixelPadding, m = P.toPixels(Math.min(w(P.options.min, P.dataMin), P.dataMin)), L = P.toPixels(Math.max(w(P.options.max, P.dataMax), P.dataMax)), Y = Math.max(m, L);
- X.min = Math.min(P.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(P.pos + P.len, Y + g);
- }
- }), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : h.length && (A(i, "touchpan", { originalEvent: c }, function() {
- W || (p.selectionMarker = W = d({ destroy: F, touch: !0 }, i.plotBox)), p.pinchTranslate(h, o, T, W, D, s), p.hasPinched = n, p.scaleGroups(T, D);
- }), p.res && (p.res = !1, this.reset(!1, 0)));
- }, a.prototype.pinchTranslate = function(c, p, i, h, o, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, h, o, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, h, o, t);
- }, a.prototype.pinchTranslateDirection = function(c, p, i, h, o, t, s, n) {
- var T = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", W = "chart" + D, P = c ? "width" : "height", X = T["plot" + (c ? "Left" : "Top")], g = T.inverted, m = T.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][W], V = !L && p[1][W];
- p = function() {
- typeof $ == "number" && 20 < Math.abs(Y - V) && (G = n || Math.abs(z - $) / Math.abs(Y - V)), k = (X - z) / G + Y, Q = T["plot" + (c ? "Width" : "Height")] / G;
- };
- var Q, k, G = n || 1, z = i[0][W], $ = !L && i[1][W];
- if (p(), i = k, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (z -= 0.8 * (z - s[_][0]), typeof $ == "number" && ($ -= 0.8 * ($ - s[_][1])), p()) : s[_] = [z, $], g || (t[_] = k - X, t[P] = Q), t = g ? 1 / G : G, o[P] = Q, o[_] = i, h[g ? c ? "scaleY" : "scaleX" : "scale" + D] = G, h["translate" + D] = t * X + (z - t * Y);
- }, a.prototype.reset = function(c, p) {
- var i = this.chart, h = i.hoverSeries, o = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : o;
- c && n && x(n).forEach(function(T) {
- T.series.isCartesian && typeof T.plotX > "u" && (c = !1);
- }), c ? s && n && x(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(T) {
- T.setState(T.state, !0), T.series.isCartesian && (T.series.xAxis.crosshair && T.series.xAxis.drawCrosshair(
- null,
- T
- ), T.series.yAxis.crosshair && T.series.yAxis.drawCrosshair(null, T));
- }) : o && (o.setState(o.state, !0), i.axes.forEach(function(T) {
- T.crosshair && o.series[T.coll] === T && T.drawCrosshair(null, o);
- }))) : (o && o.onMouseOut(), t && t.forEach(function(T) {
- T.setState();
- }), h && h.onMouseOut(), s && s.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(T) {
- T.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, a.prototype.runPointActions = function(c, p) {
- var i = this.chart, h = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, o = h ? h.shared : !1, t = p || i.hoverPoint, s = t && t.series || i.hoverSeries;
- p = this.getHoverData(t, s, i.series, (!c || c.type !== "touchmove") && (!!p || s && s.directTouch && this.isDirectTouch), o, c), t = p.hoverPoint, s = p.hoverSeries;
- var n = p.hoverPoints;
- if (p = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, o = o && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || h && h.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(T) {
- n.indexOf(T) === -1 && T.setState();
- }), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(T) {
- T.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), h && h.refresh(o ? n : t, c);
- } else
- p && h && !h.isHidden && (t = h.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && h.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = N(i.container.ownerDocument, "mousemove", function(T) {
- var _ = U[a.hoverChartIndex];
- _ && _.pointer.onDocumentMouseMove(T);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(T) {
- var _ = w((T.crosshair || {}).snap, !0), D;
- _ && ((D = i.hoverPoint) && D.series[T.coll] === T || (D = u(n, function(W) {
- return W.series[T.coll] === T;
- }))), D || !_ ? T.drawCrosshair(c, D) : T.hideCrosshair();
- });
- }, a.prototype.scaleGroups = function(c, p) {
- var i = this.chart;
- i.series.forEach(function(h) {
- var o = c || h.getPlotBox();
- h.group && (h.xAxis && h.xAxis.zoomEnabled || i.mapView) && (h.group.attr(o), h.markerGroup && (h.markerGroup.attr(o), h.markerGroup.clip(p ? i.clipRect : null)), h.dataLabelsGroup && h.dataLabelsGroup.attr(o));
- }), i.clipRect.attr(p || i.clipBox);
- }, a.prototype.setDOMEvents = function() {
- var c = this, p = this.chart.container, i = p.ownerDocument;
- p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(N(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(N(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = N(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var h = this.chart.renderTo.parentElement; h && h.tagName !== "BODY"; )
- this.eventsToUnbind.push(N(h, "scroll", function() {
- delete c.chartPosition;
- })), h = h.parentElement;
- j.hasTouch && (this.eventsToUnbind.push(N(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(N(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = N(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, a.prototype.setHoverChartIndex = function() {
- var c = this.chart, p = j.charts[w(a.hoverChartIndex, -1)];
- p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
- }, a.prototype.touch = function(c, p) {
- var i = this.chart;
- if (this.setHoverChartIndex(), c.touches.length === 1)
- if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (p && this.runPointActions(c), c.type === "touchmove") {
- p = this.pinchDown;
- var h = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
- }
- w(h, !0) && this.pinch(c);
- } else
- p && this.reset();
- else
- c.touches.length === 2 && this.pinch(c);
- }, a.prototype.touchSelect = function(c) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
- }, a.prototype.zoomOption = function(c) {
- var p = this.chart, i = p.options.chart;
- p = p.inverted;
- var h = i.zoomType || "";
- /touch/.test(c.type) && (h = w(i.pinchType, h)), this.zoomX = c = /x/.test(h), this.zoomY = i = /y/.test(h), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
- }, a;
- }(), y;
- }), E(l, "Core/MSPointer.js", [l["Core/Globals.js"], l["Core/Pointer.js"], l["Core/Utilities.js"]], function(y, j, I) {
- function Z() {
- var C = [];
- return C.item = function(b) {
- return this[b];
- }, u(O, function(b) {
- C.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
- }), C;
- }
- function H(C, b, w, x) {
- var a = F[j.hoverChartIndex || NaN];
- C.pointerType !== "touch" && C.pointerType !== C.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, x(C), a[b]({ type: w, target: C.currentTarget, preventDefault: R, touches: Z() }));
- }
- var U = this && this.__extends || function() {
- var C = function(b, w) {
- return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
- x.__proto__ = a;
- } || function(x, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (x[c] = a[c]);
- }, C(b, w);
- };
- return function(b, w) {
- function x() {
- this.constructor = b;
- }
- C(b, w), b.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }(), F = y.charts, N = y.doc, R = y.noop, S = y.win, v = I.addEvent, d = I.css, u = I.objectEach, A = I.removeEvent, O = {}, B = !!S.PointerEvent;
- return function(C) {
- function b() {
- return C !== null && C.apply(this, arguments) || this;
- }
- return U(b, C), b.isRequired = function() {
- return !(y.hasTouch || !S.PointerEvent && !S.MSPointerEvent);
- }, b.prototype.batchMSEvents = function(w) {
- w(this.chart.container, B ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, B ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(N, B ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, b.prototype.destroy = function() {
- this.batchMSEvents(A), C.prototype.destroy.call(this);
- }, b.prototype.init = function(w, x) {
- C.prototype.init.call(this, w, x), this.hasZoom && d(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, b.prototype.onContainerPointerDown = function(w) {
- H(w, "onContainerTouchStart", "touchstart", function(x) {
- O[x.pointerId] = { pageX: x.pageX, pageY: x.pageY, target: x.currentTarget };
- });
- }, b.prototype.onContainerPointerMove = function(w) {
- H(w, "onContainerTouchMove", "touchmove", function(x) {
- O[x.pointerId] = {
- pageX: x.pageX,
- pageY: x.pageY
- }, O[x.pointerId].target || (O[x.pointerId].target = x.currentTarget);
- });
- }, b.prototype.onDocumentPointerUp = function(w) {
- H(w, "onDocumentTouchEnd", "touchend", function(x) {
- delete O[x.pointerId];
- });
- }, b.prototype.setDOMEvents = function() {
- C.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(v);
- }, b;
- }(j);
- }), E(l, "Core/Legend/Legend.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Series/Point.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U) {
- var F = y.animObject, N = y.setAnimation, R = j.format;
- y = I.isFirefox;
- var S = I.marginNames;
- I = I.win;
- var v = H.distribute, d = U.addEvent, u = U.createElement, A = U.css, O = U.defined, B = U.discardElement, C = U.find, b = U.fireEvent, w = U.isNumber, x = U.merge, a = U.pick, c = U.relativeLength, p = U.stableSort, i = U.syncTimeout;
- return H = U.wrap, U = function() {
- function h(o, t) {
- this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = o, this.init(o, t);
- }
- return h.prototype.init = function(o, t) {
- this.chart = o, this.setOptions(t), t.enabled && (this.render(), d(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = d(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, h.prototype.setOptions = function(o) {
- var t = a(o.padding, 8);
- this.options = o, this.chart.styledMode || (this.itemStyle = o.itemStyle, this.itemHiddenStyle = x(this.itemStyle, o.itemHiddenStyle)), this.itemMarginTop = o.itemMarginTop || 0, this.itemMarginBottom = o.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
- o.symbolWidth,
- 16
- ), this.pages = [], this.proximate = o.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, h.prototype.update = function(o, t) {
- var s = this.chart;
- this.setOptions(x(!0, this.options, o)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, a(t, !0) && s.redraw(), b(this, "afterUpdate");
- }, h.prototype.colorizeItem = function(o, t) {
- if (o.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var s = this.options, n = o.legendItem, T = o.legendLine, _ = o.legendSymbol, D = this.itemHiddenStyle.color;
- s = t ? s.itemStyle.color : D;
- var W = t && o.color || D, P = o.options && o.options.marker, X = { fill: W };
- n && n.css({ fill: s, color: s }), T && T.attr({ stroke: W }), _ && (P && _.isMarker && (X = o.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
- }
- b(this, "afterColorizeItem", { item: o, visible: t });
- }, h.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, h.prototype.positionItem = function(o) {
- var t = this, s = this.options, n = s.symbolPadding, T = !s.rtl, _ = o._legendItemPos;
- s = _[0], _ = _[1];
- var D = o.checkbox, W = o.legendGroup;
- W && W.element && (n = { translateX: T ? s : this.legendWidth - s - 2 * n - 4, translateY: _ }, T = function() {
- b(t, "afterPositionItem", { item: o });
- }, O(W.translateY) ? W.animate(n, void 0, T) : (W.attr(n), T())), D && (D.x = s, D.y = _);
- }, h.prototype.destroyItem = function(o) {
- var t = o.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
- o[s] && (o[s] = o[s].destroy());
- }), t && B(o.checkbox);
- }, h.prototype.destroy = function() {
- function o(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(o, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(o, this), this.display = null;
- }, h.prototype.positionCheckboxes = function() {
- var o = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
- if (o) {
- var n = o.translateY;
- this.allItems.forEach(function(T) {
- var _ = T.checkbox;
- if (_) {
- var D = n + s + _.y + (this.scrollOffset || 0) + 3;
- A(_, { left: o.translateX + T.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > n - 6 && D < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, h.prototype.renderTitle = function() {
- var o = this.options, t = this.padding, s = o.title, n = 0;
- s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, o.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), o = this.title.getBBox(), n = o.height, this.offsetWidth = o.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, h.prototype.setText = function(o) {
- var t = this.options;
- o.legendItem.attr({ text: t.labelFormat ? R(t.labelFormat, o, this.chart) : t.labelFormatter.call(o) });
- }, h.prototype.renderItem = function(o) {
- var t = this.chart, s = t.renderer, n = this.options, T = this.symbolWidth, _ = n.symbolPadding || 0, D = this.itemStyle, W = this.itemHiddenStyle, P = n.layout === "horizontal" ? a(n.itemDistance, 20) : 0, X = !n.rtl, g = !o.series, m = !g && o.series.drawLegendSymbol ? o.series : o, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, V = n.useHTML, Q = o.options.className, k = o.legendItem;
- L = T + _ + P + (Y ? 20 : 0), k || (o.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + o.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + o.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), o.legendItem = k = s.text("", X ? T + _ : -_, this.baseline || 0, V), t.styledMode || k.css(x(o.visible ? D : W)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(o.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = a(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + P + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, o), this.setItemEvents && this.setItemEvents(o, k, V)), Y && !o.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(o), this.colorizeItem(o, o.visible), !t.styledMode && D.width || k.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(o), t = k.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, o.itemWidth = o.checkboxOffset = n.itemWidth || o.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, o.itemWidth), this.totalItemWidth += o.itemWidth, this.itemHeight = o.itemHeight = Math.round(o.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
- }, h.prototype.layoutItem = function(o) {
- var t = this.options, s = this.padding, n = t.layout === "horizontal", T = o.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, W = n ? a(t.itemDistance, 20) : 0, P = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > P ? this.maxItemWidth : o.itemWidth, n && this.itemX - s + t > P && (this.itemX = s, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(T, this.lastLineHeight), o._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += D + T + _, this.lastLineHeight = T), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (o.checkbox ? 0 : W) : t) + s, this.offsetWidth);
- }, h.prototype.getAllItems = function() {
- var o = [];
- return this.chart.series.forEach(function(t) {
- var s = t && t.options;
- t && a(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (o = o.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
- }), b(this, "afterGetAllItems", { allItems: o }), o;
- }, h.prototype.getAlignment = function() {
- var o = this.options;
- return this.proximate ? o.align.charAt(0) + "tv" : o.floating ? "" : o.align.charAt(0) + o.verticalAlign.charAt(0) + o.layout.charAt(0);
- }, h.prototype.adjustMargins = function(o, t) {
- var s = this.chart, n = this.options, T = this.getAlignment();
- T && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
- _.test(T) && !O(o[D]) && (s[S[D]] = Math.max(s[S[D]], s.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * n[D % 2 ? "x" : "y"] + a(n.margin, 12) + t[D] + (s.titleOffset[D] || 0)));
- });
- }, h.prototype.proximatePositions = function() {
- var o = this.chart, t = [], s = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var T, _ = s;
- if (n.yAxis) {
- n.xAxis.options.reversed && (_ = !_), n.points && (T = C(_ ? n.points : n.points.slice(0).reverse(), function(W) {
- return w(W.plotY);
- })), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var D = n.yAxis.top - o.plotTop;
- n.visible ? (T = T ? T.plotY : n.yAxis.height, T += D - 0.3 * _) : T = D + n.yAxis.height, t.push({ target: T, size: _, item: n });
- }
- }, this), v(t, o.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = o.plotTop - o.spacing[0] + n.pos);
- });
- }, h.prototype.render = function() {
- var o = this.chart, t = o.renderer, s = this.options, n = this.padding, T = this.getAllItems(), _ = this.group, D = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(s.width, o.spacingBox.width - n);
- var W = o.spacingBox.width - 2 * n - s.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, _ || (this.group = _ = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(T, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), s.reversed && T.reverse(), this.allItems = T, this.display = W = !!T.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, T.forEach(this.renderItem, this), T.forEach(this.layoutItem, this), T = (this.widthOption || this.offsetWidth) + n;
- var P = this.lastItemY + this.lastLineHeight + this.titleHeight;
- P = this.handleOverflow(P), P += n, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(_), D.isNew = !0), o.styledMode || D.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < T && 0 < P && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: T, height: P }, D.strokeWidth())), D.isNew = !1), D[W ? "show" : "hide"](), o.styledMode && _.getStyle("display") === "none" && (T = P = 0), this.legendWidth = T, this.legendHeight = P, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
- }, h.prototype.align = function(o) {
- o === void 0 && (o = this.chart.spacingBox);
- var t = this.chart, s = this.options, n = o.y;
- /(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== o.y && (o = x(o, { y: n })), this.group.align(x(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, o);
- }, h.prototype.handleOverflow = function(o) {
- var t = this, s = this.chart, n = s.renderer, T = this.options, _ = T.y, D = T.verticalAlign === "top", W = this.padding, P = T.maxHeight, X = T.navigation, g = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, V = function(q) {
- typeof q == "number" ? $.attr({ height: q }) : $ && (t.clipRect = $.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
- }, Q = function(q) {
- return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(z), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, k, G;
- _ = s.spacingBox.height + (D ? -_ : _) - W;
- var z = this.nav, $ = this.clipRect;
- return T.layout !== "horizontal" || T.verticalAlign === "middle" || T.floating || (_ /= 2), P && (_ = Math.min(_, P)), L.length = 0, o && 0 < _ && o > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - W, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = o, Y.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
- }), $ || ($ = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip($)), V(k), z || (this.nav = z = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = n.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), o = _) : z && (V(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), o;
- }, h.prototype.scroll = function(o, t) {
- var s = this, n = this.chart, T = this.pages, _ = T.length, D = this.clipHeight, W = this.options.navigation, P = this.pager, X = this.padding, g = this.currentPage + o;
- g > _ && (g = _), 0 < g && (typeof t < "u" && N(t, n), this.nav.attr({ translateX: X, translateY: D + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
- m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- }), P.attr({ text: g + "/" + _ }), [this.down, this.downTracker].forEach(
- function(m) {
- m.attr({ x: 18 + this.pager.getBBox().width, class: g === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- },
- this
- ), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === _ ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === _ ? "default" : "pointer" })), this.scrollOffset = -T[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), o = F(a(t, n.renderer.globalAnimation, !0)), i(function() {
- b(s, "afterScroll", { currentPage: g });
- }, o.duration));
- }, h.prototype.setItemEvents = function(o, t, s) {
- var n = this, T = n.chart.renderer.boxWrapper, _ = o instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", W = n.chart.styledMode, P = function(X) {
- n.allItems.forEach(function(g) {
- o !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !_);
- });
- });
- };
- (s ? [t, o.legendSymbol] : [o.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- o.visible && P("inactive"), o.setState("hover"), o.visible && T.addClass(D), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(x(o.visible ? n.itemStyle : n.itemHiddenStyle)), P(""), T.removeClass(D), o.setState();
- }).on("click", function(g) {
- var m = function() {
- o.setVisible && o.setVisible(), P(o.visible ? "inactive" : "");
- };
- T.removeClass(D), g = { browserEvent: g }, o.firePointEvent ? o.firePointEvent("legendItemClick", g, m) : b(o, "legendItemClick", g, m);
- });
- });
- }, h.prototype.createCheckboxForItem = function(o) {
- o.checkbox = u(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: o.selected, defaultChecked: o.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), d(o.checkbox, "click", function(t) {
- b(o.series || o, "checkboxClick", { checked: t.target.checked, item: o }, function() {
- o.select();
- });
- });
- }, h;
- }(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && H(U.prototype, "positionItem", function(h, o) {
- var t = this, s = function() {
- o._legendItemPos && h.call(t, o);
- };
- s(), t.bubbleLegend || setTimeout(s);
- }), U;
- }), E(
- l,
- "Core/Series/SeriesRegistry.js",
- [l["Core/Globals.js"], l["Core/DefaultOptions.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = j.defaultOptions, U = Z.error, F = Z.extendClass, N = Z.merge, R;
- return function(S) {
- function v(d, u) {
- var A = H.plotOptions || {}, O = u.defaultOptions;
- u.prototype.pointClass || (u.prototype.pointClass = I), u.prototype.type = d, O && (A[d] = O), S.seriesTypes[d] = u;
- }
- S.seriesTypes = y.seriesTypes, S.getSeries = function(d, u) {
- u === void 0 && (u = {});
- var A = d.options.chart;
- A = u.type || A.type || A.defaultSeriesType || "";
- var O = S.seriesTypes[A];
- return S || U(17, !0, d, { missingModuleFor: A }), A = new O(), typeof A.init == "function" && A.init(d, u), A;
- }, S.registerSeriesType = v, S.seriesType = function(d, u, A, O, B) {
- var C = H.plotOptions || {};
- return u = u || "", C[d] = N(C[u], A), v(d, F(S.seriesTypes[u] || function() {
- }, O)), S.seriesTypes[d].prototype.type = d, B && (S.seriesTypes[d].prototype.pointClass = F(I, B)), S.seriesTypes[d];
- };
- }(R || (R = {})), R;
- }
- ), E(l, "Core/Chart/Chart.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/Axis.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/Legend.js"],
- l["Core/MSPointer.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Pointer.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Time.js"],
- l["Core/Utilities.js"],
- l["Core/Renderer/HTML/AST.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S, v, d, u, A, O) {
- var B = y.animate, C = y.animObject, b = y.setAnimation, w = I.numberFormat, x = Z.registerEventOptions, a = H.charts, c = H.doc, p = H.marginNames, i = H.svg, h = H.win, o = N.defaultOptions, t = N.defaultTime, s = v.seriesTypes, n = A.addEvent, T = A.attr, _ = A.cleanRecursively, D = A.createElement, W = A.css, P = A.defined, X = A.discardElement, g = A.erase, m = A.error, L = A.extend, Y = A.find, V = A.fireEvent, Q = A.getStyle, k = A.isArray, G = A.isNumber, z = A.isObject, $ = A.isString, q = A.merge, it = A.objectEach, et = A.pick, nt = A.pInt, rt = A.relativeLength, ct = A.removeEvent, gt = A.splat, dt = A.syncTimeout, ht = A.uniqueKey;
- return y = function() {
- function at(J, tt, ot) {
- this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
- }
- return at.chart = function(J, tt, ot) {
- return new at(J, tt, ot);
- }, at.prototype.getArgs = function(J, tt, ot) {
- $(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var ot = J.plotOptions || {};
- V(this, "init", { args: arguments }, function() {
- var lt = q(o, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- z(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
- }), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new u(J.time) : H.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), H.chartCount++, x(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, V(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var ot = s[tt];
- return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
- }, at.prototype.setSeriesData = function() {
- this.getSeriesOrderByLinks().forEach(function(J) {
- J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
- });
- }, at.prototype.getSeriesOrderByLinks = function() {
- return this.series.concat().sort(function(J, tt) {
- return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
- });
- }, at.prototype.orderSeries = function(J) {
- var tt = this.series;
- J = J || 0;
- for (var ot = tt.length; J < ot; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, ot) {
- ot === void 0 && (ot = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, At = 0;
- ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = ot.series;
- if (pt = ot.visiblePlotOnly && Ct || pt, Ct = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Ct = ot.paneCoordinates ? Dt.pos + Ct : yt + Ct, Ct >= Math.max(Pt + yt, Dt.pos) && Ct <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
- }
- return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), V(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- V(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
- for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
- var Dt = ot[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var Lt = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = ot.length; J--; )
- Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
- ot.forEach(function(Et) {
- Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && V(Et, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
- Et.updateNames(), Et.setScale();
- }), this.getMargins(), tt.forEach(function(Et) {
- Et.isDirty && (At = !0);
- }), tt.forEach(function(Et) {
- var Kt = Et.min + "," + Et.max;
- Et.extKey !== Kt && (Et.extKey = Kt, Pt.push(function() {
- V(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
- })), (At || Lt) && Et.redraw();
- }), At && this.drawChartBox(), V(this, "predraw"), ot.forEach(function(Et) {
- (At || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), V(this, "redraw"), V(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Et) {
- Et.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var ot = this.series, lt = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
- lt = Y(ot[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), V(this, "getAxes"), ot.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), ot.concat(tt).forEach(function(lt) {
- new j(J, lt);
- }), V(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(ot) {
- et(ot.selectedStaging, ot.selected) && J.push(ot);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, ot) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
- "caption",
- void 0
- ), this.layOutTitles(ot);
- }, at.prototype.applyDescription = function(J, tt) {
- var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
- lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
- var pt = this[J];
- pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
- ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
- }, this.styledMode || pt.css(lt.style), this[J] = pt);
- }, at.prototype.layOutTitles = function(J) {
- var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
- ["title", "subtitle", "caption"].forEach(function(yt) {
- var vt = this[yt], Ct = this.options[yt], Pt = Ct.verticalAlign || "top";
- yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
- var At;
- if (vt) {
- this.styledMode || (At = Ct.style && Ct.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Ct.width || lt.width + (Ct.widthAdjust || 0)) + "px" });
- var St = Math.round(vt.getBBox(Ct.useHTML).height);
- vt.align(L({ y: Pt === "bottom" ? At : yt + At, height: St }, Ct), !1, "spacingBox"), Ct.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
- }
- }, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
- var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
- this.titleOffset = tt, V(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
- }, at.prototype.getChartSize = function() {
- var J = this.options.chart, tt = J.width;
- J = J.height;
- var ot = this.renderTo;
- P(tt) || (this.containerWidth = Q(ot, "width")), P(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
- }, at.prototype.temporaryDisplay = function(J) {
- var tt = this.renderTo;
- if (J)
- for (; tt && tt.style; )
- tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), $(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(T(pt, "data-highcharts-chart"));
- G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), T(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
- var vt = this.chartHeight;
- if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = D("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? S.getRendererType(tt.renderer) : d)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
- void 0,
- this
- ), this.setClassName(tt.className), this.styledMode)
- for (var Ct in J.defs)
- this.renderer.definition(J.defs[Ct]);
- else
- this.renderer.setStyle(tt.style);
- this.renderer.chartIndex = this.index, V(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !P(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !P(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- ot,
- tt
- ), V(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), p.forEach(function(yt, vt) {
- P(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = P(ot.width) && P(ot.height), yt = ot.width || Q(lt, "width");
- ot = ot.height || Q(lt, "height"), lt = J ? J.target : h, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === h || lt === c) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (A.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(h, "resize", function(ot) {
- tt.options && tt.reflow(ot);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, ot) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? B : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, V(lt, "resize"), dt(function() {
- lt && V(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, C(ot).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, At, St, Dt;
- this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(Lt) {
- Lt.setAxisSize(), Lt.setAxisTranslation();
- }), ot.alignElements()), V(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- V(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(ot) {
- var lt = tt[ot], pt = z(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[ot][vt] = et(tt[ot + yt], pt[vt]);
- });
- }), p.forEach(function(ot, lt) {
- J[ot] = et(J.margin[lt], J.spacing[lt]);
- }), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
- }, at.prototype.drawChartBox = function() {
- var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "attr"), pt)
- var Vt = be = Gt.strokeWidth();
- else
- Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
- Gt[zt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[zt](Jt.crisp({ x: At, y: St, width: Dt, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, V(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
- (pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(ot) {
- ot.linkedSeries.length = 0;
- }), tt.forEach(function(ot) {
- var lt = ot.options.linkedTo;
- $(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
- }), V(this, "afterLinkSeries");
- }, at.prototype.renderSeries = function() {
- this.series.forEach(function(J) {
- J.translate(), J.render();
- });
- }, at.prototype.renderLabels = function() {
- var J = this, tt = J.options.labels;
- tt.items && tt.items.forEach(function(ot) {
- var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new U(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
- if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
- return yt = 21, !0;
- });
- var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
- J.forEach(function(At) {
- At.setScale();
- }), this.getAxisMargins();
- var Ct = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
- (Ct || Pt) && (J.forEach(function(At) {
- (At.horiz && Ct || !At.horiz && Pt) && At.setTickInterval(!0);
- }), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
- }, at.prototype.addCredits = function(J) {
- var tt = this, ot = q(!0, this.options.credits, J);
- ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- ot.href && (h.location.href = ot.href);
- }).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for (V(J, "destroy"), J.renderer.forExport ? g(a, J) : a[J.index] = void 0, H.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
- tt[yt] = tt[yt].destroy();
- for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
- ot[yt] = ot[yt].destroy();
- "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
- var Ct = J[vt];
- Ct && Ct.destroy && (J[vt] = Ct.destroy());
- }), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Ct) {
- delete J[Ct];
- });
- }, at.prototype.firstRender = function() {
- var J = this, tt = J.options;
- (!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (k(tt.series) ? tt.series : []).forEach(function(ot) {
- J.initSeries(ot);
- }), J.linkSeries(), J.setSeriesData(), V(J, "beforeRender"), R && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new R(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
- }, at.prototype.onload = function() {
- this.callbacks.concat([this.callback]).forEach(function(J) {
- J && typeof this.index < "u" && J.apply(this, [this]);
- }, this), V(this, "load"), V(this, "render"), P(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, ot) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), V(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), V(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, ot, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, ot) {
- return this.createAxis(
- "colorAxis",
- { axis: J, redraw: tt, animation: ot }
- );
- }, at.prototype.createAxis = function(J, tt) {
- return J = new j(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
- }, at.prototype.showLoading = function(J) {
- var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
- yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
- }, yt = tt.loadingDiv, vt = tt.loadingSpan;
- yt || (tt.loadingDiv = yt = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D("span", { className: "highcharts-loading-inner" }, null, yt), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), B(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
- }, at.prototype.hideLoading = function() {
- var J = this.options, tt = this.loadingDiv;
- tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || B(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
- W(tt, { display: "none" });
- } })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, ot, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, At;
- V(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(J, pt.options), pt.userOptions = q(pt.userOptions, J);
- var St = J.chart;
- if (St) {
- if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
- pt.propFromSeries();
- var Dt = !0;
- }
- "alignTicks" in St && (Dt = !0), "events" in St && x(this, St), it(St, function(Lt, Nt) {
- pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
- }), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
- }
- !pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new u(J.time)), q(
- !0,
- pt.options.time,
- J.time
- )), it(J, function(Lt, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
- }), this.collectionsWithUpdate.forEach(function(Lt) {
- if (J[Lt]) {
- var Nt = [];
- pt[Lt].forEach(function(Et, Kt) {
- Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
- }), gt(J[Lt]).forEach(function(Et, Kt) {
- var Gt = P(Et.id), Wt;
- Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && P(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
- }), ot && pt[Lt].forEach(function(Et) {
- Et.touched || Et.options.isInternal ? delete Et.touched : Ct.push(Et);
- });
- }
- }), Ct.forEach(function(Lt) {
- Lt.chart && Lt.remove && Lt.remove(!1);
- }), Dt && pt.axes.forEach(function(Lt) {
- Lt.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
- Lt.chart && Lt.update({}, !1);
- }, this), Dt = St && St.width, St = St && ($(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || G(Dt) && Dt !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), V(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
- }, at.prototype.setSubtitle = function(J, tt) {
- this.applyDescription("subtitle", J), this.layOutTitles(tt);
- }, at.prototype.setCaption = function(J, tt) {
- this.applyDescription("caption", J), this.layOutTitles(tt);
- }, at.prototype.showResetZoom = function() {
- function J() {
- tt.zoomOut();
- }
- var tt = this, ot = o.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- V(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), V(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- V(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
- yt = Ct.zoom();
- }), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
- var Pt = Ct.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, Lt = !1;
- (!Dt && lt >= At && lt <= St || Dt || !P(lt)) && (Lt = !0), ot[Dt ? "zoomX" : "zoomY"] && Lt && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && z(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
- tt.options.chart.animation,
- J && J.animation,
- 100 > tt.pointCount
- ));
- }, at.prototype.pan = function(J, tt) {
- var ot = this, lt = ot.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Ct;
- V(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = ot.xAxis;
- vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, Lt = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = ot[Dt], Et = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var zt = St.panningState;
- !Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
- var Me = Vt.getProcessedData(!0);
- Me = Vt.getExtremes(Me.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Me.dataMin) && G(Me.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, zt.startMax));
- }), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
- Nt,
- Wt,
- !1,
- !1,
- { trigger: "pan" }
- ), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Ct = !0), At[Dt] = Lt);
- }
- }), it(At, function(St, Dt) {
- ot[Dt] = St;
- }), Ct && ot.redraw(!1), W(ot.container, { cursor: "move" });
- });
- }, at;
- }(), L(y.prototype, {
- callbacks: [],
- collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
- collectionsWithUpdate: ["xAxis", "yAxis", "series"],
- propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
- propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
- propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
- }), y;
- }), E(l, "Core/Legend/LegendSymbol.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.merge, I = y.pick, Z;
- return function(H) {
- H.drawLineMarker = function(U) {
- var F = this.options, N = U.symbolWidth, R = U.symbolHeight, S = R / 2, v = this.chart.renderer, d = this.legendGroup;
- U = U.baseline - Math.round(0.3 * U.fontMetrics.b);
- var u = {}, A = F.marker;
- this.chart.styledMode || (u = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (u.dashstyle = F.dashStyle)), this.legendLine = v.path([["M", 0, U], ["L", N, U]]).addClass("highcharts-graph").attr(u).add(d), A && A.enabled !== !1 && N && (F = Math.min(I(A.radius, S), S), this.symbol.indexOf("url") === 0 && (A = j(A, { width: R, height: R }), F = 0), this.legendSymbol = N = v.symbol(this.symbol, N / 2 - F, U - F, 2 * F, 2 * F, A).addClass("highcharts-point").add(d), N.isMarker = !0);
- }, H.drawRectangle = function(U, F) {
- var N = U.symbolHeight, R = U.options.squareSymbol;
- F.legendSymbol = this.chart.renderer.rect(R ? (U.symbolWidth - N) / 2 : 0, U.baseline - N + 1, R ? N : U.symbolWidth, N, I(U.options.symbolRadius, N / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
- };
- }(Z || (Z = {})), Z;
- }), E(l, "Core/Series/SeriesDefaults.js", [], function() {
- return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
- select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
- } }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
- var y = this.series.chart.numberFormatter;
- return typeof this.y != "number" ? "" : y(this.y, -1);
- }, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
- select: { animation: { duration: 0 } },
- inactive: { animation: { duration: 50 }, opacity: 0.2 }
- }, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
- }), E(l, "Core/Series/Series.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Point.js"],
- l["Core/Series/SeriesDefaults.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S) {
- var v = y.animObject, d = y.setAnimation, u = j.defaultOptions, A = I.registerEventOptions, O = Z.hasTouch, B = Z.svg, C = Z.win, b = N.seriesTypes, w = S.addEvent, x = S.arrayMax, a = S.arrayMin, c = S.clamp, p = S.cleanRecursively, i = S.correctFloat, h = S.defined, o = S.erase, t = S.error, s = S.extend, n = S.find, T = S.fireEvent, _ = S.getNestedProperty, D = S.isArray, W = S.isNumber, P = S.isString, X = S.merge, g = S.objectEach, m = S.pick, L = S.removeEvent, Y = S.splat, V = S.syncTimeout;
- return y = function() {
- function Q() {
- this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
- }
- return Q.prototype.init = function(k, G) {
- T(this, "init", { options: G });
- var z = this, $ = k.series;
- this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), s(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), A(this, G);
- var q = G.events;
- (q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
- z[et + "Data"] || (z[et + "Data"] = []);
- }), z.isCartesian && (k.hasCartesianSeries = !0);
- var it;
- $.length && (it = $[$.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert($)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), T(this, "afterInit");
- }, Q.prototype.is = function(k) {
- return b[k] && this instanceof b[k];
- }, Q.prototype.insert = function(k) {
- var G = this.options.index, z;
- if (W(G)) {
- for (z = k.length; z--; )
- if (G >= m(k[z].options.index, k[z]._i)) {
- k.splice(z + 1, 0, this);
- break;
- }
- z === -1 && k.unshift(this), z += 1;
- } else
- k.push(this);
- return m(z, k.length - 1);
- }, Q.prototype.bindAxes = function() {
- var k = this, G = k.options, z = k.chart, $;
- T(this, "bindAxes", null, function() {
- (k.axisTypes || []).forEach(function(q) {
- var it = 0;
- z[q].forEach(function(et) {
- $ = et.options, (G[q] === it && !$.isInternal || typeof G[q] < "u" && G[q] === $.id || typeof G[q] > "u" && $.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), $.isInternal || it++;
- }), k[q] || k.optionalAxis === q || t(18, !0, z);
- });
- }), T(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(k, G) {
- var z = k.series, $ = arguments, q = W(G) ? function(it) {
- var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
- z[it + "Data"][G] = et;
- } : function(it) {
- Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call($, 2));
- };
- z.parallelArrays.forEach(q);
- }, Q.prototype.hasData = function() {
- return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
- }, Q.prototype.autoIncrement = function(k) {
- var G = this.options, z = G.pointIntervalUnit, $ = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), $ && W(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), $ && W(k) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var k = this.options;
- s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), h(k.pointRange) || (k.pointRange = 1);
- }, Q.prototype.setOptions = function(k) {
- var G = this.chart, z = G.options, $ = z.plotOptions, q = G.userOptions || {};
- k = X(k), G = G.styledMode;
- var it = { plotOptions: $, userOptions: k };
- T(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, $.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(u.tooltip, u.plotOptions.series && u.plotOptions.series.tooltip, u.plotOptions[this.type].tooltip, z.tooltip.userOptions, $.series && $.series.tooltip, $[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, $ = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), $.push(z)), $.length && h($[$.length - 1].value) && $.push(G ? {} : { color: this.color, fillColor: this.fillColor }), T(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(k, G, z) {
- var $ = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m($.options.chart[k + "Count"], $[k + "Count"]);
- if (!G) {
- var rt = m(q[it], q["_" + it]);
- h(rt) || ($.series.length || ($[et] = 0), q["_" + it] = rt = $[et] % nt, $[et] += 1), z && (G = z[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[k] = G;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || u.plotOptions[this.type].color, this.chart.options.colors);
- }, Q.prototype.getPointsCollection = function() {
- return (this.hasGroupedData ? this.points : this.data) || [];
- }, Q.prototype.getSymbol = function() {
- this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
- }, Q.prototype.findPointIndex = function(k, G) {
- var z = k.id, $ = k.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (z)
- it = this.chart.get(z), it instanceof U && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === k.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === k.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === k.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W($) && (rt = this.xData.indexOf($, G)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
- }, Q.prototype.updateData = function(k, G) {
- var z = this.options, $ = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, k.forEach(function(ht, at) {
- var J = h(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
- J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== z.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || $ && $.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (k = q.length; k--; )
- (ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
- else
- !nt || $ && $.enabled ? dt = !1 : (k.forEach(function(ht, at) {
- ht !== q[at].y && q[at].update && q[at].update(
- ht,
- !1,
- null,
- !1
- );
- }), it.length = 0);
- return q.forEach(function(ht) {
- ht && (ht.touched = !1);
- }), dt ? (it.forEach(function(ht) {
- this.addPoint(ht, !1, null, null, !1);
- }, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = x(this.xData), this.autoIncrement()), !0) : !1;
- }, Q.prototype.setData = function(k, G, z, $) {
- var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
- J = J && J.length;
- var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
- k = k || [];
- var vt = k.length;
- if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), $ !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(k, z)), !ot) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
- q[Ct + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(k), W(yt))
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else if (D(yt))
- if (J)
- if (yt.length === J)
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[0], at[z] = $.slice(
- 1,
- J + 1
- );
- else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z][pt];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[lt], at[z] = $[pt];
- else
- t(12, !1, rt);
- else
- for (z = 0; z < vt; z++)
- typeof k[z] < "u" && ($ = { series: q }, q.pointClass.prototype.applyOptions.apply($, [k[z]]), q.updateParallelArrays($, z));
- for (at && P(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
- it[z] && it[z].destroy && it[z].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
- }, Q.prototype.sortData = function(k) {
- var G = this, z = G.options.dataSorting.sortKey || "y", $ = function(q, it) {
- return h(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return k.forEach(function(q, it) {
- k[it] = $(G, q), k[it].index = it;
- }, this), k.concat().sort(function(q, it) {
- return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = $(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), k;
- }, Q.prototype.getProcessedData = function(k) {
- var G = this.xAxis, z = this.options, $ = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
- k = G && G.val2lin, z = !(!G || !G.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (G) {
- gt = G.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = G.categories && !G.names.length;
- }
- if (it && this.sorted && !q && (!$ || dt > $ || this.forceCrop)) {
- if (nt[dt - 1] < ht || nt[0] > at)
- nt = [], rt = [];
- else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
- var J = this.cropData(this.xData, this.yData, ht, at);
- nt = J.xData, rt = J.yData, et = J.start, J = !0;
- }
- }
- for ($ = nt.length || 1; --$; )
- if (G = z ? k(nt[$]) - k(nt[$ - 1]) : nt[$] - nt[$ - 1], 0 < G && (typeof tt > "u" || G < tt))
- var tt = G;
- else
- 0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(k) {
- var G = this.xAxis;
- if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
- return !1;
- k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, T(this, "afterProcessData");
- }, Q.prototype.cropData = function(k, G, z, $, q) {
- var it = k.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (k[et] >= z) {
- nt = Math.max(0, et - q);
- break;
- }
- for (z = et; z < it; z++)
- if (k[z] > $) {
- rt = z + q;
- break;
- }
- return { xData: k.slice(nt, rt), yData: G.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var k = this.options, G = k.data, z = this.processedXData, $ = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
- k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = G.length, ht = this.data = at;
- }
- for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
- if (at = et + dt, nt) {
- var J = new q().init(this, [z[dt]].concat(Y($[dt])));
- J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof G[at] > "u" || (ht[at] = J = new q().init(this, G[at], z[dt]));
- J && (J.index = nt ? k + dt : at, ct[dt] = J);
- }
- if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
- for (dt = 0; dt < gt; dt++)
- dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
- this.data = ht, this.points = ct, T(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(k) {
- return { min: a(k), max: x(k) };
- }, Q.prototype.getExtremes = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- $ = $ ? $.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- k = k || this.stackedYData || this.processedYData || [];
- var dt = k.length;
- if (z) {
- var ht = z.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = k[nt];
- var J = (W(ht) || D(ht)) && (ht.length || 0 < ht || !$);
- if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
- if (J = ht.length)
- for (; J--; )
- W(ht[J]) && (it[gt++] = ht[J]);
- else
- it[gt++] = ht;
- }
- return k = { activeYData: it, dataMin: a(it), dataMax: x(it) }, T(this, "afterGetExtremes", { dataExtremes: k }), k;
- }, Q.prototype.applyExtremes = function() {
- var k = this.getExtremes();
- return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
- }, Q.prototype.getFirstValidPoint = function(k) {
- for (var G = k.length, z = 0, $ = null; $ === null && z < G; )
- $ = k[z], z++;
- return $;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var k = this.options, G = k.stacking, z = this.xAxis, $ = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Ct = ot.low, Pt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(c(z.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (D(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && At.key === Pt[lt].base && (Ct = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = h(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = c(
- pt,
- -1e5,
- 1e5
- ))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(z.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (k[ht + "Threshold"] || gt || 0), ot.category = $ && typeof $[ot.x] < "u" ? $[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
- }
- this.closestPointRangePx = tt, T(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(k, G, z) {
- var $ = this.chart;
- return (k || this.points || []).filter(function(q) {
- return G && !$.isInsidePlot(q.plotX, q.plotY, { inverted: $.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis, $ = X(k.clipBox);
- return G && G.len !== k.plotSizeX && ($.width = G.len), z && z.len !== k.plotSizeY && ($.height = z.len), $;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var k = this.chart, G = this.group, z = this.markerGroup, $ = k.sharedClips;
- k = k.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = $[it];
- et ? et.animate(q) : $[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
- }, Q.prototype.animate = function(k) {
- var G = this.chart, z = this.group, $ = this.markerGroup, q = G.inverted, it = v(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
- if (k && z)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), $ && $.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- G = this.getClipBox();
- var ct = it.step;
- $ && $.element.childNodes.length && (it.step = function(gt, dt) {
- ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
- }), nt.addClass("highcharts-animating").animate(G, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var k = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(G, z, $) {
- G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete $[z]);
- }
- ), this.finishedAnimating = !0, T(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var k = this.points, G = this.chart, z = this.options.marker, $ = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
- if (z.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < k.length; et++) {
- var rt = k[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
- if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
- var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
- this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
- var J = rt.isInside !== !1;
- nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = G.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : z).add($), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
- } else
- nt && (rt.graphic = nt.destroy());
- }
- }, Q.prototype.markerAttribs = function(k, G) {
- var z = this.options, $ = z.marker, q = k.marker || {}, it = q.symbol || $.symbol, et = m(q.radius, $.radius);
- return G && ($ = $.states[G], G = q.states && q.states[G], et = m(G && G.radius, $ && $.radius, et + ($ && $.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
- }, Q.prototype.pointAttribs = function(k, G) {
- var z = this.options.marker, $ = k && k.options, q = $ && $.marker || {}, it = $ && $.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
- return k = m(q.lineWidth, z.lineWidth), $ = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, $ = m(G.opacity, z.opacity, $), { stroke: et, "stroke-width": k, fill: it, opacity: $ };
- }, Q.prototype.destroy = function(k) {
- var G = this, z = G.chart, $ = /AppleWebKit\/533/.test(C.navigator.userAgent), q = G.data || [], it, et, nt, rt;
- for (T(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
- (rt = G[ct]) && rt.series && (o(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
- }), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- G.clips && G.clips.forEach(function(ct) {
- return ct.destroy();
- }), S.clearTimeout(G.animationTimeout), g(G, function(ct, gt) {
- ct instanceof R && !ct.survive && (it = $ && gt === "group" ? "hide" : "destroy", ct[it]());
- }), z.hoverSeries === G && (z.hoverSeries = void 0), o(z.series, G), z.orderSeries(), g(G, function(ct, gt) {
- k && gt === "hcEvents" || delete G[gt];
- });
- }, Q.prototype.applyZones = function() {
- var k = this, G = this.chart, z = G.renderer, $ = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
- if ($.length && (it || et) && rt && typeof rt.min < "u") {
- var yt = rt.reversed, vt = rt.horiz;
- it && !this.showLine && it.hide(), et && et.hide();
- var Ct = rt.getExtremes();
- $.forEach(function(Pt, At) {
- gt = yt ? vt ? G.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Pt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = G.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = G.plotWidth - ht.y)), ct && z.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: G.chartWidth
- } : { x: ht.y - G.plotLeft - G.spacingBox.x, y: 0, width: ht.height, height: G.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = z.clipRect(ht), ot = k["zone-area-" + At], lt = k["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Ct.max, k.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- k.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(k) {
- function G() {
- ["group", "markerGroup"].forEach(function(q) {
- z[q] && ($.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
- });
- }
- var z = this, $ = z.chart;
- z.xAxis && (z.eventsToUnbind.push(w($, "resize", G)), G(), z.invertGroups = G);
- }, Q.prototype.plotGroup = function(k, G, z, $, q) {
- var it = this[k], et = !it;
- return z = { visibility: z, zIndex: $ || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (h(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis;
- return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(k) {
- k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
- G();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var k = this, G = k.chart, z = k.options, $ = v(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
- G = !k.finishedAnimating && G.renderer.isSVG ? $.duration : 0, T(this, "render");
- var ct = k.plotGroup("group", "series", q, it, nt);
- k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && $.defer && (G += $.defer), k.animationTimeout = V(function() {
- k.afterAnimate();
- }, G || 0)), k.isDirty = !1, k.hasRendered = !0, T(k, "afterRender");
- }, Q.prototype.redraw = function() {
- var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, $ = this.xAxis, q = this.yAxis;
- z && (k.inverted && z.attr({
- width: k.plotWidth,
- height: k.plotHeight
- }), z.animate({ translateX: m($ && $.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
- }, Q.prototype.searchPoint = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? $.len - k.chartX + $.pos : k.chartY - $.pos }, G, k);
- }, Q.prototype.buildKDTree = function(k) {
- function G(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = z.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var z = this, $ = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete z.kdTree, V(function() {
- z.kdTree = G(z.getValidPoints(null, !z.directTouch), $, $), z.buildingKdTree = !1;
- }, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(k, G, z) {
- function $(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = h(rt[it]) && h(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = h(rt[et]) && h(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return ot = (tt || 0) + (ot || 0), ht.dist = h(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = h(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = $(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = $(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
- }
- var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = G ? "distX" : "dist";
- if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
- return $(
- k,
- this.kdTree,
- G,
- G
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var k = this.options, G = k.pointRange, z = this.xAxis;
- return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), W(k) ? k * (G || z.pointRange) : 0;
- }, Q.prototype.isPointInside = function(k) {
- var G = this.chart, z = this.xAxis, $ = this.yAxis;
- return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= ($ ? $.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var k = this, G = k.options, z = G.trackByArea, $ = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
- q.hoverSeries !== k && k.onMouseOver();
- }, gt = "rgba(192,192,192," + (B ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: $ }) : k.graph && (k.tracker = et.path($).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
- })), T(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(k, G, z, $, q) {
- var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
- rt = rt && rt.hasNames && rt.names;
- var ct = it.data, gt = this.xData, dt;
- G = m(G, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [k]
- );
- var at = ht.x, J = gt.length;
- if (this.requireSorting && at < gt[J - 1])
- for (dt = !0; J && gt[J - 1] > at; )
- J--;
- this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && T(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, G && nt.redraw($);
- }, Q.prototype.removePoint = function(k, G, z) {
- var $ = this, q = $.data, it = q[k], et = $.points, nt = $.chart, rt = function() {
- et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), $.options.data.splice(k, 1), $.updateParallelArrays(it || { series: $ }, "splice", k, 1), it && it.destroy(), $.isDirty = !0, $.isDirtyData = !0, G && nt.redraw();
- };
- d(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(k, G, z, $) {
- function q() {
- it.destroy($), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
- }
- var it = this, et = it.chart;
- z !== !1 ? T(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(k, G) {
- k = p(k, this.userOptions), T(this, "update", { options: k });
- var z = this, $ = z.chart, q = z.userOptions, it = z.initialType || z.type, et = $.options.plotOptions, nt = b[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = k.type || q.type || $.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.hasOptionChanged("keys"));
- if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), k.data && (k.dataSorting && s(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = z[tt], delete z[tt];
- }), et = !1, b[ht]) {
- if (et = ht !== z.type, z.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(z, b[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
- for (gt in nt)
- z[gt] = void 0;
- s(z, b[ht].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
- }
- } else
- t(17, !0, $, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- z[tt] = dt[tt];
- }), z.init($, k), at && this.points) {
- var J = z.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
- tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && $.legend.destroyItem(tt));
- }, this);
- }
- z.initialType = it, $.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), T(this, "afterUpdate"), m(G, !0) && $.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(k) {
- this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(k) {
- var G = this.options[k], z = this.chart.options.plotOptions, $ = this.userOptions[k];
- return $ ? G !== $ : G !== m(
- z && z[this.type] && z[this.type][k],
- z && z.series && z.series[k],
- G
- );
- }, Q.prototype.onMouseOver = function() {
- var k = this.chart, G = k.hoverSeries;
- k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && T(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var k = this.options, G = this.chart, z = G.tooltip, $ = G.hoverPoint;
- G.hoverSeries = null, $ && $.onMouseOut(), this && k.events.mouseOut && T(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(k, G) {
- var z = this, $ = z.options, q = z.graph, it = $.inactiveOtherPoints, et = $.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = $.lineWidth, ct = 0, gt = $.opacity;
- if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
- dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
- }), z.state = k, !z.chart.styledMode)) {
- if (et[k] && et[k].enabled === !1)
- return;
- if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
- for ($ = { "stroke-width": rt }, q.animate($, nt); z["zone-graph-" + ct]; )
- z["zone-graph-" + ct].animate($, nt), ct += 1;
- it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- G && it && z.points && z.setAllPointsToState(k || void 0);
- }, Q.prototype.setAllPointsToState = function(k) {
- this.points.forEach(function(G) {
- G.setState && G.setState(k);
- });
- }, Q.prototype.setVisible = function(k, G) {
- var z = this, $ = z.chart, q = z.legendItem, it = $.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- z[rt] && z[rt][nt]();
- }), ($.hoverSeries === z || ($.hoverPoint && $.hoverPoint.series) === z) && z.onMouseOut(), q && $.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && $.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), z.linkedSeries.forEach(function(rt) {
- rt.setVisible(k, !1);
- }), it && ($.isDirtyBox = !0), T(z, nt), G !== !1 && $.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(k) {
- this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), T(this, k ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(k, G, z) {
- return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
- }, Q.defaultOptions = F, Q;
- }(), s(y.prototype, { axisTypes: [
- "xAxis",
- "yAxis"
- ], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: H.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: U, requireSorting: !0, sorted: !0 }), N.series = y, y;
- }), E(l, "Extensions/ScrollablePlotArea.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/Series/Series.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- var F = y.stop, N = U.addEvent, R = U.createElement, S = U.merge, v = U.pick;
- N(I, "afterSetChartSize", function(d) {
- var u = this.options.chart.scrollablePlotArea, A = u && u.minWidth;
- if (u = u && u.minHeight, !this.renderer.forExport) {
- if (A) {
- if (this.scrollablePixelsX = A = Math.max(0, A - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.width = this.plotWidth += A, this.inverted ? this.clipBox.height += A : this.clipBox.width += A;
- var O = { 1: { name: "right", value: A } };
- }
- } else
- u && (this.scrollablePixelsY = A = Math.max(
- 0,
- u - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.height = this.plotHeight += A, this.inverted ? this.clipBox.width += A : this.clipBox.height += A, O = { 2: { name: "bottom", value: A } });
- O && !d.skipAxes && this.axes.forEach(function(B) {
- O[B.side] ? B.getPlotLinePath = function() {
- var C = O[B.side].name, b = this[C];
- this[C] = b - O[B.side].value;
- var w = j.prototype.getPlotLinePath.apply(this, arguments);
- return this[C] = b, w;
- } : (B.setAxisSize(), B.setAxisTranslation());
- });
- }
- }), N(I, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), I.prototype.setUpScrolling = function() {
- var d = this, u = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (u.overflowX = "auto"), this.scrollablePixelsY && (u.overflowY = "auto"), this.scrollingParent = R("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = R(
- "div",
- { className: "highcharts-scrolling" },
- u,
- this.scrollingParent
- ), N(this.scrollingContainer, "scroll", function() {
- d.pointer && delete d.pointer.chartPosition;
- }), this.innerContainer = R("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, I.prototype.moveFixedElements = function() {
- var d = this.container, u = this.fixedRenderer, A = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
- this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && A.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), A.forEach(function(B) {
- [].forEach.call(d.querySelectorAll(B), function(C) {
- (C.namespaceURI === u.SVG_NS ? u.box : u.box.parentNode).appendChild(C), C.style.pointerEvents = "auto";
- });
- });
- }, I.prototype.applyFixed = function() {
- var d = !this.fixedDiv, u = this.options.chart, A = u.scrollablePlotArea, O = H.getRendererType();
- d ? (this.fixedDiv = R("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (u.style && u.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = u = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = u.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": v(A.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), N(this, "afterShowResetZoom", this.moveFixedElements), N(this, "afterDrilldown", this.moveFixedElements), N(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || d) && (this.scrollableDirty = !1, this.moveFixedElements()), u = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = u + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: u, height: O, viewBox: [0, 0, u, O].join(" ") }), this.chartBackground.attr({ width: u, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", d && (A.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * A.scrollPositionX), A.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * A.scrollPositionY)), O = this.axisOffset, d = this.plotTop - O[0] - 1, A = this.plotLeft - O[3] - 1, u = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var B = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), C = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- d = this.scrollablePixelsX ? [["M", 0, d], ["L", this.plotLeft - 1, d], ["L", this.plotLeft - 1, u], ["L", 0, u], ["Z"], ["M", B, d], ["L", this.chartWidth, d], ["L", this.chartWidth, u], ["L", B, u], ["Z"]] : this.scrollablePixelsY ? [["M", A, 0], ["L", A, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", A, C], ["L", A, this.chartHeight], ["L", O, this.chartHeight], ["L", O, C], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d });
- }, N(j, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), N(Z, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), E(l, "Core/Axis/StackingAxis.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = I.addEvent, U = I.destroyObjectProperties, F = I.fireEvent, N = I.isNumber, R = I.objectEach, S;
- return function(v) {
- function d() {
- var B = this.stacking;
- if (B) {
- var C = B.stacks;
- R(C, function(b, w) {
- U(b), C[w] = null;
- }), B && B.stackTotalGroup && B.stackTotalGroup.destroy();
- }
- }
- function u() {
- this.stacking || (this.stacking = new O(this));
- }
- var A = [];
- v.compose = function(B) {
- return A.indexOf(B) === -1 && (A.push(B), H(B, "init", u), H(B, "destroy", d)), B;
- };
- var O = function() {
- function B(C) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = C;
- }
- return B.prototype.buildStacks = function() {
- var C = this.axis, b = C.series, w = C.options.reversedStacks, x = b.length, a;
- if (!C.isXAxis) {
- for (this.usePercentage = !1, a = x; a--; ) {
- var c = b[w ? a : x - a - 1];
- c.setStackedPoints(), c.setGroupedPoints();
- }
- for (a = 0; a < x; a++)
- b[a].modifyStacks();
- F(C, "afterBuildStacks");
- }
- }, B.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var C = this.stacks = this.oldStacks;
- R(C, function(b) {
- R(b, function(w) {
- w.cumulative = w.total;
- });
- });
- }
- }, B.prototype.resetStacks = function() {
- var C = this, b = C.stacks;
- C.axis.isXAxis || R(b, function(w) {
- R(
- w,
- function(x, a) {
- N(x.touched) && x.touched < C.stacksTouched ? (x.destroy(), delete w[a]) : (x.total = null, x.cumulative = null);
- }
- );
- });
- }, B.prototype.renderStackTotals = function() {
- var C = this.axis, b = C.chart, w = b.renderer, x = this.stacks;
- C = Z(b, C.options.stackLabels && C.options.stackLabels.animation || !1);
- var a = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- a.translate(b.plotLeft, b.plotTop), R(x, function(c) {
- R(c, function(p) {
- p.render(a);
- });
- }), a.animate(
- { opacity: 1 },
- C
- );
- }, B;
- }();
- v.Additions = O;
- }(S || (S = {})), S;
- }), E(l, "Extensions/Stacking.js", [l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Axis/StackingAxis.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F) {
- var N = I.format, R = F.correctFloat, S = F.defined, v = F.destroyObjectProperties, d = F.isArray, u = F.isNumber, A = F.objectEach, O = F.pick, B = function() {
- function C(b, w, x, a, c) {
- var p = b.chart.inverted;
- this.axis = b, this.isNegative = x, this.options = w = w || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (p ? x ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (p ? "middle" : x ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (p ? x ? "right" : "left" : "center");
- }
- return C.prototype.destroy = function() {
- v(this, this.axis);
- }, C.prototype.render = function(b) {
- var w = this.axis.chart, x = this.options, a = x.format;
- a = a ? N(a, this, w) : x.formatter.call(this), this.label ? this.label.attr({
- text: a,
- visibility: "hidden"
- }) : (this.label = w.renderer.label(a, null, null, x.shape, null, null, x.useHTML, !1, "stack-labels"), a = { r: x.borderRadius || 0, text: a, rotation: x.rotation, padding: O(x.padding, 5), visibility: "hidden" }, w.styledMode || (a.fill = x.backgroundColor, a.stroke = x.borderColor, a["stroke-width"] = x.borderWidth, this.label.css(x.style)), this.label.attr(a), this.label.added || this.label.add(b)), this.label.labelrank = w.plotSizeY;
- }, C.prototype.setOffset = function(b, w, x, a, c) {
- var p = this.axis, i = p.chart;
- a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), x = p.translate(x || 0), x = S(a) && Math.abs(a - x), b = O(c, i.xAxis[0].translate(this.x)) + b, p = S(a) && this.getStackBox(i, this, b, a, w, x, p), w = this.label, x = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
- var h = this.textAlign;
- w && p && (c = w.getBBox(), a = w.padding, h = h === "left" ? i.inverted ? -a : a : h === "right" ? c.width : i.inverted && h === "center" ? c.width / 2 : i.inverted ? x ? c.width + a : -a : c.width / 2, x = i.inverted ? c.height / 2 : x ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= h, p.y -= x, w.align(this.alignOptions, null, p), i.isInsidePlot(w.alignAttr.x + h - this.alignOptions.x, w.alignAttr.y + x - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, b = !1), b && H.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, c, p), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = u(w.x) && u(w.y) && i.isInsidePlot(w.x - a + w.width, w.y) && i.isInsidePlot(w.x + a, w.y)) || w.hide()));
- }, C.prototype.getStackBox = function(b, w, x, a, c, p, i) {
- var h = w.axis.reversed, o = b.inverted, t = i.height + i.pos - (o ? b.plotLeft : b.plotTop);
- return w = w.isNegative && !h || !w.isNegative && h, { x: o ? w ? a - i.right : a - p + i.pos - b.plotLeft : x + b.xAxis[0].transB - b.plotLeft, y: o ? i.height - x - c : w ? t - a - p : t - a, width: o ? p : c, height: o ? c : p };
- }, C;
- }();
- return j.prototype.getStacks = function() {
- var C = this, b = C.inverted;
- C.yAxis.forEach(function(w) {
- w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
- }), C.series.forEach(function(w) {
- var x = w.xAxis && w.xAxis.options || {};
- !w.options.stacking || w.visible !== !0 && C.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), b ? x.top : x.left, b ? x.height : x.width].join());
- });
- }, U.compose(y), H.prototype.setGroupedPoints = function() {
- var C = this.yAxis.stacking;
- this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? H.prototype.setStackedPoints.call(this, "group") : C && A(C.stacks, function(b, w) {
- w.slice(-5) === "group" && (A(b, function(x) {
- return x.destroy();
- }), delete C.stacks[w]);
- });
- }, H.prototype.setStackedPoints = function(C) {
- var b = C || this.options.stacking;
- if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var w = this.processedXData, x = this.processedYData, a = [], c = x.length, p = this.options, i = p.threshold, h = O(p.startFromThreshold && i, 0);
- p = p.stack, C = C ? this.type + "," + b : this.stackKey;
- var o = "-" + C, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, T = s.stacking.oldStacks, _, D;
- for (s.stacking.stacksTouched += 1, D = 0; D < c; D++) {
- var W = w[D], P = x[D], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (_ = t && P < (h ? 0 : i)) ? o : C;
- n[m] || (n[m] = {}), n[m][W] || (T[m] && T[m][W] ? (n[m][W] = T[m][W], n[m][W].total = null) : n[m][W] = new B(s, s.options.stackLabels, _, W, p)), m = n[m][W], P !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, h)], S(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (_ = _ ? C : o, t && n[_] && n[_][W] ? (_ = n[_][W], m.total = _.total = Math.max(_.total, m.total) + Math.abs(P) || 0) : m.total = R(m.total + (Math.abs(P) || 0))) : b === "group" ? (d(P) && (P = P[0]), P !== null && (m.total = (m.total || 0) + 1)) : m.total = R(m.total + (P || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, h) + (P || 0), P !== null && (m.points[g].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
- }
- b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = a), s.stacking.oldStacks = {};
- }
- }, H.prototype.modifyStacks = function() {
- var C = this, b = C.stackKey, w = C.yAxis.stacking.stacks, x = C.processedXData, a, c = C.options.stacking;
- C[c + "Stacker"] && [b, "-" + b].forEach(function(p) {
- for (var i = x.length, h, o; i--; )
- h = x[i], a = C.getStackIndicator(a, h, C.index, p), (o = (h = w[p] && w[p][h]) && h.points[a.key]) && C[c + "Stacker"](o, h, i);
- });
- }, H.prototype.percentStacker = function(C, b, w) {
- b = b.total ? 100 / b.total : 0, C[0] = R(C[0] * b), C[1] = R(C[1] * b), this.stackedYData[w] = C[1];
- }, H.prototype.getStackIndicator = function(C, b, w, x) {
- return !S(C) || C.x !== b || x && C.key !== x ? C = { x: b, index: 0, key: x } : C.index++, C.key = [w, b, C.index].join(), C;
- }, Z.StackItem = B, Z.StackItem;
- }), E(l, "Series/Line/LineSeries.js", [l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), H = I.defined, U = I.merge;
- return I = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.data = void 0, R.options = void 0, R.points = void 0, R;
- }
- return Z(N, F), N.prototype.drawGraph = function() {
- var R = this, S = this.options, v = (this.gappedPath || this.getGraphPath).call(this), d = this.chart.styledMode, u = [["graph", "highcharts-graph"]];
- d || u[0].push(S.lineColor || this.color || "#cccccc", S.dashStyle), u = R.getZonesGraphs(u), u.forEach(function(A, O) {
- var B = A[0], C = R[B], b = C ? "animate" : "attr";
- C ? (C.endX = R.preventGraphAnimation ? null : v.xMap, C.animate({ d: v })) : v.length && (R[B] = C = R.chart.renderer.path(v).addClass(A[1]).attr({ zIndex: 1 }).add(R.group)), C && !d && (B = { stroke: A[2], "stroke-width": S.lineWidth, fill: R.fillGraph && R.color || "none" }, A[3] ? B.dashstyle = A[3] : S.linecap !== "square" && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), C[b](B).shadow(2 > O && S.shadow)), C && (C.startX = v.xMap, C.isArea = v.isArea);
- });
- }, N.prototype.getGraphPath = function(R, S, v) {
- var d = this, u = d.options, A = [], O = [], B, C = u.step;
- R = R || d.points;
- var b = R.reversed;
- return b && R.reverse(), (C = { right: 1, center: 2 }[C] || C && 3) && b && (C = 4 - C), R = this.getValidPoints(R, !1, !(u.connectNulls && !S && !v)), R.forEach(function(w, x) {
- var a = w.plotX, c = w.plotY, p = R[x - 1];
- (w.leftCliff || p && p.rightCliff) && !v && (B = !0), w.isNull && !H(S) && 0 < x ? B = !u.connectNulls : w.isNull && !S ? B = !0 : (x === 0 || B ? x = [["M", w.plotX, w.plotY]] : d.getPointSpline ? x = [d.getPointSpline(R, w, x)] : C ? (x = C === 1 ? [["L", p.plotX, c]] : C === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], x.push(["L", a, c])) : x = [["L", a, c]], O.push(w.x), C && (O.push(w.x), C === 2 && O.push(w.x)), A.push.apply(A, x), B = !1);
- }), A.xMap = O, d.graphPath = A;
- }, N.prototype.getZonesGraphs = function(R) {
- return this.zones.forEach(function(S, v) {
- v = ["zone-graph-" + v, "highcharts-graph highcharts-zone-graph-" + v + " " + (S.className || "")], this.chart.styledMode || v.push(S.color || this.color, S.dashStyle || this.options.dashStyle), R.push(v);
- }, this), R;
- }, N.defaultOptions = U(y.defaultOptions, {}), N;
- }(y), j.registerSeriesType("line", I), I;
- }), E(l, "Series/Area/AreaSeries.js", [
- l["Core/Color/Color.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var v = function(d, u) {
- return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, O) {
- A.__proto__ = O;
- } || function(A, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (A[B] = O[B]);
- }, v(d, u);
- };
- return function(d, u) {
- function A() {
- this.constructor = d;
- }
- v(d, u), d.prototype = u === null ? Object.create(u) : (A.prototype = u.prototype, new A());
- };
- }(), U = y.parse, F = I.seriesTypes.line;
- y = Z.extend;
- var N = Z.merge, R = Z.objectEach, S = Z.pick;
- return Z = function(v) {
- function d() {
- var u = v !== null && v.apply(this, arguments) || this;
- return u.data = void 0, u.options = void 0, u.points = void 0, u;
- }
- return H(d, v), d.prototype.drawGraph = function() {
- this.areaPath = [], v.prototype.drawGraph.apply(this);
- var u = this, A = this.areaPath, O = this.options, B = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(C, b) {
- B.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + C.className, C.color || u.color, C.fillColor || O.fillColor]);
- }), B.forEach(function(C) {
- var b = C[0], w = u[b], x = w ? "animate" : "attr", a = {};
- w ? (w.endX = u.preventGraphAnimation ? null : A.xMap, w.animate({ d: A })) : (a.zIndex = 0, w = u[b] = u.chart.renderer.path(A).addClass(C[1]).add(u.group), w.isArea = !0), u.chart.styledMode || (a.fill = S(C[3], U(C[2]).setOpacity(S(O.fillOpacity, 0.75)).get())), w[x](a), w.startX = A.xMap, w.shiftUnit = O.step ? 2 : 1;
- });
- }, d.prototype.getGraphPath = function(u) {
- var A = F.prototype.getGraphPath, O = this.options, B = O.stacking, C = this.yAxis, b, w = [], x = [], a = this.index, c = C.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(C.getThreshold(O.threshold));
- O = S(O.connectNulls, B === "percent");
- var h = function(n, T, _) {
- var D = u[n];
- n = B && c[D.x].points[a];
- var W = D[_ + "Null"] || 0;
- if (_ = D[_ + "Cliff"] || 0, D = !0, _ || W) {
- var P = (W ? n[0] : n[1]) + _, X = n[0] + _;
- D = !!W;
- } else
- !B && u[T] && u[T].isNull && (P = X = p);
- typeof P < "u" && (x.push({ plotX: t, plotY: P === null ? i : C.getThreshold(P), isNull: D, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : C.getThreshold(X), doCurve: !1 }));
- };
- for (u = u || this.points, B && (u = this.getStackPoints(u)), b = 0; b < u.length; b++) {
- B || (u[b].leftCliff = u[b].rightCliff = u[b].leftNull = u[b].rightNull = void 0);
- var o = u[b].isNull, t = S(u[b].rectPlotX, u[b].plotX), s = B ? S(u[b].yBottom, i) : i;
- (!o || O) && (O || h(b, b - 1, "left"), o && !B && O || (x.push(u[b]), w.push({ x: b, plotX: t, plotY: s })), O || h(b, b + 1, "right"));
- }
- return b = A.call(this, x, !0, !0), w.reversed = !0, o = A.call(this, w, !0, !0), (s = o[0]) && s[0] === "M" && (o[0] = ["L", s[1], s[2]]), o = b.concat(o), o.length && o.push(["Z"]), A = A.call(this, x, !1, O), o.xMap = b.xMap, this.areaPath = o, A;
- }, d.prototype.getStackPoints = function(u) {
- var A = this, O = [], B = [], C = this.xAxis, b = this.yAxis, w = b.stacking.stacks[this.stackKey], x = {}, a = b.series, c = a.length, p = b.options.reversedStacks ? 1 : -1, i = a.indexOf(A);
- if (u = u || this.points, this.options.stacking) {
- for (var h = 0; h < u.length; h++)
- u[h].leftNull = u[h].rightNull = void 0, x[u[h].x] = u[h];
- R(w, function(t, s) {
- t.total !== null && B.push(s);
- }), B.sort(function(t, s) {
- return t - s;
- });
- var o = a.map(function(t) {
- return t.visible;
- });
- B.forEach(function(t, s) {
- var n = 0, T, _;
- if (x[t] && !x[t].isNull)
- O.push(x[t]), [-1, 1].forEach(function(W) {
- var P = W === 1 ? "rightNull" : "leftNull", X = 0, g = w[B[s + W]];
- if (g)
- for (var m = i; 0 <= m && m < c; ) {
- var L = a[m].index;
- T = g.points[L], T || (L === A.index ? x[t][P] = !0 : o[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += p;
- }
- x[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var D = i; 0 <= D && D < c; ) {
- if (T = w[t].points[a[D].index]) {
- n = T[1];
- break;
- }
- D += p;
- }
- n = S(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: C.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, d.defaultOptions = N(F.defaultOptions, { threshold: 0 }), d;
- }(F), y(Z.prototype, {
- singleStacks: !1,
- drawLegendSymbol: j.drawRectangle
- }), I.registerSeriesType("area", Z), Z;
- }), E(l, "Series/Spline/SplineSeries.js", [l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), Z = y.seriesTypes.line, H = j.merge, U = j.pick;
- return j = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.data = void 0, R.options = void 0, R.points = void 0, R;
- }
- return I(N, F), N.prototype.getPointSpline = function(R, S, v) {
- var d = S.plotX || 0, u = S.plotY || 0, A = R[v - 1];
- if (v = R[v + 1], A && !A.isNull && A.doCurve !== !1 && !S.isCliff && v && !v.isNull && v.doCurve !== !1 && !S.isCliff) {
- R = A.plotY || 0;
- var O = v.plotX || 0;
- v = v.plotY || 0;
- var B = 0, C = (1.5 * d + (A.plotX || 0)) / 2.5, b = (1.5 * u + R) / 2.5;
- O = (1.5 * d + O) / 2.5;
- var w = (1.5 * u + v) / 2.5;
- O !== C && (B = (w - b) * (O - d) / (O - C) + u - w), b += B, w += B, b > R && b > u ? (b = Math.max(R, u), w = 2 * u - b) : b < R && b < u && (b = Math.min(R, u), w = 2 * u - b), w > v && w > u ? (w = Math.max(v, u), b = 2 * u - w) : w < v && w < u && (w = Math.min(v, u), b = 2 * u - w), S.rightContX = O, S.rightContY = w;
- }
- return S = ["C", U(A.rightContX, A.plotX, 0), U(A.rightContY, A.plotY, 0), U(C, d, 0), U(b, u, 0), d, u], A.rightContX = A.rightContY = void 0, S;
- }, N.defaultOptions = H(Z.defaultOptions), N;
- }(Z), y.registerSeriesType("spline", j), j;
- }), E(
- l,
- "Series/AreaSpline/AreaSplineSeries.js",
- [l["Series/Area/AreaSeries.js"], l["Series/Spline/SplineSeries.js"], l["Core/Legend/LegendSymbol.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H) {
- var U = this && this.__extends || function() {
- var S = function(v, d) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, A) {
- u.__proto__ = A;
- } || function(u, A) {
- for (var O in A)
- A.hasOwnProperty(O) && (u[O] = A[O]);
- }, S(v, d);
- };
- return function(v, d) {
- function u() {
- this.constructor = v;
- }
- S(v, d), v.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
- };
- }(), F = y.prototype, N = H.extend, R = H.merge;
- return H = function(S) {
- function v() {
- var d = S !== null && S.apply(this, arguments) || this;
- return d.data = void 0, d.points = void 0, d.options = void 0, d;
- }
- return U(v, S), v.defaultOptions = R(j.defaultOptions, y.defaultOptions), v;
- }(j), N(H.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", H), H;
- }
- ), E(l, "Series/Column/ColumnSeries.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Color/Color.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F) {
- var N = this && this.__extends || function() {
- var c = function(p, i) {
- return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, o) {
- h.__proto__ = o;
- } || function(h, o) {
- for (var t in o)
- o.hasOwnProperty(t) && (h[t] = o[t]);
- }, c(p, i);
- };
- return function(p, i) {
- function h() {
- this.constructor = p;
- }
- c(p, i), p.prototype = i === null ? Object.create(i) : (h.prototype = i.prototype, new h());
- };
- }(), R = y.animObject, S = j.parse, v = I.hasTouch;
- y = I.noop;
- var d = F.clamp, u = F.css, A = F.defined, O = F.extend, B = F.fireEvent, C = F.isArray, b = F.isNumber, w = F.merge, x = F.pick, a = F.objectEach;
- return F = function(c) {
- function p() {
- var i = c !== null && c.apply(this, arguments) || this;
- return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
- }
- return N(p, c), p.prototype.animate = function(i) {
- var h = this, o = this.yAxis, t = h.options, s = this.chart.inverted, n = {}, T = s ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = d(o.toPixels(t.threshold), o.pos, o.pos + o.len), s ? n.translateX = i - o.len : n.translateY = i, h.clipBox && h.setClip(), h.group.attr(n);
- else {
- var _ = Number(h.group.attr(T));
- h.group.animate({ scaleY: 1 }, O(R(h.options.animation), { step: function(D, W) {
- h.group && (n[T] = _ + W.pos * (o.pos - _), h.group.attr(n));
- } }));
- }
- }, p.prototype.init = function(i, h) {
- c.prototype.init.apply(this, arguments);
- var o = this;
- i = o.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === o.type && (t.isDirty = !0);
- });
- }, p.prototype.getColumnMetrics = function() {
- var i = this, h = i.options, o = i.xAxis, t = i.yAxis, s = o.options.reversedStacks;
- s = o.reversed && !s || !o.reversed && s;
- var n = {}, T, _ = 0;
- h.grouping === !1 ? _ = 1 : i.chart.series.forEach(function(X) {
- var g = X.yAxis, m = X.options;
- if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
- if (m.stacking && m.stacking !== "group") {
- T = X.stackKey, typeof n[T] > "u" && (n[T] = _++);
- var L = n[T];
- } else
- m.grouping !== !1 && (L = _++);
- X.columnIndex = L;
- }
- });
- var D = Math.min(Math.abs(o.transA) * (o.ordinal && o.ordinal.slope || h.pointRange || o.closestPointRange || o.tickInterval || 1), o.len), W = D * h.groupPadding, P = (D - 2 * W) / (_ || 1);
- return h = Math.min(h.maxPointWidth || o.len, x(h.pointWidth, P * (1 - 2 * h.pointPadding))), i.columnMetrics = { width: h, offset: (P - h) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * P - D / 2) * (s ? -1 : 1), paddedWidth: P, columnCount: _ }, i.columnMetrics;
- }, p.prototype.crispCol = function(i, h, o, t) {
- var s = this.chart, n = this.borderWidth, T = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (o = Math.round(i + o) + T, i = Math.round(i) + T, o -= i), t = Math.round(h + t) + n, T = 0.5 >= Math.abs(h) && 0.5 < t, h = Math.round(h) + n, t -= h, T && t && (--h, t += 1), { x: i, y: h, width: o, height: t };
- }, p.prototype.adjustForMissingColumns = function(i, h, o, t) {
- var s = this, n = this.options.stacking;
- if (!o.isNull && 1 < t.columnCount) {
- var T = 0, _ = 0;
- a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
- if (typeof o.x == "number" && (D = D[o.x.toString()])) {
- var W = D.points[s.index], P = D.total;
- n ? (W && (T = _), D.hasValidPoints && _++) : C(W) && (T = W[1], _ = P || 0);
- }
- }), i = (o.plotX || 0) + ((_ - 1) * t.paddedWidth + h) / 2 - h - T * t.paddedWidth;
- }
- return i;
- }, p.prototype.translate = function() {
- var i = this, h = i.chart, o = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = x(o.borderWidth, t ? 0 : 1);
- var s = i.xAxis, n = i.yAxis, T = o.threshold, _ = i.translatedThreshold = n.getThreshold(T), D = x(o.minPointLength, 5), W = i.getColumnMetrics(), P = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(P, 1 + 2 * t);
- h.inverted && (_ -= 0.5), o.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(Y) {
- var V = x(Y.yBottom, _), Q = 999 + Math.abs(V), k = Y.plotX || 0;
- Q = d(Y.plotY, -Q, n.len + Q);
- var G = Math.min(Q, V), z = Math.max(Q, V) - G, $ = P, q = k + X, it = L;
- D && Math.abs(z) < D && (z = D, k = !n.reversed && !Y.negative || n.reversed && Y.negative, b(T) && b(m) && Y.y === T && m <= T && (n.min || 0) < T && (g !== m || (n.max || 0) <= T) && (k = !k), G = Math.abs(G - _) > D ? V - D : _ - (k ? D : 0)), A(Y.options.pointWidth) && ($ = it = Math.ceil(Y.options.pointWidth), q -= Math.round(($ - P) / 2)), o.centerInCategory && (q = i.adjustForMissingColumns(q, $, Y, W)), Y.barX = q, Y.pointWidth = $, Y.tooltipPos = h.inverted ? [d(n.len + n.pos - h.plotLeft - Q, n.pos - h.plotLeft, n.len + n.pos - h.plotLeft), s.len + s.pos - h.plotTop - q - it / 2, z] : [s.left - h.plotLeft + q + it / 2, d(Q + n.pos - h.plotTop, n.pos - h.plotTop, n.len + n.pos - h.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
- });
- }, p.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, p.prototype.pointAttribs = function(i, h) {
- var o = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", T = i && i.color || this.color, _ = i && i[s] || o[s] || T;
- t = i && i.options.dashStyle || o.dashStyle;
- var D = i && i[n] || o[n] || this[n] || 0, W = x(i && i.opacity, o.opacity, 1);
- if (i && this.zones.length) {
- var P = i.getZone();
- T = i.options.color || P && (P.color || i.nonZonedColor) || this.color, P && (_ = P.borderColor || _, t = P.dashStyle || t, D = P.borderWidth || D);
- }
- return h && i && (i = w(o.states[h], i.options.states && i.options.states[h] || {}), h = i.brightness, T = i.color || typeof h < "u" && S(T).brighten(i.brightness).get() || T, _ = i[s] || _, D = i[n] || D, t = i.dashStyle || t, W = x(i.opacity, W)), s = { fill: T, stroke: _, "stroke-width": D, opacity: W }, t && (s.dashstyle = t), s;
- }, p.prototype.drawPoints = function() {
- var i = this, h = this.chart, o = i.options, t = h.renderer, s = o.animationLimit || 250, n;
- i.points.forEach(function(T) {
- var _ = T.graphic, D = !!_, W = _ && h.pointCount < s ? "animate" : "attr";
- b(T.plotY) && T.y !== null ? (n = T.shapeArgs, _ && T.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (T.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (T.graphic = _ = t[T.shapeType](n).add(T.group || i.group)) && i.enabledDataSorting && h.hasRendered && h.pointCount < s && (_.attr({ x: T.startXPos }), D = !0, W = "animate"), _ && D && _[W](w(n)), o.borderRadius && _[W]({ r: o.borderRadius }), h.styledMode || _[W](i.pointAttribs(T, T.selected && "select")).shadow(T.allowShadow !== !1 && o.shadow, null, o.stacking && !o.borderRadius), _ && (_.addClass(T.getClassName(), !0), _.attr({ visibility: T.visible ? "inherit" : "hidden" }))) : _ && (T.graphic = _.destroy());
- });
- }, p.prototype.drawTracker = function() {
- var i = this, h = i.chart, o = h.pointer, t = function(n) {
- var T = o.getPointFromEvent(n);
- typeof T < "u" && (o.isDirectTouch = !0, T.onMouseOver(n));
- }, s;
- i.points.forEach(function(n) {
- s = C(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(T) {
- T.div ? T.div.point = n : T.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(T) {
- o.onTrackerMouseOut(T);
- }), v && i[n].on(
- "touchstart",
- t
- ), !h.styledMode && i.options.cursor && i[n].css(u).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), B(this, "afterDrawTracker");
- }, p.prototype.remove = function() {
- var i = this, h = i.chart;
- h.hasRendered && h.series.forEach(function(o) {
- o.type === i.type && (o.isDirty = !0);
- }), H.prototype.remove.apply(i, arguments);
- }, p.defaultOptions = w(H.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
- hover: { halo: !1, brightness: 0.1 },
- select: { color: "#cccccc", borderColor: "#000000" }
- }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), p;
- }(H), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("column", F), F;
- }), E(l, "Core/Series/DataLabel.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = j.format, U = I.defined, F = I.extend, N = I.fireEvent, R = I.isArray, S = I.merge, v = I.objectEach, d = I.pick, u = I.splat, A;
- return function(O) {
- function B(p, i, h, o, t) {
- var s = this, n = this.chart, T = this.isCartesian && n.inverted, _ = this.enabledDataSorting, D = d(p.dlBox && p.dlBox.centerX, p.plotX, -9999), W = d(p.plotY, -9999), P = i.getBBox(), X = h.rotation, g = h.align, m = n.isInsidePlot(D, Math.round(W), { inverted: T, paneCoordinates: !0, series: s }), L = function(k) {
- _ && s.xAxis && !Y && s.setDataLabelStartPos(
- p,
- i,
- t,
- m,
- k
- );
- }, Y = d(h.overflow, _ ? "none" : "justify") === "justify", V = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || d(h.inside, !!this.options.stacking) && o && n.isInsidePlot(D, T ? o.x + 1 : o.y + o.height - 1, { inverted: T, paneCoordinates: !0, series: s }));
- if (V) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : h.style.fontSize, i).b;
- o = F({ x: T ? this.yAxis.len - W : D, y: Math.round(T ? this.xAxis.len - D : W), width: 0, height: 0 }, o), F(h, { width: P.width, height: P.height }), X ? (Y = !1, D = n.renderer.rotCorr(Q, X), D = { x: o.x + (h.x || 0) + o.width / 2 + D.x, y: o.y + (h.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[h.verticalAlign] * o.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? D.y -= L ? P.height : 0 : g === "center" ? (D.x -= P.width / 2, D.y -= P.height / 2) : g === "right" && (D.x -= P.width, D.y -= L ? 0 : P.height), i.placed = !0, i.alignAttr = D) : (L(o), i.align(h, void 0, o), D = i.alignAttr), Y && 0 <= o.height ? this.justifyDataLabel(i, h, D, P, o, t) : d(h.crop, !0) && (V = n.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(D.x + P.width, D.y + P.height, {
- paneCoordinates: !0,
- series: s
- })), h.shape && !X && i[t ? "attr" : "animate"]({ anchorX: T ? n.plotWidth - p.plotY : p.plotX, anchorY: T ? n.plotHeight - p.plotX : p.plotY });
- }
- t && _ && (i.placed = !1), V || _ && !Y || (i.hide(!0), i.placed = !1);
- }
- function C(p, i) {
- var h = i.filter;
- return h ? (i = h.operator, p = p[h.property], h = h.value, i === ">" && p > h || i === "<" && p < h || i === ">=" && p >= h || i === "<=" && p <= h || i === "==" && p == h || i === "===" && p === h) : !0;
- }
- function b() {
- var p = this, i = p.chart, h = p.options, o = p.points, t = p.hasRendered || 0, s = i.renderer, n = h.dataLabels, T, _ = n.animation;
- if (_ = n.defer ? Z(
- i,
- _,
- p
- ) : { defer: 0, duration: 0 }, n = x(x(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[p.type] && i.options.plotOptions[p.type].dataLabels), n), N(this, "drawDataLabels"), R(n) || n.enabled || p._hasPointLabels) {
- var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[h.animation ? "animate" : "attr"]({ opacity: 1 }, _)), o.forEach(function(W) {
- T = u(x(n, W.dlOptions || W.options && W.options.dataLabels)), T.forEach(function(P, X) {
- var g = P.enabled && (!W.isNull || W.dataLabelOnNull) && C(W, P), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, Y = d(P.distance, W.labelDistance), V = !L;
- if (g) {
- var Q = W.getLabelConfig(), k = d(P[W.formatPrefix + "Format"], P.format);
- Q = U(k) ? H(k, Q, i) : (P[W.formatPrefix + "Formatter"] || P.formatter).call(Q, P), k = P.style;
- var G = P.rotation;
- i.styledMode || (k.color = d(P.color, k.color, p.color, "#000000"), k.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || p.color), k.color = !U(Y) && P.inside || 0 > Y || h.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, h.cursor && (k.cursor = h.cursor));
- var z = { r: P.borderRadius || 0, rotation: G, padding: P.padding, zIndex: 1 };
- i.styledMode || (z.fill = P.backgroundColor, z.stroke = P.borderColor, z["stroke-width"] = P.borderWidth), v(z, function($, q) {
- typeof $ > "u" && delete z[q];
- });
- }
- !L || g && U(Q) && !!L.div == !!P.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && U(Q) && (L ? z.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = G ? s.text(Q, 0, -9999, P.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, P.shape, null, null, P.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (P.className || "") + (P.useHTML ? " highcharts-tracker" : ""))), L.options = P, L.attr(z), i.styledMode || L.css(k).shadow(P.shadow), L.added || L.add(D), P.textPath && !P.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, P.textPath), W.dataLabelPath && !P.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), p.alignDataLabel(W, L, P, null, V));
- });
- });
- }
- N(this, "afterDrawDataLabels");
- }
- function w(p, i, h, o, t, s) {
- var n = this.chart, T = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var P = i.y;
- P = P === void 0 ? 0 : P;
- var X = (h.x || 0) + D;
- if (0 > X) {
- T === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (h.x || 0) + o.width - D, X > n.plotWidth && (T === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = h.y + D, 0 > X && (_ === "bottom" && 0 <= P ? (i.verticalAlign = "top", i.inside = !0) : P -= X, g = !0), X = (h.y || 0) + o.height - D, X > n.plotHeight && (_ === "top" && 0 >= P ? (i.verticalAlign = "bottom", i.inside = !0) : P += n.plotHeight - X, g = !0), g && (i.x = W, i.y = P, p.placed = !s, p.align(i, void 0, t)), g;
- }
- function x(p, i) {
- var h = [], o;
- if (R(p) && !R(i))
- h = p.map(function(t) {
- return S(t, i);
- });
- else if (R(i) && !R(p))
- h = i.map(function(t) {
- return S(p, t);
- });
- else if (R(p) || R(i))
- for (o = Math.max(p.length, i.length); o--; )
- h[o] = S(p[o], i[o]);
- else
- h = S(p, i);
- return h;
- }
- function a(p, i, h, o, t) {
- var s = this.chart, n = s.inverted, T = this.xAxis, _ = T.reversed, D = n ? i.height / 2 : i.width / 2;
- p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = n ? t.x : _ ? -D - p : T.width - D + p, i.startYPos = n ? _ ? this.yAxis.height - D + p : -D - p : t.y, o ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), s.hasRendered && (h && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var c = [];
- O.compose = function(p) {
- if (c.indexOf(p) === -1) {
- var i = p.prototype;
- c.push(p), i.alignDataLabel = B, i.drawDataLabels = b, i.justifyDataLabel = w, i.setDataLabelStartPos = a;
- }
- };
- }(A || (A = {})), A;
- }), E(l, "Series/Column/ColumnDataLabel.js", [l["Core/Series/DataLabel.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.series, H = I.merge, U = I.pick, F;
- return function(N) {
- function R(v, d, u, A, O) {
- var B = this.chart.inverted, C = v.series, b = (C.xAxis ? C.xAxis.len : this.chart.plotSizeX) || 0;
- C = (C.yAxis ? C.yAxis.len : this.chart.plotSizeY) || 0;
- var w = v.dlBox || v.shapeArgs, x = U(v.below, v.plotY > U(this.translatedThreshold, C)), a = U(u.inside, !!this.options.stacking);
- w && (A = H(w), 0 > A.y && (A.height += A.y, A.y = 0), w = A.y + A.height - C, 0 < w && w < A.height && (A.height -= w), B && (A = { x: C - A.y - A.height, y: b - A.x - A.width, width: A.height, height: A.width }), a || (B ? (A.x += x ? 0 : A.width, A.width = 0) : (A.y += x ? A.height : 0, A.height = 0))), u.align = U(u.align, !B || a ? "center" : x ? "right" : "left"), u.verticalAlign = U(u.verticalAlign, B || a ? "middle" : x ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, v, d, u, A, O), u.inside && v.contrastColor && d.css({ color: v.contrastColor });
- }
- var S = [];
- N.compose = function(v) {
- y.compose(Z), S.indexOf(v) === -1 && (S.push(v), v.prototype.alignDataLabel = R);
- };
- }(F || (F = {})), F;
- }), E(l, "Series/Bar/BarSeries.js", [l["Series/Column/ColumnSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), H = I.extend, U = I.merge;
- return I = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.data = void 0, R.options = void 0, R.points = void 0, R;
- }
- return Z(N, F), N.defaultOptions = U(
- y.defaultOptions,
- {}
- ), N;
- }(y), H(I.prototype, { inverted: !0 }), j.registerSeriesType("bar", I), I;
- }), E(l, "Series/Scatter/ScatterSeries.js", [l["Series/Column/ColumnSeries.js"], l["Series/Line/LineSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var R = function(S, v) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, u) {
- d.__proto__ = u;
- } || function(d, u) {
- for (var A in u)
- u.hasOwnProperty(A) && (d[A] = u[A]);
- }, R(S, v);
- };
- return function(S, v) {
- function d() {
- this.constructor = S;
- }
- R(S, v), S.prototype = v === null ? Object.create(v) : (d.prototype = v.prototype, new d());
- };
- }(), U = Z.addEvent, F = Z.extend, N = Z.merge;
- return Z = function(R) {
- function S() {
- var v = R !== null && R.apply(this, arguments) || this;
- return v.data = void 0, v.options = void 0, v.points = void 0, v;
- }
- return H(S, R), S.prototype.applyJitter = function() {
- var v = this, d = this.options.jitter, u = this.points.length;
- d && this.points.forEach(function(A, O) {
- ["x", "y"].forEach(function(B, C) {
- var b = "plot" + B.toUpperCase();
- if (d[B] && !A.isNull) {
- var w = v[B + "Axis"], x = d[B] * w.transA;
- if (w && !w.isLog) {
- var a = Math.max(0, A[b] - x);
- w = Math.min(w.len, A[b] + x), C = 1e4 * Math.sin(O + C * u), A[b] = a + (w - a) * (C - Math.floor(C)), B === "x" && (A.clientX = A.plotX);
- }
- }
- });
- });
- }, S.prototype.drawGraph = function() {
- this.options.lineWidth ? R.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, S.defaultOptions = N(j.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
- headerFormat: '<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',
- pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
- } }), S;
- }(j), F(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), U(Z, "afterTranslate", function() {
- this.applyJitter();
- }), I.registerSeriesType("scatter", Z), Z;
- }), E(l, "Series/CenteredUtilities.js", [l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.deg2rad, H = I.isNumber, U = I.pick, F = I.relativeLength, N;
- return function(R) {
- R.getCenter = function() {
- var S = this.options, v = this.chart, d = 2 * (S.slicedOffset || 0), u = v.plotWidth - 2 * d, A = v.plotHeight - 2 * d, O = S.center, B = Math.min(u, A), C = S.size, b = S.innerSize || 0;
- for (typeof C == "string" && (C = parseFloat(C)), typeof b == "string" && (b = parseFloat(b)), S = [U(O[0], "50%"), U(O[1], "50%"), U(C && 0 > C ? void 0 : S.size, "100%"), U(b && 0 > b ? void 0 : S.innerSize || 0, "0%")], !v.angular || this instanceof j || (S[3] = 0), O = 0; 4 > O; ++O)
- C = S[O], v = 2 > O || O === 2 && /%$/.test(C), S[O] = F(C, [u, A, B, S[2]][O]) + (v ? d : 0);
- return S[3] > S[2] && (S[3] = S[2]), S;
- }, R.getStartAndEndRadians = function(S, v) {
- return S = H(S) ? S : 0, v = H(v) && v > S && 360 > v - S ? v : S + 360, { start: Z * (S + -90), end: Z * (v + -90) };
- };
- }(N || (N = {})), N;
- }), E(l, "Series/Pie/PiePoint.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var v = function(d, u) {
- return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, O) {
- A.__proto__ = O;
- } || function(A, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (A[B] = O[B]);
- }, v(d, u);
- };
- return function(d, u) {
- function A() {
- this.constructor = d;
- }
- v(d, u), d.prototype = u === null ? Object.create(u) : (A.prototype = u.prototype, new A());
- };
- }(), H = y.setAnimation, U = I.addEvent, F = I.defined;
- y = I.extend;
- var N = I.isNumber, R = I.pick, S = I.relativeLength;
- return j = function(v) {
- function d() {
- var u = v !== null && v.apply(this, arguments) || this;
- return u.labelDistance = void 0, u.options = void 0, u.series = void 0, u;
- }
- return Z(d, v), d.prototype.getConnectorPath = function() {
- var u = this.labelPosition, A = this.series.options.dataLabels, O = this.connectorShapes, B = A.connectorShape;
- return O[B] && (B = O[B]), B.call(this, { x: u.final.x, y: u.final.y, alignment: u.alignment }, u.connectorPosition, A);
- }, d.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, d.prototype.haloPath = function(u) {
- var A = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(A.x, A.y, A.r + u, A.r + u, { innerR: A.r - 1, start: A.start, end: A.end });
- }, d.prototype.init = function() {
- var u = this;
- v.prototype.init.apply(
- this,
- arguments
- ), this.name = R(this.name, "Slice");
- var A = function(O) {
- u.slice(O.type === "select");
- };
- return U(this, "select", A), U(this, "unselect", A), this;
- }, d.prototype.isValid = function() {
- return N(this.y) && 0 <= this.y;
- }, d.prototype.setVisible = function(u, A) {
- var O = this, B = this.series, C = B.chart, b = B.options.ignoreHiddenPoint;
- A = R(A, b), u !== this.visible && (this.visible = this.options.visible = u = typeof u > "u" ? !this.visible : u, B.options.data[B.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
- O[w] && O[w][u ? "show" : "hide"](u);
- }), this.legendItem && C.legend.colorizeItem(this, u), u || this.state !== "hover" || this.setState(""), b && (B.isDirty = !0), A && C.redraw());
- }, d.prototype.slice = function(u, A, O) {
- var B = this.series;
- H(O, B.chart), R(A, !0), this.sliced = this.options.sliced = F(u) ? u : !this.sliced, B.options.data[B.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, d;
- }(j), y(j.prototype, { connectorShapes: { fixedOffset: function(v, d, u) {
- var A = d.breakAt;
- return d = d.touchingSliceAt, [["M", v.x, v.y], u.softConnector ? ["C", v.x + (v.alignment === "left" ? -5 : 5), v.y, 2 * A.x - d.x, 2 * A.y - d.y, A.x, A.y] : ["L", A.x, A.y], ["L", d.x, d.y]];
- }, straight: function(v, d) {
- return d = d.touchingSliceAt, [["M", v.x, v.y], ["L", d.x, d.y]];
- }, crookedLine: function(v, d, u) {
- d = d.touchingSliceAt;
- var A = this.series, O = A.center[0], B = A.chart.plotWidth, C = A.chart.plotLeft;
- A = v.alignment;
- var b = this.shapeArgs.r;
- return u = S(u.crookDistance, 1), B = A === "left" ? O + b + (B + C - O - b) * (1 - u) : C + (O - b) * u, u = ["L", B, v.y], O = !0, (A === "left" ? B > v.x || B < d.x : B < v.x || B > d.x) && (O = !1), v = [["M", v.x, v.y]], O && v.push(u), v.push(["L", d.x, d.y]), v;
- } } }), j;
- }), E(l, "Series/Pie/PieSeries.js", [l["Series/CenteredUtilities.js"], l["Series/Column/ColumnSeries.js"], l["Core/Globals.js"], l["Core/Legend/LegendSymbol.js"], l["Series/Pie/PiePoint.js"], l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, N, R) {
- var S = this && this.__extends || function() {
- var b = function(w, x) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
- a.__proto__ = c;
- } || function(a, c) {
- for (var p in c)
- c.hasOwnProperty(p) && (a[p] = c[p]);
- }, b(w, x);
- };
- return function(w, x) {
- function a() {
- this.constructor = w;
- }
- b(w, x), w.prototype = x === null ? Object.create(x) : (a.prototype = x.prototype, new a());
- };
- }(), v = y.getStartAndEndRadians;
- I = I.noop;
- var d = R.clamp, u = R.extend, A = R.fireEvent, O = R.merge, B = R.pick, C = R.relativeLength;
- return R = function(b) {
- function w() {
- var x = b !== null && b.apply(this, arguments) || this;
- return x.center = void 0, x.data = void 0, x.maxLabelDistance = void 0, x.options = void 0, x.points = void 0, x;
- }
- return S(w, b), w.prototype.animate = function(x) {
- var a = this, c = a.points, p = a.startAngleRad;
- x || c.forEach(function(i) {
- var h = i.graphic, o = i.shapeArgs;
- h && o && (h.attr({ r: B(i.startR, a.center && a.center[3] / 2), start: p, end: p }), h.animate({ r: o.r, start: o.start, end: o.end }, a.options.animation));
- });
- }, w.prototype.drawEmpty = function() {
- var x = this.startAngleRad, a = this.endAngleRad, c = this.options;
- if (this.total === 0 && this.center) {
- var p = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, x, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: N.arc(p, i, this.center[2] / 2, 0, { start: x, end: a, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, w.prototype.drawPoints = function() {
- var x = this.chart.renderer;
- this.points.forEach(function(a) {
- a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = x[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
- });
- }, w.prototype.generatePoints = function() {
- b.prototype.generatePoints.call(this), this.updateTotals();
- }, w.prototype.getX = function(x, a, c) {
- var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
- return x = Math.asin(d((x - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(x) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, w.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, w.prototype.redrawPoints = function() {
- var x = this, a = x.chart, c = a.renderer, p = x.options.shadow, i, h, o, t;
- this.drawEmpty(), !p || x.shadowGroup || a.styledMode || (x.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(x.group)), x.points.forEach(function(s) {
- var n = {};
- if (h = s.graphic, !s.isNull && h) {
- var T = void 0;
- t = s.shapeArgs, i = s.getTranslate(), a.styledMode || (T = s.shadowGroup, p && !T && (T = s.shadowGroup = c.g("shadow").add(x.shadowGroup)), T && T.attr(i), o = x.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (h.setRadialReference(x.center).attr(t).attr(i), a.styledMode || h.attr(o).attr({ "stroke-linejoin": "round" }).shadow(p, T), s.delayedRendering = !1) : (h.setRadialReference(x.center), a.styledMode || O(!0, n, o), O(!0, n, t, i), h.animate(n)), h.attr({ visibility: s.visible ? "inherit" : "hidden" }), h.addClass(s.getClassName(), !0);
- } else
- h && (s.graphic = h.destroy());
- });
- }, w.prototype.sortByAngle = function(x, a) {
- x.sort(function(c, p) {
- return typeof c.angle < "u" && (p.angle - c.angle) * a;
- });
- }, w.prototype.translate = function(x) {
- this.generatePoints();
- var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = v(a.startAngle, a.endAngle), h = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - h;
- var o = this.points, t = a.dataLabels.distance;
- a = a.ignoreHiddenPoint;
- var s = o.length, n, T = 0;
- for (x || (this.center = x = this.getCenter()), n = 0; n < s; n++) {
- var _ = o[n], D = h + T * i;
- !_.isValid() || a && !_.visible || (T += _.percentage / 100);
- var W = h + T * i, P = { x: x[0], y: x[1], r: x[2] / 2, innerR: x[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- _.shapeType = "arc", _.shapeArgs = P, _.labelDistance = B(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = C(_.labelDistance, P.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), W = (W + D) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(W) * c), translateY: Math.round(Math.sin(W) * c) }, P = Math.cos(W) * x[2] / 2;
- var X = Math.sin(W) * x[2] / 2;
- _.tooltipPos = [x[0] + 0.7 * P, x[1] + 0.7 * X], _.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, _.angle = W, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: x[0] + P + Math.cos(W) * _.labelDistance, y: x[1] + X + Math.sin(W) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: x[0] + P + Math.cos(W) * D, y: x[1] + X + Math.sin(W) * D }, touchingSliceAt: { x: x[0] + P, y: x[1] + X } } };
- }
- A(this, "afterTranslate");
- }, w.prototype.updateTotals = function() {
- var x = this.points, a = x.length, c = this.options.ignoreHiddenPoint, p, i = 0;
- for (p = 0; p < a; p++) {
- var h = x[p];
- !h.isValid() || c && !h.visible || (i += h.y);
- }
- for (this.total = i, p = 0; p < a; p++)
- h = x[p], h.percentage = 0 < i && (h.visible || !c) ? h.y / i * 100 : 0, h.total = i;
- }, w.defaultOptions = O(U.defaultOptions, {
- center: [null, null],
- clip: !1,
- colorByPoint: !0,
- dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
- return this.point.isNull ? void 0 : this.point.name;
- }, softConnector: !0, x: 0 },
- fillColor: void 0,
- ignoreHiddenPoint: !0,
- inactiveOtherPoints: !0,
- legendType: "point",
- marker: null,
- size: null,
- showInLegend: !1,
- slicedOffset: 10,
- stickyTracking: !1,
- tooltip: { followPointer: !0 },
- borderColor: "#ffffff",
- borderWidth: 1,
- lineWidth: void 0,
- states: { hover: { brightness: 0.1 } }
- }), w;
- }(U), u(R.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: j.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: j.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", R), R;
- }), E(l, "Series/Pie/PieDataLabel.js", [
- l["Core/Series/DataLabel.js"],
- l["Core/Globals.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H) {
- var U = j.noop, F = I.distribute, N = Z.series, R = H.arrayMax, S = H.clamp, v = H.defined, d = H.merge, u = H.pick, A = H.relativeLength, O;
- return function(B) {
- function C() {
- var c = this, p = c.data, i = c.chart, h = c.options.dataLabels || {}, o = h.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, T = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, W = _[1], P = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, Y, V, Q, k, G, z, $, q, it, et;
- c.visible && (h.enabled || c._hasPointLabels) && (p.forEach(function(nt) {
- nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
- }), N.prototype.drawDataLabels.apply(c), p.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (P[nt.half].push(nt), nt.dataLabel._pos = null, !v(h.style.width) && !v(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > T && (nt.dataLabel.css({ width: Math.round(0.7 * T) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), P.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
- var ht = Math.max(0, W - D - c.maxLabelDistance), at = Math.min(W + D + c.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - D - J.labelDistance), J.bottom = Math.min(W + D + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
- }), ht = at + dt - ht, F(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], k = m.labelPosition, V = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", $ = ht = k.natural.y, gt && v(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, $ = g.radialDistributionY(m))), delete m.positionIndex, h.justify)
- z = g.justify(m, D, _);
- else
- switch (h.alignTo) {
- case "connectors":
- z = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- z = g.alignToPlotEdges(V, rt, t, n);
- break;
- default:
- z = g.radialDistributionX(c, m, $, ht);
- }
- V._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, V._pos = { x: z + u(et.x, h.x) + ({ left: o, right: -o }[k.alignment] || 0), y: $ + u(et.y, h.y) - 10 }, k.final.x = z, k.final.y = $, u(h.crop, !0) && (Q = V.getBBox().width, ht = null, z - Q < o && rt === 1 ? (ht = Math.round(Q - z + o), X[3] = Math.max(ht, X[3])) : z + Q > t - o && rt === 0 && (ht = Math.round(z + Q - t + o), X[1] = Math.max(ht, X[1])), 0 > $ - G / 2 ? X[0] = Math.max(Math.round(-$ + G / 2), X[0]) : $ + G / 2 > s && (X[2] = Math.max(Math.round($ + G / 2 - s), X[2])), V.sideOverflow = ht);
- }
- }
- }), R(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = d(h, nt.options.dataLabels), L = u(et.connectorWidth, 1)) {
- var rt;
- Y = nt.connector, (V = nt.dataLabel) && V._pos && nt.visible && 0 < nt.labelDistance ? (q = V._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
- }
- }));
- }
- function b() {
- this.points.forEach(function(c) {
- var p = c.dataLabel, i;
- p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
- }, this);
- }
- function w(c) {
- var p = this.center, i = this.options, h = i.center, o = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (h[0] !== null)
- var s = Math.max(p[2] - Math.max(c[1], c[3]), o);
- else
- s = Math.max(p[2] - c[1] - c[3], o), p[0] += (c[3] - c[1]) / 2;
- h[1] !== null ? s = S(s, o, p[2] - Math.max(c[0], c[2])) : (s = S(s, o, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), s < p[2] ? (p[2] = s, p[3] = Math.min(A(i.innerSize || 0, s), s), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var x = [], a = { radialDistributionY: function(c) {
- return c.top + c.distributeBox.pos;
- }, radialDistributionX: function(c, p, i, h) {
- return c.getX(i < p.top + 2 || i > p.bottom - 2 ? h : i, p.half, p);
- }, justify: function(c, p, i) {
- return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
- }, alignToPlotEdges: function(c, p, i, h) {
- return c = c.getBBox().width, p ? c + h : i - c - h;
- }, alignToConnectors: function(c, p, i, h) {
- var o = 0, t;
- return c.forEach(function(s) {
- t = s.dataLabel.getBBox().width, t > o && (o = t);
- }), p ? o + h : i - o - h;
- } };
- B.compose = function(c) {
- y.compose(N), x.indexOf(c) === -1 && (x.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = U, c.drawDataLabels = C, c.placeDataLabels = b, c.verifyDataLabelOverflow = w);
- };
- }(O || (O = {})), O;
- }), E(l, "Extensions/OverlappingDataLabels.js", [l["Core/Chart/Chart.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(S, v) {
- var d = !1;
- if (S) {
- var u = S.newOpacity;
- S.oldOpacity !== u && (S.alignAttr && S.placed ? (S[u ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), d = !0, S.alignAttr.opacity = u, S[S.isOld ? "animate" : "attr"](S.alignAttr, null, function() {
- v.styledMode || S.css({ pointerEvents: u ? "auto" : "none" });
- }), H(v, "afterHideOverlappingLabel")) : S.attr({ opacity: u })), S.isOld = !0;
- }
- return d;
- }
- var Z = j.addEvent, H = j.fireEvent, U = j.isArray, F = j.isNumber, N = j.objectEach, R = j.pick;
- Z(y, "render", function() {
- var S = this, v = [];
- (this.labelCollectors || []).forEach(function(d) {
- v = v.concat(d());
- }), (this.yAxis || []).forEach(function(d) {
- d.stacking && d.options.stackLabels && !d.options.stackLabels.allowOverlap && N(d.stacking.stacks, function(u) {
- N(u, function(A) {
- A.label && A.label.visibility !== "hidden" && v.push(A.label);
- });
- });
- }), (this.series || []).forEach(function(d) {
- var u = d.options.dataLabels;
- d.visible && (u.enabled !== !1 || d._hasPointLabels) && (u = function(A) {
- return A.forEach(function(O) {
- O.visible && (U(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(B) {
- var C = B.options;
- B.labelrank = R(C.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), C.allowOverlap ? (B.oldOpacity = B.opacity, B.newOpacity = 1, I(B, S)) : v.push(B);
- });
- });
- }, u(d.nodes || []), u(d.points));
- }), this.hideOverlappingLabels(v);
- }), y.prototype.hideOverlappingLabels = function(S) {
- var v = this, d = S.length, u = v.renderer, A, O, B, C = !1, b = function(a) {
- var c, p = a.box ? 0 : a.padding || 0, i = c = 0, h;
- if (a && (!a.alignAttr || a.placed)) {
- var o = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
- a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = u.fontMetrics(null, a.element).h);
- var s = a.width - 2 * p;
- return (h = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +h * s : F(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: o.x + (t.translateX || 0) + p - (i || 0), y: o.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
- }
- };
- for (O = 0; O < d; O++)
- (A = S[O]) && (A.oldOpacity = A.opacity, A.newOpacity = 1, A.absoluteBox = b(A));
- for (S.sort(function(a, c) {
- return (c.labelrank || 0) - (a.labelrank || 0);
- }), O = 0; O < d; O++) {
- var w = (b = S[O]) && b.absoluteBox;
- for (A = O + 1; A < d; ++A) {
- var x = (B = S[A]) && B.absoluteBox;
- !w || !x || b === B || b.newOpacity === 0 || B.newOpacity === 0 || x.x >= w.x + w.width || x.x + x.width <= w.x || x.y >= w.y + w.height || x.y + x.height <= w.y || ((b.labelrank < B.labelrank ? b : B).newOpacity = 0);
- }
- }
- S.forEach(function(a) {
- I(a, v) && (C = !0);
- }), C && H(v, "afterHideAllOverlappingLabels");
- };
- }), E(
- l,
- "Core/Responsive.js",
- [l["Core/Utilities.js"]],
- function(y) {
- var j = y.extend, I = y.find, Z = y.isArray, H = y.isObject, U = y.merge, F = y.objectEach, N = y.pick, R = y.splat, S = y.uniqueKey, v;
- return function(d) {
- var u = [];
- d.compose = function(O) {
- return u.indexOf(O) === -1 && (u.push(O), j(O.prototype, A.prototype)), O;
- };
- var A = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(B) {
- function C(x, a, c, p) {
- var i;
- F(x, function(h, o) {
- if (!p && -1 < b.collectionsWithUpdate.indexOf(o) && a[o])
- for (h = R(h), c[o] = [], i = 0; i < Math.max(h.length, a[o].length); i++)
- a[o][i] && (h[i] === void 0 ? c[o][i] = a[o][i] : (c[o][i] = {}, C(h[i], a[o][i], c[o][i], p + 1)));
- else
- H(h) ? (c[o] = Z(h) ? [] : {}, C(h, a[o] || {}, c[o], p + 1)) : c[o] = typeof a[o] > "u" ? null : a[o];
- });
- }
- var b = this, w = {};
- return C(B, this.options, w, 0), w;
- }, O.prototype.matchResponsiveRule = function(B, C) {
- var b = B.condition;
- (b.callback || function() {
- return this.chartWidth <= N(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= N(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= N(b.minWidth, 0) && this.chartHeight >= N(b.minHeight, 0);
- }).call(this) && C.push(B._id);
- }, O.prototype.setResponsive = function(B, C) {
- var b = this, w = this.options.responsive, x = this.currentResponsive, a = [];
- !C && w && w.rules && w.rules.forEach(function(c) {
- typeof c._id > "u" && (c._id = S()), b.matchResponsiveRule(c, a);
- }, this), C = U.apply(void 0, a.map(function(c) {
- return I((w || {}).rules || [], function(p) {
- return p._id === c;
- });
- }).map(function(c) {
- return c && c.chartOptions;
- })), C.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (x && x.ruleIds) && (x && this.update(x.undoOptions, B, !0), a ? (x = this.currentOptions(C), x.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: C, undoOptions: x }, this.update(C, B, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(v || (v = {})), v;
- }
- ), E(l, "masters/highcharts.src.js", [
- l["Core/Globals.js"],
- l["Core/Utilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Animation/Fx.js"],
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Renderer/HTML/AST.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Renderer/HTML/HTMLElement.js"],
- l["Core/Renderer/HTML/HTMLRenderer.js"],
- l["Core/Axis/Axis.js"],
- l["Core/Axis/DateTimeAxis.js"],
- l["Core/Axis/LogarithmicAxis.js"],
- l["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Tooltip.js"],
- l["Core/Series/Point.js"],
- l["Core/Pointer.js"],
- l["Core/MSPointer.js"],
- l["Core/Legend/Legend.js"],
- l["Core/Chart/Chart.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Series/Column/ColumnSeries.js"],
- l["Series/Column/ColumnDataLabel.js"],
- l["Series/Pie/PieSeries.js"],
- l["Series/Pie/PieDataLabel.js"],
- l["Core/Series/DataLabel.js"],
- l["Core/Responsive.js"],
- l["Core/Color/Color.js"],
- l["Core/Time.js"]
- ], function(y, j, I, Z, H, U, F, N, R, S, v, d, u, A, O, B, C, b, w, x, a, c, p, i, h, o, t, s, n, T, _, D, W) {
- return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = Z.timers, y.AST = U, y.Axis = u, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = B, y.Point = w, y.Pointer = a.isRequired() ? a : x, y.Series = i, y.SVGElement = R, y.SVGRenderer = S, y.Tick = C, y.Time = W, y.Tooltip = b, y.Color = D, y.color = D.parse, d.compose(S), v.compose(R), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = j.addEvent, y.arrayMax = j.arrayMax, y.arrayMin = j.arrayMin, y.attr = j.attr, y.clearTimeout = j.clearTimeout, y.correctFloat = j.correctFloat, y.createElement = j.createElement, y.css = j.css, y.defined = j.defined, y.destroyObjectProperties = j.destroyObjectProperties, y.discardElement = j.discardElement, y.distribute = N.distribute, y.erase = j.erase, y.error = j.error, y.extend = j.extend, y.extendClass = j.extendClass, y.find = j.find, y.fireEvent = j.fireEvent, y.getMagnitude = j.getMagnitude, y.getStyle = j.getStyle, y.inArray = j.inArray, y.isArray = j.isArray, y.isClass = j.isClass, y.isDOMElement = j.isDOMElement, y.isFunction = j.isFunction, y.isNumber = j.isNumber, y.isObject = j.isObject, y.isString = j.isString, y.keys = j.keys, y.merge = j.merge, y.normalizeTickInterval = j.normalizeTickInterval, y.objectEach = j.objectEach, y.offset = j.offset, y.pad = j.pad, y.pick = j.pick, y.pInt = j.pInt, y.relativeLength = j.relativeLength, y.removeEvent = j.removeEvent, y.seriesType = h.seriesType, y.splat = j.splat, y.stableSort = j.stableSort, y.syncTimeout = j.syncTimeout, y.timeUnits = j.timeUnits, y.uniqueKey = j.uniqueKey, y.useSerialIds = j.useSerialIds, y.wrap = j.wrap, t.compose(o), T.compose(i), A.compose(u), O.compose(u), n.compose(s), B.compose(u), _.compose(p), y;
- }), l["masters/highcharts.src.js"]._modules = l, l["masters/highcharts.src.js"];
- });
- })(O0);
- const Qn = dl;
- var fl = {}, L0 = {
- get exports() {
- return fl;
- },
- set exports(r) {
- fl = r;
- }
- };
- (function(r) {
- (function(f) {
- r.exports ? (f.default = f, r.exports = f) : f(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(f) {
- function E(l, y, j, I) {
- l.hasOwnProperty(y) || (l[y] = I.apply(null, j));
- }
- f = f ? f._modules : {}, E(f, "Extensions/Pane.js", [
- f["Core/Chart/Chart.js"],
- f["Series/CenteredUtilities.js"],
- f["Core/Globals.js"],
- f["Core/Pointer.js"],
- f["Core/Utilities.js"]
- ], function(l, y, j, I, Z) {
- function H(v, d, u) {
- return Math.sqrt(Math.pow(v - u[0], 2) + Math.pow(d - u[1], 2)) <= u[2] / 2;
- }
- var U = Z.addEvent, F = Z.extend, N = Z.merge, R = Z.pick, S = Z.splat;
- return l.prototype.collectionsWithUpdate.push("pane"), Z = function() {
- function v(d, u) {
- this.options = this.chart = this.center = this.background = void 0, this.coll = "pane", this.defaultOptions = { center: ["50%", "50%"], size: "85%", innerSize: "0%", startAngle: 0 }, this.defaultBackgroundOptions = { shape: "circle", borderWidth: 1, borderColor: "#cccccc", backgroundColor: { linearGradient: {
- x1: 0,
- y1: 0,
- x2: 0,
- y2: 1
- }, stops: [[0, "#ffffff"], [1, "#e6e6e6"]] }, from: -Number.MAX_VALUE, innerRadius: 0, to: Number.MAX_VALUE, outerRadius: "105%" }, this.init(d, u);
- }
- return v.prototype.init = function(d, u) {
- this.chart = u, this.background = [], u.pane.push(this), this.setOptions(d);
- }, v.prototype.setOptions = function(d) {
- this.options = N(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, d);
- }, v.prototype.render = function() {
- var d = this.options, u = this.options.background, A = this.chart.renderer;
- if (this.group || (this.group = A.g("pane-group").attr({ zIndex: d.zIndex || 0 }).add()), this.updateCenter(), u)
- for (u = S(u), d = Math.max(u.length, this.background.length || 0), A = 0; A < d; A++)
- u[A] && this.axis ? this.renderBackground(N(this.defaultBackgroundOptions, u[A]), A) : this.background[A] && (this.background[A] = this.background[A].destroy(), this.background.splice(A, 1));
- }, v.prototype.renderBackground = function(d, u) {
- var A = "animate", O = { class: "highcharts-pane " + (d.className || "") };
- this.chart.styledMode || F(O, { fill: d.backgroundColor, stroke: d.borderColor, "stroke-width": d.borderWidth }), this.background[u] || (this.background[u] = this.chart.renderer.path().add(this.group), A = "attr"), this.background[u][A]({ d: this.axis.getPlotBandPath(d.from, d.to, d) }).attr(O);
- }, v.prototype.updateCenter = function(d) {
- this.center = (d || this.axis || {}).center = y.getCenter.call(this);
- }, v.prototype.update = function(d, u) {
- N(!0, this.options, d), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(A) {
- A.pane === this && (A.pane = null, A.update({}, u));
- }, this);
- }, v;
- }(), l.prototype.getHoverPane = function(v) {
- var d = this, u;
- return v && d.pane.forEach(function(A) {
- var O = v.chartX - d.plotLeft, B = v.chartY - d.plotTop;
- H(d.inverted ? B : O, d.inverted ? O : B, A.center) && (u = A);
- }), u;
- }, U(l, "afterIsInsidePlot", function(v) {
- this.polar && (v.isInsidePlot = this.pane.some(function(d) {
- return H(v.x, v.y, d.center);
- }));
- }), U(I, "beforeGetHoverData", function(v) {
- var d = this.chart;
- d.polar ? (d.hoverPane = d.getHoverPane(v), v.filter = function(u) {
- return u.visible && !(!v.shared && u.directTouch) && R(u.options.enableMouseTracking, !0) && (!d.hoverPane || u.xAxis.pane === d.hoverPane);
- }) : d.hoverPane = void 0;
- }), U(
- I,
- "afterGetHoverData",
- function(v) {
- var d = this.chart;
- v.hoverPoint && v.hoverPoint.plotX && v.hoverPoint.plotY && d.hoverPane && !H(v.hoverPoint.plotX, v.hoverPoint.plotY, d.hoverPane.center) && (v.hoverPoint = void 0);
- }
- ), j.Pane = Z, j.Pane;
- }), E(f, "Core/Axis/RadialAxis.js", [f["Core/Axis/AxisDefaults.js"], f["Core/DefaultOptions.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = y.defaultOptions, H = j.noop, U = I.addEvent, F = I.correctFloat, N = I.defined, R = I.extend, S = I.fireEvent, v = I.merge, d = I.pick, u = I.relativeLength, A = I.wrap, O;
- return function(B) {
- function C() {
- this.autoConnect = this.isCircular && typeof d(this.userMax, this.options.max) > "u" && F(this.endAngleRad - this.startAngleRad) === F(2 * Math.PI), !this.isCircular && this.chart.inverted && this.max++, this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
- }
- function b() {
- var $ = this;
- return function() {
- if ($.isRadial && $.tickPositions && $.options.labels && $.options.labels.allowOverlap !== !0)
- return $.tickPositions.map(function(q) {
- return $.ticks[q] && $.ticks[q].label;
- }).filter(function(q) {
- return !!q;
- });
- };
- }
- function w() {
- return H;
- }
- function x($, q, it) {
- var et = this.pane.center, nt = $.value;
- if (this.isCircular) {
- if (N(nt))
- $.point && (rt = $.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate($.point.rectPlotY, !0) : $.point.x));
- else {
- var rt = $.chartX || 0, ct = $.chartY || 0;
- nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
- }
- $ = this.getPosition(nt), rt = $.x, ct = $.y;
- } else
- N(nt) || (rt = $.chartX, ct = $.chartY), N(rt) && N(ct) && (it = et[1] + this.chart.plotTop, nt = this.translate(Math.min(Math.sqrt(Math.pow(rt - q, 2) + Math.pow(ct - it, 2)), et[2] / 2) - et[3] / 2, !0));
- return [nt, rt || 0, ct || 0];
- }
- function a($, q, it) {
- $ = this.pane.center;
- var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = d(q, $[2] / 2 - this.offset);
- return typeof it > "u" && (it = this.horiz ? 0 : this.center && -this.center[3] / 2), it && (ct += it), this.isCircular || typeof q < "u" ? (q = this.chart.renderer.symbols.arc(nt + $[0], rt + $[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + $[0]], q.yBounds = [rt + $[1] - ct]) : (q = this.postTranslate(this.angleRad, ct), q = [["M", this.center[0] + et.plotLeft, this.center[1] + et.plotTop], ["L", q.x, q.y]]), q;
- }
- function c() {
- this.constructor.prototype.getOffset.call(this), this.chart.axisOffset[this.side] = 0;
- }
- function p($, q, it) {
- var et = this.chart, nt = function(yt) {
- if (typeof yt == "string") {
- var vt = parseInt(yt, 10);
- return J.test(yt) && (vt = vt * gt / 100), vt;
- }
- return yt;
- }, rt = this.center, ct = this.startAngleRad, gt = rt[2] / 2, dt = Math.min(this.offset, 0), ht = this.left || 0, at = this.top || 0, J = /%$/, tt = this.isCircular, ot = d(nt(it.outerRadius), gt), lt = nt(it.innerRadius);
- if (nt = d(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
- dt = this.getPlotLinePath({ value: $ }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
- else {
- if ($ = Math.max($, this.min), q = Math.min(q, this.max), $ = this.translate($), q = this.translate(q), tt || (ot = $ || 0, lt = q || 0), it.shape !== "circle" && tt)
- it = ct + ($ || 0), ct += q || 0;
- else {
- it = -Math.PI / 2, ct = 1.5 * Math.PI;
- var pt = !0;
- }
- ot -= dt, dt = et.renderer.symbols.arc(ht + rt[0], at + rt[1], ot, ot, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: d(lt, ot - (nt - dt)), open: pt }), tt && (tt = (ct + it) / 2, ht = ht + rt[0] + rt[2] / 2 * Math.cos(tt), dt.xBounds = tt > -Math.PI / 2 && tt < Math.PI / 2 ? [ht, et.plotWidth] : [0, ht], dt.yBounds = [at + rt[1] + rt[2] / 2 * Math.sin(tt)], dt.yBounds[0] += tt > -Math.PI && 0 > tt || tt > Math.PI ? -10 : 10);
- }
- return dt;
- }
- function i($) {
- var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = $.reverse, ct = this.pane.options.background ? this.pane.options.background[0] || this.pane.options.background : {}, gt = ct.innerRadius || "0%", dt = ct.outerRadius || "100%", ht = it[0] + et.plotLeft, at = it[1] + et.plotTop, J = this.height, tt = $.isCrosshair;
- ct = it[3] / 2;
- var ot = $.value, lt, pt = this.getPosition(ot), yt = pt.x;
- if (pt = pt.y, tt && (pt = this.getCrosshairPosition($, ht, at), ot = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
- ot = Math.sqrt(Math.pow(yt - ht, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? u(gt, 1) : gt / ot, et = typeof dt == "string" ? u(dt, 1) : dt / ot, it && ct && (ct /= ot, rt < ct && (rt = ct), et < ct && (et = ct)), it = [["M", ht + rt * (yt - ht), at - rt * (at - pt)], ["L", yt - (1 - et) * (yt - ht), pt + (1 - et) * (at - pt)]];
- else if ((ot = this.translate(ot)) && (0 > ot || ot > J) && (ot = 0), this.options.gridLineInterpolation === "circle")
- it = this.getLinePath(0, ot, ct);
- else if (it = [], et[nt ? "yAxis" : "xAxis"].forEach(function(vt) {
- vt.pane === q.pane && (lt = vt);
- }), lt)
- for (ht = lt.tickPositions, lt.autoConnect && (ht = ht.concat([ht[0]])), rt && (ht = ht.slice().reverse()), ot && (ot += ct), at = 0; at < ht.length; at++)
- ct = lt.getPosition(ht[at], ot), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
- return it;
- }
- function h($, q) {
- return $ = this.translate($), this.postTranslate(this.isCircular ? $ : this.angleRad, d(this.isCircular ? q : 0 > $ ? 0 : $, this.center[2] / 2) - this.offset);
- }
- function o() {
- var $ = this.center, q = this.chart, it = this.options.title;
- return { x: q.plotLeft + $[0] + (it.x || 0), y: q.plotTop + $[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * $[2] + (it.y || 0) };
- }
- function t($) {
- $.beforeSetTickPositions = C, $.createLabelCollector = b, $.getCrosshairPosition = x, $.getLinePath = a, $.getOffset = c, $.getPlotBandPath = p, $.getPlotLinePath = i, $.getPosition = h, $.getTitlePosition = o, $.postTranslate = X, $.setAxisSize = m, $.setAxisTranslation = L, $.setOptions = Y;
- }
- function s() {
- var $ = this.chart, q = this.options, it = this.pane, et = it && it.options;
- $.angular && this.isXAxis || !it || !$.angular && !$.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (d(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
- }
- function n($) {
- this.isRadial && ($.align = void 0, $.preventDefault());
- }
- function T() {
- if (this.chart && this.chart.labelCollectors) {
- var $ = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
- 0 <= $ && this.chart.labelCollectors.splice($, 1);
- }
- }
- function _($) {
- var q = this.chart, it = q.inverted, et = q.angular, nt = q.polar, rt = this.isXAxis, ct = this.coll, gt = et && rt, dt = q.options;
- $ = $.userOptions.pane || 0, $ = this.pane = q.pane && q.pane[$];
- var ht;
- ct === "colorAxis" ? this.isRadial = !1 : (et ? (gt ? (this.isHidden = !0, this.createLabelCollector = w, this.getOffset = H, this.render = this.redraw = g, this.setTitle = this.setCategories = this.setScale = H) : t(this), (ht = !rt) && (this.defaultPolarOptions = G)) : nt && (t(this), this.defaultPolarOptions = (ht = this.horiz) ? k : v(ct === "xAxis" ? l.defaultXAxisOptions : l.defaultYAxisOptions, z), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = l.defaultYAxisOptions.stackLabels, this.defaultPolarOptions.reversedStacks = !0)), et || nt ? (this.isRadial = !0, dt.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()), this.labelCollector && q.labelCollectors.push(this.labelCollector)) : this.isRadial = !1, $ && ht && ($.axis = this), this.isCircular = ht);
- }
- function D() {
- this.isRadial && this.beforeSetTickPositions();
- }
- function W($) {
- var q = this.label;
- if (q) {
- var it = this.axis, et = q.getBBox(), nt = it.options.labels, rt = (it.translate(this.pos) + it.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, ct = Math.round(rt), gt = N(nt.y) ? 0 : 0.3 * -et.height, dt = nt.y, ht = 20, at = nt.align, J = "end", tt = 0 > ct ? ct + 360 : ct, ot = tt, lt = 0, pt = 0;
- if (it.isRadial) {
- var yt = it.getPosition(this.pos, it.center[2] / 2 + u(d(nt.distance, -25), it.center[2] / 2, -it.center[2] / 2));
- nt.rotation === "auto" ? q.attr({ rotation: rt }) : N(dt) || (dt = it.chart.renderer.fontMetrics(q.styles && q.styles.fontSize).b - et.height / 2), N(at) || (it.isCircular ? (et.width > it.len * it.tickInterval / (it.max - it.min) && (ht = 0), at = rt > ht && rt < 180 - ht ? "left" : rt > 180 + ht && rt < 360 - ht ? "right" : "center") : at = "center", q.attr({ align: at })), at === "auto" && it.tickPositions.length === 2 && it.isCircular && (90 < tt && 180 > tt ? tt = 180 - tt : 270 < tt && 360 >= tt && (tt = 540 - tt), 180 < ot && 360 >= ot && (ot = 360 - ot), (it.pane.options.startAngle === ct || it.pane.options.startAngle === ct + 360 || it.pane.options.startAngle === ct - 360) && (J = "start"), at = -90 <= ct && 90 >= ct || -360 <= ct && -270 >= ct || 270 <= ct && 360 >= ct ? J === "start" ? "right" : "left" : J === "start" ? "left" : "right", 70 < ot && 110 > ot && (at = "center"), 15 > tt || 180 <= tt && 195 > tt ? lt = 0.3 * et.height : 15 <= tt && 35 >= tt ? lt = J === "start" ? 0 : 0.75 * et.height : 195 <= tt && 215 >= tt ? lt = J === "start" ? 0.75 * et.height : 0 : 35 < tt && 90 >= tt ? lt = J === "start" ? 0.25 * -et.height : et.height : 215 < tt && 270 >= tt && (lt = J === "start" ? et.height : 0.25 * -et.height), 15 > ot ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < ot && 180 >= ot && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
- pt,
- lt + gt
- )), $.pos.x = yt.x + (nt.x || 0), $.pos.y = yt.y + (dt || 0);
- }
- }
- }
- function P($) {
- this.axis.getPosition && R($.pos, this.axis.getPosition(this.pos));
- }
- function X($, q) {
- var it = this.chart, et = this.center;
- return $ = this.startAngleRad + $, { x: it.plotLeft + et[0] + Math.cos($) * q, y: it.plotTop + et[1] + Math.sin($) * q };
- }
- function g() {
- this.isDirty = !1;
- }
- function m() {
- if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
- this.pane.updateCenter(this);
- var $ = this.center = this.pane.center.slice();
- if (this.isCircular)
- this.sector = this.endAngleRad - this.startAngleRad;
- else {
- var q = this.postTranslate(this.angleRad, $[3] / 2);
- $[0] = q.x - this.chart.plotLeft, $[1] = q.y - this.chart.plotTop;
- }
- this.len = this.width = this.height = ($[2] - $[3]) * d(this.sector, 1) / 2;
- }
- }
- function L() {
- this.constructor.prototype.setAxisTranslation.call(this), this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1), this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
- }
- function Y($) {
- $ = this.options = v(this.constructor.defaultOptions, this.defaultPolarOptions, Z[this.coll], $), $.plotBands || ($.plotBands = []), S(this, "afterSetOptions");
- }
- function V($, q, it, et, nt, rt, ct) {
- var gt = this.axis;
- return gt.isRadial ? ($ = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", $.x, $.y]) : q = $.call(this, q, it, et, nt, rt, ct), q;
- }
- var Q = [], k = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, G = {
- labels: { align: "center", x: 0, y: void 0 },
- minorGridLineWidth: 0,
- minorTickInterval: "auto",
- minorTickLength: 10,
- minorTickPosition: "inside",
- minorTickWidth: 1,
- tickLength: 10,
- tickPosition: "inside",
- tickWidth: 2,
- title: { rotation: 0 },
- zIndex: 2
- }, z = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
- B.compose = function($, q) {
- return Q.indexOf($) === -1 && (Q.push($), U($, "afterInit", s), U($, "autoLabelAlign", n), U($, "destroy", T), U($, "init", _), U($, "initialAxisTranslation", D)), Q.indexOf(q) === -1 && (Q.push(q), U(
- q,
- "afterGetLabelPosition",
- W
- ), U(q, "afterGetPosition", P), A(q.prototype, "getMarkPath", V)), $;
- };
- }(O || (O = {})), O;
- }), E(f, "Series/AreaRange/AreaRangePoint.js", [f["Series/Area/AreaSeries.js"], f["Core/Series/Point.js"], f["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), Z = y.prototype, H = j.defined, U = j.isNumber;
- return function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.high = void 0, R.low = void 0, R.options = void 0, R.plotHigh = void 0, R.plotLow = void 0, R.plotHighX = void 0, R.plotLowX = void 0, R.plotX = void 0, R.series = void 0, R;
- }
- return I(N, F), N.prototype.setState = function() {
- var R = this.state, S = this.series, v = S.chart.polar;
- H(this.plotHigh) || (this.plotHigh = S.yAxis.toPixels(
- this.high,
- !0
- )), H(this.plotLow) || (this.plotLow = this.plotY = S.yAxis.toPixels(this.low, !0)), S.stateMarkerGraphic && (S.lowerStateMarkerGraphic = S.stateMarkerGraphic, S.stateMarkerGraphic = S.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, v && (this.plotX = this.plotHighX), Z.setState.apply(this, arguments), this.state = R, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, v && (this.plotX = this.plotLowX), S.stateMarkerGraphic && (S.upperStateMarkerGraphic = S.stateMarkerGraphic, S.stateMarkerGraphic = S.lowerStateMarkerGraphic, S.lowerStateMarkerGraphic = void 0), Z.setState.apply(this, arguments);
- }, N.prototype.haloPath = function() {
- var R = this.series.chart.polar, S = [];
- return this.plotY = this.plotLow, R && (this.plotX = this.plotLowX), this.isInside && (S = Z.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, R && (this.plotX = this.plotHighX), this.isTopInside && (S = S.concat(Z.haloPath.apply(this, arguments))), S;
- }, N.prototype.isValid = function() {
- return U(this.low) && U(this.high);
- }, N;
- }(l.prototype.pointClass);
- }), E(
- f,
- "Series/AreaRange/AreaRangeSeries.js",
- [f["Series/AreaRange/AreaRangePoint.js"], f["Series/Area/AreaSeries.js"], f["Series/Column/ColumnSeries.js"], f["Core/Globals.js"], f["Core/Series/Series.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]],
- function(l, y, j, I, Z, H, U) {
- var F = this && this.__extends || function() {
- var B = function(C, b) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var a in x)
- x.hasOwnProperty(a) && (w[a] = x[a]);
- }, B(C, b);
- };
- return function(C, b) {
- function w() {
- this.constructor = C;
- }
- B(C, b), C.prototype = b === null ? Object.create(b) : (w.prototype = b.prototype, new w());
- };
- }(), N = y.prototype, R = j.prototype;
- j = I.noop;
- var S = Z.prototype, v = U.defined, d = U.extend, u = U.isArray, A = U.pick, O = U.merge;
- return Z = function(B) {
- function C() {
- var b = B !== null && B.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b.lowerStateMarkerGraphic = void 0, b.xAxis = void 0, b;
- }
- return F(C, B), C.prototype.toYData = function(b) {
- return [b.low, b.high];
- }, C.prototype.highToXY = function(b) {
- var w = this.chart, x = this.xAxis.postTranslate(b.rectPlotX || 0, this.yAxis.len - b.plotHigh);
- b.plotHighX = x.x - w.plotLeft, b.plotHigh = x.y - w.plotTop, b.plotLowX = b.plotX;
- }, C.prototype.translate = function() {
- var b = this, w = b.yAxis;
- N.translate.apply(b), b.points.forEach(function(x) {
- var a = x.high, c = x.plotY;
- x.isNull ? x.plotY = null : (x.plotLow = c, x.plotHigh = w.translate(b.dataModify ? b.dataModify.modifyValue(a) : a, 0, 1, 0, 1), b.dataModify && (x.yBottom = x.plotHigh));
- }), this.chart.polar && this.points.forEach(function(x) {
- b.highToXY(x), x.tooltipPos = [(x.plotHighX + x.plotLowX) / 2, (x.plotHigh + x.plotLow) / 2];
- });
- }, C.prototype.getGraphPath = function(b) {
- var w = [], x = [], a, c = N.getGraphPath, p = this.options, i = this.chart.polar, h = i && p.connectEnds !== !1, o = p.connectNulls, t = p.step;
- for (b = b || this.points, a = b.length; a--; ) {
- var s = b[a], n = i ? { plotX: s.rectPlotX, plotY: s.yBottom, doCurve: !1 } : { plotX: s.plotX, plotY: s.plotY, doCurve: !1 };
- s.isNull || h || o || b[a + 1] && !b[a + 1].isNull || x.push(n);
- var T = { polarPlotY: s.polarPlotY, rectPlotX: s.rectPlotX, yBottom: s.yBottom, plotX: A(
- s.plotHighX,
- s.plotX
- ), plotY: s.plotHigh, isNull: s.isNull };
- x.push(T), w.push(T), s.isNull || h || o || b[a - 1] && !b[a - 1].isNull || x.push(n);
- }
- return b = c.call(this, b), t && (t === !0 && (t = "left"), p.step = { left: "right", center: "center", right: "left" }[t]), w = c.call(this, w), x = c.call(this, x), p.step = t, p = [].concat(b, w), !this.chart.polar && x[0] && x[0][0] === "M" && (x[0] = ["L", x[0][1], x[0][2]]), this.graphPath = p, this.areaPath = b.concat(x), p.isArea = !0, p.xMap = b.xMap, this.areaPath.xMap = b.xMap, p;
- }, C.prototype.drawDataLabels = function() {
- var b = this.points, w = b.length, x, a = [], c = this.options.dataLabels, p, i = this.chart.inverted;
- if (c) {
- if (u(c))
- var h = c[0] || { enabled: !1 }, o = c[1] || { enabled: !1 };
- else
- h = d({}, c), h.x = c.xHigh, h.y = c.yHigh, o = d({}, c), o.x = c.xLow, o.y = c.yLow;
- if (h.enabled || this._hasPointLabels) {
- for (x = w; x--; )
- if (p = b[x]) {
- var t = h.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow;
- p.y = p.high, p._plotY = p.plotY, p.plotY = p.plotHigh, a[x] = p.dataLabel, p.dataLabel = p.dataLabelUpper, p.below = t, i ? h.align || (h.align = t ? "right" : "left") : h.verticalAlign || (h.verticalAlign = t ? "top" : "bottom");
- }
- for (this.options.dataLabels = h, S.drawDataLabels && S.drawDataLabels.apply(this, arguments), x = w; x--; )
- (p = b[x]) && (p.dataLabelUpper = p.dataLabel, p.dataLabel = a[x], delete p.dataLabels, p.y = p.low, p.plotY = p._plotY);
- }
- if (o.enabled || this._hasPointLabels) {
- for (x = w; x--; )
- (p = b[x]) && (t = o.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow, p.below = !t, i ? o.align || (o.align = t ? "left" : "right") : o.verticalAlign || (o.verticalAlign = t ? "bottom" : "top"));
- this.options.dataLabels = o, S.drawDataLabels && S.drawDataLabels.apply(this, arguments);
- }
- if (h.enabled)
- for (x = w; x--; )
- (p = b[x]) && (p.dataLabels = [p.dataLabelUpper, p.dataLabel].filter(function(s) {
- return !!s;
- }));
- this.options.dataLabels = c;
- }
- }, C.prototype.alignDataLabel = function() {
- R.alignDataLabel.apply(this, arguments);
- }, C.prototype.drawPoints = function() {
- var b = this.points.length, w;
- for (S.drawPoints.apply(this, arguments), w = 0; w < b; ) {
- var x = this.points[w];
- x.origProps = { plotY: x.plotY, plotX: x.plotX, isInside: x.isInside, negative: x.negative, zone: x.zone, y: x.y }, x.lowerGraphic = x.graphic, x.graphic = x.upperGraphic, x.plotY = x.plotHigh, v(x.plotHighX) && (x.plotX = x.plotHighX), x.y = A(x.high, x.origProps.y), x.negative = x.y < (this.options.threshold || 0), this.zones.length && (x.zone = x.getZone()), this.chart.polar || (x.isInside = x.isTopInside = typeof x.plotY < "u" && 0 <= x.plotY && x.plotY <= this.yAxis.len && 0 <= x.plotX && x.plotX <= this.xAxis.len), w++;
- }
- for (S.drawPoints.apply(this, arguments), w = 0; w < b; )
- x = this.points[w], x.upperGraphic = x.graphic, x.graphic = x.lowerGraphic, x.origProps && (d(x, x.origProps), delete x.origProps), w++;
- }, C.defaultOptions = O(y.defaultOptions, {
- lineWidth: 1,
- threshold: null,
- tooltip: { pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>' },
- trackByArea: !0,
- dataLabels: { align: void 0, verticalAlign: void 0, xLow: 0, xHigh: 0, yLow: 0, yHigh: 0 }
- }), C;
- }(y), d(Z.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: l, setStackedPoints: j }), H.registerSeriesType("arearange", Z), Z;
- }
- ), E(f, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
- f["Series/AreaRange/AreaRangeSeries.js"],
- f["Core/Series/SeriesRegistry.js"],
- f["Core/Utilities.js"]
- ], function(l, y, j) {
- var I = this && this.__extends || function() {
- var F = function(N, R) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var d in v)
- v.hasOwnProperty(d) && (S[d] = v[d]);
- }, F(N, R);
- };
- return function(N, R) {
- function S() {
- this.constructor = N;
- }
- F(N, R), N.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
- };
- }(), Z = y.seriesTypes.spline, H = j.merge;
- j = j.extend;
- var U = function(F) {
- function N() {
- var R = F !== null && F.apply(this, arguments) || this;
- return R.options = void 0, R.data = void 0, R.points = void 0, R;
- }
- return I(N, F), N.defaultOptions = H(l.defaultOptions), N;
- }(l);
- return j(U.prototype, { getPointSpline: Z.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", U), U;
- }), E(f, "Series/BoxPlot/BoxPlotSeries.js", [f["Series/Column/ColumnSeries.js"], f["Core/Globals.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var N = function(R, S) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, d) {
- v.__proto__ = d;
- } || function(v, d) {
- for (var u in d)
- d.hasOwnProperty(u) && (v[u] = d[u]);
- }, N(R, S);
- };
- return function(R, S) {
- function v() {
- this.constructor = R;
- }
- N(R, S), R.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }();
- y = y.noop;
- var H = I.extend, U = I.merge, F = I.pick;
- return I = function(N) {
- function R() {
- var S = N !== null && N.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return Z(R, N), R.prototype.pointAttribs = function() {
- return {};
- }, R.prototype.translate = function() {
- var S = this.yAxis, v = this.pointArrayMap;
- N.prototype.translate.apply(this), this.points.forEach(function(d) {
- v.forEach(function(u) {
- d[u] !== null && (d[u + "Plot"] = S.translate(d[u], 0, 1, 0, 1));
- }), d.plotHigh = d.highPlot;
- });
- }, R.prototype.drawPoints = function() {
- var S = this, v = S.options, d = S.chart, u = d.renderer, A, O, B, C, b, w, x = 0, a, c, p, i, h = S.doQuartiles !== !1, o, t = S.options.whiskerLength;
- S.points.forEach(function(s) {
- var n = s.graphic, T = n ? "animate" : "attr", _ = s.shapeArgs, D = {}, W = {}, P = {}, X = {}, g = s.color || S.color;
- typeof s.plotY < "u" && (a = Math.round(_.width), c = Math.floor(_.x), p = c + a, i = Math.round(a / 2), A = Math.floor(h ? s.q1Plot : s.lowPlot), O = Math.floor(h ? s.q3Plot : s.lowPlot), B = Math.floor(s.highPlot), C = Math.floor(s.lowPlot), n || (s.graphic = n = u.g("point").add(S.group), s.stem = u.path().addClass("highcharts-boxplot-stem").add(n), t && (s.whiskers = u.path().addClass("highcharts-boxplot-whisker").add(n)), h && (s.box = u.path(void 0).addClass("highcharts-boxplot-box").add(n)), s.medianShape = u.path(void 0).addClass("highcharts-boxplot-median").add(n)), d.styledMode || (W.stroke = s.stemColor || v.stemColor || g, W["stroke-width"] = F(s.stemWidth, v.stemWidth, v.lineWidth), W.dashstyle = s.stemDashStyle || v.stemDashStyle || v.dashStyle, s.stem.attr(W), t && (P.stroke = s.whiskerColor || v.whiskerColor || g, P["stroke-width"] = F(s.whiskerWidth, v.whiskerWidth, v.lineWidth), P.dashstyle = s.whiskerDashStyle || v.whiskerDashStyle || v.dashStyle, s.whiskers.attr(P)), h && (D.fill = s.fillColor || v.fillColor || g, D.stroke = v.lineColor || g, D["stroke-width"] = v.lineWidth || 0, D.dashstyle = s.boxDashStyle || v.boxDashStyle || v.dashStyle, s.box.attr(D)), X.stroke = s.medianColor || v.medianColor || g, X["stroke-width"] = F(s.medianWidth, v.medianWidth, v.lineWidth), X.dashstyle = s.medianDashStyle || v.medianDashStyle || v.dashStyle, s.medianShape.attr(X)), w = s.stem.strokeWidth() % 2 / 2, x = c + i + w, n = [["M", x, O], ["L", x, B], ["M", x, A], ["L", x, C]], s.stem[T]({ d: n }), h && (w = s.box.strokeWidth() % 2 / 2, A = Math.floor(A) + w, O = Math.floor(O) + w, c += w, p += w, n = [["M", c, O], ["L", c, A], ["L", p, A], ["L", p, O], ["L", c, O], ["Z"]], s.box[T]({ d: n })), t && (w = s.whiskers.strokeWidth() % 2 / 2, B += w, C += w, o = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, n = [["M", x - o, B], ["L", x + o, B], ["M", x - o, C], ["L", x + o, C]], s.whiskers[T]({ d: n })), b = Math.round(s.medianPlot), w = s.medianShape.strokeWidth() % 2 / 2, b += w, n = [["M", c, b], ["L", p, b]], s.medianShape[T]({ d: n }));
- });
- }, R.prototype.toYData = function(S) {
- return [S.low, S.q1, S.median, S.q3, S.high];
- }, R.defaultOptions = U(l.defaultOptions, {
- threshold: null,
- tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>' },
- whiskerLength: "50%",
- fillColor: "#ffffff",
- lineWidth: 1,
- medianWidth: 2,
- whiskerWidth: 2
- }), R;
- }(l), H(I.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), j.registerSeriesType("boxplot", I), I;
- }), E(f, "Series/Bubble/BubbleLegendDefaults.js", [], function() {
- return { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: !1, labels: {
- className: void 0,
- allowOverlap: !1,
- format: "",
- formatter: void 0,
- align: "right",
- style: { fontSize: "10px", color: "#000000" },
- x: 0,
- y: 0
- }, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: !1, zIndex: 1, zThreshold: 0 };
- }), E(f, "Series/Bubble/BubbleLegendItem.js", [f["Core/Color/Color.js"], f["Core/FormatUtilities.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = l.parse, H = j.noop, U = I.arrayMax, F = I.arrayMin, N = I.isNumber, R = I.merge, S = I.pick, v = I.stableSort;
- return function() {
- function d(u, A) {
- this.options = this.symbols = this.visible = this.selected = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0, this.setState = H, this.init(u, A);
- }
- return d.prototype.init = function(u, A) {
- this.options = u, this.visible = !0, this.chart = A.chart, this.legend = A;
- }, d.prototype.addToLegend = function(u) {
- u.splice(
- this.options.legendIndex,
- 0,
- this
- );
- }, d.prototype.drawLegendSymbol = function(u) {
- var A = this.chart, O = this.options, B = S(u.options.itemDistance, 20), C = O.ranges, b = O.connectorDistance;
- this.fontMetrics = A.renderer.fontMetrics(O.labels.style.fontSize), C && C.length && N(C[0].value) ? (v(C, function(w, x) {
- return x.value - w.value;
- }), this.ranges = C, this.setOptions(), this.render(), u = this.getMaxLabelSize(), C = this.ranges[0].radius, A = 2 * C, b = b - C + u.width, b = 0 < b ? b : 0, this.maxLabel = u, this.movementX = O.labels.align === "left" ? b : 0, this.legendItemWidth = A + b + B, this.legendItemHeight = A + this.fontMetrics.h / 2) : u.options.bubbleLegend.autoRanges = !0;
- }, d.prototype.setOptions = function() {
- var u = this.ranges, A = this.options, O = this.chart.series[A.seriesIndex], B = this.legend.baseline, C = { zIndex: A.zIndex, "stroke-width": A.borderWidth }, b = { zIndex: A.zIndex, "stroke-width": A.connectorWidth }, w = { align: this.legend.options.rtl || A.labels.align === "left" ? "right" : "left", zIndex: A.zIndex }, x = O.options.marker.fillOpacity, a = this.chart.styledMode;
- u.forEach(function(c, p) {
- a || (C.stroke = S(c.borderColor, A.borderColor, O.color), C.fill = S(c.color, A.color, x !== 1 ? Z(O.color).setOpacity(x).get("rgba") : O.color), b.stroke = S(c.connectorColor, A.connectorColor, O.color)), u[p].radius = this.getRangeRadius(c.value), u[p] = R(u[p], { center: u[0].radius - u[p].radius + B }), a || R(!0, u[p], { bubbleAttribs: R(C), connectorAttribs: R(b), labelAttribs: w });
- }, this);
- }, d.prototype.getRangeRadius = function(u) {
- var A = this.options;
- return this.chart.series[this.options.seriesIndex].getRadius.call(
- this,
- A.ranges[A.ranges.length - 1].value,
- A.ranges[0].value,
- A.minSize,
- A.maxSize,
- u
- );
- }, d.prototype.render = function() {
- var u = this.chart.renderer, A = this.options.zThreshold;
- this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = u.g("bubble-legend"), this.legendItem = u.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
- O.value >= A && this.renderRange(O);
- }, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
- }, d.prototype.renderRange = function(u) {
- var A = this.options, O = A.labels, B = this.chart, C = B.series[A.seriesIndex], b = B.renderer, w = this.symbols;
- B = w.labels;
- var x = u.center, a = Math.abs(u.radius), c = A.connectorDistance || 0, p = O.align, i = A.connectorWidth, h = this.ranges[0].radius || 0, o = x - a - A.borderWidth / 2 + i / 2, t = this.fontMetrics;
- t = t.f / 2 - (t.h - t.f) / 2;
- var s = b.styledMode;
- c = this.legend.options.rtl || p === "left" ? -c : c, p === "center" && (c = 0, A.connectorDistance = 0, u.labelAttribs.align = "center"), p = o + A.labels.y;
- var n = h + c + A.labels.x;
- w.bubbleItems.push(b.circle(
- h,
- x + ((o % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
- a
- ).attr(s ? {} : u.bubbleAttribs).addClass((s ? "highcharts-color-" + C.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (A.className || "")).add(this.legendSymbol)), w.connectors.push(b.path(b.crispLine([["M", h, o], ["L", h + c, o]], A.connectorWidth)).attr(s ? {} : u.connectorAttribs).addClass((s ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (A.connectorClassName || "")).add(this.legendSymbol)), u = b.text(this.formatLabel(u), n, p + t).attr(s ? {} : u.labelAttribs).css(s ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (A.labels.className || "")).add(this.legendSymbol), B.push(u), u.placed = !0, u.alignAttr = { x: n, y: p + t };
- }, d.prototype.getMaxLabelSize = function() {
- var u, A;
- return this.symbols.labels.forEach(function(O) {
- A = O.getBBox(!0), u = u ? A.width > u.width ? A : u : A;
- }), u || {};
- }, d.prototype.formatLabel = function(u) {
- var A = this.options, O = A.labels.formatter;
- A = A.labels.format;
- var B = this.chart.numberFormatter;
- return A ? y.format(A, u) : O ? O.call(u) : B(u.value, 1);
- }, d.prototype.hideOverlappingLabels = function() {
- var u = this.chart, A = this.symbols;
- !this.options.labels.allowOverlap && A && (u.hideOverlappingLabels(A.labels), A.labels.forEach(function(O, B) {
- O.newOpacity ? O.newOpacity !== O.oldOpacity && A.connectors[B].show() : A.connectors[B].hide();
- }));
- }, d.prototype.getRanges = function() {
- var u = this.legend.bubbleLegend, A = u.options.ranges, O, B = Number.MAX_VALUE, C = -Number.MAX_VALUE;
- u.chart.series.forEach(function(w) {
- w.isBubble && !w.ignoreSeries && (O = w.zData.filter(N), O.length && (B = S(w.options.zMin, Math.min(B, Math.max(
- F(O),
- w.options.displayNegative === !1 ? w.options.zThreshold : -Number.MAX_VALUE
- ))), C = S(w.options.zMax, Math.max(C, U(O)))));
- });
- var b = B === C ? [{ value: C }] : [{ value: B }, { value: (B + C) / 2 }, { value: C, autoRanges: !0 }];
- return A.length && A[0].radius && b.reverse(), b.forEach(function(w, x) {
- A && A[x] && (b[x] = R(A[x], w));
- }), b;
- }, d.prototype.predictBubbleSizes = function() {
- var u = this.chart, A = this.fontMetrics, O = u.legend.options, B = O.floating, C = (O = O.layout === "horizontal") ? u.legend.lastLineHeight : 0, b = u.plotSizeX, w = u.plotSizeY, x = u.series[this.options.seriesIndex], a = x.getPxExtremes();
- u = Math.ceil(a.minPxSize), a = Math.ceil(a.maxPxSize);
- var c = Math.min(w, b);
- return x = x.options.maxSize, B || !/%$/.test(x) ? A = a : (x = parseFloat(x), A = (c + C - A.h / 2) * x / 100 / (x / 100 + 1), (O && w - A >= b || !O && b - A >= w) && (A = a)), [u, Math.ceil(A)];
- }, d.prototype.updateRanges = function(u, A) {
- var O = this.legend.options.bubbleLegend;
- O.minSize = u, O.maxSize = A, O.ranges = this.getRanges();
- }, d.prototype.correctSizes = function() {
- var u = this.legend, A = this.chart.series[this.options.seriesIndex].getPxExtremes();
- 1 < Math.abs(Math.ceil(A.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, A.maxPxSize), u.render());
- }, d;
- }();
- }), E(f, "Series/Bubble/BubbleLegendComposition.js", [f["Series/Bubble/BubbleLegendDefaults.js"], f["Series/Bubble/BubbleLegendItem.js"], f["Core/DefaultOptions.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = j.setOptions, H = I.addEvent, U = I.objectEach, F = I.wrap, N;
- return function(R) {
- function S(C, b, w) {
- var x = this.legend, a = 0 <= v(this);
- if (x && x.options.enabled && x.bubbleLegend && x.options.bubbleLegend.autoRanges && a) {
- var c = x.bubbleLegend.options;
- a = x.bubbleLegend.predictBubbleSizes(), x.bubbleLegend.updateRanges(a[0], a[1]), c.placed || (x.group.placed = !1, x.allItems.forEach(function(p) {
- p.legendGroup.translateY = null;
- })), x.render(), this.getMargins(), this.axes.forEach(function(p) {
- p.visible && p.render(), c.placed || (p.setScale(), p.updateNames(), U(p.ticks, function(i) {
- i.isNew = !0, i.isNewLabel = !0;
- }));
- }), c.placed = !0, this.getMargins(), C.call(this, b, w), x.bubbleLegend.correctSizes(), O(x, d(x));
- } else
- C.call(this, b, w), x && x.options.enabled && x.bubbleLegend && (x.render(), O(x, d(x)));
- }
- function v(C) {
- C = C.series;
- for (var b = 0; b < C.length; ) {
- if (C[b] && C[b].isBubble && C[b].visible && C[b].zData.length)
- return b;
- b++;
- }
- return -1;
- }
- function d(C) {
- C = C.allItems;
- var b = [], w = C.length, x, a = 0;
- for (x = 0; x < w; x++)
- if (C[x].legendItemHeight && (C[x].itemHeight = C[x].legendItemHeight), C[x] === C[w - 1] || C[x + 1] && C[x]._legendItemPos[1] !== C[x + 1]._legendItemPos[1]) {
- b.push({ height: 0 });
- var c = b[b.length - 1];
- for (a; a <= x; a++)
- C[a].itemHeight > c.height && (c.height = C[a].itemHeight);
- c.step = x;
- }
- return b;
- }
- function u(C) {
- var b = this.bubbleLegend, w = this.options, x = w.bubbleLegend, a = v(this.chart);
- b && b.ranges && b.ranges.length && (x.ranges.length && (x.autoRanges = !!x.ranges[0].autoRanges), this.destroyItem(b)), 0 <= a && w.enabled && x.enabled && (x.seriesIndex = a, this.bubbleLegend = new y(x, this), this.bubbleLegend.addToLegend(C.allItems));
- }
- function A() {
- var C = this.chart, b = this.visible, w = this.chart.legend;
- w && w.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, C = 0 <= v(C), w.bubbleLegend.visible !== C && (w.update({ bubbleLegend: { enabled: C } }), w.bubbleLegend.visible = C), this.visible = b);
- }
- function O(C, b) {
- var w = C.options.rtl, x, a, c, p = 0;
- C.allItems.forEach(function(i, h) {
- x = i.legendGroup.translateX, a = i._legendItemPos[1], ((c = i.movementX) || w && i.ranges) && (c = w ? x - i.options.maxSize / 2 : x + c, i.legendGroup.attr({ translateX: c })), h > b[p].step && p++, i.legendGroup.attr({ translateY: Math.round(a + b[p].height / 2) }), i._legendItemPos[1] = a + b[p].height / 2;
- });
- }
- var B = [];
- R.compose = function(C, b, w) {
- B.indexOf(C) === -1 && (B.push(C), Z({ legend: { bubbleLegend: l } }), F(C.prototype, "drawChartBox", S)), B.indexOf(b) === -1 && (B.push(b), H(b, "afterGetAllItems", u)), B.indexOf(w) === -1 && (B.push(w), H(w, "legendItemClick", A));
- };
- }(N || (N = {})), N;
- }), E(f, "Series/Bubble/BubblePoint.js", [f["Core/Series/Point.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var Z = function(H, U) {
- return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, N) {
- F.__proto__ = N;
- } || function(F, N) {
- for (var R in N)
- N.hasOwnProperty(R) && (F[R] = N[R]);
- }, Z(H, U);
- };
- return function(H, U) {
- function F() {
- this.constructor = H;
- }
- Z(H, U), H.prototype = U === null ? Object.create(U) : (F.prototype = U.prototype, new F());
- };
- }();
- return j = j.extend, y = function(Z) {
- function H() {
- var U = Z !== null && Z.apply(this, arguments) || this;
- return U.options = void 0, U.series = void 0, U;
- }
- return I(H, Z), H.prototype.haloPath = function(U) {
- return l.prototype.haloPath.call(this, U === 0 ? 0 : (this.marker && this.marker.radius || 0) + U);
- }, H;
- }(y.seriesTypes.scatter.prototype.pointClass), j(y.prototype, { ttBelow: !1 }), y;
- }), E(f, "Series/Bubble/BubbleSeries.js", [
- f["Core/Axis/Axis.js"],
- f["Series/Bubble/BubbleLegendComposition.js"],
- f["Series/Bubble/BubblePoint.js"],
- f["Core/Color/Color.js"],
- f["Core/Globals.js"],
- f["Core/Series/Series.js"],
- f["Core/Series/SeriesRegistry.js"],
- f["Core/Utilities.js"]
- ], function(l, y, j, I, Z, H, U, F) {
- var N = this && this.__extends || function() {
- var w = function(x, a) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
- c.__proto__ = p;
- } || function(c, p) {
- for (var i in p)
- p.hasOwnProperty(i) && (c[i] = p[i]);
- }, w(x, a);
- };
- return function(x, a) {
- function c() {
- this.constructor = x;
- }
- w(x, a), x.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
- };
- }(), R = I.parse;
- I = Z.noop;
- var S = U.seriesTypes;
- Z = S.column;
- var v = S.scatter;
- S = F.addEvent;
- var d = F.arrayMax, u = F.arrayMin, A = F.clamp, O = F.extend, B = F.isNumber, C = F.merge, b = F.pick;
- return F = function(w) {
- function x() {
- var a = w !== null && w.apply(this, arguments) || this;
- return a.data = void 0, a.maxPxSize = void 0, a.minPxSize = void 0, a.options = void 0, a.points = void 0, a.radii = void 0, a.yData = void 0, a.zData = void 0, a;
- }
- return N(x, w), x.prototype.animate = function(a) {
- !a && this.points.length < this.options.animationLimit && this.points.forEach(function(c) {
- var p = c.graphic;
- p && p.width && (this.hasRendered || p.attr({ x: c.plotX, y: c.plotY, width: 1, height: 1 }), p.animate(this.markerAttribs(c), this.options.animation));
- }, this);
- }, x.prototype.getRadii = function() {
- var a = this, c = this.zData, p = this.yData, i = [], h = this.chart.bubbleZExtremes, o = this.getPxExtremes(), t = o.minPxSize, s = o.maxPxSize;
- if (!h) {
- var n = Number.MAX_VALUE, T = -Number.MAX_VALUE, _;
- this.chart.series.forEach(function(P) {
- P.bubblePadding && (P.visible || !a.chart.options.chart.ignoreHiddenSeries) && (P = P.getZExtremes()) && (n = Math.min(n || P.zMin, P.zMin), T = Math.max(T || P.zMax, P.zMax), _ = !0);
- }), _ ? (h = { zMin: n, zMax: T }, this.chart.bubbleZExtremes = h) : h = { zMin: 0, zMax: 0 };
- }
- var D = 0;
- for (o = c.length; D < o; D++) {
- var W = c[D];
- i.push(this.getRadius(h.zMin, h.zMax, t, s, W, p[D]));
- }
- this.radii = i;
- }, x.prototype.getRadius = function(a, c, p, i, h, o) {
- var t = this.options, s = t.sizeBy !== "width", n = t.zThreshold, T = c - a, _ = 0.5;
- if (o === null || h === null)
- return null;
- if (B(h)) {
- if (t.sizeByAbsoluteValue && (h = Math.abs(h - n), T = Math.max(c - n, Math.abs(a - n)), a = 0), h < a)
- return p / 2 - 1;
- 0 < T && (_ = (h - a) / T);
- }
- return s && 0 <= _ && (_ = Math.sqrt(_)), Math.ceil(p + _ * (i - p)) / 2;
- }, x.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, x.prototype.pointAttribs = function(a, c) {
- var p = this.options.marker.fillOpacity;
- return a = H.prototype.pointAttribs.call(this, a, c), p !== 1 && (a.fill = R(a.fill).setOpacity(p).get("rgba")), a;
- }, x.prototype.translate = function() {
- w.prototype.translate.call(this), this.getRadii(), this.translateBubble();
- }, x.prototype.translateBubble = function() {
- for (var a = this.data, c = this.radii, p = this.getPxExtremes().minPxSize, i = a.length; i--; ) {
- var h = a[i], o = c ? c[i] : 0;
- B(o) && o >= p / 2 ? (h.marker = O(h.marker, { radius: o, width: 2 * o, height: 2 * o }), h.dlBox = { x: h.plotX - o, y: h.plotY - o, width: 2 * o, height: 2 * o }) : h.shapeArgs = h.plotY = h.dlBox = void 0;
- }
- }, x.prototype.getPxExtremes = function() {
- var a = Math.min(this.chart.plotWidth, this.chart.plotHeight), c = function(i) {
- if (typeof i == "string") {
- var h = /%$/.test(i);
- i = parseInt(i, 10);
- }
- return h ? a * i / 100 : i;
- }, p = c(b(this.options.minSize, 8));
- return c = Math.max(c(b(this.options.maxSize, "20%")), p), {
- minPxSize: p,
- maxPxSize: c
- };
- }, x.prototype.getZExtremes = function() {
- var a = this.options, c = (this.zData || []).filter(B);
- if (c.length) {
- var p = b(a.zMin, A(u(c), a.displayNegative === !1 ? a.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
- if (a = b(a.zMax, d(c)), B(p) && B(a))
- return { zMin: p, zMax: a };
- }
- }, x.compose = y.compose, x.defaultOptions = C(v.defaultOptions, { dataLabels: { formatter: function() {
- var a = this.series.chart.numberFormatter, c = this.point.z;
- return B(c) ? a(c, -1) : "";
- }, inside: !0, verticalAlign: "middle" }, animationLimit: 250, marker: {
- lineColor: null,
- lineWidth: 1,
- fillOpacity: 0.5,
- radius: null,
- states: { hover: { radiusPlus: 0 } },
- symbol: "circle"
- }, minSize: 8, maxSize: "20%", softThreshold: !1, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }), x;
- }(v), O(F.prototype, {
- alignDataLabel: Z.prototype.alignDataLabel,
- applyZones: I,
- bubblePadding: !0,
- buildKDTree: I,
- directTouch: !0,
- isBubble: !0,
- pointArrayMap: ["y", "z"],
- pointClass: j,
- parallelArrays: ["x", "y", "z"],
- trackerGroups: ["group", "dataLabelsGroup"],
- specialGroup: "group",
- zoneAxis: "z"
- }), S(F, "updatedData", function(w) {
- delete w.target.chart.bubbleZExtremes;
- }), l.prototype.beforePadding = function() {
- var w = this, x = this.len, a = this.chart, c = 0, p = x, i = this.isXAxis, h = i ? "xData" : "yData", o = this.min, t = this.max - o, s = x / t, n;
- this.series.forEach(function(T) {
- if (T.bubblePadding && (T.visible || !a.options.chart.ignoreHiddenSeries)) {
- n = w.allowZoomOutside = !0;
- var _ = T[h];
- if (i && T.getRadii(0, 0, T), 0 < t) {
- for (var D = _.length; D--; )
- if (B(_[D]) && w.dataMin <= _[D] && _[D] <= w.max) {
- var W = T.radii && T.radii[D] || 0;
- c = Math.min((_[D] - o) * s - W, c), p = Math.max((_[D] - o) * s + W, p);
- }
- }
- }
- }), n && 0 < t && !this.logarithmic && (p -= x, s *= (x + Math.max(0, c) - Math.min(p, x)) / x, [["min", "userMin", c], ["max", "userMax", p]].forEach(function(T) {
- typeof b(w.options[T[0]], w[T[1]]) > "u" && (w[T[0]] += T[2] / s);
- }));
- }, U.registerSeriesType("bubble", F), F;
- }), E(f, "Series/ColumnRange/ColumnRangePoint.js", [f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y) {
- var j = this && this.__extends || function() {
- var U = function(F, N) {
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, S) {
- R.__proto__ = S;
- } || function(R, S) {
- for (var v in S)
- S.hasOwnProperty(v) && (R[v] = S[v]);
- }, U(F, N);
- };
- return function(F, N) {
- function R() {
- this.constructor = F;
- }
- U(F, N), F.prototype = N === null ? Object.create(N) : (R.prototype = N.prototype, new R());
- };
- }(), I = l.seriesTypes;
- l = I.column.prototype.pointClass;
- var Z = y.extend, H = y.isNumber;
- return y = function(U) {
- function F() {
- var N = U !== null && U.apply(this, arguments) || this;
- return N.series = void 0, N.options = void 0, N.barX = void 0, N.pointWidth = void 0, N.shapeType = void 0, N;
- }
- return j(F, U), F.prototype.isValid = function() {
- return H(this.low);
- }, F;
- }(I.arearange.prototype.pointClass), Z(y.prototype, { setState: l.prototype.setState }), y;
- }), E(f, "Series/ColumnRange/ColumnRangeSeries.js", [f["Series/ColumnRange/ColumnRangePoint.js"], f["Core/Globals.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var A = function(O, B) {
- return A = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
- C.__proto__ = b;
- } || function(C, b) {
- for (var w in b)
- b.hasOwnProperty(w) && (C[w] = b[w]);
- }, A(O, B);
- };
- return function(O, B) {
- function C() {
- this.constructor = O;
- }
- A(O, B), O.prototype = B === null ? Object.create(B) : (C.prototype = B.prototype, new C());
- };
- }();
- y = y.noop;
- var H = j.seriesTypes, U = H.arearange, F = H.column, N = F.prototype, R = U.prototype, S = I.clamp, v = I.merge, d = I.pick;
- I = I.extend;
- var u = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
- return H = function(A) {
- function O() {
- var B = A !== null && A.apply(this, arguments) || this;
- return B.data = void 0, B.points = void 0, B.options = void 0, B;
- }
- return Z(O, A), O.prototype.setOptions = function() {
- return v(!0, arguments[0], { stacking: void 0 }), R.setOptions.apply(this, arguments);
- }, O.prototype.translate = function() {
- var B = this, C = B.yAxis, b = B.xAxis, w = b.startAngleRad, x, a = B.chart, c = B.xAxis.isRadial, p = Math.max(a.chartWidth, a.chartHeight) + 999, i;
- N.translate.apply(B), B.points.forEach(function(h) {
- var o = h.shapeArgs || {}, t = B.options.minPointLength;
- h.plotHigh = i = S(C.translate(h.high, 0, 1, 0, 1), -p, p), h.plotLow = S(h.plotY, -p, p);
- var s = i, n = d(
- h.rectPlotY,
- h.plotY
- ) - i;
- Math.abs(n) < t ? (t -= n, n += t, s -= t / 2) : 0 > n && (n *= -1, s -= n), c ? (x = h.barX + w, h.shapeType = "arc", h.shapeArgs = B.polarArc(s + n, s, x, x + h.pointWidth)) : (o.height = n, o.y = s, t = o.x, t = t === void 0 ? 0 : t, o = o.width, o = o === void 0 ? 0 : o, h.tooltipPos = a.inverted ? [C.len + C.pos - a.plotLeft - s - n / 2, b.len + b.pos - a.plotTop - t - o / 2, n] : [b.left - a.plotLeft + t + o / 2, C.pos - a.plotTop + s + n / 2, n]);
- });
- }, O.prototype.crispCol = function() {
- return N.crispCol.apply(this, arguments);
- }, O.prototype.drawPoints = function() {
- return N.drawPoints.apply(this, arguments);
- }, O.prototype.drawTracker = function() {
- return N.drawTracker.apply(this, arguments);
- }, O.prototype.getColumnMetrics = function() {
- return N.getColumnMetrics.apply(this, arguments);
- }, O.prototype.pointAttribs = function() {
- return N.pointAttribs.apply(this, arguments);
- }, O.prototype.adjustForMissingColumns = function() {
- return N.adjustForMissingColumns.apply(this, arguments);
- }, O.prototype.animate = function() {
- return N.animate.apply(this, arguments);
- }, O.prototype.translate3dPoints = function() {
- return N.translate3dPoints.apply(this, arguments);
- }, O.prototype.translate3dShapes = function() {
- return N.translate3dShapes.apply(this, arguments);
- }, O.defaultOptions = v(F.defaultOptions, U.defaultOptions, u), O;
- }(U), I(H.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
- return N.polarArc.apply(this, arguments);
- }, pointClass: l }), j.registerSeriesType("columnrange", H), H;
- }), E(f, "Series/ColumnPyramid/ColumnPyramidSeries.js", [f["Series/Column/ColumnSeries.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var N = function(R, S) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, d) {
- v.__proto__ = d;
- } || function(v, d) {
- for (var u in d)
- d.hasOwnProperty(u) && (v[u] = d[u]);
- }, N(R, S);
- };
- return function(R, S) {
- function v() {
- this.constructor = R;
- }
- N(R, S), R.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }(), Z = l.prototype, H = j.clamp, U = j.merge, F = j.pick;
- return j = function(N) {
- function R() {
- var S = N !== null && N.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return I(R, N), R.prototype.translate = function() {
- var S = this, v = S.chart, d = S.options, u = S.dense = 2 > S.closestPointRange * S.xAxis.transA;
- u = S.borderWidth = F(d.borderWidth, u ? 0 : 1);
- var A = S.yAxis, O = d.threshold, B = S.translatedThreshold = A.getThreshold(O), C = F(d.minPointLength, 5), b = S.getColumnMetrics(), w = b.width, x = S.barW = Math.max(w, 1 + 2 * u), a = S.pointXOffset = b.offset;
- v.inverted && (B -= 0.5), d.pointPadding && (x = Math.ceil(x)), Z.translate.apply(S), S.points.forEach(function(c) {
- var p = F(c.yBottom, B), i = 999 + Math.abs(p), h = H(c.plotY, -i, A.len + i);
- i = c.plotX + a;
- var o = x / 2, t = Math.min(h, p);
- p = Math.max(h, p) - t;
- var s;
- c.barX = i, c.pointWidth = w, c.tooltipPos = v.inverted ? [A.len + A.pos - v.plotLeft - h, S.xAxis.len - i - o, p] : [i + o, h + A.pos - v.plotTop, p], h = O + (c.total || c.y), d.stacking === "percent" && (h = O + (0 > c.y) ? -100 : 100), h = A.toPixels(h, !0);
- var n = (s = v.plotHeight - h - (v.plotHeight - B)) ? o * (t - h) / s : 0, T = s ? o * (t + p - h) / s : 0;
- s = i - n + o, n = i + n + o;
- var _ = i + T + o;
- T = i - T + o;
- var D = t - C, W = t + p;
- 0 > c.y && (D = t, W = t + p + C), v.inverted && (_ = A.width - t, s = h - (A.width - B), n = o * (h - _) / s, T = o * (h - (_ - p)) / s, s = i + o + n, n = s - 2 * n, _ = i - T + o, T = i + T + o, D = t, W = t + p - C, 0 > c.y && (W = t + p + C)), c.shapeType = "path", c.shapeArgs = { x: s, y: D, width: n - s, height: p, d: [["M", s, D], ["L", n, D], ["L", _, W], ["L", T, W], ["Z"]] };
- });
- }, R.defaultOptions = U(l.defaultOptions, {}), R;
- }(l), y.registerSeriesType("columnpyramid", j), j;
- }), E(f, "Series/ErrorBar/ErrorBarSeries.js", [f["Series/BoxPlot/BoxPlotSeries.js"], f["Series/Column/ColumnSeries.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var N = function(R, S) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, d) {
- v.__proto__ = d;
- } || function(v, d) {
- for (var u in d)
- d.hasOwnProperty(u) && (v[u] = d[u]);
- }, N(R, S);
- };
- return function(R, S) {
- function v() {
- this.constructor = R;
- }
- N(R, S), R.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }(), H = j.seriesTypes.arearange, U = I.merge;
- I = I.extend;
- var F = function(N) {
- function R() {
- var S = N !== null && N.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return Z(R, N), R.prototype.getColumnMetrics = function() {
- return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
- }, R.prototype.drawDataLabels = function() {
- var S = this.pointValKey;
- H && (H.prototype.drawDataLabels.call(this), this.data.forEach(function(v) {
- v.y = v[S];
- }));
- }, R.prototype.toYData = function(S) {
- return [S.low, S.high];
- }, R.defaultOptions = U(l.defaultOptions, {
- color: "#000000",
- grouping: !1,
- linkedTo: ":previous",
- tooltip: { pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>' },
- whiskerWidth: null
- }), R;
- }(l);
- return I(F.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), j.registerSeriesType("errorbar", F), F;
- }), E(f, "Series/Gauge/GaugePoint.js", [f["Core/Series/SeriesRegistry.js"]], function(l) {
- var y = this && this.__extends || function() {
- var j = function(I, Z) {
- return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(H, U) {
- H.__proto__ = U;
- } || function(H, U) {
- for (var F in U)
- U.hasOwnProperty(F) && (H[F] = U[F]);
- }, j(I, Z);
- };
- return function(I, Z) {
- function H() {
- this.constructor = I;
- }
- j(I, Z), I.prototype = Z === null ? Object.create(Z) : (H.prototype = Z.prototype, new H());
- };
- }();
- return function(j) {
- function I() {
- var Z = j !== null && j.apply(this, arguments) || this;
- return Z.options = void 0, Z.series = void 0, Z.shapeArgs = void 0, Z;
- }
- return y(I, j), I.prototype.setState = function(Z) {
- this.state = Z;
- }, I;
- }(l.series.prototype.pointClass);
- }), E(f, "Series/Gauge/GaugeSeries.js", [f["Series/Gauge/GaugePoint.js"], f["Core/Globals.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var u = function(A, O) {
- return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, C) {
- B.__proto__ = C;
- } || function(B, C) {
- for (var b in C)
- C.hasOwnProperty(b) && (B[b] = C[b]);
- }, u(A, O);
- };
- return function(A, O) {
- function B() {
- this.constructor = A;
- }
- u(A, O), A.prototype = O === null ? Object.create(O) : (B.prototype = O.prototype, new B());
- };
- }();
- y = y.noop;
- var H = j.series, U = j.seriesTypes.column, F = I.clamp, N = I.isNumber, R = I.extend, S = I.merge, v = I.pick, d = I.pInt;
- return I = function(u) {
- function A() {
- var O = u !== null && u.apply(this, arguments) || this;
- return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
- }
- return Z(A, u), A.prototype.translate = function() {
- var O = this.yAxis, B = this.options, C = O.center;
- this.generatePoints(), this.points.forEach(function(b) {
- var w = S(B.dial, b.dial), x = d(v(w.radius, "80%")) * C[2] / 200, a = d(v(w.baseLength, "70%")) * x / 100, c = d(v(w.rearLength, "10%")) * x / 100, p = w.baseWidth || 3, i = w.topWidth || 1, h = B.overshoot, o = O.startAngleRad + O.translate(b.y, null, null, null, !0);
- (N(h) || B.wrap === !1) && (h = N(h) ? h / 180 * Math.PI : 0, o = F(
- o,
- O.startAngleRad - h,
- O.endAngleRad + h
- )), o = 180 * o / Math.PI, b.shapeType = "path", b.shapeArgs = { d: w.path || [["M", -c, -p / 2], ["L", a, -p / 2], ["L", x, -i / 2], ["L", x, i / 2], ["L", a, p / 2], ["L", -c, p / 2], ["Z"]], translateX: C[0], translateY: C[1], rotation: o }, b.plotX = C[0], b.plotY = C[1];
- });
- }, A.prototype.drawPoints = function() {
- var O = this, B = O.chart, C = O.yAxis.center, b = O.pivot, w = O.options, x = w.pivot, a = B.renderer;
- O.points.forEach(function(c) {
- var p = c.graphic, i = c.shapeArgs, h = i.d, o = S(w.dial, c.dial);
- p ? (p.animate(i), i.d = h) : c.graphic = a[c.shapeType](i).attr({
- rotation: i.rotation,
- zIndex: 1
- }).addClass("highcharts-dial").add(O.group), B.styledMode || c.graphic[p ? "animate" : "attr"]({ stroke: o.borderColor || "none", "stroke-width": o.borderWidth || 0, fill: o.backgroundColor || "#000000" });
- }), b ? b.animate({ translateX: C[0], translateY: C[1] }) : (O.pivot = a.circle(0, 0, v(x.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(C[0], C[1]).add(O.group), B.styledMode || O.pivot.attr({ "stroke-width": x.borderWidth || 0, stroke: x.borderColor || "#cccccc", fill: x.backgroundColor || "#000000" }));
- }, A.prototype.animate = function(O) {
- var B = this;
- O || B.points.forEach(function(C) {
- var b = C.graphic;
- b && (b.attr({ rotation: 180 * B.yAxis.startAngleRad / Math.PI }), b.animate({ rotation: C.shapeArgs.rotation }, B.options.animation));
- });
- }, A.prototype.render = function() {
- this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup), H.prototype.render.call(this), this.group.clip(this.chart.clipRect);
- }, A.prototype.setData = function(O, B) {
- H.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), v(B, !0) && this.chart.redraw();
- }, A.prototype.hasData = function() {
- return !!this.points.length;
- }, A.defaultOptions = S(H.defaultOptions, { dataLabels: { borderColor: "#cccccc", borderRadius: 3, borderWidth: 1, crop: !1, defer: !1, enabled: !0, verticalAlign: "top", y: 15, zIndex: 2 }, dial: {}, pivot: {}, tooltip: { headerFormat: "" }, showInLegend: !1 }), A;
- }(H), R(I.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: U.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: l, trackerGroups: [
- "group",
- "dataLabelsGroup"
- ] }), j.registerSeriesType("gauge", I), I;
- }), E(f, "Series/PackedBubble/PackedBubblePoint.js", [f["Core/Chart/Chart.js"], f["Core/Series/Point.js"], f["Core/Series/SeriesRegistry.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var Z = function(H, U) {
- return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, N) {
- F.__proto__ = N;
- } || function(F, N) {
- for (var R in N)
- N.hasOwnProperty(R) && (F[R] = N[R]);
- }, Z(H, U);
- };
- return function(H, U) {
- function F() {
- this.constructor = H;
- }
- Z(H, U), H.prototype = U === null ? Object.create(U) : (F.prototype = U.prototype, new F());
- };
- }();
- return function(Z) {
- function H() {
- var U = Z !== null && Z.apply(this, arguments) || this;
- return U.degree = NaN, U.mass = NaN, U.radius = NaN, U.options = void 0, U.series = void 0, U.value = null, U;
- }
- return I(H, Z), H.prototype.destroy = function() {
- return this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes), y.prototype.destroy.apply(this, arguments);
- }, H.prototype.firePointEvent = function() {
- var U = this.series.options;
- if (this.isParentNode && U.parentNode) {
- var F = U.allowPointSelect;
- U.allowPointSelect = U.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), U.allowPointSelect = F;
- } else
- y.prototype.firePointEvent.apply(this, arguments);
- }, H.prototype.select = function() {
- var U = this.series.chart;
- this.isParentNode ? (U.getSelectedPoints = U.getSelectedParentNodes, y.prototype.select.apply(this, arguments), U.getSelectedPoints = l.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
- }, H;
- }(j.seriesTypes.bubble.prototype.pointClass);
- }), E(f, "Series/Networkgraph/DraggableNodes.js", [f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j) {
- var I = j.addEvent;
- y.dragNodesMixin = { onMouseDown: function(Z, H) {
- H = this.chart.pointer.normalize(H), Z.fixedPosition = { chartX: H.chartX, chartY: H.chartY, plotX: Z.plotX, plotY: Z.plotY }, Z.inDragMode = !0;
- }, onMouseMove: function(Z, H) {
- if (Z.fixedPosition && Z.inDragMode) {
- var U = this.chart, F = U.pointer.normalize(H);
- H = Z.fixedPosition.chartX - F.chartX, F = Z.fixedPosition.chartY - F.chartY;
- var N = void 0, R = void 0, S = U.graphLayoutsLookup;
- (5 < Math.abs(H) || 5 < Math.abs(F)) && (N = Z.fixedPosition.plotX - H, R = Z.fixedPosition.plotY - F, U.isInsidePlot(N, R) && (Z.plotX = N, Z.plotY = R, Z.hasDragged = !0, this.redrawHalo(Z), S.forEach(function(v) {
- v.restartSimulation();
- })));
- }
- }, onMouseUp: function(Z, H) {
- Z.fixedPosition && (Z.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), Z.inDragMode = Z.hasDragged = !1, this.options.fixedDraggable || delete Z.fixedPosition);
- }, redrawHalo: function(Z) {
- Z && this.halo && this.halo.attr({ d: Z.haloPath(this.options.states.hover.halo.size) });
- } }, I(l, "load", function() {
- var Z = this, H, U, F;
- Z.container && (H = I(Z.container, "mousedown", function(N) {
- var R = Z.hoverPoint;
- R && R.series && R.series.hasDraggableNodes && R.series.options.draggable && (R.series.onMouseDown(R, N), U = I(Z.container, "mousemove", function(S) {
- return R && R.series && R.series.onMouseMove(R, S);
- }), F = I(Z.container.ownerDocument, "mouseup", function(S) {
- return U(), F(), R && R.series && R.series.onMouseUp(R, S);
- }));
- })), I(Z, "destroy", function() {
- H();
- });
- });
- }), E(
- f,
- "Series/Networkgraph/Integrations.js",
- [f["Core/Globals.js"]],
- function(l) {
- l.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, j) {
- return (j - y) / y;
- }, repulsiveForceFunction: function(y, j) {
- return (j - y) / y * (j > y ? 1 : 0);
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, j = this.barycenter.xFactor, I = this.barycenter.yFactor;
- j = (j - (this.box.left + this.box.width) / 2) * y, I = (I - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(Z) {
- Z.fixedPosition || (Z.plotX -= j / Z.mass / Z.degree, Z.plotY -= I / Z.mass / Z.degree);
- });
- }, repulsive: function(y, j, I) {
- j = j * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += I.x * j, y.plotY += I.y * j);
- }, attractive: function(y, j, I) {
- var Z = y.getMass(), H = -I.x * j * this.diffTemperature;
- j = -I.y * j * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= H * Z.fromNode / y.fromNode.degree, y.fromNode.plotY -= j * Z.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += H * Z.toNode / y.toNode.degree, y.toNode.plotY += j * Z.toNode / y.toNode.degree);
- }, integrate: function(y, j) {
- var I = -y.options.friction, Z = y.options.maxSpeed, H = (j.plotX + j.dispX - j.prevX) * I;
- I *= j.plotY + j.dispY - j.prevY;
- var U = Math.abs, F = U(H) / (H || 1);
- U = U(I) / (I || 1), H = F * Math.min(Z, Math.abs(H)), I = U * Math.min(Z, Math.abs(I)), j.prevX = j.plotX + j.dispX, j.prevY = j.plotY + j.dispY, j.plotX += H, j.plotY += I, j.temperature = y.vectorLength({ x: H, y: I });
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
- } }, euler: { attractiveForceFunction: function(y, j) {
- return y * y / j;
- }, repulsiveForceFunction: function(y, j) {
- return j * j / y;
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, j = this.barycenter.xFactor, I = this.barycenter.yFactor;
- this.nodes.forEach(function(Z) {
- if (!Z.fixedPosition) {
- var H = Z.getDegree();
- H *= 1 + H / 2, Z.dispX += (j - Z.plotX) * y * H / Z.degree, Z.dispY += (I - Z.plotY) * y * H / Z.degree;
- }
- });
- }, repulsive: function(y, j, I, Z) {
- y.dispX += I.x / Z * j / y.degree, y.dispY += I.y / Z * j / y.degree;
- }, attractive: function(y, j, I, Z) {
- var H = y.getMass(), U = I.x / Z * j;
- j *= I.y / Z, y.fromNode.fixedPosition || (y.fromNode.dispX -= U * H.fromNode / y.fromNode.degree, y.fromNode.dispY -= j * H.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += U * H.toNode / y.toNode.degree, y.toNode.dispY += j * H.toNode / y.toNode.degree);
- }, integrate: function(y, j) {
- j.dispX += j.dispX * y.options.friction, j.dispY += j.dispY * y.options.friction;
- var I = j.temperature = y.vectorLength({ x: j.dispX, y: j.dispY });
- I !== 0 && (j.plotX += j.dispX / I * Math.min(Math.abs(j.dispX), y.temperature), j.plotY += j.dispY / I * Math.min(Math.abs(j.dispY), y.temperature));
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
- } } };
- }
- ), E(
- f,
- "Series/Networkgraph/QuadTree.js",
- [f["Core/Globals.js"], f["Core/Utilities.js"]],
- function(l, y) {
- y = y.extend;
- var j = l.QuadTreeNode = function(I) {
- this.box = I, this.boxSize = Math.min(I.width, I.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
- };
- y(j.prototype, { insert: function(I, Z) {
- this.isInternal ? this.nodes[this.getBoxPosition(I)].insert(I, Z - 1) : (this.isEmpty = !1, this.body ? Z ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, Z - 1), this.body = !0), this.nodes[this.getBoxPosition(I)].insert(I, Z - 1)) : (Z = new j({
- top: I.plotX,
- left: I.plotY,
- width: 0.1,
- height: 0.1
- }), Z.body = I, Z.isInternal = !1, this.nodes.push(Z)) : (this.isInternal = !1, this.body = I));
- }, updateMassAndCenter: function() {
- var I = 0, Z = 0, H = 0;
- this.isInternal ? (this.nodes.forEach(function(U) {
- U.isEmpty || (I += U.mass, Z += U.plotX * U.mass, H += U.plotY * U.mass);
- }), Z /= I, H /= I) : this.body && (I = this.body.mass, Z = this.body.plotX, H = this.body.plotY), this.mass = I, this.plotX = Z, this.plotY = H;
- }, divideBox: function() {
- var I = this.box.width / 2, Z = this.box.height / 2;
- this.nodes[0] = new j({
- left: this.box.left,
- top: this.box.top,
- width: I,
- height: Z
- }), this.nodes[1] = new j({ left: this.box.left + I, top: this.box.top, width: I, height: Z }), this.nodes[2] = new j({ left: this.box.left + I, top: this.box.top + Z, width: I, height: Z }), this.nodes[3] = new j({ left: this.box.left, top: this.box.top + Z, width: I, height: Z });
- }, getBoxPosition: function(I) {
- var Z = I.plotY < this.box.top + this.box.height / 2;
- return I.plotX < this.box.left + this.box.width / 2 ? Z ? 0 : 3 : Z ? 1 : 2;
- } }), l = l.QuadTree = function(I, Z, H, U) {
- this.box = { left: I, top: Z, width: H, height: U }, this.maxDepth = 25, this.root = new j(
- this.box,
- "0"
- ), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
- }, y(l.prototype, { insertNodes: function(I) {
- I.forEach(function(Z) {
- this.root.insert(Z, this.maxDepth);
- }, this);
- }, visitNodeRecursive: function(I, Z, H) {
- var U;
- I || (I = this.root), I === this.root && Z && (U = Z(I)), U !== !1 && (I.nodes.forEach(function(F) {
- if (F.isInternal) {
- if (Z && (U = Z(F)), U === !1)
- return;
- this.visitNodeRecursive(F, Z, H);
- } else
- F.body && Z && Z(F.body);
- H && H(F);
- }, this), I === this.root && H && H(I));
- }, calculateMassAndCenter: function() {
- this.visitNodeRecursive(
- null,
- null,
- function(I) {
- I.updateMassAndCenter();
- }
- );
- } });
- }
- ), E(f, "Series/Networkgraph/Layouts.js", [f["Core/Chart/Chart.js"], f["Core/Animation/AnimationUtilities.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = y.setAnimation;
- y = I.addEvent;
- var H = I.clamp, U = I.defined, F = I.extend, N = I.isFunction, R = I.pick;
- j.layouts = { "reingold-fruchterman": function() {
- } }, F(j.layouts["reingold-fruchterman"].prototype, {
- init: function(S) {
- this.options = S, this.nodes = [], this.links = [], this.series = [], this.box = {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- }, this.setInitialRendering(!0), this.integration = j.networkgraphIntegrations[S.integration], this.enableSimulation = S.enableSimulation, this.attractiveForce = R(S.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = R(S.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = S.approximation;
- },
- updateSimulation: function(S) {
- this.enableSimulation = R(S, this.options.enableSimulation);
- },
- start: function() {
- var S = this.series, v = this.options;
- this.currentStep = 0, this.forces = S[0] && S[0].forces || [], this.chart = S[0] && S[0].chart, this.initialRendering && (this.initPositions(), S.forEach(function(d) {
- d.finishedAnimating = !0, d.render();
- })), this.setK(), this.resetSimulation(v), this.enableSimulation && this.step();
- },
- step: function() {
- var S = this, v = this.series;
- S.currentStep++, S.approximation === "barnes-hut" && (S.createQuadTree(), S.quadTree.calculateMassAndCenter()), S.forces.forEach(function(d) {
- S[d + "Forces"](S.temperature);
- }), S.applyLimits(S.temperature), S.temperature = S.coolDown(
- S.startTemperature,
- S.diffTemperature,
- S.currentStep
- ), S.prevSystemTemperature = S.systemTemperature, S.systemTemperature = S.getSystemTemperature(), S.enableSimulation && (v.forEach(function(d) {
- d.chart && d.render();
- }), S.maxIterations-- && isFinite(S.temperature) && !S.isStable() ? (S.simulation && j.win.cancelAnimationFrame(S.simulation), S.simulation = j.win.requestAnimationFrame(function() {
- S.step();
- })) : S.simulation = !1);
- },
- stop: function() {
- this.simulation && j.win.cancelAnimationFrame(this.simulation);
- },
- setArea: function(S, v, d, u) {
- this.box = {
- left: S,
- top: v,
- width: d,
- height: u
- };
- },
- setK: function() {
- this.k = this.options.linkLength || this.integration.getK(this);
- },
- addElementsToCollection: function(S, v) {
- S.forEach(function(d) {
- v.indexOf(d) === -1 && v.push(d);
- });
- },
- removeElementFromCollection: function(S, v) {
- S = v.indexOf(S), S !== -1 && v.splice(S, 1);
- },
- clear: function() {
- this.nodes.length = 0, this.links.length = 0, this.series.length = 0, this.resetSimulation();
- },
- resetSimulation: function() {
- this.forcedStop = !1, this.systemTemperature = 0, this.setMaxIterations(), this.setTemperature(), this.setDiffTemperature();
- },
- restartSimulation: function() {
- this.simulation ? this.resetSimulation() : (this.setInitialRendering(!1), this.enableSimulation ? this.start() : this.setMaxIterations(1), this.chart && this.chart.redraw(), this.setInitialRendering(!0));
- },
- setMaxIterations: function(S) {
- this.maxIterations = R(S, this.options.maxIterations);
- },
- setTemperature: function() {
- this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
- },
- setDiffTemperature: function() {
- this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
- },
- setInitialRendering: function(S) {
- this.initialRendering = S;
- },
- createQuadTree: function() {
- this.quadTree = new j.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
- },
- initPositions: function() {
- var S = this.options.initialPositions;
- N(S) ? (S.call(this), this.nodes.forEach(function(v) {
- U(v.prevX) || (v.prevX = v.plotX), U(v.prevY) || (v.prevY = v.plotY), v.dispX = 0, v.dispY = 0;
- })) : S === "circle" ? this.setCircularPositions() : this.setRandomPositions();
- },
- setCircularPositions: function() {
- function S(b) {
- b.linksFrom.forEach(function(w) {
- B[w.toNode.id] || (B[w.toNode.id] = !0, O.push(w.toNode), S(w.toNode));
- });
- }
- var v = this.box, d = this.nodes, u = 2 * Math.PI / (d.length + 1), A = d.filter(function(b) {
- return b.linksTo.length === 0;
- }), O = [], B = {}, C = this.options.initialPositionRadius;
- A.forEach(function(b) {
- O.push(b), S(b);
- }), O.length ? d.forEach(function(b) {
- O.indexOf(b) === -1 && O.push(b);
- }) : O = d, O.forEach(function(b, w) {
- b.plotX = b.prevX = R(b.plotX, v.width / 2 + C * Math.cos(w * u)), b.plotY = b.prevY = R(b.plotY, v.height / 2 + C * Math.sin(w * u)), b.dispX = 0, b.dispY = 0;
- });
- },
- setRandomPositions: function() {
- function S(A) {
- return A = A * A / Math.PI, A -= Math.floor(A);
- }
- var v = this.box, d = this.nodes, u = d.length + 1;
- d.forEach(function(A, O) {
- A.plotX = A.prevX = R(A.plotX, v.width * S(O)), A.plotY = A.prevY = R(A.plotY, v.height * S(u + O)), A.dispX = 0, A.dispY = 0;
- });
- },
- force: function(S) {
- this.integration[S].apply(this, Array.prototype.slice.call(arguments, 1));
- },
- barycenterForces: function() {
- this.getBarycenter(), this.force("barycenter");
- },
- getBarycenter: function() {
- var S = 0, v = 0, d = 0;
- return this.nodes.forEach(function(u) {
- v += u.plotX * u.mass, d += u.plotY * u.mass, S += u.mass;
- }), this.barycenter = { x: v, y: d, xFactor: v / S, yFactor: d / S };
- },
- barnesHutApproximation: function(S, v) {
- var d = this.getDistXY(S, v), u = this.vectorLength(d);
- if (S !== v && u !== 0)
- if (v.isInternal)
- if (v.boxSize / u < this.options.theta && u !== 0) {
- var A = this.repulsiveForce(u, this.k);
- this.force("repulsive", S, A * v.mass, d, u);
- var O = !1;
- } else
- O = !0;
- else
- A = this.repulsiveForce(u, this.k), this.force("repulsive", S, A * v.mass, d, u);
- return O;
- },
- repulsiveForces: function() {
- var S = this;
- S.approximation === "barnes-hut" ? S.nodes.forEach(function(v) {
- S.quadTree.visitNodeRecursive(
- null,
- function(d) {
- return S.barnesHutApproximation(v, d);
- }
- );
- }) : S.nodes.forEach(function(v) {
- S.nodes.forEach(function(d) {
- if (v !== d && !v.fixedPosition) {
- var u = S.getDistXY(v, d), A = S.vectorLength(u);
- if (A !== 0) {
- var O = S.repulsiveForce(A, S.k);
- S.force("repulsive", v, O * d.mass, u, A);
- }
- }
- });
- });
- },
- attractiveForces: function() {
- var S = this, v, d, u;
- S.links.forEach(function(A) {
- A.fromNode && A.toNode && (v = S.getDistXY(A.fromNode, A.toNode), d = S.vectorLength(v), d !== 0 && (u = S.attractiveForce(d, S.k), S.force("attractive", A, u, v, d)));
- });
- },
- applyLimits: function() {
- var S = this;
- S.nodes.forEach(function(v) {
- v.fixedPosition || (S.integration.integrate(S, v), S.applyLimitBox(v, S.box), v.dispX = 0, v.dispY = 0);
- });
- },
- applyLimitBox: function(S, v) {
- var d = S.radius;
- S.plotX = H(S.plotX, v.left + d, v.width - d), S.plotY = H(S.plotY, v.top + d, v.height - d);
- },
- coolDown: function(S, v, d) {
- return S - v * d;
- },
- isStable: function() {
- return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
- },
- getSystemTemperature: function() {
- return this.nodes.reduce(function(S, v) {
- return S + v.temperature;
- }, 0);
- },
- vectorLength: function(S) {
- return Math.sqrt(S.x * S.x + S.y * S.y);
- },
- getDistR: function(S, v) {
- return S = this.getDistXY(S, v), this.vectorLength(S);
- },
- getDistXY: function(S, v) {
- var d = S.plotX - v.plotX;
- return S = S.plotY - v.plotY, { x: d, y: S, absX: Math.abs(d), absY: Math.abs(S) };
- }
- }), y(l, "predraw", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(S) {
- S.stop();
- });
- }), y(l, "render", function() {
- function S(u) {
- u.maxIterations-- && isFinite(u.temperature) && !u.isStable() && !u.enableSimulation && (u.beforeStep && u.beforeStep(), u.step(), d = !1, v = !0);
- }
- var v = !1;
- if (this.graphLayoutsLookup) {
- for (Z(!1, this), this.graphLayoutsLookup.forEach(function(u) {
- u.start();
- }); !d; ) {
- var d = !0;
- this.graphLayoutsLookup.forEach(S);
- }
- v && this.series.forEach(function(u) {
- u && u.layout && u.render();
- });
- }
- }), y(l, "beforePrint", function() {
- this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(S) {
- S.updateSimulation(!1);
- }), this.redraw());
- }), y(l, "afterPrint", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(S) {
- S.updateSimulation();
- }), this.redraw();
- });
- }), E(f, "Series/PackedBubble/PackedBubbleComposition.js", [f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j) {
- var I = y.layouts["reingold-fruchterman"], Z = j.addEvent, H = j.extendClass, U = j.pick;
- l.prototype.getSelectedParentNodes = function() {
- var F = [];
- return this.series.forEach(function(N) {
- N.parentNode && N.parentNode.selected && F.push(N.parentNode);
- }), F;
- }, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(F, N, R, S) {
- return Math.min(F, (R.marker.radius + S.marker.radius) / 2);
- }, barycenter: function() {
- var F = this, N = F.options.gravitationalConstant, R = F.box, S = F.nodes, v, d;
- S.forEach(function(u) {
- F.options.splitSeries && !u.isParentNode ? (v = u.series.parentNode.plotX, d = u.series.parentNode.plotY) : (v = R.width / 2, d = R.height / 2), u.fixedPosition || (u.plotX -= (u.plotX - v) * N / (u.mass * Math.sqrt(S.length)), u.plotY -= (u.plotY - d) * N / (u.mass * Math.sqrt(S.length)));
- });
- }, repulsive: function(F, N, R, S) {
- var v = N * this.diffTemperature / F.mass / F.degree;
- N = R.x * v, R = R.y * v, F.fixedPosition || (F.plotX += N, F.plotY += R), S.fixedPosition || (S.plotX -= N, S.plotY -= R);
- }, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = H(I, { beforeStep: function() {
- this.options.marker && this.series.forEach(function(F) {
- F && F.calculateParentRadius();
- });
- }, isStable: function() {
- var F = Math.abs(this.prevSystemTemperature - this.systemTemperature);
- return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > F || 0 >= this.temperature;
- }, setCircularPositions: function() {
- var F = this, N = F.box, R = F.nodes, S = 2 * Math.PI / (R.length + 1), v, d, u = F.options.initialPositionRadius;
- R.forEach(function(A, O) {
- F.options.splitSeries && !A.isParentNode ? (v = A.series.parentNode.plotX, d = A.series.parentNode.plotY) : (v = N.width / 2, d = N.height / 2), A.plotX = A.prevX = U(A.plotX, v + u * Math.cos(A.index || O * S)), A.plotY = A.prevY = U(A.plotY, d + u * Math.sin(A.index || O * S)), A.dispX = 0, A.dispY = 0;
- });
- }, repulsiveForces: function() {
- var F = this, N, R, S, v = F.options.bubblePadding;
- F.nodes.forEach(function(d) {
- d.degree = d.mass, d.neighbours = 0, F.nodes.forEach(function(u) {
- N = 0, d === u || d.fixedPosition || !F.options.seriesInteraction && d.series !== u.series || (S = F.getDistXY(d, u), R = F.vectorLength(S) - (d.marker.radius + u.marker.radius + v), 0 > R && (d.degree += 0.01, d.neighbours++, N = F.repulsiveForce(-R / Math.sqrt(d.neighbours), F.k, d, u)), F.force("repulsive", d, N * u.mass, S, u, R));
- });
- });
- }, applyLimitBox: function(F) {
- if (this.options.splitSeries && !F.isParentNode && this.options.parentNodeLimit) {
- var N = this.getDistXY(F, F.series.parentNode), R = F.series.parentNodeRadius - F.marker.radius - this.vectorLength(N);
- 0 > R && R > -2 * F.marker.radius && (F.plotX -= 0.01 * N.x, F.plotY -= 0.01 * N.y);
- }
- I.prototype.applyLimitBox.apply(this, arguments);
- } }), Z(l, "beforeRedraw", function() {
- this.allDataPoints && delete this.allDataPoints;
- });
- }), E(f, "Series/PackedBubble/PackedBubbleSeries.js", [f["Core/Color/Color.js"], f["Core/Globals.js"], f["Series/PackedBubble/PackedBubblePoint.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j, I, Z) {
- var H = this && this.__extends || function() {
- var w = function(x, a) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
- c.__proto__ = p;
- } || function(c, p) {
- for (var i in p)
- p.hasOwnProperty(i) && (c[i] = p[i]);
- }, w(x, a);
- };
- return function(x, a) {
- function c() {
- this.constructor = x;
- }
- w(x, a), x.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
- };
- }(), U = l.parse, F = I.series, N = I.seriesTypes.bubble, R = Z.addEvent, S = Z.clamp, v = Z.defined, d = Z.extend, u = Z.fireEvent, A = Z.isArray, O = Z.isNumber, B = Z.merge, C = Z.pick, b = y.dragNodesMixin;
- return l = function(w) {
- function x() {
- var a = w !== null && w.apply(this, arguments) || this;
- return a.chart = void 0, a.data = void 0, a.layout = void 0, a.options = void 0, a.points = void 0, a.xData = void 0, a;
- }
- return H(x, w), x.prototype.accumulateAllPoints = function(a) {
- var c = a.chart, p = [], i, h;
- for (i = 0; i < c.series.length; i++)
- if (a = c.series[i], a.is("packedbubble") && a.visible || !c.options.chart.ignoreHiddenSeries)
- for (h = 0; h < a.yData.length; h++)
- p.push([null, null, a.yData[h], a.index, h, { id: h, marker: { radius: 0 } }]);
- return p;
- }, x.prototype.addLayout = function() {
- var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
- c || (this.chart.graphLayoutsStorage = c = {}, this.chart.graphLayoutsLookup = p = []);
- var h = c[a.type];
- h || (a.enableSimulation = v(i.forExport) ? !i.forExport : a.enableSimulation, c[a.type] = h = new y.layouts[a.type](), h.init(a), p.splice(h.index, 0, h)), this.layout = h, this.points.forEach(function(o) {
- o.mass = 2, o.degree = 1, o.collisionNmb = 1;
- }), h.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), h.addElementsToCollection([this], h.series), h.addElementsToCollection(this.points, h.nodes);
- }, x.prototype.addSeriesLayout = function() {
- var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = B(a, a.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), h = c[a.type + "-series"];
- h || (c[a.type + "-series"] = h = new y.layouts[a.type](), h.init(i), p.splice(h.index, 0, h)), this.parentNodeLayout = h, this.createParentNodes();
- }, x.prototype.calculateParentRadius = function() {
- var a = this.seriesBox();
- this.parentNodeRadius = S(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, a ? Math.max(Math.sqrt(Math.pow(
- a.width,
- 2
- ) + Math.pow(a.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20), this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
- }, x.prototype.calculateZExtremes = function() {
- var a = this.options.zMin, c = this.options.zMax, p = 1 / 0, i = -1 / 0;
- return a && c ? [a, c] : (this.chart.series.forEach(function(h) {
- h.yData.forEach(function(o) {
- v(o) && (o > i && (i = o), o < p && (p = o));
- });
- }), a = C(a, p), c = C(c, i), [a, c]);
- }, x.prototype.checkOverlap = function(a, c) {
- var p = a[0] - c[0], i = a[1] - c[1];
- return -1e-3 > Math.sqrt(p * p + i * i) - Math.abs(a[2] + c[2]);
- }, x.prototype.createParentNodes = function() {
- var a = this, c = a.chart, p = a.parentNodeLayout, i, h = a.parentNode, o = a.pointClass, t = a.layout.options, s = { radius: a.parentNodeRadius, lineColor: a.color, fillColor: U(a.color).brighten(0.4).get() };
- t.parentNodeOptions && (s = B(t.parentNodeOptions.marker || {}, s)), a.parentNodeMass = 0, a.points.forEach(function(n) {
- a.parentNodeMass += Math.PI * Math.pow(n.marker.radius, 2);
- }), a.calculateParentRadius(), p.nodes.forEach(function(n) {
- n.seriesIndex === a.index && (i = !0);
- }), p.setArea(0, 0, c.plotWidth, c.plotHeight), i || (h || (h = new o().init(this, { mass: a.parentNodeRadius / 2, marker: s, dataLabels: { inside: !1 }, states: { normal: { marker: s }, hover: { marker: s } }, dataLabelOnNull: !0, degree: a.parentNodeRadius, isParentNode: !0, seriesIndex: a.index })), a.parentNode && (h.plotX = a.parentNode.plotX, h.plotY = a.parentNode.plotY), a.parentNode = h, p.addElementsToCollection([a], p.series), p.addElementsToCollection([h], p.nodes));
- }, x.prototype.deferLayout = function() {
- var a = this.options.layoutAlgorithm;
- this.visible && (this.addLayout(), a.splitSeries && this.addSeriesLayout());
- }, x.prototype.destroy = function() {
- this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(a) {
- a.removeElementFromCollection(this, a.series);
- }, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), F.prototype.destroy.apply(this, arguments);
- }, x.prototype.drawDataLabels = function() {
- var a = this.options.dataLabels.textPath, c = this.points;
- F.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, F.prototype.drawDataLabels.apply(this, arguments), this.points = c, this.options.dataLabels.textPath = a);
- }, x.prototype.drawGraph = function() {
- if (this.layout && this.layout.options.splitSeries) {
- var a = this.chart, c = this.layout.options.parentNodeOptions.marker, p = { fill: c.fillColor || U(this.color).brighten(0.4).get(), opacity: c.fillOpacity, stroke: c.lineColor || this.color, "stroke-width": C(c.lineWidth, this.options.lineWidth) };
- this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, a.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), c = B({
- x: this.parentNode.plotX - this.parentNodeRadius,
- y: this.parentNode.plotY - this.parentNodeRadius,
- width: 2 * this.parentNodeRadius,
- height: 2 * this.parentNodeRadius
- }, p), this.parentNode.graphic || (this.graph = this.parentNode.graphic = a.renderer.symbol(p.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(c);
- }
- }, x.prototype.drawTracker = function() {
- var a = this.parentNode;
- if (w.prototype.drawTracker.call(this), a) {
- var c = A(a.dataLabels) ? a.dataLabels : a.dataLabel ? [a.dataLabel] : [];
- a.graphic && (a.graphic.element.point = a), c.forEach(function(p) {
- p.div ? p.div.point = a : p.element.point = a;
- });
- }
- }, x.prototype.getPointRadius = function() {
- var a = this, c = a.chart, p = a.options, i = p.useSimulation, h = Math.min(c.plotWidth, c.plotHeight), o = {}, t = [], s = c.allDataPoints, n, T, _, D;
- ["minSize", "maxSize"].forEach(function(P) {
- var X = parseInt(p[P], 10), g = /%$/.test(p[P]);
- o[P] = g ? h * X / 100 : X * Math.sqrt(s.length);
- }), c.minRadius = n = o.minSize / Math.sqrt(s.length), c.maxRadius = T = o.maxSize / Math.sqrt(s.length);
- var W = i ? a.calculateZExtremes() : [n, T];
- (s || []).forEach(function(P, X) {
- _ = i ? S(P[2], W[0], W[1]) : P[2], D = a.getRadius(W[0], W[1], n, T, _), D === 0 && (D = null), s[X][2] = D, t.push(D);
- }), a.radii = t;
- }, x.prototype.init = function() {
- return F.prototype.init.apply(this, arguments), this.eventsToUnbind.push(R(this, "updatedData", function() {
- this.chart.series.forEach(function(a) {
- a.type === this.type && (a.isDirty = !0);
- }, this);
- })), this;
- }, x.prototype.onMouseUp = function(a) {
- if (a.fixedPosition && !a.removed) {
- var c, p, i = this.layout, h = this.parentNodeLayout;
- h && i.options.dragBetweenSeries && h.nodes.forEach(function(o) {
- a && a.marker && o !== a.series.parentNode && (c = i.getDistXY(a, o), p = i.vectorLength(c) - o.marker.radius - a.marker.radius, 0 > p && (o.series.addPoint(B(a.options, { plotX: a.plotX, plotY: a.plotY }), !1), i.removeElementFromCollection(a, i.nodes), a.remove()));
- }), b.onMouseUp.apply(this, arguments);
- }
- }, x.prototype.placeBubbles = function(a) {
- var c = this.checkOverlap, p = this.positionBubble, i = [], h = 1, o = 0, t = 0, s = [], n;
- if (a = a.sort(function(T, _) {
- return _[2] - T[2];
- }), a.length) {
- if (i.push([[0, 0, a[0][2], a[0][3], a[0][4]]]), 1 < a.length)
- for (i.push([[0, 0 - a[1][2] - a[0][2], a[1][2], a[1][3], a[1][4]]]), n = 2; n < a.length; n++)
- a[n][2] = a[n][2] || 1, s = p(i[h][o], i[h - 1][t], a[n]), c(s, i[h][0]) ? (i.push([]), t = 0, i[h + 1].push(p(i[h][o], i[h][0], a[n])), h++, o = 0) : 1 < h && i[h - 1][t + 1] && c(s, i[h - 1][t + 1]) ? (t++, i[h].push(p(i[h][o], i[h - 1][t], a[n])), o++) : (o++, i[h].push(s));
- this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), s = this.chart.rawPositions;
- }
- return s;
- }, x.prototype.pointAttribs = function(a, c) {
- var p = this.options, i = p.marker;
- return a && a.isParentNode && p.layoutAlgorithm && p.layoutAlgorithm.parentNodeOptions && (i = p.layoutAlgorithm.parentNodeOptions.marker), p = i.fillOpacity, a = F.prototype.pointAttribs.call(this, a, c), p !== 1 && (a["fill-opacity"] = p), a;
- }, x.prototype.positionBubble = function(a, c, p) {
- var i = Math.sqrt, h = Math.asin, o = Math.acos, t = Math.pow, s = Math.abs;
- return i = i(t(a[0] - c[0], 2) + t(a[1] - c[1], 2)), o = o((t(i, 2) + t(p[2] + c[2], 2) - t(p[2] + a[2], 2)) / (2 * (p[2] + c[2]) * i)), h = h(s(a[0] - c[0]) / i), a = (0 > a[1] - c[1] ? 0 : Math.PI) + o + h * (0 > (a[0] - c[0]) * (a[1] - c[1]) ? 1 : -1), [c[0] + (c[2] + p[2]) * Math.sin(a), c[1] - (c[2] + p[2]) * Math.cos(a), p[2], p[3], p[4]];
- }, x.prototype.render = function() {
- var a = [];
- F.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(c) {
- A(c.dataLabels) && c.dataLabels.forEach(function(p) {
- a.push(p);
- });
- }), this.options.useSimulation && this.chart.hideOverlappingLabels(a));
- }, x.prototype.resizeRadius = function() {
- var a = this.chart, c = a.rawPositions, p = Math.min, i = Math.max, h = a.plotLeft, o = a.plotTop, t = a.plotHeight, s = a.plotWidth, n, T, _, D = n = Number.POSITIVE_INFINITY, W = T = Number.NEGATIVE_INFINITY;
- for (_ = 0; _ < c.length; _++) {
- var P = c[_][2];
- D = p(
- D,
- c[_][0] - P
- ), W = i(W, c[_][0] + P), n = p(n, c[_][1] - P), T = i(T, c[_][1] + P);
- }
- if (_ = [W - D, T - n], p = p.apply([], [(s - h) / _[0], (t - o) / _[1]]), 1e-10 < Math.abs(p - 1)) {
- for (_ = 0; _ < c.length; _++)
- c[_][2] *= p;
- this.placeBubbles(c);
- } else
- a.diffY = t / 2 + o - n - (T - n) / 2, a.diffX = s / 2 + h - D - (W - D) / 2;
- }, x.prototype.seriesBox = function() {
- var a = this.chart, c = Math.max, p = Math.min, i, h = [a.plotLeft, a.plotLeft + a.plotWidth, a.plotTop, a.plotTop + a.plotHeight];
- return this.data.forEach(function(o) {
- v(o.plotX) && v(o.plotY) && o.marker.radius && (i = o.marker.radius, h[0] = p(h[0], o.plotX - i), h[1] = c(h[1], o.plotX + i), h[2] = p(h[2], o.plotY - i), h[3] = c(h[3], o.plotY + i));
- }), O(h.width / h.height) ? h : null;
- }, x.prototype.setVisible = function() {
- var a = this;
- F.prototype.setVisible.apply(a, arguments), a.parentNodeLayout && a.graph ? a.visible ? (a.graph.show(), a.parentNode.dataLabel && a.parentNode.dataLabel.show()) : (a.graph.hide(), a.parentNodeLayout.removeElementFromCollection(a.parentNode, a.parentNodeLayout.nodes), a.parentNode.dataLabel && a.parentNode.dataLabel.hide()) : a.layout && (a.visible ? a.layout.addElementsToCollection(
- a.points,
- a.layout.nodes
- ) : a.points.forEach(function(c) {
- a.layout.removeElementFromCollection(c, a.layout.nodes);
- }));
- }, x.prototype.translate = function() {
- var a = this.chart, c = this.data, p = this.index, i, h = this.options.useSimulation;
- if (this.processedXData = this.xData, this.generatePoints(), v(a.allDataPoints) || (a.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), h)
- var o = a.allDataPoints;
- else
- o = this.placeBubbles(a.allDataPoints), this.options.draggable = !1;
- for (i = 0; i < o.length; i++)
- if (o[i][3] === p) {
- var t = c[o[i][4]], s = C(o[i][2], void 0);
- h || (t.plotX = o[i][0] - a.plotLeft + a.diffX, t.plotY = o[i][1] - a.plotTop + a.diffY), O(s) && (t.marker = d(t.marker, { radius: s, width: 2 * s, height: 2 * s }), t.radius = s);
- }
- h && this.deferLayout(), u(this, "afterTranslate");
- }, x.defaultOptions = B(N.defaultOptions, { minSize: "10%", maxSize: "50%", sizeBy: "area", zoneAxis: "y", crisp: !1, tooltip: { pointFormat: "Value: {point.value}" }, draggable: !0, useSimulation: !0, parentNode: { allowPointSelect: !1 }, dataLabels: { formatter: function() {
- var a = this.series.chart.numberFormatter, c = this.point.value;
- return O(c) ? a(c, -1) : "";
- }, parentNodeFormatter: function() {
- return this.name;
- }, parentNodeTextPath: { enabled: !0 }, padding: 0, style: { transition: "opacity 2000ms" } }, layoutAlgorithm: { initialPositions: "circle", initialPositionRadius: 20, bubblePadding: 5, parentNodeLimit: !1, seriesInteraction: !0, dragBetweenSeries: !1, parentNodeOptions: { maxIterations: 400, gravitationalConstant: 0.03, maxSpeed: 50, initialPositionRadius: 100, seriesInteraction: !0, marker: {
- fillColor: null,
- fillOpacity: 1,
- lineWidth: null,
- lineColor: null,
- symbol: "circle"
- } }, enableSimulation: !0, type: "packedbubble", integration: "packedbubble", maxIterations: 1e3, splitSeries: !1, maxSpeed: 5, gravitationalConstant: 0.01, friction: -0.981 } }), x;
- }(N), d(l.prototype, {
- alignDataLabel: F.prototype.alignDataLabel,
- axisTypes: [],
- directTouch: !0,
- forces: ["barycenter", "repulsive"],
- hasDraggableNodes: !0,
- isCartesian: !1,
- noSharedTooltip: !0,
- onMouseDown: b.onMouseDown,
- onMouseMove: b.onMouseMove,
- pointArrayMap: ["value"],
- pointClass: j,
- pointValKey: "value",
- redrawHalo: b.redrawHalo,
- requireSorting: !1,
- searchPoint: y.noop,
- trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
- }), I.registerSeriesType("packedbubble", l), l;
- }), E(f, "Series/Polygon/PolygonSeries.js", [f["Core/Globals.js"], f["Core/Legend/LegendSymbol.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var v = function(d, u) {
- return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, O) {
- A.__proto__ = O;
- } || function(A, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (A[B] = O[B]);
- }, v(d, u);
- };
- return function(d, u) {
- function A() {
- this.constructor = d;
- }
- v(d, u), d.prototype = u === null ? Object.create(u) : (A.prototype = u.prototype, new A());
- };
- }();
- l = l.noop;
- var H = j.series, U = j.seriesTypes, F = U.area, N = U.line, R = U.scatter;
- U = I.extend;
- var S = I.merge;
- return I = function(v) {
- function d() {
- var u = v !== null && v.apply(this, arguments) || this;
- return u.data = void 0, u.options = void 0, u.points = void 0, u;
- }
- return Z(d, v), d.prototype.getGraphPath = function() {
- for (var u = N.prototype.getGraphPath.call(this), A = u.length + 1; A--; )
- (A === u.length || u[A][0] === "M") && 0 < A && u.splice(A, 0, ["Z"]);
- return this.areaPath = u;
- }, d.prototype.drawGraph = function() {
- this.options.fillColor = this.color, F.prototype.drawGraph.call(this);
- }, d.defaultOptions = S(R.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), d;
- }(R), U(I.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: H.prototype.drawTracker, setStackedPoints: l }), j.registerSeriesType("polygon", I), I;
- }), E(f, "Core/Axis/WaterfallAxis.js", [f["Extensions/Stacking.js"], f["Core/Utilities.js"]], function(l, y) {
- var j = y.addEvent, I = y.objectEach, Z;
- return function(H) {
- function U() {
- var v = this.waterfall.stacks;
- v && (v.changed = !1, delete v.alreadyChanged);
- }
- function F() {
- var v = this.options.stackLabels;
- v && v.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
- }
- function N() {
- for (var v = this.axes, d = this.series, u = d.length; u--; )
- d[u].options.stacking && (v.forEach(function(A) {
- A.isXAxis || (A.waterfall.stacks.changed = !0);
- }), u = 0);
- }
- function R() {
- this.waterfall || (this.waterfall = new S(this));
- }
- var S = function() {
- function v(d) {
- this.axis = d, this.stacks = { changed: !1 };
- }
- return v.prototype.renderStackTotals = function() {
- var d = this.axis, u = d.waterfall.stacks, A = d.stacking && d.stacking.stackTotalGroup, O = new l(d, d.options.stackLabels, !1, 0, void 0);
- this.dummyStackItem = O, I(u, function(B) {
- I(B, function(C) {
- O.total = C.stackTotal, C.label && (O.label = C.label), l.prototype.render.call(O, A), C.label = O.label, delete O.label;
- });
- }), O.total = null;
- }, v;
- }();
- H.Composition = S, H.compose = function(v, d) {
- j(v, "init", R), j(v, "afterBuildStacks", U), j(v, "afterRender", F), j(d, "beforeRedraw", N);
- };
- }(Z || (Z = {})), Z;
- }), E(f, "Series/Waterfall/WaterfallPoint.js", [f["Series/Column/ColumnSeries.js"], f["Core/Series/Point.js"], f["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var H = function(U, F) {
- return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(N, R) {
- N.__proto__ = R;
- } || function(N, R) {
- for (var S in R)
- R.hasOwnProperty(S) && (N[S] = R[S]);
- }, H(U, F);
- };
- return function(U, F) {
- function N() {
- this.constructor = U;
- }
- H(U, F), U.prototype = F === null ? Object.create(F) : (N.prototype = F.prototype, new N());
- };
- }(), Z = j.isNumber;
- return function(H) {
- function U() {
- var F = H !== null && H.apply(this, arguments) || this;
- return F.options = void 0, F.series = void 0, F;
- }
- return I(U, H), U.prototype.getClassName = function() {
- var F = y.prototype.getClassName.call(this);
- return this.isSum ? F += " highcharts-sum" : this.isIntermediateSum && (F += " highcharts-intermediate-sum"), F;
- }, U.prototype.isValid = function() {
- return Z(this.y) || this.isSum || !!this.isIntermediateSum;
- }, U;
- }(l.prototype.pointClass);
- }), E(f, "Series/Waterfall/WaterfallSeries.js", [f["Core/Axis/Axis.js"], f["Core/Chart/Chart.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"], f["Core/Axis/WaterfallAxis.js"], f["Series/Waterfall/WaterfallPoint.js"]], function(l, y, j, I, Z, H) {
- var U = this && this.__extends || function() {
- var C = function(b, w) {
- return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
- x.__proto__ = a;
- } || function(x, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (x[c] = a[c]);
- }, C(b, w);
- };
- return function(b, w) {
- function x() {
- this.constructor = b;
- }
- C(b, w), b.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }(), F = j.seriesTypes, N = F.column, R = F.line, S = I.arrayMax, v = I.arrayMin, d = I.correctFloat;
- F = I.extend;
- var u = I.isNumber, A = I.merge, O = I.objectEach, B = I.pick;
- return I = function(C) {
- function b() {
- var w = C !== null && C.apply(this, arguments) || this;
- return w.chart = void 0, w.data = void 0, w.options = void 0, w.points = void 0, w.stackedYNeg = void 0, w.stackedYPos = void 0, w.stackKey = void 0, w.xData = void 0, w.yAxis = void 0, w.yData = void 0, w;
- }
- return U(b, C), b.prototype.generatePoints = function() {
- var w;
- N.prototype.generatePoints.apply(this);
- var x = 0;
- for (w = this.points.length; x < w; x++) {
- var a = this.points[x], c = this.processedYData[x];
- (a.isIntermediateSum || a.isSum) && (a.y = d(c));
- }
- }, b.prototype.translate = function() {
- var w = this.options, x = this.yAxis, a = B(w.minPointLength, 5), c = a / 2, p = w.threshold || 0, i = p, h = p;
- w = w.stacking;
- var o = x.waterfall.stacks[this.stackKey];
- N.prototype.translate.apply(this);
- for (var t = this.points, s = 0; s < t.length; s++) {
- var n = t[s], T = this.processedYData[s], _ = n.shapeArgs;
- if (_ && u(T)) {
- var D = [0, T], W = n.y;
- if (w) {
- if (o) {
- if (D = o[s], w === "overlap") {
- var P = D.stackState[D.stateIndex--];
- P = 0 <= W ? P : P - W, Object.hasOwnProperty.call(D, "absolutePos") && delete D.absolutePos, Object.hasOwnProperty.call(D, "absoluteNeg") && delete D.absoluteNeg;
- } else
- 0 <= W ? (P = D.threshold + D.posTotal, D.posTotal -= W) : (P = D.threshold + D.negTotal, D.negTotal -= W, P -= W), !D.posTotal && Object.hasOwnProperty.call(D, "absolutePos") && (D.posTotal = D.absolutePos, delete D.absolutePos), !D.negTotal && Object.hasOwnProperty.call(D, "absoluteNeg") && (D.negTotal = D.absoluteNeg, delete D.absoluteNeg);
- n.isSum || (D.connectorThreshold = D.threshold + D.stackTotal), x.reversed ? (T = 0 <= W ? P - W : P + W, W = P) : (T = P, W = P - W), n.below = T <= p, _.y = x.translate(T, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - (x.translate(W, !1, !0, !1, !0) || 0)), (W = x.waterfall.dummyStackItem) && (W.x = s, W.label = o[s].label, W.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[s], this.stackedYPos[s]));
- }
- } else
- P = Math.max(i, i + W) + D[0], _.y = x.translate(
- P,
- !1,
- !0,
- !1,
- !0
- ) || 0, n.isSum ? (_.y = x.translate(D[1], !1, !0, !1, !0) || 0, _.height = Math.min(x.translate(D[0], !1, !0, !1, !0) || 0, x.len) - _.y, n.below = D[1] <= p) : n.isIntermediateSum ? (0 <= W ? (T = D[1] + h, W = h) : (T = h, W = D[1] + h), x.reversed && (T ^= W, W ^= T, T ^= W), _.y = x.translate(T, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - Math.min(x.translate(W, !1, !0, !1, !0) || 0, x.len)), h += D[1], n.below = T <= p) : (_.height = 0 < T ? (x.translate(i, !1, !0, !1, !0) || 0) - _.y : (x.translate(i, !1, !0, !1, !0) || 0) - (x.translate(i - T, !1, !0, !1, !0) || 0), i += T, n.below = i < p), 0 > _.height && (_.y += _.height, _.height *= -1);
- n.plotY = _.y = Math.round(_.y || 0) - this.borderWidth % 2 / 2, _.height = Math.max(Math.round(_.height || 0), 1e-3), n.yBottom = _.y + _.height, _.height <= a && !n.isNull ? (_.height = a, _.y -= c, n.plotY = _.y, n.minPointLengthOffset = 0 > n.y ? -c : c) : (n.isNull && (_.width = 0), n.minPointLengthOffset = 0), W = n.plotY + (n.negative ? _.height : 0), n.below && (n.plotY += _.height), n.tooltipPos && (this.chart.inverted ? n.tooltipPos[0] = x.len - W : n.tooltipPos[1] = W);
- }
- }
- }, b.prototype.processData = function(w) {
- var x = this.options, a = this.yData, c = x.data, p = a.length, i = x.threshold || 0, h, o, t, s, n;
- for (n = o = h = t = s = 0; n < p; n++) {
- var T = a[n], _ = c && c[n] ? c[n] : {};
- T === "sum" || _.isSum ? a[n] = d(o) : T === "intermediateSum" || _.isIntermediateSum ? (a[n] = d(h), h = 0) : (o += T, h += T), t = Math.min(o, t), s = Math.max(o, s);
- }
- C.prototype.processData.call(this, w), x.stacking || (this.dataMin = t + i, this.dataMax = s);
- }, b.prototype.toYData = function(w) {
- return w.isSum ? "sum" : w.isIntermediateSum ? "intermediateSum" : w.y;
- }, b.prototype.updateParallelArrays = function(w, x) {
- C.prototype.updateParallelArrays.call(this, w, x), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
- }, b.prototype.pointAttribs = function(w, x) {
- var a = this.options.upColor;
- return a && !w.options.color && (w.color = 0 < w.y ? a : null), w = N.prototype.pointAttribs.call(this, w, x), delete w.dashstyle, w;
- }, b.prototype.getGraphPath = function() {
- return [["M", 0, 0]];
- }, b.prototype.getCrispPath = function() {
- var w = this.data, x = this.yAxis, a = w.length, c = Math.round(this.graph.strokeWidth()) % 2 / 2, p = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, h = this.yAxis.reversed, o = this.options.stacking, t = [], s;
- for (s = 1; s < a; s++) {
- var n = w[s].shapeArgs, T = w[s - 1], _ = w[s - 1].shapeArgs, D = x.waterfall.stacks[this.stackKey], W = 0 < T.y ? -_.height : 0;
- D && _ && n && (D = D[s - 1], o ? (D = D.connectorThreshold, W = Math.round(x.translate(D, 0, 1, 0, 1) + (h ? W : 0)) - c) : W = _.y + T.minPointLengthOffset + p - c, t.push(["M", (_.x || 0) + (i ? 0 : _.width || 0), W], ["L", (n.x || 0) + (i && n.width || 0), W])), _ && t.length && (!o && 0 > T.y && !h || 0 < T.y && h) && ((T = t[t.length - 2]) && typeof T[2] == "number" && (T[2] += _.height || 0), (T = t[t.length - 1]) && typeof T[2] == "number" && (T[2] += _.height || 0));
- }
- return t;
- }, b.prototype.drawGraph = function() {
- R.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
- }, b.prototype.setStackedPoints = function() {
- function w(V, Q, k, G) {
- if (Y)
- for (k; k < Y; k++)
- X.stackState[k] += G;
- else
- X.stackState[0] = V, Y = X.stackState.length;
- X.stackState.push(X.stackState[Y - 1] + Q);
- }
- var x = this.options, a = this.yAxis.waterfall.stacks, c = x.threshold, p = c || 0, i = p, h = this.stackKey, o = this.xData, t = o.length, s, n, T;
- this.yAxis.stacking.usePercentage = !1;
- var _ = n = T = p;
- if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
- var D = a.changed;
- (s = a.alreadyChanged) && 0 > s.indexOf(h) && (D = !0), a[h] || (a[h] = {}), s = a[h];
- for (var W = 0; W < t; W++) {
- var P = o[W];
- (!s[P] || D) && (s[P] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: D && s[P] ? s[P].label : void 0 });
- var X = s[P], g = this.yData[W];
- 0 <= g ? X.posTotal += g : X.negTotal += g;
- var m = x.data[W];
- P = X.absolutePos = X.posTotal;
- var L = X.absoluteNeg = X.negTotal;
- X.stackTotal = P + L;
- var Y = X.stackState.length;
- m && m.isIntermediateSum ? (w(T, n, 0, T), T = n, n = c, p ^= i, i ^= p, p ^= i) : m && m.isSum ? (w(c, _, Y), p = c) : (w(p, g, 0, _), m && (_ += g, n += g)), X.stateIndex++, X.threshold = p, p += X.stackTotal;
- }
- a.changed = !1, a.alreadyChanged || (a.alreadyChanged = []), a.alreadyChanged.push(h);
- }
- }, b.prototype.getExtremes = function() {
- var w = this.options.stacking;
- if (w) {
- var x = this.yAxis;
- x = x.waterfall.stacks;
- var a = this.stackedYNeg = [], c = this.stackedYPos = [];
- return w === "overlap" ? O(x[this.stackKey], function(p) {
- a.push(v(p.stackState)), c.push(S(p.stackState));
- }) : O(x[this.stackKey], function(p) {
- a.push(p.negTotal + p.threshold), c.push(p.posTotal + p.threshold);
- }), { dataMin: v(a), dataMax: S(c) };
- }
- return { dataMin: this.dataMin, dataMax: this.dataMax };
- }, b.defaultOptions = A(N.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), b;
- }(N), F(I.prototype, { getZonesGraphs: R.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: H }), j.registerSeriesType("waterfall", I), Z.compose(l, y), I;
- }), E(f, "Extensions/Polar.js", [
- f["Core/Animation/AnimationUtilities.js"],
- f["Core/Chart/Chart.js"],
- f["Core/Globals.js"],
- f["Extensions/Pane.js"],
- f["Core/Pointer.js"],
- f["Core/Series/Series.js"],
- f["Core/Series/SeriesRegistry.js"],
- f["Core/Renderer/SVG/SVGRenderer.js"],
- f["Core/Utilities.js"]
- ], function(l, y, j, I, Z, H, U, F, N) {
- var R = l.animObject;
- U = U.seriesTypes;
- var S = N.addEvent, v = N.defined, d = N.find, u = N.isNumber, A = N.pick, O = N.splat, B = N.uniqueKey;
- l = N.wrap;
- var C = H.prototype;
- Z = Z.prototype, C.searchPointByAngle = function(x) {
- var a = this.chart, c = this.xAxis.pane.center;
- return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(x.chartX - c[0] - a.plotLeft, x.chartY - c[1] - a.plotTop) });
- }, C.getConnectors = function(x, a, c, p) {
- var i = p ? 1 : 0, h = 0 <= a && a <= x.length - 1 ? a : 0 > a ? x.length - 1 + a : 0;
- a = 0 > h - 1 ? x.length - (1 + i) : h - 1, i = h + 1 > x.length - 1 ? i : h + 1;
- var o = x[a];
- i = x[i];
- var t = o.plotX;
- o = o.plotY;
- var s = i.plotX, n = i.plotY;
- i = x[h].plotX, h = x[h].plotY, t = (1.5 * i + t) / 2.5, o = (1.5 * h + o) / 2.5, s = (1.5 * i + s) / 2.5;
- var T = (1.5 * h + n) / 2.5;
- n = Math.sqrt(Math.pow(t - i, 2) + Math.pow(o - h, 2));
- var _ = Math.sqrt(Math.pow(s - i, 2) + Math.pow(T - h, 2));
- return t = Math.atan2(o - h, t - i), T = Math.PI / 2 + (t + Math.atan2(T - h, s - i)) / 2, Math.abs(t - T) > Math.PI / 2 && (T -= Math.PI), t = i + Math.cos(T) * n, o = h + Math.sin(T) * n, s = i + Math.cos(Math.PI + T) * _, T = h + Math.sin(Math.PI + T) * _, i = { rightContX: s, rightContY: T, leftContX: t, leftContY: o, plotX: i, plotY: h }, c && (i.prevPointCont = this.getConnectors(x, a, !1, p)), i;
- }, C.toXY = function(x) {
- var a = this.chart, c = this.xAxis, p = this.yAxis, i = x.plotX, h = x.plotY, o = x.series, t = a.inverted, s = x.y, n = t ? i : p.len - h;
- t && o && !o.isRadialBar && (x.plotY = h = typeof s == "number" && p.translate(s) || 0), x.rectPlotX = i, x.rectPlotY = h, p.center && (n += p.center[3] / 2), u(h) && (p = t ? p.postTranslate(h, n) : c.postTranslate(i, n), x.plotX = x.polarPlotX = p.x - a.plotLeft, x.plotY = x.polarPlotY = p.y - a.plotTop), this.kdByAngle ? (a = (i / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > a && (a += 360), x.clientX = a) : x.clientX = x.plotX;
- }, U.spline && (l(U.spline.prototype, "getPointSpline", function(x, a, c, p) {
- return this.chart.polar ? p ? (x = this.getConnectors(a, p, !0, this.connectEnds), a = x.prevPointCont && x.prevPointCont.rightContX, c = x.prevPointCont && x.prevPointCont.rightContY, x = ["C", u(a) ? a : x.plotX, u(c) ? c : x.plotY, u(x.leftContX) ? x.leftContX : x.plotX, u(x.leftContY) ? x.leftContY : x.plotY, x.plotX, x.plotY]) : x = ["M", c.plotX, c.plotY] : x = x.call(this, a, c, p), x;
- }), U.areasplinerange && (U.areasplinerange.prototype.getPointSpline = U.spline.prototype.getPointSpline)), S(H, "afterTranslate", function() {
- var x = this.chart;
- if (x.polar && this.xAxis) {
- if ((this.kdByAngle = x.tooltip && x.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy", !this.preventPostTranslate)
- for (var a = this.points, c = a.length; c--; )
- this.toXY(a[c]), !x.hasParallelCoordinates && !this.yAxis.reversed && a[c].y < this.yAxis.min && (a[c].isNull = !0);
- this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(S(this, "afterRender", function() {
- if (x.polar) {
- var p = this.yAxis.pane.center;
- this.clipCircle ? this.clipCircle.animate({ x: p[0], y: p[1], r: p[2] / 2, innerR: p[3] / 2 }) : this.clipCircle = x.renderer.clipCircle(p[0], p[1], p[2] / 2, p[3] / 2), this.group.clip(this.clipCircle), this.setClip = j.noop;
- }
- })));
- }
- }, { order: 2 }), l(
- U.line.prototype,
- "getGraphPath",
- function(x, a) {
- var c = this, p;
- if (this.chart.polar) {
- for (a = a || this.points, p = 0; p < a.length; p++)
- if (!a[p].isNull) {
- var i = p;
- break;
- }
- if (this.options.connectEnds !== !1 && typeof i < "u") {
- this.connectEnds = !0, a.splice(a.length, 0, a[i]);
- var h = !0;
- }
- a.forEach(function(o) {
- typeof o.polarPlotY > "u" && c.toXY(o);
- });
- }
- return p = x.apply(this, [].slice.call(arguments, 1)), h && a.pop(), p;
- }
- );
- var b = function(x, a) {
- var c = this, p = this.chart, i = this.options.animation, h = this.group, o = this.markerGroup, t = this.xAxis && this.xAxis.center, s = p.plotLeft, n = p.plotTop, T, _, D, W;
- if (p.polar) {
- if (c.isRadialBar)
- a || (c.startAngleRad = A(c.translatedThreshold, c.xAxis.startAngleRad), j.seriesTypes.pie.prototype.animate.call(c, a));
- else if (p.renderer.isSVG)
- if (i = R(i), c.is("column")) {
- if (!a) {
- var P = t[3] / 2;
- c.points.forEach(function(X) {
- T = X.graphic, D = (_ = X.shapeArgs) && _.r, W = _ && _.innerR, T && _ && (T.attr({ r: P, innerR: P }), T.animate({ r: D, innerR: W }, c.options.animation));
- });
- }
- } else
- a ? (x = { translateX: t[0] + s, translateY: t[1] + n, scaleX: 1e-3, scaleY: 1e-3 }, h.attr(x), o && o.attr(x)) : (x = { translateX: s, translateY: n, scaleX: 1, scaleY: 1 }, h.animate(x, i), o && o.animate(x, i));
- } else
- x.call(this, a);
- };
- if (l(C, "animate", b), U.column) {
- var w = U.arearange.prototype;
- U = U.column.prototype, U.polarArc = function(x, a, c, p) {
- var i = this.xAxis.center, h = this.yAxis.len, o = i[3] / 2;
- return a = h - a + o, x = h - A(x, h) + o, this.yAxis.reversed && (0 > a && (a = o), 0 > x && (x = o)), { x: i[0], y: i[1], r: a, innerR: x, start: c, end: p };
- }, l(U, "animate", b), l(U, "translate", function(x) {
- var a = this.options, c = a.stacking, p = this.chart, i = this.xAxis, h = this.yAxis, o = h.reversed, t = h.center, s = i.startAngleRad, n = i.endAngleRad - s;
- if (this.preventPostTranslate = !0, x.call(this), i.isRadial) {
- x = this.points, i = x.length;
- var T = h.translate(h.min), _ = h.translate(h.max);
- if (a = a.threshold || 0, p.inverted && u(a)) {
- var D = h.translate(a);
- v(D) && (0 > D ? D = 0 : D > n && (D = n), this.translatedThreshold = D + s);
- }
- for (; i--; ) {
- a = x[i];
- var W = a.barX, P = a.x, X = a.y;
- if (a.shapeType = "arc", p.inverted) {
- if (a.plotY = h.translate(X), c && h.stacking) {
- if (X = h.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[P] && !a.isNull) {
- var g = X[P].points[this.getStackIndicator(void 0, P, this.index).key], m = h.translate(g[0]);
- g = h.translate(g[1]), v(m) && (m = N.clamp(m, 0, n));
- }
- } else
- m = D, g = a.plotY;
- m > g && (g = [m, m = g][0]), o ? g > T ? g = T : m < _ ? m = _ : (m > T || g < _) && (m = g = n) : m < T ? m = T : g > _ ? g = _ : (g < T || m > _) && (m = g = 0), h.min > h.max && (m = g = o ? n : 0), m += s, g += s, t && (a.barX = W += t[3] / 2), P = Math.max(W, 0), X = Math.max(W + a.pointWidth, 0), a.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: P, start: m, end: g }, a.opacity = m === g ? 0 : void 0, a.plotY = (v(this.translatedThreshold) && (m < this.translatedThreshold ? m : g)) - s;
- } else
- m = W + s, a.shapeArgs = this.polarArc(a.yBottom, a.plotY, m, m + a.pointWidth);
- this.toXY(a), p.inverted ? (W = h.postTranslate(a.rectPlotY, W + a.pointWidth / 2), a.tooltipPos = [W.x - p.plotLeft, W.y - p.plotTop]) : a.tooltipPos = [a.plotX, a.plotY], t && (a.ttBelow = a.plotY > t[1]);
- }
- }
- }), U.findAlignments = function(x, a) {
- return a.align === null && (a.align = 20 < x && 160 > x ? "left" : 200 < x && 340 > x ? "right" : "center"), a.verticalAlign === null && (a.verticalAlign = 45 > x || 315 < x ? "bottom" : 135 < x && 225 > x ? "top" : "middle"), a;
- }, w && (w.findAlignments = U.findAlignments), l(U, "alignDataLabel", function(x, a, c, p, i, h) {
- var o = this.chart, t = A(p.inside, !!this.options.stacking);
- o.polar ? (x = a.rectPlotX / Math.PI * 180, o.inverted ? (this.forceDL = o.isInsidePlot(a.plotX, Math.round(a.plotY)), t && a.shapeArgs ? (i = a.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, a.barX + a.pointWidth / 2), i = { x: i.x - o.plotLeft, y: i.y - o.plotTop }) : a.tooltipPos && (i = { x: a.tooltipPos[0], y: a.tooltipPos[1] }), p.align = A(p.align, "center"), p.verticalAlign = A(
- p.verticalAlign,
- "middle"
- )) : this.findAlignments && (p = this.findAlignments(x, p)), C.alignDataLabel.call(this, a, c, p, i, h), this.isRadialBar && a.shapeArgs && a.shapeArgs.start === a.shapeArgs.end && c.hide(!0)) : x.call(this, a, c, p, i, h);
- });
- }
- l(Z, "getCoordinates", function(x, a) {
- var c = this.chart, p = { xAxis: [], yAxis: [] };
- return c.polar ? c.axes.forEach(function(i) {
- var h = i.isXAxis, o = i.center;
- if (i.coll !== "colorAxis") {
- var t = a.chartX - o[0] - c.plotLeft;
- o = a.chartY - o[1] - c.plotTop, p[h ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(h ? Math.PI - Math.atan2(t, o) : Math.sqrt(Math.pow(
- t,
- 2
- ) + Math.pow(o, 2)), !0) });
- }
- }) : p = x.call(this, a), p;
- }), F.prototype.clipCircle = function(x, a, c, p) {
- var i = B(), h = this.createElement("clipPath").attr({ id: i }).add(this.defs);
- return x = p ? this.arc(x, a, c, p, 0, 2 * Math.PI).add(h) : this.circle(x, a, c).add(h), x.id = i, x.clipPath = h, x;
- }, S(y, "getAxes", function() {
- this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(x) {
- new I(x, this);
- }, this);
- }), S(y, "afterDrawChartBox", function() {
- this.pane.forEach(function(x) {
- x.render();
- });
- }), S(
- H,
- "afterInit",
- function() {
- var x = this.chart;
- x.inverted && x.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
- }
- ), l(y.prototype, "get", function(x, a) {
- return d(this.pane || [], function(c) {
- return c.options.id === a;
- }) || x.call(this, a);
- });
- }), E(f, "masters/highcharts-more.src.js", [f["Core/Globals.js"], f["Core/Axis/RadialAxis.js"], f["Series/Bubble/BubbleSeries.js"]], function(l, y, j) {
- y.compose(l.Axis, l.Tick), j.compose(l.Chart, l.Legend, l.Series);
- });
- });
- })(L0);
- const _0 = fl;
- var gl = {}, D0 = {
- get exports() {
- return gl;
- },
- set exports(r) {
- gl = r;
- }
- };
- (function(r) {
- (function(f) {
- r.exports ? (f.default = f, r.exports = f) : f(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(f) {
- function E(l, y, j, I) {
- l.hasOwnProperty(y) || (l[y] = I.apply(null, j));
- }
- f = f ? f._modules : {}, E(
- f,
- "Extensions/FullScreen.js",
- [f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Renderer/HTML/AST.js"], f["Core/Utilities.js"]],
- function(l, y, j, I) {
- var Z = I.addEvent;
- return I = function() {
- function H(U) {
- this.chart = U, this.isOpen = !1, U = U.renderTo, this.browserProps || (typeof U.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : U.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : U.webkitRequestFullScreen ? this.browserProps = {
- fullscreenChange: "webkitfullscreenchange",
- requestFullscreen: "webkitRequestFullScreen",
- exitFullscreen: "webkitExitFullscreen"
- } : U.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
- }
- return H.prototype.close = function() {
- var U = this.chart, F = U.options.chart;
- this.isOpen && this.browserProps && U.container.ownerDocument instanceof Document && U.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), U.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, F.width = this.origWidthOption, F.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
- }, H.prototype.open = function() {
- var U = this, F = U.chart, N = F.options.chart;
- if (N && (U.origWidthOption = N.width, U.origHeightOption = N.height), U.origWidth = F.chartWidth, U.origHeight = F.chartHeight, U.browserProps) {
- var R = Z(
- F.container.ownerDocument,
- U.browserProps.fullscreenChange,
- function() {
- U.isOpen ? (U.isOpen = !1, U.close()) : (F.setSize(null, null, !1), U.isOpen = !0, U.setButtonText());
- }
- ), S = Z(F, "destroy", R);
- U.unbindFullscreenEvent = function() {
- R(), S();
- }, (N = F.renderTo[U.browserProps.requestFullscreen]()) && N.catch(function() {
- alert("Full screen is not supported inside a frame.");
- });
- }
- }, H.prototype.setButtonText = function() {
- var U = this.chart, F = U.exportDivElements, N = U.options.exporting, R = N && N.buttons && N.buttons.contextButton.menuItems;
- U = U.options.lang, N && N.menuItemDefinitions && U && U.exitFullscreen && U.viewFullscreen && R && F && (F = F[R.indexOf("viewFullscreen")]) && j.setElementHTML(F, this.isOpen ? U.exitFullscreen : N.menuItemDefinitions.viewFullscreen.text || U.viewFullscreen);
- }, H.prototype.toggle = function() {
- this.isOpen ? this.close() : this.open();
- }, H;
- }(), y.Fullscreen = I, Z(l, "beforeRender", function() {
- this.fullscreen = new y.Fullscreen(this);
- }), y.Fullscreen;
- }
- ), E(f, "Core/Chart/ChartNavigationComposition.js", [], function() {
- var l;
- return function(y) {
- y.compose = function(I) {
- return I.navigation || (I.navigation = new j(I)), I;
- };
- var j = function() {
- function I(Z) {
- this.updates = [], this.chart = Z;
- }
- return I.prototype.addUpdate = function(Z) {
- this.chart.navigation.updates.push(Z);
- }, I.prototype.update = function(Z, H) {
- var U = this;
- this.updates.forEach(function(F) {
- F.call(U.chart, Z, H);
- });
- }, I;
- }();
- y.Additions = j;
- }(l || (l = {})), l;
- }), E(f, "Extensions/Exporting/ExportingDefaults.js", [f["Core/Globals.js"]], function(l) {
- return { exporting: { type: "image/png", url: "https://export.highcharts.com/", printMaxWidth: 780, scale: 2, buttons: { contextButton: {
- className: "highcharts-contextbutton",
- menuClassName: "highcharts-contextmenu",
- symbol: "menu",
- titleKey: "contextButtonTitle",
- menuItems: "viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")
- } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
- this.fullscreen.toggle();
- } }, printChart: { textKey: "printChart", onclick: function() {
- this.print();
- } }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: function() {
- this.exportChart();
- } }, downloadJPEG: {
- textKey: "downloadJPEG",
- onclick: function() {
- this.exportChart({ type: "image/jpeg" });
- }
- }, downloadPDF: { textKey: "downloadPDF", onclick: function() {
- this.exportChart({ type: "application/pdf" });
- } }, downloadSVG: { textKey: "downloadSVG", onclick: function() {
- this.exportChart({ type: "image/svg+xml" });
- } } } }, lang: {
- viewFullscreen: "View in full screen",
- exitFullscreen: "Exit from full screen",
- printChart: "Print chart",
- downloadPNG: "Download PNG image",
- downloadJPEG: "Download JPEG image",
- downloadPDF: "Download PDF document",
- downloadSVG: "Download SVG vector image",
- contextButtonTitle: "Chart context menu"
- }, navigation: { buttonOptions: { symbolSize: 14, symbolX: 12.5, symbolY: 10.5, align: "right", buttonSpacing: 3, height: 22, verticalAlign: "top", width: 24, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { padding: 5 } }, menuStyle: { border: "1px solid #999999", background: "#ffffff", padding: "5px 0" }, menuItemStyle: { padding: "0.5em 1em", color: "#333333", background: "none", fontSize: l.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
- background: "#335cad",
- color: "#ffffff"
- } } };
- }), E(f, "Extensions/Exporting/ExportingSymbols.js", [], function() {
- var l;
- return function(y) {
- function j(H, U, F, N) {
- return [["M", H, U + 2.5], ["L", H + F, U + 2.5], ["M", H, U + N / 2 + 0.5], ["L", H + F, U + N / 2 + 0.5], ["M", H, U + N - 1.5], ["L", H + F, U + N - 1.5]];
- }
- function I(H, U, F, N) {
- return H = N / 3 - 2, N = [], N = N.concat(this.circle(F - H, U, H, H), this.circle(F - H, U + H + 4, H, H), this.circle(F - H, U + 2 * (H + 4), H, H));
- }
- var Z = [];
- y.compose = function(H) {
- Z.indexOf(H) === -1 && (Z.push(H), H = H.prototype.symbols, H.menu = j, H.menuball = I.bind(H));
- };
- }(l || (l = {})), l;
- }), E(f, "Core/HttpUtilities.js", [f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y) {
- var j = l.doc, I = y.createElement, Z = y.discardElement, H = y.merge, U = y.objectEach, F = { ajax: function(N) {
- var R = H(!0, { url: !1, type: "get", dataType: "json", success: !1, error: !1, data: !1, headers: {} }, N);
- N = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" };
- var S = new XMLHttpRequest();
- if (!R.url)
- return !1;
- S.open(R.type.toUpperCase(), R.url, !0), R.headers["Content-Type"] || S.setRequestHeader(
- "Content-Type",
- N[R.dataType] || N.text
- ), U(R.headers, function(v, d) {
- S.setRequestHeader(d, v);
- }), S.onreadystatechange = function() {
- if (S.readyState === 4) {
- if (S.status === 200) {
- var v = S.responseText;
- if (R.dataType === "json")
- try {
- v = JSON.parse(v);
- } catch (d) {
- R.error && R.error(S, d);
- return;
- }
- return R.success && R.success(v);
- }
- R.error && R.error(S, S.responseText);
- }
- };
- try {
- R.data = JSON.stringify(R.data);
- } catch {
- }
- S.send(R.data || !0);
- }, getJSON: function(N, R) {
- F.ajax({ url: N, success: R, dataType: "json", headers: { "Content-Type": "text/plain" } });
- }, post: function(N, R, S) {
- var v = I("form", H({ method: "post", action: N, enctype: "multipart/form-data" }, S), { display: "none" }, j.body);
- U(R, function(d, u) {
- I("input", { type: "hidden", name: u, value: d }, null, v);
- }), v.submit(), Z(v);
- } };
- return F;
- }), E(f, "Extensions/Exporting/Exporting.js", [
- f["Core/Renderer/HTML/AST.js"],
- f["Core/Chart/Chart.js"],
- f["Core/Chart/ChartNavigationComposition.js"],
- f["Core/DefaultOptions.js"],
- f["Extensions/Exporting/ExportingDefaults.js"],
- f["Extensions/Exporting/ExportingSymbols.js"],
- f["Core/Globals.js"],
- f["Core/HttpUtilities.js"],
- f["Core/Utilities.js"]
- ], function(l, y, j, I, Z, H, U, F, N) {
- y = I.defaultOptions;
- var R = U.doc, S = U.win, v = N.addEvent, d = N.css, u = N.createElement, A = N.discardElement, O = N.extend, B = N.find, C = N.fireEvent, b = N.isObject, w = N.merge, x = N.objectEach, a = N.pick, c = N.removeEvent, p = N.uniqueKey, i;
- return function(h) {
- function o(nt) {
- var rt = this, ct = rt.renderer, gt = w(rt.options.navigation.buttonOptions, nt), dt = gt.onclick, ht = gt.menuItems, at = gt.symbolSize || 12;
- if (rt.btnCount || (rt.btnCount = 0), rt.exportDivElements || (rt.exportDivElements = [], rt.exportSVGElements = []), gt.enabled !== !1 && gt.theme) {
- var J = gt.theme, tt = J.states, ot = tt && tt.hover;
- tt = tt && tt.select;
- var lt;
- rt.styledMode || (J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none")), delete J.states, dt ? lt = function(vt) {
- vt && vt.stopPropagation(), dt.call(rt, vt);
- } : ht && (lt = function(vt) {
- vt && vt.stopPropagation(), rt.contextMenu(pt.menuClassName, ht, pt.translateX, pt.translateY, pt.width, pt.height, pt), pt.setState(2);
- }), gt.text && gt.symbol ? J.paddingLeft = a(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none"));
- var pt = ct.button(gt.text, 0, 0, lt, J, ot, tt).addClass(nt.className).attr({ title: a(rt.options.lang[gt._titleKey || gt.titleKey], "") });
- if (pt.menuClassName = nt.menuClassName || "highcharts-menu-" + rt.btnCount++, gt.symbol) {
- var yt = ct.symbol(gt.symbol, gt.symbolX - at / 2, gt.symbolY - at / 2, at, at, { width: at, height: at }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(pt);
- rt.styledMode || yt.attr({ stroke: gt.symbolStroke, fill: gt.symbolFill, "stroke-width": gt.symbolStrokeWidth || 1 });
- }
- pt.add(rt.exportingGroup).align(O(
- gt,
- { width: pt.width, x: a(gt.x, rt.buttonOffset) }
- ), !0, "spacingBox"), rt.buttonOffset += (pt.width + gt.buttonSpacing) * (gt.align === "right" ? -1 : 1), rt.exportSVGElements.push(pt, yt);
- }
- }
- function t() {
- if (this.printReverseInfo) {
- var nt = this.printReverseInfo, rt = nt.childNodes, ct = nt.origDisplay;
- nt = nt.resetParams, this.moveContainers(this.renderTo), [].forEach.call(rt, function(gt, dt) {
- gt.nodeType === 1 && (gt.style.display = ct[dt] || "");
- }), this.isPrinting = !1, nt && this.setSize.apply(this, nt), delete this.printReverseInfo, et = void 0, C(this, "afterPrint");
- }
- }
- function s() {
- var nt = R.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
- this.isPrinting = !0, this.pointer.reset(null, 0), C(this, "beforePrint"), rt && this.chartWidth > rt && (ct.resetParams = [this.options.chart.width, void 0, !1], this.setSize(rt, void 0, !1)), [].forEach.call(ct.childNodes, function(gt, dt) {
- gt.nodeType === 1 && (ct.origDisplay[dt] = gt.style.display, gt.style.display = "none");
- }), this.moveContainers(nt), this.printReverseInfo = ct;
- }
- function n(nt) {
- nt.renderExporting(), v(nt, "redraw", nt.renderExporting), v(nt, "destroy", nt.destroyExport);
- }
- function T(nt, rt, ct, gt, dt, ht, at) {
- var J = this, tt = J.options.navigation, ot = J.chartWidth, lt = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, ht), vt = J[pt];
- if (!vt) {
- J.exportContextMenu = J[pt] = vt = u("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
- var Ct = u("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
- J.styledMode || d(Ct, O(
- { MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
- tt.menuStyle
- )), vt.hideMenu = function() {
- d(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, d(J.renderTo, { overflow: "hidden" }), d(J.container, { overflow: "hidden" }), N.clearTimeout(vt.hideTimer), C(J, "exportMenuHidden");
- }, J.exportEvents.push(v(vt, "mouseleave", function() {
- vt.hideTimer = S.setTimeout(vt.hideMenu, 500);
- }), v(vt, "mouseenter", function() {
- N.clearTimeout(vt.hideTimer);
- }), v(R, "mouseup", function(Pt) {
- J.pointer.inClass(Pt.target, nt) || vt.hideMenu();
- }), v(vt, "click", function() {
- J.openMenu && vt.hideMenu();
- })), rt.forEach(function(Pt) {
- if (typeof Pt == "string" && (Pt = J.options.exporting.menuItemDefinitions[Pt]), b(Pt, !0)) {
- var At = void 0;
- Pt.separator ? At = u("hr", void 0, void 0, Ct) : (Pt.textKey === "viewData" && J.isDataTableVisible && (Pt.textKey = "hideData"), At = u("li", { className: "highcharts-menu-item", onclick: function(St) {
- St && St.stopPropagation(), vt.hideMenu(), Pt.onclick && Pt.onclick.apply(J, arguments);
- } }, void 0, Ct), l.setElementHTML(At, Pt.text || J.options.lang[Pt.textKey]), J.styledMode || (At.onmouseover = function() {
- d(this, tt.menuItemHoverStyle);
- }, At.onmouseout = function() {
- d(this, tt.menuItemStyle);
- }, d(At, O({ cursor: "pointer" }, tt.menuItemStyle)))), J.exportDivElements.push(At);
- }
- }), J.exportDivElements.push(Ct, vt), J.exportMenuWidth = vt.offsetWidth, J.exportMenuHeight = vt.offsetHeight;
- }
- rt = { display: "block" }, ct + J.exportMenuWidth > ot ? rt.right = ot - ct - dt - yt + "px" : rt.left = ct - yt + "px", gt + ht + J.exportMenuHeight > lt && at.alignOptions.verticalAlign !== "top" ? rt.bottom = lt - gt - yt + "px" : rt.top = gt + ht - yt + "px", d(vt, rt), d(J.renderTo, { overflow: "" }), d(J.container, { overflow: "" }), J.openMenu = !0, C(J, "exportMenuShown");
- }
- function _(nt) {
- var rt = nt ? nt.target : this, ct = rt.exportSVGElements, gt = rt.exportDivElements;
- nt = rt.exportEvents;
- var dt;
- ct && (ct.forEach(function(ht, at) {
- ht && (ht.onclick = ht.ontouchstart = null, dt = "cache-" + ht.menuClassName, rt[dt] && delete rt[dt], ct[at] = ht.destroy());
- }), ct.length = 0), rt.exportingGroup && (rt.exportingGroup.destroy(), delete rt.exportingGroup), gt && (gt.forEach(function(ht, at) {
- ht && (N.clearTimeout(ht.hideTimer), c(ht, "mouseleave"), gt[at] = ht.onmouseout = ht.onmouseover = ht.ontouchstart = ht.onclick = null, A(ht));
- }), gt.length = 0), nt && (nt.forEach(function(ht) {
- ht();
- }), nt.length = 0);
- }
- function D(nt, rt) {
- rt = this.getSVGForExport(nt, rt), nt = w(this.options.exporting, nt), F.post(nt.url, { filename: nt.filename ? nt.filename.replace(/\//g, "-") : this.getFilename(), type: nt.type, width: nt.width || 0, scale: nt.scale, svg: rt }, nt.formAttributes);
- }
- function W() {
- return this.styledMode && this.inlineStyles(), this.container.innerHTML;
- }
- function P() {
- var nt = this.userOptions.title && this.userOptions.title.text, rt = this.options.exporting.filename;
- return rt ? rt.replace(/\//g, "-") : (typeof nt == "string" && (rt = nt.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(
- /[^a-z0-9\-]/g,
- ""
- ).replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!rt || 5 > rt.length) && (rt = "chart"), rt);
- }
- function X(nt) {
- var rt, ct = w(this.options, nt);
- ct.plotOptions = w(this.userOptions.plotOptions, nt && nt.plotOptions), ct.time = w(this.userOptions.time, nt && nt.time);
- var gt = u("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, R.body), dt = this.renderTo.style.width, ht = this.renderTo.style.height;
- dt = ct.exporting.sourceWidth || ct.chart.width || /px$/.test(dt) && parseInt(dt, 10) || (ct.isGantt ? 800 : 600), ht = ct.exporting.sourceHeight || ct.chart.height || /px$/.test(ht) && parseInt(ht, 10) || 400, O(ct.chart, { animation: !1, renderTo: gt, forExport: !0, renderer: "SVGRenderer", width: dt, height: ht }), ct.exporting.enabled = !1, delete ct.data, ct.series = [], this.series.forEach(function(tt) {
- rt = w(tt.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: tt.visible }), rt.isInternal || ct.series.push(rt);
- });
- var at = {};
- this.axes.forEach(function(tt) {
- tt.userOptions.internalKey || (tt.userOptions.internalKey = p()), tt.options.isInternal || (at[tt.coll] || (at[tt.coll] = !0, ct[tt.coll] = []), ct[tt.coll].push(w(tt.userOptions, { visible: tt.visible })));
- });
- var J = new this.constructor(ct, this.callback);
- return nt && ["xAxis", "yAxis", "series"].forEach(function(tt) {
- var ot = {};
- nt[tt] && (ot[tt] = nt[tt], J.update(ot));
- }), this.axes.forEach(function(tt) {
- var ot = B(J.axes, function(yt) {
- return yt.options.internalKey === tt.userOptions.internalKey;
- }), lt = tt.getExtremes(), pt = lt.userMin;
- lt = lt.userMax, ot && (typeof pt < "u" && pt !== ot.min || typeof lt < "u" && lt !== ot.max) && ot.setExtremes(
- pt,
- lt,
- !0,
- !1
- );
- }), ht = J.getChartHTML(), C(this, "getSVG", { chartCopy: J }), ht = this.sanitizeSVG(ht, ct), ct = null, J.destroy(), A(gt), ht;
- }
- function g(nt, rt) {
- var ct = this.options.exporting;
- return this.getSVG(w({ chart: { borderRadius: 0 } }, ct.chartOptions, rt, { exporting: { sourceWidth: nt && nt.sourceWidth || ct.sourceWidth, sourceHeight: nt && nt.sourceHeight || ct.sourceHeight } }));
- }
- function m(nt) {
- return nt.replace(/([A-Z])/g, function(rt, ct) {
- return "-" + ct.toLowerCase();
- });
- }
- function L() {
- function nt(J) {
- function tt(St, Dt) {
- if (lt = pt = !1, ct.length) {
- for (yt = ct.length; yt-- && !pt; )
- pt = ct[yt].test(Dt);
- lt = !pt;
- }
- for (Dt === "transform" && St === "none" && (lt = !0), yt = rt.length; yt-- && !lt; )
- lt = rt[yt].test(Dt) || typeof St == "function";
- lt || Ct[Dt] === St && J.nodeName !== "svg" || gt[J.nodeName][Dt] === St || (q && q.indexOf(Dt) === -1 ? ot += m(Dt) + ":" + St + ";" : St && J.setAttribute(m(Dt), St));
- }
- var ot = "", lt, pt, yt;
- if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
- var vt = S.getComputedStyle(J, null), Ct = J.nodeName === "svg" ? {} : S.getComputedStyle(J.parentNode, null);
- if (!gt[J.nodeName]) {
- dt = at.getElementsByTagName("svg")[0];
- var Pt = at.createElementNS(J.namespaceURI, J.nodeName);
- dt.appendChild(Pt), gt[J.nodeName] = w(S.getComputedStyle(Pt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Pt);
- }
- if (U.isFirefox || U.isMS)
- for (var At in vt)
- tt(vt[At], At);
- else
- x(vt, tt);
- ot && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + ot)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
- }
- }
- var rt = $, ct = h.inlineWhitelist, gt = {}, dt, ht = R.createElement("iframe");
- d(ht, { width: "1px", height: "1px", visibility: "hidden" }), R.body.appendChild(ht);
- var at = ht.contentWindow.document;
- at.open(), at.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>'), at.close(), nt(this.container.querySelector("svg")), dt.parentNode.removeChild(dt), ht.parentNode.removeChild(ht);
- }
- function Y(nt) {
- (this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
- nt.appendChild(rt);
- });
- }
- function V() {
- var nt = this;
- nt.exporting = { update: function(rt, ct) {
- nt.isDirtyExporting = !0, w(!0, nt.options.exporting, rt), a(ct, !0) && nt.redraw();
- } }, j.compose(nt).navigation.addUpdate(function(rt, ct) {
- nt.isDirtyExporting = !0, w(!0, nt.options.navigation, rt), a(ct, !0) && nt.redraw();
- });
- }
- function Q() {
- var nt = this;
- nt.isPrinting || (et = nt, U.isSafari || nt.beforePrint(), setTimeout(function() {
- S.focus(), S.print(), U.isSafari || setTimeout(function() {
- nt.afterPrint();
- }, 1e3);
- }, 1));
- }
- function k() {
- var nt = this, rt = nt.options.exporting, ct = rt.buttons, gt = nt.isDirtyExporting || !nt.exportSVGElements;
- nt.buttonOffset = 0, nt.isDirtyExporting && nt.destroyExport(), gt && rt.enabled !== !1 && (nt.exportEvents = [], nt.exportingGroup = nt.exportingGroup || nt.renderer.g("exporting-group").attr({ zIndex: 3 }).add(), x(ct, function(dt) {
- nt.addButton(dt);
- }), nt.isDirtyExporting = !1);
- }
- function G(nt, rt) {
- var ct = nt.indexOf("</svg>") + 6, gt = nt.substr(ct);
- return nt = nt.substr(0, ct), rt && rt.exporting && rt.exporting.allowHTML && gt && (gt = '<foreignObject x="0" y="0" width="' + rt.chart.width + '" height="' + rt.chart.height + '"><body xmlns="http://www.w3.org/1999/xhtml">' + gt.replace(/(<(?:img|br).*?(?=>))>/g, "$1 />") + "</body></foreignObject>", nt = nt.replace("</svg>", gt + "</svg>")), nt = nt.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(
- /jQuery[0-9]+="[^"]+"/g,
- ""
- ).replace(/url\(("|")(.*?)("|");?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g, " xlink:href=").replace(/\n/, " ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"').replace(/ /g, " ").replace(/­/g, ""), this.ieSanitizeSVG && (nt = this.ieSanitizeSVG(nt)), nt;
- }
- var z = [], $ = [
- /-/,
- /^(clipPath|cssText|d|height|width)$/,
- /^font$/,
- /[lL]ogical(Width|Height)$/,
- /perspective/,
- /TapHighlightColor/,
- /^transition/,
- /^length$/
- ], q = "fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");
- h.inlineWhitelist = [];
- var it = ["clipPath", "defs", "desc"], et;
- h.compose = function(nt, rt) {
- H.compose(rt), z.indexOf(nt) === -1 && (z.push(nt), rt = nt.prototype, rt.afterPrint = t, rt.exportChart = D, rt.inlineStyles = L, rt.print = Q, rt.sanitizeSVG = G, rt.getChartHTML = W, rt.getSVG = X, rt.getSVGForExport = g, rt.getFilename = P, rt.moveContainers = Y, rt.beforePrint = s, rt.contextMenu = T, rt.addButton = o, rt.destroyExport = _, rt.renderExporting = k, rt.callbacks.push(n), v(nt, "init", V), U.isSafari && U.win.matchMedia("print").addListener(function(ct) {
- et && (ct.matches ? et.beforePrint() : et.afterPrint());
- }));
- };
- }(i || (i = {})), y.exporting = w(Z.exporting, y.exporting), y.lang = w(Z.lang, y.lang), y.navigation = w(Z.navigation, y.navigation), i;
- }), E(f, "masters/modules/exporting.src.js", [f["Core/Globals.js"], f["Extensions/Exporting/Exporting.js"], f["Core/HttpUtilities.js"]], function(l, y, j) {
- l.HttpUtilities = j, l.ajax = j.ajax, l.getJSON = j.getJSON, l.post = j.post, y.compose(l.Chart, l.Renderer);
- });
- });
- })(D0);
- const I0 = gl;
- var ml = {}, R0 = {
- get exports() {
- return ml;
- },
- set exports(r) {
- ml = r;
- }
- };
- (function(r) {
- (function(f) {
- r.exports ? (f.default = f, r.exports = f) : f(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(f) {
- function E(l, y, j, I) {
- l.hasOwnProperty(y) || (l[y] = I.apply(null, j));
- }
- f = f ? f._modules : {}, E(f, "Extensions/Boost/Boostables.js", [], function() {
- return "area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ");
- }), E(f, "Extensions/Boost/BoostableMap.js", [f["Extensions/Boost/Boostables.js"]], function(l) {
- var y = {};
- return l.forEach(function(j) {
- y[j] = 1;
- }), y;
- }), E(f, "Extensions/Boost/WGLShader.js", [f["Core/Utilities.js"]], function(l) {
- var y = l.clamp, j = l.error, I = l.pick;
- return function(Z) {
- function H() {
- x.length && j("[highcharts boost] shader error - " + x.join(`
- `));
- }
- function U(c, p) {
- var i = Z.createShader(p === "vertex" ? Z.VERTEX_SHADER : Z.FRAGMENT_SHADER);
- return Z.shaderSource(i, c), Z.compileShader(i), Z.getShaderParameter(i, Z.COMPILE_STATUS) ? i : (x.push("when compiling " + p + ` shader:
- ` + Z.getShaderInfoLog(i)), !1);
- }
- function F() {
- function c(h) {
- return Z.getUniformLocation(S, h);
- }
- var p = U(
- `#version 100
- #define LN10 2.302585092994046
- precision highp float;
- attribute vec4 aVertexPosition;
- attribute vec4 aColor;
- varying highp vec2 position;
- varying highp vec4 vColor;
- uniform mat4 uPMatrix;
- uniform float pSize;
- uniform float translatedThreshold;
- uniform bool hasThreshold;
- uniform bool skipTranslation;
- uniform float xAxisTrans;
- uniform float xAxisMin;
- uniform float xAxisMinPad;
- uniform float xAxisPointRange;
- uniform float xAxisLen;
- uniform bool xAxisPostTranslate;
- uniform float xAxisOrdinalSlope;
- uniform float xAxisOrdinalOffset;
- uniform float xAxisPos;
- uniform bool xAxisCVSCoord;
- uniform bool xAxisIsLog;
- uniform bool xAxisReversed;
- uniform float yAxisTrans;
- uniform float yAxisMin;
- uniform float yAxisMinPad;
- uniform float yAxisPointRange;
- uniform float yAxisLen;
- uniform bool yAxisPostTranslate;
- uniform float yAxisOrdinalSlope;
- uniform float yAxisOrdinalOffset;
- uniform float yAxisPos;
- uniform bool yAxisCVSCoord;
- uniform bool yAxisIsLog;
- uniform bool yAxisReversed;
- uniform bool isBubble;
- uniform bool bubbleSizeByArea;
- uniform float bubbleZMin;
- uniform float bubbleZMax;
- uniform float bubbleZThreshold;
- uniform float bubbleMinSize;
- uniform float bubbleMaxSize;
- uniform bool bubbleSizeAbs;
- uniform bool isInverted;
- float bubbleRadius(){
- float value = aVertexPosition.w;
- float zMax = bubbleZMax;
- float zMin = bubbleZMin;
- float radius = 0.0;
- float pos = 0.0;
- float zRange = zMax - zMin;
- if (bubbleSizeAbs){
- value = value - bubbleZThreshold;
- zMax = max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);
- zMin = 0.0;
- }
- if (value < zMin){
- radius = bubbleZMin / 2.0 - 1.0;
- } else {
- pos = zRange > 0.0 ? (value - zMin) / zRange : 0.5;
- if (bubbleSizeByArea && pos > 0.0){
- pos = sqrt(pos);
- }
- radius = ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;
- }
- return radius * 2.0;
- }
- float translate(float val,
- float pointPlacement,
- float localA,
- float localMin,
- float minPixelPadding,
- float pointRange,
- float len,
- bool cvsCoord,
- bool isLog,
- bool reversed
- ){
- float sign = 1.0;
- float cvsOffset = 0.0;
- if (cvsCoord) {
- sign *= -1.0;
- cvsOffset = len;
- }
- if (isLog) {
- val = log(val) / LN10;
- }
- if (reversed) {
- sign *= -1.0;
- cvsOffset -= sign * len;
- }
- return sign * (val - localMin) * localA + cvsOffset +
- (sign * minPixelPadding);
- }
- float xToPixels(float value) {
- if (skipTranslation){
- return value;// + xAxisPos;
- }
- return translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;
- }
- float yToPixels(float value, float checkTreshold) {
- float v;
- if (skipTranslation){
- v = value;// + yAxisPos;
- } else {
- v = translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;
- if (v > yAxisLen) {
- v = yAxisLen;
- }
- }
- if (checkTreshold > 0.0 && hasThreshold) {
- v = min(v, translatedThreshold);
- }
- return v;
- }
- void main(void) {
- if (isBubble){
- gl_PointSize = bubbleRadius();
- } else {
- gl_PointSize = pSize;
- }
- vColor = aColor;
- if (skipTranslation && isInverted) {
- gl_Position = uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);
- } else if (isInverted) {
- gl_Position = uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);
- } else {
- gl_Position = uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);
- }
- }`,
- "vertex"
- ), i = U(`precision highp float;
- uniform vec4 fillColor;
- varying highp vec2 position;
- varying highp vec4 vColor;
- uniform sampler2D uSampler;
- uniform bool isCircle;
- uniform bool hasColor;
- void main(void) {
- vec4 col = fillColor;
- vec4 tcol = texture2D(uSampler, gl_PointCoord.st);
- if (hasColor) {
- col = vColor;
- }
- if (isCircle) {
- col *= tcol;
- if (tcol.r < 0.0) {
- discard;
- } else {
- gl_FragColor = col;
- }
- } else {
- gl_FragColor = col;
- }
- }`, "fragment");
- return !p || !i ? (S = !1, H(), !1) : (S = Z.createProgram(), Z.attachShader(S, p), Z.attachShader(S, i), Z.linkProgram(S), Z.getProgramParameter(S, Z.LINK_STATUS) ? (Z.useProgram(S), Z.bindAttribLocation(S, 0, "aVertexPosition"), v = c("uPMatrix"), d = c("pSize"), u = c("fillColor"), A = c("isBubble"), O = c("bubbleSizeAbs"), B = c("bubbleSizeByArea"), a = c("uSampler"), C = c("skipTranslation"), b = c("isCircle"), w = c("isInverted"), !0) : (x.push(Z.getProgramInfoLog(S)), H(), S = !1));
- }
- function N(c, p) {
- Z && S && (c = R[c] = R[c] || Z.getUniformLocation(S, c), Z.uniform1f(c, p));
- }
- var R = {}, S, v, d, u, A, O, B, C, b, w, x = [], a;
- return Z && !F() ? !1 : { psUniform: function() {
- return d;
- }, pUniform: function() {
- return v;
- }, fillColorUniform: function() {
- return u;
- }, setBubbleUniforms: function(c, p, i) {
- var h = c.options, o = Number.MAX_VALUE, t = -Number.MAX_VALUE;
- if (Z && S && c.is("bubble")) {
- var s = c.getPxExtremes();
- o = I(h.zMin, y(p, h.displayNegative === !1 ? h.zThreshold : -Number.MAX_VALUE, o)), t = I(h.zMax, Math.max(t, i)), Z.uniform1i(A, 1), Z.uniform1i(b, 1), Z.uniform1i(B, c.options.sizeBy !== "width"), Z.uniform1i(O, c.options.sizeByAbsoluteValue), N("bubbleZMin", o), N("bubbleZMax", t), N("bubbleZThreshold", c.options.zThreshold), N("bubbleMinSize", s.minPxSize), N("bubbleMaxSize", s.maxPxSize);
- }
- }, bind: function() {
- Z && S && Z.useProgram(S);
- }, program: function() {
- return S;
- }, create: F, setUniform: N, setPMatrix: function(c) {
- Z && S && Z.uniformMatrix4fv(v, !1, c);
- }, setColor: function(c) {
- Z && S && Z.uniform4f(u, c[0] / 255, c[1] / 255, c[2] / 255, c[3]);
- }, setPointSize: function(c) {
- Z && S && Z.uniform1f(d, c);
- }, setSkipTranslation: function(c) {
- Z && S && Z.uniform1i(C, c === !0 ? 1 : 0);
- }, setTexture: function(c) {
- Z && S && Z.uniform1i(a, c);
- }, setDrawAsCircle: function(c) {
- Z && S && Z.uniform1i(b, c ? 1 : 0);
- }, reset: function() {
- Z && S && (Z.uniform1i(A, 0), Z.uniform1i(b, 0));
- }, setInverted: function(c) {
- Z && S && Z.uniform1i(w, c);
- }, destroy: function() {
- Z && S && (Z.deleteProgram(S), S = !1);
- } };
- };
- }), E(f, "Extensions/Boost/WGLVBuffer.js", [], function() {
- return function(l, y, j) {
- function I() {
- Z && (l.deleteBuffer(Z), H = Z = !1), N = 0, U = j || 2, R = [];
- }
- var Z = !1, H = !1, U = j || 2, F = !1, N = 0, R;
- return {
- destroy: I,
- bind: function() {
- if (!Z)
- return !1;
- l.vertexAttribPointer(H, U, l.FLOAT, !1, 0, 0);
- },
- data: R,
- build: function(S, v, d) {
- var u;
- return R = S || [], R && R.length !== 0 || F ? (U = d || U, Z && l.deleteBuffer(Z), F || (u = new Float32Array(R)), Z = l.createBuffer(), l.bindBuffer(l.ARRAY_BUFFER, Z), l.bufferData(l.ARRAY_BUFFER, F || u, l.STATIC_DRAW), H = l.getAttribLocation(y.program(), v), l.enableVertexAttribArray(H), !0) : (I(), !1);
- },
- render: function(S, v, d) {
- var u = F ? F.length : R.length;
- return !Z || !u || ((!S || S > u || 0 > S) && (S = 0), (!v || v > u) && (v = u), S >= v) ? !1 : (l.drawArrays(l[(d || "points").toUpperCase()], S / U, (v - S) / U), !0);
- },
- allocate: function(S) {
- N = -1, F = new Float32Array(4 * S);
- },
- push: function(S, v, d, u) {
- F && (F[++N] = S, F[++N] = v, F[++N] = d, F[++N] = u);
- }
- };
- };
- }), E(f, "Extensions/Boost/WGLRenderer.js", [f["Core/Color/Color.js"], f["Extensions/Boost/WGLShader.js"], f["Extensions/Boost/WGLVBuffer.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j, I, Z) {
- var H = l.parse, U = I.doc, F = Z.isNumber, N = Z.isObject, R = Z.merge, S = Z.objectEach, v = Z.pick;
- return function(d) {
- function u(m) {
- if (m.isSeriesBoosting) {
- var L = !!m.options.stacking, Y = m.xData || m.options.xData || m.processedXData;
- return L = (L ? m.data : Y || m.options.data).length, m.type === "treemap" ? L *= 12 : m.type === "heatmap" ? L *= 6 : P[m.type] && (L *= 2), L;
- }
- return 0;
- }
- function A() {
- h.clear(h.COLOR_BUFFER_BIT | h.DEPTH_BUFFER_BIT);
- }
- function O(m, L) {
- function Y($t) {
- $t && (L.colorData.push($t[0]), L.colorData.push($t[1]), L.colorData.push($t[2]), L.colorData.push($t[3]));
- }
- function V($t, ue, ge, Re, De) {
- Y(De), g.usePreallocated ? (p.push($t, ue, ge ? 1 : 0, Re || 1), i += 4) : (s.push($t), s.push(ue), s.push(ge ? 1 : 0), s.push(Re || 1));
- }
- function Q() {
- L.segments.length && (L.segments[L.segments.length - 1].to = s.length || i);
- }
- function k() {
- L.segments.length && L.segments[L.segments.length - 1].from === (s.length || i) || (Q(), L.segments.push({ from: s.length || i }));
- }
- function G($t, ue, ge, Re, De) {
- Y(De), V($t + ge, ue), Y(De), V($t, ue), Y(De), V($t, ue + Re), Y(De), V($t, ue + Re), Y(De), V($t + ge, ue + Re), Y(De), V($t + ge, ue);
- }
- function z($t, ue) {
- g.useGPUTranslations || (L.skipTranslation = !0, $t.x = lt.toPixels($t.x, !0), $t.y = ot.toPixels($t.y, !0)), ue ? s = [$t.x, $t.y, 0, 2].concat(s) : V($t.x, $t.y, 0, 2);
- }
- var $ = m.pointArrayMap && m.pointArrayMap.join(",") === "low,high", q = m.chart, it = m.options, et = !!it.stacking, nt = it.data, rt = m.xAxis.getExtremes(), ct = rt.min, gt = rt.max;
- rt = m.yAxis.getExtremes();
- var dt = rt.min, ht = rt.max, at = m.xData || it.xData || m.processedXData, J = m.yData || it.yData || m.processedYData, tt = m.zData || it.zData || m.processedZData, ot = m.yAxis, lt = m.xAxis, pt = m.chart.plotWidth, yt = !at || at.length === 0, vt = it.connectNulls;
- rt = m.points || !1;
- var Ct = !1, Pt = !1, At, St, Dt = et ? m.data : at || nt, Lt = { x: Number.MAX_VALUE, y: 0 }, Nt = { x: -Number.MAX_VALUE, y: 0 }, Et = 0, Kt = !1, Gt, Wt, Jt, be, zt = -1, Vt = !1, Me = !1, _r, ps = typeof q.index > "u", Tn = !1, Pn = !1, $e = !1, En = P[m.type], On = !1, Jr = !0, us = !0, Xo = it.zoneAxis || "y", Dr = it.zones || !1, Yi = !1, ds = it.threshold, Ln = !1;
- if (!(it.boostData && 0 < it.boostData.length)) {
- if (it.gapSize && (Ln = it.gapUnit !== "value" ? it.gapSize * m.closestPointRange : it.gapSize), Dr) {
- var Ir = [];
- Dr.forEach(function($t, ue) {
- if ($t.color) {
- var ge = H($t.color).rgba;
- ge[0] /= 255, ge[1] /= 255, ge[2] /= 255, Ir[ue] = ge, Yi || typeof $t.value < "u" || (Yi = ge);
- }
- }), Yi || (at = m.pointAttribs && m.pointAttribs().fill || m.color, Yi = H(at).rgba, Yi[0] /= 255, Yi[1] /= 255, Yi[2] /= 255);
- }
- if (q.inverted && (pt = m.chart.plotHeight), m.closestPointRangePx = Number.MAX_VALUE, k(), rt && 0 < rt.length)
- L.skipTranslation = !0, L.drawMode = "triangles", rt[0].node && rt[0].node.levelDynamic && rt.sort(function($t, ue) {
- if ($t.node) {
- if ($t.node.levelDynamic > ue.node.levelDynamic)
- return 1;
- if ($t.node.levelDynamic < ue.node.levelDynamic)
- return -1;
- }
- return 0;
- }), rt.forEach(function($t) {
- var ue = $t.plotY;
- if (typeof ue < "u" && !isNaN(ue) && $t.y !== null && $t.shapeArgs) {
- var ge = $t.shapeArgs;
- ue = ge.x, ue = ue === void 0 ? 0 : ue;
- var Re = ge.y;
- Re = Re === void 0 ? 0 : Re;
- var De = ge.width;
- De = De === void 0 ? 0 : De, ge = ge.height, ge = ge === void 0 ? 0 : ge;
- var qr = q.styledMode ? $t.series.colorAttribs($t) : qr = $t.series.pointAttribs($t);
- $t = qr["stroke-width"] || 0, $e = H(qr.fill).rgba, $e[0] /= 255, $e[1] /= 255, $e[2] /= 255, m.type === "treemap" && ($t = $t || 1, St = H(qr.stroke).rgba, St[0] /= 255, St[1] /= 255, St[2] /= 255, G(ue, Re, De, ge, St), $t /= 2), m.type === "heatmap" && q.inverted && (ue = lt.len - ue, Re = ot.len - Re, De = -De, ge = -ge), G(ue + $t, Re + $t, De - 2 * $t, ge - 2 * $t, $e);
- }
- });
- else {
- for (rt = function() {
- if (Jt = Dt[++zt], typeof Jt > "u")
- return "continue";
- if (ps)
- return "break";
- var $t = nt && nt[zt];
- if (!yt && N($t, !0) && $t.color && ($e = H($t.color).rgba, $e[0] /= 255, $e[1] /= 255, $e[2] /= 255), yt ? (Gt = Jt[0], Wt = Jt[1], Dt[zt + 1] && (Me = Dt[zt + 1][0]), Dt[zt - 1] && (Vt = Dt[zt - 1][0]), 3 <= Jt.length && (be = Jt[2], Jt[2] > L.zMax && (L.zMax = Jt[2]), Jt[2] < L.zMin && (L.zMin = Jt[2]))) : (Gt = Jt, Wt = J[zt], Dt[zt + 1] && (Me = Dt[zt + 1]), Dt[zt - 1] && (Vt = Dt[zt - 1]), tt && tt.length && (be = tt[zt], tt[zt] > L.zMax && (L.zMax = tt[zt]), tt[zt] < L.zMin && (L.zMin = tt[zt]))), !vt && (Gt === null || Wt === null))
- return k(), "continue";
- if (Me && Me >= ct && Me <= gt && (Tn = !0), Vt && Vt >= ct && Vt <= gt && (Pn = !0), $ ? (yt && (Wt = Jt.slice(1, 3)), _r = Wt[0], Wt = Wt[1]) : et && (Gt = Jt.x, Wt = Jt.stackY, _r = Wt - Jt.y), dt !== null && typeof dt < "u" && ht !== null && typeof ht < "u" && (Jr = Wt >= dt && Wt <= ht), Gt > gt && Nt.x < gt && (Nt.x = Gt, Nt.y = Wt), Gt < ct && Lt.x > ct && (Lt.x = Gt, Lt.y = Wt), Wt === null && vt)
- return "continue";
- if (Wt === null || !Jr && !Tn && !Pn)
- return k(), "continue";
- if ((Me >= ct || Gt >= ct) && (Vt <= gt || Gt <= gt) && (On = !0), !On && !Tn && !Pn)
- return "continue";
- if (Ln && Gt - Vt > Ln && k(), Dr) {
- var ue;
- Dr.some(function(ge, Re) {
- var De = Dr[Re - 1];
- return Xo === "x" ? typeof ge.value < "u" && Gt <= ge.value ? (Ir[Re] && (!De || Gt >= De.value) && (ue = Ir[Re]), !0) : !1 : typeof ge.value < "u" && Wt <= ge.value ? (Ir[Re] && (!De || Wt >= De.value) && (ue = Ir[Re]), !0) : !1;
- }), $e = ue || Yi || $e;
- }
- if (!g.useGPUTranslations && (L.skipTranslation = !0, Gt = lt.toPixels(Gt, !0), Wt = ot.toPixels(Wt, !0), Gt > pt && L.drawMode === "points"))
- return "continue";
- if (L.hasMarkers && On && Ct !== !1 && (m.closestPointRangePx = Math.min(m.closestPointRangePx, Math.abs(Gt - Ct))), !g.useGPUTranslations && !g.usePreallocated && Ct && 1 > Math.abs(Gt - Ct) && Pt && 1 > Math.abs(Wt - Pt))
- return g.debug.showSkipSummary && ++Et, "continue";
- En && (At = _r, (_r === !1 || typeof _r > "u") && (At = 0 > Wt ? Wt : 0), $ || et || (At = Math.max(ds === null ? dt : ds, dt)), g.useGPUTranslations || (At = ot.toPixels(At, !0)), V(Gt, At, 0, 0, $e)), it.step && !us && V(Gt, Pt, 0, 2, $e), V(Gt, Wt, 0, m.type === "bubble" ? be || 1 : 2, $e), Ct = Gt, Pt = Wt, Kt = !0, us = !1;
- }; zt < Dt.length - 1 && rt() !== "break"; )
- ;
- g.debug.showSkipSummary && console.log("skipped points:", Et), Kt || vt === !1 || m.drawMode !== "line_strip" || (Lt.x < Number.MAX_VALUE && z(Lt, !0), Nt.x > -Number.MAX_VALUE && z(Nt));
- }
- Q();
- }
- }
- function B() {
- D = [], T.data = s = [], n = [], p && p.destroy();
- }
- function C(m) {
- c && (c.setUniform("xAxisTrans", m.transA), c.setUniform("xAxisMin", m.min), c.setUniform("xAxisMinPad", m.minPixelPadding), c.setUniform("xAxisPointRange", m.pointRange), c.setUniform("xAxisLen", m.len), c.setUniform(
- "xAxisPos",
- m.pos
- ), c.setUniform("xAxisCVSCoord", !m.horiz), c.setUniform("xAxisIsLog", !!m.logarithmic), c.setUniform("xAxisReversed", !!m.reversed));
- }
- function b(m) {
- c && (c.setUniform("yAxisTrans", m.transA), c.setUniform("yAxisMin", m.min), c.setUniform("yAxisMinPad", m.minPixelPadding), c.setUniform("yAxisPointRange", m.pointRange), c.setUniform("yAxisLen", m.len), c.setUniform("yAxisPos", m.pos), c.setUniform("yAxisCVSCoord", !m.horiz), c.setUniform("yAxisIsLog", !!m.logarithmic), c.setUniform("yAxisReversed", !!m.reversed));
- }
- function w(m, L) {
- c.setUniform("hasThreshold", m), c.setUniform("translatedThreshold", L);
- }
- function x(m) {
- if (m)
- o = m.chartWidth || 800, t = m.chartHeight || 400;
- else
- return !1;
- if (!(h && o && t && c))
- return !1;
- g.debug.timeRendering && console.time("gl rendering"), h.canvas.width = o, h.canvas.height = t, c.bind(), h.viewport(0, 0, o, t), c.setPMatrix([2 / o, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]), 1 < g.lineWidth && !I.isMS && h.lineWidth(g.lineWidth), p.build(T.data, "aVertexPosition", 4), p.bind(), c.setInverted(m.inverted), D.forEach(function(L, Y) {
- var V = L.series.options, Q = V.marker, k = typeof V.lineWidth < "u" ? V.lineWidth : 1, G = V.threshold, z = F(G), $ = L.series.yAxis.getThreshold(G);
- if (G = v(V.marker ? V.marker.enabled : null, L.series.xAxis.isRadial ? !0 : null, L.series.closestPointRangePx > 2 * ((V.marker ? V.marker.radius : 10) || 10)), Q = W[Q && Q.symbol || L.series.symbol] || W.circle, L.segments.length !== 0 && L.segments[0].from !== L.segments[0].to) {
- if (Q.isReady && (h.bindTexture(h.TEXTURE_2D, Q.handle), c.setTexture(Q.handle)), m.styledMode ? Q = L.series.markerGroup && L.series.markerGroup.getStyle("fill") : (Q = L.drawMode === "points" && L.series.pointAttribs && L.series.pointAttribs().fill || L.series.color, V.colorByPoint && (Q = L.series.chart.options.colors[Y])), L.series.fillOpacity && V.fillOpacity && (Q = new l(Q).setOpacity(v(V.fillOpacity, 1)).get()), Q = H(Q).rgba, g.useAlpha || (Q[3] = 1), L.drawMode === "lines" && g.useAlpha && 1 > Q[3] && (Q[3] /= 10), V.boostBlending === "add" ? (h.blendFunc(h.SRC_ALPHA, h.ONE), h.blendEquation(h.FUNC_ADD)) : V.boostBlending === "mult" || V.boostBlending === "multiply" ? h.blendFunc(h.DST_COLOR, h.ZERO) : V.boostBlending === "darken" ? (h.blendFunc(h.ONE, h.ONE), h.blendEquation(h.FUNC_MIN)) : h.blendFuncSeparate(h.SRC_ALPHA, h.ONE_MINUS_SRC_ALPHA, h.ONE, h.ONE_MINUS_SRC_ALPHA), c.reset(), 0 < L.colorData.length ? (c.setUniform("hasColor", 1), Y = j(h, c), Y.build(L.colorData, "aColor", 4), Y.bind()) : h.disableVertexAttribArray(h.getAttribLocation(c.program(), "aColor")), c.setColor(Q), C(L.series.xAxis), b(L.series.yAxis), w(z, $), L.drawMode === "points" && (V.marker && F(V.marker.radius) ? c.setPointSize(2 * V.marker.radius) : c.setPointSize(1)), c.setSkipTranslation(L.skipTranslation), L.series.type === "bubble" && c.setBubbleUniforms(L.series, L.zMin, L.zMax), c.setDrawAsCircle(X[L.series.type] || !1), 0 < k || L.drawMode !== "line_strip")
- for (k = 0; k < L.segments.length; k++)
- p.render(L.segments[k].from, L.segments[k].to, L.drawMode);
- if (L.hasMarkers && G)
- for (V.marker && F(V.marker.radius) ? c.setPointSize(2 * V.marker.radius) : c.setPointSize(10), c.setDrawAsCircle(!0), k = 0; k < L.segments.length; k++)
- p.render(L.segments[k].from, L.segments[k].to, "POINTS");
- }
- }), g.debug.timeRendering && console.timeEnd("gl rendering"), d && d(), B();
- }
- function a(m) {
- if (A(), m.renderer.forExport)
- return x(m);
- _ ? x(m) : setTimeout(function() {
- a(m);
- }, 1);
- }
- var c = !1, p = !1, i = 0, h = !1, o = 0, t = 0, s = !1, n = !1, T = {}, _ = !1, D = [], W = {}, P = { column: !0, columnrange: !0, bar: !0, area: !0, arearange: !0 }, X = { scatter: !0, bubble: !0 }, g = { pointSize: 1, lineWidth: 1, fillColor: "#AA00AA", useAlpha: !0, usePreallocated: !1, useGPUTranslations: !1, debug: { timeRendering: !1, timeSeriesProcessing: !1, timeSetup: !1, timeBufferCopy: !1, timeKDTree: !1, showSkipSummary: !1 } };
- return T = { allocateBufferForSingleSeries: function(m) {
- var L = 0;
- g.usePreallocated && (m.isSeriesBoosting && (L = u(m)), p.allocate(L));
- }, pushSeries: function(m) {
- 0 < D.length && D[D.length - 1].hasMarkers && (D[D.length - 1].markerTo = n.length), g.debug.timeSeriesProcessing && console.time("building " + m.type + " series");
- var L = { segments: [], markerFrom: n.length, colorData: [], series: m, zMin: Number.MAX_VALUE, zMax: -Number.MAX_VALUE, hasMarkers: m.options.marker ? m.options.marker.enabled !== !1 : !1, showMarkers: !0, drawMode: {
- area: "lines",
- arearange: "lines",
- areaspline: "line_strip",
- column: "lines",
- columnrange: "lines",
- bar: "lines",
- line: "line_strip",
- scatter: "points",
- heatmap: "triangles",
- treemap: "triangles",
- bubble: "points"
- }[m.type] || "line_strip" };
- m.index >= D.length ? D.push(L) : D[m.index] = L, O(m, L), g.debug.timeSeriesProcessing && console.timeEnd("building " + m.type + " series");
- }, setSize: function(m, L) {
- o === m && t === L || !c || (o = m, t = L, c.bind(), c.setPMatrix([2 / o, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]));
- }, inited: function() {
- return _;
- }, setThreshold: w, init: function(m, L) {
- function Y(k, G) {
- var z = { isReady: !1, texture: U.createElement("canvas"), handle: h.createTexture() }, $ = z.texture.getContext("2d");
- W[k] = z, z.texture.width = 512, z.texture.height = 512, $.mozImageSmoothingEnabled = !1, $.webkitImageSmoothingEnabled = !1, $.msImageSmoothingEnabled = !1, $.imageSmoothingEnabled = !1, $.strokeStyle = "rgba(255, 255, 255, 0)", $.fillStyle = "#FFF", G($);
- try {
- h.activeTexture(h.TEXTURE0), h.bindTexture(h.TEXTURE_2D, z.handle), h.texImage2D(h.TEXTURE_2D, 0, h.RGBA, h.RGBA, h.UNSIGNED_BYTE, z.texture), h.texParameteri(h.TEXTURE_2D, h.TEXTURE_WRAP_S, h.CLAMP_TO_EDGE), h.texParameteri(
- h.TEXTURE_2D,
- h.TEXTURE_WRAP_T,
- h.CLAMP_TO_EDGE
- ), h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MAG_FILTER, h.LINEAR), h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MIN_FILTER, h.LINEAR), h.bindTexture(h.TEXTURE_2D, null), z.isReady = !0;
- } catch {
- }
- }
- var V = 0, Q = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"];
- if (_ = !1, !m)
- return !1;
- for (g.debug.timeSetup && console.time("gl setup"); V < Q.length && !(h = m.getContext(Q[V], {})); V++)
- ;
- if (h)
- L || B();
- else
- return !1;
- return h.enable(h.BLEND), h.blendFunc(h.SRC_ALPHA, h.ONE_MINUS_SRC_ALPHA), h.disable(h.DEPTH_TEST), h.depthFunc(h.LESS), c = y(h), c ? (p = j(h, c), Y("circle", function(k) {
- k.beginPath(), k.arc(256, 256, 256, 0, 2 * Math.PI), k.stroke(), k.fill();
- }), Y("square", function(k) {
- k.fillRect(0, 0, 512, 512);
- }), Y("diamond", function(k) {
- k.beginPath(), k.moveTo(256, 0), k.lineTo(512, 256), k.lineTo(256, 512), k.lineTo(0, 256), k.lineTo(256, 0), k.fill();
- }), Y("triangle", function(k) {
- k.beginPath(), k.moveTo(0, 512), k.lineTo(256, 0), k.lineTo(512, 512), k.lineTo(0, 512), k.fill();
- }), Y("triangle-down", function(k) {
- k.beginPath(), k.moveTo(0, 0), k.lineTo(256, 512), k.lineTo(
- 512,
- 0
- ), k.lineTo(0, 0), k.fill();
- }), _ = !0, g.debug.timeSetup && console.timeEnd("gl setup"), !0) : !1;
- }, render: a, settings: g, valid: function() {
- return h !== !1;
- }, clear: A, flush: B, setXAxis: C, setYAxis: b, data: s, gl: function() {
- return h;
- }, allocateBuffer: function(m) {
- var L = 0;
- g.usePreallocated && (m.series.forEach(function(Y) {
- Y.isSeriesBoosting && (L += u(Y));
- }), p.allocate(L));
- }, destroy: function() {
- B(), p.destroy(), c.destroy(), h && (S(W, function(m) {
- m.handle && h.deleteTexture(m.handle);
- }), h.canvas.width = 1, h.canvas.height = 1);
- }, setOptions: function(m) {
- R(
- !0,
- g,
- m
- );
- } };
- };
- }), E(f, "Extensions/Boost/BoostAttach.js", [f["Core/Chart/Chart.js"], f["Extensions/Boost/WGLRenderer.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = j.doc, H = I.error, U;
- return function(F, N) {
- var R = F.chartWidth, S = F.chartHeight, v = F, d = F.seriesGroup || N.group, u = Z.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility", "1.1");
- return v = F.isChartSeriesBoosting() ? F : N, u = !1, U || (U = Z.createElement("canvas")), v.renderTarget || (v.canvas = U, F.renderer.forExport || !u ? (v.renderTarget = F.renderer.image("", 0, 0, R, S).addClass("highcharts-boost-canvas").add(d), v.boostClear = function() {
- v.renderTarget.attr({ href: "" });
- }, v.boostCopy = function() {
- v.boostResizeTarget(), v.renderTarget.attr({ href: v.canvas.toDataURL("image/png") });
- }) : (v.renderTargetFo = F.renderer.createElement("foreignObject").add(d), v.renderTarget = Z.createElement("canvas"), v.renderTargetCtx = v.renderTarget.getContext("2d"), v.renderTargetFo.element.appendChild(v.renderTarget), v.boostClear = function() {
- v.renderTarget.width = v.canvas.width, v.renderTarget.height = v.canvas.height;
- }, v.boostCopy = function() {
- v.renderTarget.width = v.canvas.width, v.renderTarget.height = v.canvas.height, v.renderTargetCtx.drawImage(v.canvas, 0, 0);
- }), v.boostResizeTarget = function() {
- R = F.chartWidth, S = F.chartHeight, (v.renderTargetFo || v.renderTarget).attr({ x: 0, y: 0, width: R, height: S }).css({ pointerEvents: "none", mixedBlendMode: "normal", opacity: 1 }), v instanceof l && v.markerGroup.translate(F.plotLeft, F.plotTop);
- }, v.boostClipRect = F.renderer.clipRect(), (v.renderTargetFo || v.renderTarget).clip(v.boostClipRect), v instanceof l && (v.markerGroup = v.renderer.g().add(d), v.markerGroup.translate(N.xAxis.pos, N.yAxis.pos))), v.canvas.width = R, v.canvas.height = S, v.boostClipRect.attr(F.getBoostClipRect(v)), v.boostResizeTarget(), v.boostClear(), v.ogl || (v.ogl = y(function() {
- v.ogl.settings.debug.timeBufferCopy && console.time("buffer copy"), v.boostCopy(), v.ogl.settings.debug.timeBufferCopy && console.timeEnd("buffer copy");
- }), v.ogl.init(v.canvas) || H("[highcharts boost] - unable to init WebGL renderer"), v.ogl.setOptions(F.options.boost || {}), v instanceof l && v.ogl.allocateBuffer(F)), v.ogl.setSize(R, S), v.ogl;
- };
- }), E(f, "Extensions/Boost/BoostUtils.js", [f["Core/Globals.js"], f["Extensions/Boost/BoostableMap.js"], f["Extensions/Boost/BoostAttach.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- function Z() {
- for (var d = [], u = 0; u < arguments.length; u++)
- d[u] = arguments[u];
- var A = -Number.MAX_VALUE;
- return d.forEach(function(O) {
- if (typeof O < "u" && O !== null && typeof O.length < "u" && 0 < O.length)
- return A = O.length, !0;
- }), A;
- }
- function H(d, u, A) {
- d && u.renderTarget && u.canvas && !(A || u.chart).isChartSeriesBoosting() && d.render(A || u.chart);
- }
- function U(d, u) {
- d && u.renderTarget && u.canvas && !u.chart.isChartSeriesBoosting() && d.allocateBufferForSingleSeries(u);
- }
- function F(d, u, A, O, B, C) {
- B = B || 0, O = O || 3e3;
- for (var b = B + O, w = !0; w && B < b && B < d.length; )
- w = u(d[B], B), ++B;
- w && (B < d.length ? C ? F(d, u, A, O, B, C) : R.requestAnimationFrame ? R.requestAnimationFrame(function() {
- F(d, u, A, O, B);
- }) : setTimeout(function() {
- F(d, u, A, O, B);
- }) : A && A());
- }
- function N() {
- var d = 0, u, A = [
- "webgl",
- "experimental-webgl",
- "moz-webgl",
- "webkit-3d"
- ], O = !1;
- if (typeof R.WebGLRenderingContext < "u")
- for (u = S.createElement("canvas"); d < A.length; d++)
- try {
- if (O = u.getContext(A[d]), typeof O < "u" && O !== null)
- return !0;
- } catch {
- }
- return !1;
- }
- var R = l.win, S = l.doc, v = I.pick;
- return I = { patientMax: Z, boostEnabled: function(d) {
- return v(d && d.options && d.options.boost && d.options.boost.enabled, !0);
- }, shouldForceChartSeriesBoosting: function(d) {
- var u = 0, A = 0, O = v(d.options.boost && d.options.boost.allowForce, !0);
- if (typeof d.boostForceChartBoost < "u")
- return d.boostForceChartBoost;
- if (1 < d.series.length)
- for (var B = 0; B < d.series.length; B++) {
- var C = d.series[B];
- C.options.boostThreshold !== 0 && C.visible !== !1 && C.type !== "heatmap" && (y[C.type] && ++A, Z(C.processedXData, C.options.data, C.points) >= (C.options.boostThreshold || Number.MAX_VALUE) && ++u);
- }
- return d.boostForceChartBoost = O && (A === d.series.length && 0 < u || 5 < u), d.boostForceChartBoost;
- }, renderIfNotSeriesBoosting: H, allocateIfNotSeriesBoosting: U, eachAsync: F, hasWebGLSupport: N, pointDrawHandler: function(d) {
- var u = !0;
- if (this.chart.options && this.chart.options.boost && (u = typeof this.chart.options.boost.enabled > "u" ? !0 : this.chart.options.boost.enabled), !u || !this.isSeriesBoosting)
- return d.call(this);
- this.chart.isBoosting = !0, (d = j(this.chart, this)) && (U(d, this), d.pushSeries(this)), H(d, this);
- } }, l.hasWebGLSupport = N, I;
- }), E(
- f,
- "Extensions/Boost/BoostInit.js",
- [f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Series/Series.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"], f["Extensions/Boost/BoostUtils.js"], f["Extensions/Boost/BoostAttach.js"]],
- function(l, y, j, I, Z, H, U) {
- var F = y.noop, N = I.seriesTypes, R = Z.addEvent, S = Z.extend, v = Z.fireEvent, d = Z.wrap, u = H.eachAsync, A = H.pointDrawHandler, O = H.allocateIfNotSeriesBoosting, B = H.renderIfNotSeriesBoosting, C = H.shouldForceChartSeriesBoosting, b;
- return function() {
- S(j.prototype, { renderCanvas: function() {
- function w(dt, ht) {
- var at = !1, J = typeof i.index > "u", tt = !0;
- if (typeof dt > "u")
- return !0;
- if (!J) {
- if (G)
- var ot = dt[0], lt = dt[1];
- else
- ot = dt, lt = s[ht];
- Y ? (G && (lt = dt.slice(1, 3)), at = lt[0], lt = lt[1]) : V && (ot = dt.x, lt = dt.stackY, at = lt - dt.y), k || (tt = lt >= D && lt <= W), lt !== null && ot >= T && ot <= _ && tt && (dt = h.toPixels(ot, !0), g ? ((typeof q > "u" || dt === X) && (Y || (at = lt), (typeof it > "u" || lt > $) && ($ = lt, it = ht), (typeof q > "u" || at < z) && (z = at, q = ht)), dt !== X && (typeof q < "u" && (lt = o.toPixels($, !0), L = o.toPixels(z, !0), rt(dt, lt, it), L !== lt && rt(dt, L, q)), q = it = void 0, X = dt)) : (lt = Math.ceil(o.toPixels(lt, !0)), rt(dt, lt, ht)));
- }
- return !J;
- }
- function x() {
- v(a, "renderedCanvas"), delete a.buildKDTree, a.buildKDTree(), ct.debug.timeKDTree && console.timeEnd("kd tree building");
- }
- var a = this, c = a.options || {}, p = !1, i = a.chart, h = this.xAxis, o = this.yAxis, t = c.xData || a.processedXData, s = c.yData || a.processedYData, n = c.data;
- p = h.getExtremes();
- var T = p.min, _ = p.max;
- p = o.getExtremes();
- var D = p.min, W = p.max, P = {}, X, g = !!a.sampling, m = c.enableMouseTracking !== !1, L = o.getThreshold(c.threshold), Y = a.pointArrayMap && a.pointArrayMap.join(",") === "low,high", V = !!c.stacking, Q = a.cropStart || 0, k = a.requireSorting, G = !t, z, $, q, it, et = c.findNearestPointBy === "x", nt = this.xData || this.options.xData || this.processedXData || !1, rt = function(dt, ht, at) {
- dt = Math.ceil(dt), b = et ? dt : dt + "," + ht, m && !P[b] && (P[b] = !0, i.inverted && (dt = h.len - dt, ht = o.len - ht), gt.push({ x: nt ? nt[Q + at] : !1, clientX: dt, plotX: dt, plotY: ht, i: Q + at }));
- };
- p = U(i, a), i.isBoosting = !0;
- var ct = p.settings;
- if (this.visible) {
- (this.points || this.graph) && this.destroyGraphics(), i.isChartSeriesBoosting() ? (this.markerGroup && this.markerGroup !== i.markerGroup && this.markerGroup.destroy(), this.markerGroup = i.markerGroup, this.renderTarget && (this.renderTarget = this.renderTarget.destroy())) : (this.markerGroup === i.markerGroup && (this.markerGroup = void 0), this.markerGroup = a.plotGroup("markerGroup", "markers", !0, 1, i.seriesGroup));
- var gt = this.points = [];
- a.buildKDTree = F, p && (O(p, this), p.pushSeries(a), B(p, this, i)), i.renderer.forExport || (ct.debug.timeKDTree && console.time("kd tree building"), u(V ? a.data : t || n, w, x));
- }
- } }), ["heatmap", "treemap"].forEach(function(w) {
- N[w] && d(N[w].prototype, "drawPoints", A);
- }), N.bubble && (delete N.bubble.prototype.buildKDTree, d(N.bubble.prototype, "markerAttribs", function(w) {
- return this.isSeriesBoosting ? !1 : w.apply(this, [].slice.call(arguments, 1));
- })), N.scatter.prototype.fill = !0, S(N.area.prototype, { fill: !0, fillOpacity: !0, sampling: !0 }), S(N.column.prototype, { fill: !0, sampling: !0 }), l.prototype.propsRequireUpdateSeries.push("boost"), l.prototype.callbacks.push(function(w) {
- R(w, "predraw", function() {
- w.boostForceChartBoost = void 0, w.boostForceChartBoost = C(w), w.isBoosting = !1, !w.isChartSeriesBoosting() && w.didBoost && (w.didBoost = !1), w.boostClear && w.boostClear(), w.canvas && w.ogl && w.isChartSeriesBoosting() && (w.didBoost = !0, w.ogl.allocateBuffer(w)), w.markerGroup && w.xAxis && 0 < w.xAxis.length && w.yAxis && 0 < w.yAxis.length && w.markerGroup.translate(w.xAxis[0].pos, w.yAxis[0].pos);
- }), R(w, "render", function() {
- w.ogl && w.isChartSeriesBoosting() && w.ogl.render(w);
- });
- var x = -1, a = -1;
- R(w.pointer, "afterGetHoverData", function() {
- var c = w.hoverSeries;
- if (w.markerGroup && c) {
- var p = w.inverted ? c.yAxis : c.xAxis;
- c = w.inverted ? c.xAxis : c.yAxis, (p && p.pos !== x || c && c.pos !== a) && (w.markerGroup.translate(p.pos, c.pos), x = p.pos, a = c.pos);
- }
- });
- });
- };
- }
- ), E(
- f,
- "Extensions/BoostCanvas.js",
- [f["Core/Chart/Chart.js"], f["Core/Color/Color.js"], f["Core/Globals.js"], f["Core/Series/Series.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]],
- function(l, y, j, I, Z, H) {
- var U = y.parse, F = j.doc, N = j.noop, R = Z.seriesTypes, S = H.addEvent, v = H.extend, d = H.fireEvent, u = H.isNumber, A = H.merge, O = H.pick, B = H.wrap, C;
- return function() {
- j.seriesTypes.heatmap && B(j.seriesTypes.heatmap.prototype, "drawPoints", function() {
- var b = this.chart, w = this.getContext(), x = this.chart.inverted, a = this.xAxis, c = this.yAxis;
- w ? (this.points.forEach(function(p) {
- var i = p.plotY;
- if (typeof i < "u" && !isNaN(i) && p.y !== null && w) {
- var h = p.shapeArgs || {};
- i = h.x, i = i === void 0 ? 0 : i;
- var o = h.y;
- o = o === void 0 ? 0 : o;
- var t = h.width;
- t = t === void 0 ? 0 : t, h = h.height, h = h === void 0 ? 0 : h, p = b.styledMode ? p.series.colorAttribs(p) : p.series.pointAttribs(p), w.fillStyle = p.fill, x ? w.fillRect(c.len - o + a.left, a.len - i + c.top, -h, -t) : w.fillRect(i + a.left, o + c.top, t, h);
- }
- }), this.canvasToSVG()) : this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser");
- }), v(I.prototype, { getContext: function() {
- var b = this.chart, w = b.chartWidth, x = b.chartHeight, a = b.seriesGroup || this.group, c = this, p = function(h, o, t, s, n, T, _) {
- h.call(this, t, o, s, n, T, _);
- };
- b.isChartSeriesBoosting() && (c = b, a = b.seriesGroup);
- var i = c.ctx;
- return c.canvas || (c.canvas = F.createElement("canvas"), c.renderTarget = b.renderer.image("", 0, 0, w, x).addClass("highcharts-boost-canvas").add(a), c.ctx = i = c.canvas.getContext("2d"), b.inverted && ["moveTo", "lineTo", "rect", "arc"].forEach(function(h) {
- B(i, h, p);
- }), c.boostCopy = function() {
- c.renderTarget.attr({ href: c.canvas.toDataURL("image/png") });
- }, c.boostClear = function() {
- i.clearRect(0, 0, c.canvas.width, c.canvas.height), c === this && c.renderTarget.attr({ href: "" });
- }, c.boostClipRect = b.renderer.clipRect(), c.renderTarget.clip(c.boostClipRect)), c.canvas.width !== w && (c.canvas.width = w), c.canvas.height !== x && (c.canvas.height = x), c.renderTarget.attr({ x: 0, y: 0, width: w, height: x, style: "pointer-events: none", href: "" }), c.boostClipRect.attr(b.getBoostClipRect(c)), i;
- }, canvasToSVG: function() {
- this.chart.isChartSeriesBoosting() ? this.boostClear && this.boostClear() : (this.boostCopy || this.chart.boostCopy) && (this.boostCopy || this.chart.boostCopy)();
- }, cvsLineTo: function(b, w, x) {
- b.lineTo(w, x);
- }, renderCanvas: function() {
- var b = this, w = b.options, x = b.chart, a = this.xAxis, c = this.yAxis, p = (x.options.boost || {}).timeRendering || !1, i = 0, h = b.processedXData, o = b.processedYData, t = w.data, s = a.getExtremes(), n = s.min, T = s.max;
- s = c.getExtremes();
- var _ = s.min, D = s.max, W = {}, P, X = !!b.sampling, g = w.marker && w.marker.radius, m = this.cvsDrawPoint, L = w.lineWidth ? this.cvsLineTo : void 0, Y = g && 1 >= g ? this.cvsMarkerSquare : this.cvsMarkerCircle, V = this.cvsStrokeBatch || 1e3, Q = w.enableMouseTracking !== !1, k;
- s = w.threshold;
- var G = c.getThreshold(s), z = u(s), $ = G, q = this.fill, it = b.pointArrayMap && b.pointArrayMap.join(",") === "low,high", et = !!w.stacking, nt = b.cropStart || 0;
- s = x.options.loading;
- var rt = b.requireSorting, ct, gt = w.connectNulls, dt = !h, ht, at, J, tt, ot, lt = et ? b.data : h || t, pt = b.fillOpacity ? y.parse(b.color).setOpacity(O(w.fillOpacity, 0.75)).get() : b.color, yt = function() {
- q ? (Dt.fillStyle = pt, Dt.fill()) : (Dt.strokeStyle = b.color, Dt.lineWidth = w.lineWidth, Dt.stroke());
- }, vt = function(Lt, Nt, Et, Kt) {
- i === 0 && (Dt.beginPath(), L && (Dt.lineJoin = "round")), x.scroller && b.options.className === "highcharts-navigator-series" ? (Nt += x.scroller.top, Et && (Et += x.scroller.top)) : Nt += x.plotTop, Lt += x.plotLeft, ct ? Dt.moveTo(Lt, Nt) : m ? m(Dt, Lt, Nt, Et, k) : L ? L(Dt, Lt, Nt) : Y && Y.call(b, Dt, Lt, Nt, g, Kt), i += 1, i === V && (yt(), i = 0), k = { clientX: Lt, plotY: Nt, yBottom: Et };
- }, Ct = w.findNearestPointBy === "x", Pt = this.xData || this.options.xData || this.processedXData || !1, At = function(Lt, Nt, Et) {
- ot = Ct ? Lt : Lt + "," + Nt, Q && !W[ot] && (W[ot] = !0, x.inverted && (Lt = a.len - Lt, Nt = c.len - Nt), St.push({ x: Pt ? Pt[nt + Et] : !1, clientX: Lt, plotX: Lt, plotY: Nt, i: nt + Et }));
- };
- this.renderTarget && this.renderTarget.attr({ href: "" }), (this.points || this.graph) && this.destroyGraphics(), b.plotGroup("group", "series", b.visible ? "visible" : "hidden", w.zIndex, x.seriesGroup), b.markerGroup = b.group, S(b, "destroy", function() {
- b.markerGroup = null;
- });
- var St = this.points = [], Dt = this.getContext();
- b.buildKDTree = N, this.boostClear && this.boostClear(), this.visible && (99999 < t.length && (x.options.loading = A(s, { labelStyle: {
- backgroundColor: U("#ffffff").setOpacity(0.75).get(),
- padding: "1em",
- borderRadius: "0.5em"
- }, style: { backgroundColor: "none", opacity: 1 } }), H.clearTimeout(C), x.showLoading("Drawing..."), x.options.loading = s), p && console.time("canvas rendering"), j.eachAsync(lt, function(Lt, Nt) {
- var Et = !1, Kt = !1, Gt = !1, Wt = !1, Jt = typeof x.index > "u", be = !0;
- if (!Jt) {
- if (dt) {
- var zt = Lt[0], Vt = Lt[1];
- lt[Nt + 1] && (Gt = lt[Nt + 1][0]), lt[Nt - 1] && (Wt = lt[Nt - 1][0]);
- } else
- zt = Lt, Vt = o[Nt], lt[Nt + 1] && (Gt = lt[Nt + 1]), lt[Nt - 1] && (Wt = lt[Nt - 1]);
- if (Gt && Gt >= n && Gt <= T && (Et = !0), Wt && Wt >= n && Wt <= T && (Kt = !0), it) {
- dt && (Vt = Lt.slice(1, 3));
- var Me = Vt[0];
- Vt = Vt[1];
- } else
- et && (zt = Lt.x, Vt = Lt.stackY, Me = Vt - Lt.y);
- Lt = Vt === null, rt || (be = Vt >= _ && Vt <= D), !Lt && (zt >= n && zt <= T && be || Et || Kt) && (zt = Math.round(a.toPixels(zt, !0)), X ? ((typeof J > "u" || zt === P) && (it || (Me = Vt), (typeof tt > "u" || Vt > at) && (at = Vt, tt = Nt), (typeof J > "u" || Me < ht) && (ht = Me, J = Nt)), zt !== P && (typeof J < "u" && (Vt = c.toPixels(at, !0), G = c.toPixels(ht, !0), vt(zt, z ? Math.min(Vt, $) : Vt, z ? Math.max(G, $) : G, Nt), At(zt, Vt, tt), G !== Vt && At(zt, G, J)), J = tt = void 0, P = zt)) : (Vt = Math.round(c.toPixels(Vt, !0)), vt(zt, Vt, G, Nt), At(zt, Vt, Nt))), ct = Lt && !gt, Nt % 5e4 === 0 && (b.boostCopy || b.chart.boostCopy) && (b.boostCopy || b.chart.boostCopy)();
- }
- return !Jt;
- }, function() {
- var Lt = x.loadingDiv, Nt = x.loadingShown;
- yt(), b.canvasToSVG(), p && console.timeEnd("canvas rendering"), d(b, "renderedCanvas"), Nt && (v(Lt.style, { transition: "opacity 250ms", opacity: 0 }), x.loadingShown = !1, C = setTimeout(function() {
- Lt.parentNode && Lt.parentNode.removeChild(Lt), x.loadingDiv = x.loadingSpan = null;
- }, 250)), delete b.buildKDTree, b.buildKDTree();
- }, x.renderer.forExport ? Number.MAX_VALUE : void 0));
- } }), R.scatter.prototype.cvsMarkerCircle = function(b, w, x, a) {
- b.moveTo(w, x), b.arc(w, x, a, 0, 2 * Math.PI, !1);
- }, R.scatter.prototype.cvsMarkerSquare = function(b, w, x, a) {
- b.rect(w - a, x - a, 2 * a, 2 * a);
- }, R.scatter.prototype.fill = !0, R.bubble && (R.bubble.prototype.cvsMarkerCircle = function(b, w, x, a, c) {
- b.moveTo(w, x), b.arc(w, x, this.radii && this.radii[c], 0, 2 * Math.PI, !1);
- }, R.bubble.prototype.cvsStrokeBatch = 1), v(R.area.prototype, {
- cvsDrawPoint: function(b, w, x, a, c) {
- c && w !== c.clientX && (b.moveTo(c.clientX, c.yBottom), b.lineTo(c.clientX, c.plotY), b.lineTo(w, x), b.lineTo(w, a));
- },
- fill: !0,
- fillOpacity: !0,
- sampling: !0
- }), v(R.column.prototype, { cvsDrawPoint: function(b, w, x, a) {
- b.rect(w - 1, x, 1, a - x);
- }, fill: !0, sampling: !0 }), l.prototype.callbacks.push(function(b) {
- S(b, "predraw", function() {
- b.renderTarget && b.renderTarget.attr({ href: "" }), b.canvas && b.canvas.getContext("2d").clearRect(0, 0, b.canvas.width, b.canvas.height);
- }), S(b, "render", function() {
- b.boostCopy && b.boostCopy();
- });
- });
- };
- }
- ), E(f, "Extensions/Boost/BoostOverrides.js", [
- f["Core/Chart/Chart.js"],
- f["Core/DefaultOptions.js"],
- f["Core/Series/Point.js"],
- f["Core/Series/Series.js"],
- f["Core/Series/SeriesRegistry.js"],
- f["Core/Utilities.js"],
- f["Extensions/Boost/BoostUtils.js"],
- f["Extensions/Boost/Boostables.js"],
- f["Extensions/Boost/BoostableMap.js"]
- ], function(l, y, j, I, Z, H, U, F, N) {
- y = y.getOptions;
- var R = Z.seriesTypes;
- Z = H.addEvent;
- var S = H.error, v = H.isArray, d = H.isNumber, u = H.pick, A = H.wrap, O = U.boostEnabled, B = U.shouldForceChartSeriesBoosting, C = y().plotOptions;
- l.prototype.isChartSeriesBoosting = function() {
- return u(this.options.boost && this.options.boost.seriesThreshold, 50) <= this.series.length || B(this);
- }, l.prototype.getBoostClipRect = function(b) {
- var w = { x: this.plotLeft, y: this.plotTop, width: this.plotWidth, height: this.plotHeight };
- return b === this && (b = this.inverted ? this.xAxis : this.yAxis, 1 >= b.length ? (w.y = Math.min(b[0].pos, w.y), w.height = b[0].pos - this.plotTop + b[0].len) : w.height = this.plotHeight), w;
- }, I.prototype.getPoint = function(b) {
- var w = b, x = this.xData || this.options.xData || this.processedXData || !1;
- return !b || b instanceof this.pointClass || (w = new this.pointClass().init(this, this.options.data[b.i], x ? x[b.i] : void 0), w.category = u(this.xAxis.categories ? this.xAxis.categories[w.x] : w.x, w.x), w.dist = b.dist, w.distX = b.distX, w.plotX = b.plotX, w.plotY = b.plotY, w.index = b.i, w.isInside = this.isPointInside(b)), w;
- }, A(I.prototype, "searchPoint", function(b) {
- return this.getPoint(b.apply(this, [].slice.call(arguments, 1)));
- }), A(j.prototype, "haloPath", function(b) {
- var w = this.series, x = this.plotX, a = this.plotY, c = w.chart.inverted;
- w.isSeriesBoosting && c && (this.plotX = w.yAxis.len - a, this.plotY = w.xAxis.len - x);
- var p = b.apply(this, Array.prototype.slice.call(
- arguments,
- 1
- ));
- return w.isSeriesBoosting && c && (this.plotX = x, this.plotY = a), p;
- }), A(I.prototype, "markerAttribs", function(b, w) {
- var x = w.plotX, a = w.plotY, c = this.chart.inverted;
- this.isSeriesBoosting && c && (w.plotX = this.yAxis.len - a, w.plotY = this.xAxis.len - x);
- var p = b.apply(this, Array.prototype.slice.call(arguments, 1));
- return this.isSeriesBoosting && c && (w.plotX = x, w.plotY = a), p;
- }), Z(I, "destroy", function() {
- var b = this, w = b.chart;
- w.markerGroup === b.markerGroup && (b.markerGroup = null), w.hoverPoints && (w.hoverPoints = w.hoverPoints.filter(function(x) {
- return x.series === b;
- })), w.hoverPoint && w.hoverPoint.series === b && (w.hoverPoint = null);
- }), A(I.prototype, "getExtremes", function(b) {
- return this.isSeriesBoosting && this.hasExtremes && this.hasExtremes() ? {} : b.apply(this, Array.prototype.slice.call(arguments, 1));
- }), ["translate", "generatePoints", "drawTracker", "drawPoints", "render"].forEach(function(b) {
- function w(x) {
- var a = this.options.stacking && (b === "translate" || b === "generatePoints");
- !this.isSeriesBoosting || a || !O(this.chart) || this.type === "heatmap" || this.type === "treemap" || !N[this.type] || this.options.boostThreshold === 0 ? x.call(this) : this[b + "Canvas"] && this[b + "Canvas"]();
- }
- A(I.prototype, b, w), b === "translate" && "column bar arearange columnrange heatmap treemap".split(" ").forEach(function(x) {
- R[x] && A(R[x].prototype, b, w);
- });
- }), A(I.prototype, "processData", function(b) {
- function w(c) {
- return x.forceCrop ? !1 : x.chart.isChartSeriesBoosting() || (c ? c.length : 0) >= (x.options.boostThreshold || Number.MAX_VALUE);
- }
- var x = this, a = this.options.data;
- O(this.chart) && N[this.type] ? (w(a) && this.type !== "heatmap" && this.type !== "treemap" && !this.options.stacking && this.hasExtremes && this.hasExtremes(!0) || (b.apply(this, Array.prototype.slice.call(arguments, 1)), a = this.processedXData), (this.isSeriesBoosting = w(a)) ? (a = void 0, this.options.data && this.options.data.length && (a = this.getFirstValidPoint(this.options.data), d(a) || v(a) || S(12, !1, this.chart)), this.enterBoost()) : this.exitBoost && this.exitBoost()) : b.apply(this, Array.prototype.slice.call(arguments, 1));
- }), Z(I, "hide", function() {
- this.canvas && this.renderTarget && (this.ogl && this.ogl.clear(), this.boostClear());
- }), I.prototype.enterBoost = function() {
- this.alteredByBoost = [], ["allowDG", "directTouch", "stickyTracking"].forEach(function(b) {
- this.alteredByBoost.push({ prop: b, val: this[b], own: Object.hasOwnProperty.call(this, b) });
- }, this), this.directTouch = this.allowDG = !1, this.finishedAnimating = this.stickyTracking = !0, this.labelBySeries && (this.labelBySeries = this.labelBySeries.destroy());
- }, I.prototype.exitBoost = function() {
- (this.alteredByBoost || []).forEach(
- function(b) {
- b.own ? this[b.prop] = b.val : delete this[b.prop];
- },
- this
- ), this.boostClear && this.boostClear();
- }, I.prototype.hasExtremes = function(b) {
- var w = this.options, x = this.xAxis && this.xAxis.options, a = this.yAxis && this.yAxis.options, c = this.colorAxis && this.colorAxis.options;
- return w.data.length > (w.boostThreshold || Number.MAX_VALUE) && d(a.min) && d(a.max) && (!b || d(x.min) && d(x.max)) && (!c || d(c.min) && d(c.max));
- }, I.prototype.destroyGraphics = function() {
- var b = this, w = this, x = this.points, a, c;
- if (x)
- for (c = 0; c < x.length; c += 1)
- (a = x[c]) && a.destroyElements && a.destroyElements();
- [
- "graph",
- "area",
- "tracker"
- ].forEach(function(p) {
- w[p] && (w[p] = w[p].destroy());
- }), this.getZonesGraphs && this.getZonesGraphs([["graph", "highcharts-graph"]]).forEach(function(p) {
- var i = b[p[0]];
- i && (b[p[0]] = i.destroy());
- });
- }, F.forEach(function(b) {
- C[b] && (C[b].boostThreshold = 5e3, C[b].boostData = [], R[b].prototype.fillOpacity = !0);
- });
- }), E(f, "Extensions/Boost/NamedColors.js", [f["Core/Color/Color.js"]], function(l) {
- var y = {
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dodgerblue: "#1e90ff",
- feldspar: "#d19275",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgrey: "#d3d3d3",
- lightgreen: "#90ee90",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslateblue: "#8470ff",
- lightslategray: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370d8",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#d87093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- violetred: "#d02090",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- };
- return l.names = y;
- }), E(f, "Extensions/Boost/Boost.js", [f["Extensions/Boost/BoostUtils.js"], f["Extensions/Boost/BoostInit.js"], f["Extensions/BoostCanvas.js"], f["Core/Utilities.js"]], function(l, y, j, I) {
- I = I.error, l = l.hasWebGLSupport, l() ? y() : typeof j < "u" ? j() : I(26);
- }), E(f, "masters/modules/boost.src.js", [], function() {
- });
- });
- })(R0);
- const N0 = ml, B0 = (r) => {
- let f = window.location.protocol;
- /^http(s)?:&/.test(f) || (f = "http:");
- let E = {
- lang: {
- // Highcharts
- contextButtonTitle: "图表导出菜单",
- decimalPoint: ".",
- downloadJPEG: "下载 JPEG 图片",
- downloadPDF: "下载 PDF 文件",
- downloadPNG: "下载 PNG 文件",
- downloadSVG: "下载 SVG 文件",
- downloadXLS: "下载 XLS 文件",
- drillUpText: "◁ 返回 {series.name}",
- exitFullscreen: "退出全屏",
- exportData: {
- categoryDatetimeHeader: "时间",
- categoryHeader: "类别"
- },
- openInCloud: "在 Highcharts Cloud 中打开",
- invalidDate: "无效的时间",
- loading: "加载中...",
- months: [
- "一月",
- "二月",
- "三月",
- "四月",
- "五月",
- "六月",
- "七月",
- "八月",
- "九月",
- "十月",
- "十一月",
- "十二月"
- ],
- navigation: {
- popup: {
- addButton: "新增",
- arrowLine: "直线",
- arrowRay: "射线",
- arrowSegment: "线段",
- background: "背景",
- backgroundColor: "背景颜色",
- backgroundColors: "背景颜色",
- borderColor: "边框颜色",
- borderRadius: "圆角",
- borderWidth: "边框大小",
- circle: "圆",
- color: "颜色",
- connector: "连接",
- crooked3: "Crooked 3 line",
- crooked5: "Crooked 5 line",
- crosshairX: "竖直准星线",
- crosshairY: "水平准星线",
- editButton: "编辑",
- elliott3: "Elliott 3 line",
- elliott5: "Elliott 5 line",
- fibonacci: "斐波纳契",
- fill: "填充颜色",
- flags: "标志",
- fontSize: "字体大小",
- format: "文本",
- height: "高度",
- horizontalLine: "水平线",
- infinityLine: "无限线",
- innerBackground: "内背景",
- label: "文字标签",
- labelOptions: "文字标签配置",
- labels: "文字标签",
- line: "线",
- lines: "线条",
- measure: "Measure",
- measureX: "Measure X",
- measureXY: "Measure XY",
- measureY: "Measure Y",
- name: "名字",
- outerBackground: "外背景",
- padding: "内间距",
- parallelChannel: "并行通道",
- pitchfork: "杈子",
- ray: "射线",
- rectangle: "矩形",
- removeButton: "删除",
- saveButton: "保存",
- segment: "段落",
- series: "数据列",
- shapeOptions: "图形配置",
- shapes: "图形",
- simpleShapes: "简单图形",
- stroke: "线条颜色",
- strokeWidth: "线条粗细",
- style: "样式",
- title: "标题",
- tunnel: "通道",
- typeOptions: "详情",
- verticalArrow: "竖直箭头",
- verticalCounter: "竖直计数器",
- verticalLabel: "竖直标签",
- verticalLine: "竖直线",
- volume: "成交量"
- }
- },
- noData: "暂无数据",
- numericSymbols: null,
- printChart: "打印图表",
- resetZoom: "重置缩放比例",
- resetZoomTitle: "重置为原始大小",
- shortMonths: [
- "一月",
- "二月",
- "三月",
- "四月",
- "五月",
- "六月",
- "七月",
- "八月",
- "九月",
- "十月",
- "十一月",
- "十二月"
- ],
- thousandsSep: ",",
- viewData: "查看数据表格",
- viewFullscreen: "全屏查看",
- weekdays: [
- "星期天",
- "星期一",
- "星期二",
- "星期三",
- "星期四",
- "星期五",
- "星期六"
- ],
- viewData: "查看数据表格",
- // Highstock
- rangeSelectorFrom: "开始时间",
- rangeSelectorTo: "结束时间",
- rangeSelectorZoom: "范围",
- // Highmaps
- zoomIn: "缩小",
- zoomOut: "放大"
- },
- global: {
- // 不使用 UTC时间
- useUTC: !1,
- timezoneOffset: -8 * 60,
- canvasToolsURL: f + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
- VMLRadialGradientURL: f + +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"
- },
- exporting: {
- url: f + "//export.highcharts.com.cn"
- },
- credits: {
- text: "Highcharts.com.cn",
- href: "https://www.highcharts.com.cn"
- },
- /**
- * Highstock
- */
- rangeSelector: {
- inputDateFormat: "%Y-%m-%d",
- buttons: [
- {
- type: "month",
- count: 1,
- text: "月"
- },
- {
- type: "month",
- count: 3,
- text: "季度"
- },
- {
- type: "month",
- count: 6,
- text: "半年"
- },
- {
- type: "ytd",
- text: "YTD"
- },
- {
- type: "year",
- count: 1,
- text: "年"
- },
- {
- type: "all",
- text: "所有"
- }
- ]
- },
- plotOptions: {
- series: {
- dataGrouping: {
- dateTimeLabelFormats: {
- /* millisecond: [
- '%Y-%m-%d %H:%M:%S.%L',
- '%Y-%m-%d %H:%M:%S.%L',
- ' ~ %H:%M:%S.%L',
- ],
- second: ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S', ' ~ %H:%M:%S'],
- minute: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'],
- hour: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'], */
- day: ["%Y/%m/%d", "%Y/%m/%d", " ~ %Y/%m/%d"],
- week: ["%Y/%m/%d", "%Y/%m/%d", " ~ %Y/%m/%d"],
- month: ["%Y/%m", "%Y/%m", " ~ %Y/%m"],
- year: ["%Y", "%Y", " ~ %Y"]
- }
- }
- }
- }
- };
- r.setOptions(E);
- };
- //! moment.js
- //! version : 2.29.4
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- var Zp;
- function Xt() {
- return Zp.apply(null, arguments);
- }
- function j0(r) {
- Zp = r;
- }
- function ji(r) {
- return r instanceof Array || Object.prototype.toString.call(r) === "[object Array]";
- }
- function Zr(r) {
- return r != null && Object.prototype.toString.call(r) === "[object Object]";
- }
- function me(r, f) {
- return Object.prototype.hasOwnProperty.call(r, f);
- }
- function Pl(r) {
- if (Object.getOwnPropertyNames)
- return Object.getOwnPropertyNames(r).length === 0;
- var f;
- for (f in r)
- if (me(r, f))
- return !1;
- return !0;
- }
- function hi(r) {
- return r === void 0;
- }
- function ur(r) {
- return typeof r == "number" || Object.prototype.toString.call(r) === "[object Number]";
- }
- function ss(r) {
- return r instanceof Date || Object.prototype.toString.call(r) === "[object Date]";
- }
- function Kp(r, f) {
- var E = [], l, y = r.length;
- for (l = 0; l < y; ++l)
- E.push(f(r[l], l));
- return E;
- }
- function Er(r, f) {
- for (var E in f)
- me(f, E) && (r[E] = f[E]);
- return me(f, "toString") && (r.toString = f.toString), me(f, "valueOf") && (r.valueOf = f.valueOf), r;
- }
- function $i(r, f, E, l) {
- return bu(r, f, E, l, !0).utc();
- }
- function W0() {
- return {
- empty: !1,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: !1,
- invalidEra: null,
- invalidMonth: null,
- invalidFormat: !1,
- userInvalidated: !1,
- iso: !1,
- parsedDateParts: [],
- era: null,
- meridiem: null,
- rfc2822: !1,
- weekdayMismatch: !1
- };
- }
- function se(r) {
- return r._pf == null && (r._pf = W0()), r._pf;
- }
- var yl;
- Array.prototype.some ? yl = Array.prototype.some : yl = function(r) {
- var f = Object(this), E = f.length >>> 0, l;
- for (l = 0; l < E; l++)
- if (l in f && r.call(this, f[l], l, f))
- return !0;
- return !1;
- };
- function El(r) {
- if (r._isValid == null) {
- var f = se(r), E = yl.call(f.parsedDateParts, function(y) {
- return y != null;
- }), l = !isNaN(r._d.getTime()) && f.overflow < 0 && !f.empty && !f.invalidEra && !f.invalidMonth && !f.invalidWeekday && !f.weekdayMismatch && !f.nullInput && !f.invalidFormat && !f.userInvalidated && (!f.meridiem || f.meridiem && E);
- if (r._strict && (l = l && f.charsLeftOver === 0 && f.unusedTokens.length === 0 && f.bigHour === void 0), Object.isFrozen == null || !Object.isFrozen(r))
- r._isValid = l;
- else
- return l;
- }
- return r._isValid;
- }
- function ko(r) {
- var f = $i(NaN);
- return r != null ? Er(se(f), r) : se(f).userInvalidated = !0, f;
- }
- var Op = Xt.momentProperties = [], el = !1;
- function Ol(r, f) {
- var E, l, y, j = Op.length;
- if (hi(f._isAMomentObject) || (r._isAMomentObject = f._isAMomentObject), hi(f._i) || (r._i = f._i), hi(f._f) || (r._f = f._f), hi(f._l) || (r._l = f._l), hi(f._strict) || (r._strict = f._strict), hi(f._tzm) || (r._tzm = f._tzm), hi(f._isUTC) || (r._isUTC = f._isUTC), hi(f._offset) || (r._offset = f._offset), hi(f._pf) || (r._pf = se(f)), hi(f._locale) || (r._locale = f._locale), j > 0)
- for (E = 0; E < j; E++)
- l = Op[E], y = f[l], hi(y) || (r[l] = y);
- return r;
- }
- function os(r) {
- Ol(this, r), this._d = new Date(r._d != null ? r._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), el === !1 && (el = !0, Xt.updateOffset(this), el = !1);
- }
- function Wi(r) {
- return r instanceof os || r != null && r._isAMomentObject != null;
- }
- function Jp(r) {
- Xt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + r);
- }
- function Oi(r, f) {
- var E = !0;
- return Er(function() {
- if (Xt.deprecationHandler != null && Xt.deprecationHandler(null, r), E) {
- var l = [], y, j, I, Z = arguments.length;
- for (j = 0; j < Z; j++) {
- if (y = "", typeof arguments[j] == "object") {
- y += `
- [` + j + "] ";
- for (I in arguments[0])
- me(arguments[0], I) && (y += I + ": " + arguments[0][I] + ", ");
- y = y.slice(0, -2);
- } else
- y = arguments[j];
- l.push(y);
- }
- Jp(
- r + `
- Arguments: ` + Array.prototype.slice.call(l).join("") + `
- ` + new Error().stack
- ), E = !1;
- }
- return f.apply(this, arguments);
- }, f);
- }
- var Lp = {};
- function qp(r, f) {
- Xt.deprecationHandler != null && Xt.deprecationHandler(r, f), Lp[r] || (Jp(f), Lp[r] = !0);
- }
- Xt.suppressDeprecationWarnings = !1;
- Xt.deprecationHandler = null;
- function Zi(r) {
- return typeof Function < "u" && r instanceof Function || Object.prototype.toString.call(r) === "[object Function]";
- }
- function z0(r) {
- var f, E;
- for (E in r)
- me(r, E) && (f = r[E], Zi(f) ? this[E] = f : this["_" + E] = f);
- this._config = r, this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
- );
- }
- function vl(r, f) {
- var E = Er({}, r), l;
- for (l in f)
- me(f, l) && (Zr(r[l]) && Zr(f[l]) ? (E[l] = {}, Er(E[l], r[l]), Er(E[l], f[l])) : f[l] != null ? E[l] = f[l] : delete E[l]);
- for (l in r)
- me(r, l) && !me(f, l) && Zr(r[l]) && (E[l] = Er({}, E[l]));
- return E;
- }
- function Ll(r) {
- r != null && this.set(r);
- }
- var xl;
- Object.keys ? xl = Object.keys : xl = function(r) {
- var f, E = [];
- for (f in r)
- me(r, f) && E.push(f);
- return E;
- };
- var Y0 = {
- sameDay: "[Today at] LT",
- nextDay: "[Tomorrow at] LT",
- nextWeek: "dddd [at] LT",
- lastDay: "[Yesterday at] LT",
- lastWeek: "[Last] dddd [at] LT",
- sameElse: "L"
- };
- function X0(r, f, E) {
- var l = this._calendar[r] || this._calendar.sameElse;
- return Zi(l) ? l.call(f, E) : l;
- }
- function Vi(r, f, E) {
- var l = "" + Math.abs(r), y = f - l.length, j = r >= 0;
- return (j ? E ? "+" : "" : "-") + Math.pow(10, Math.max(0, y)).toString().substr(1) + l;
- }
- var _l = /(\[[^\[]*\])|(\\)?([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, io = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, il = {}, vn = {};
- function Zt(r, f, E, l) {
- var y = l;
- typeof l == "string" && (y = function() {
- return this[l]();
- }), r && (vn[r] = y), f && (vn[f[0]] = function() {
- return Vi(y.apply(this, arguments), f[1], f[2]);
- }), E && (vn[E] = function() {
- return this.localeData().ordinal(
- y.apply(this, arguments),
- r
- );
- });
- }
- function G0(r) {
- return r.match(/\[[\s\S]/) ? r.replace(/^\[|\]$/g, "") : r.replace(/\\/g, "");
- }
- function H0(r) {
- var f = r.match(_l), E, l;
- for (E = 0, l = f.length; E < l; E++)
- vn[f[E]] ? f[E] = vn[f[E]] : f[E] = G0(f[E]);
- return function(y) {
- var j = "", I;
- for (I = 0; I < l; I++)
- j += Zi(f[I]) ? f[I].call(y, r) : f[I];
- return j;
- };
- }
- function so(r, f) {
- return r.isValid() ? (f = Qp(f, r.localeData()), il[f] = il[f] || H0(f), il[f](r)) : r.localeData().invalidDate();
- }
- function Qp(r, f) {
- var E = 5;
- function l(y) {
- return f.longDateFormat(y) || y;
- }
- for (io.lastIndex = 0; E >= 0 && io.test(r); )
- r = r.replace(
- io,
- l
- ), io.lastIndex = 0, E -= 1;
- return r;
- }
- var F0 = {
- LTS: "h:mm:ss A",
- LT: "h:mm A",
- L: "MM/DD/YYYY",
- LL: "MMMM D, YYYY",
- LLL: "MMMM D, YYYY h:mm A",
- LLLL: "dddd, MMMM D, YYYY h:mm A"
- };
- function U0(r) {
- var f = this._longDateFormat[r], E = this._longDateFormat[r.toUpperCase()];
- return f || !E ? f : (this._longDateFormat[r] = E.match(_l).map(function(l) {
- return l === "MMMM" || l === "MM" || l === "DD" || l === "dddd" ? l.slice(1) : l;
- }).join(""), this._longDateFormat[r]);
- }
- var V0 = "Invalid date";
- function $0() {
- return this._invalidDate;
- }
- var Z0 = "%d", K0 = /\d{1,2}/;
- function J0(r) {
- return this._ordinal.replace("%d", r);
- }
- var q0 = {
- future: "in %s",
- past: "%s ago",
- s: "a few seconds",
- ss: "%d seconds",
- m: "a minute",
- mm: "%d minutes",
- h: "an hour",
- hh: "%d hours",
- d: "a day",
- dd: "%d days",
- w: "a week",
- ww: "%d weeks",
- M: "a month",
- MM: "%d months",
- y: "a year",
- yy: "%d years"
- };
- function Q0(r, f, E, l) {
- var y = this._relativeTime[E];
- return Zi(y) ? y(r, f, E, l) : y.replace(/%d/i, r);
- }
- function t1(r, f) {
- var E = this._relativeTime[r > 0 ? "future" : "past"];
- return Zi(E) ? E(f) : E.replace(/%s/i, f);
- }
- var Jn = {};
- function ti(r, f) {
- var E = r.toLowerCase();
- Jn[E] = Jn[E + "s"] = Jn[f] = r;
- }
- function Li(r) {
- return typeof r == "string" ? Jn[r] || Jn[r.toLowerCase()] : void 0;
- }
- function Dl(r) {
- var f = {}, E, l;
- for (l in r)
- me(r, l) && (E = Li(l), E && (f[E] = r[l]));
- return f;
- }
- var tu = {};
- function ei(r, f) {
- tu[r] = f;
- }
- function e1(r) {
- var f = [], E;
- for (E in r)
- me(r, E) && f.push({ unit: E, priority: tu[E] });
- return f.sort(function(l, y) {
- return l.priority - y.priority;
- }), f;
- }
- function Ao(r) {
- return r % 4 === 0 && r % 100 !== 0 || r % 400 === 0;
- }
- function Ti(r) {
- return r < 0 ? Math.ceil(r) || 0 : Math.floor(r);
- }
- function le(r) {
- var f = +r, E = 0;
- return f !== 0 && isFinite(f) && (E = Ti(f)), E;
- }
- function Cn(r, f) {
- return function(E) {
- return E != null ? (eu(this, r, E), Xt.updateOffset(this, f), this) : mo(this, r);
- };
- }
- function mo(r, f) {
- return r.isValid() ? r._d["get" + (r._isUTC ? "UTC" : "") + f]() : NaN;
- }
- function eu(r, f, E) {
- r.isValid() && !isNaN(E) && (f === "FullYear" && Ao(r.year()) && r.month() === 1 && r.date() === 29 ? (E = le(E), r._d["set" + (r._isUTC ? "UTC" : "") + f](
- E,
- r.month(),
- _o(E, r.month())
- )) : r._d["set" + (r._isUTC ? "UTC" : "") + f](E));
- }
- function i1(r) {
- return r = Li(r), Zi(this[r]) ? this[r]() : this;
- }
- function r1(r, f) {
- if (typeof r == "object") {
- r = Dl(r);
- var E = e1(r), l, y = E.length;
- for (l = 0; l < y; l++)
- this[E[l].unit](r[E[l].unit]);
- } else if (r = Li(r), Zi(this[r]))
- return this[r](f);
- return this;
- }
- var iu = /\d/, vi = /\d\d/, ru = /\d{3}/, Il = /\d{4}/, To = /[+-]?\d{6}/, Pe = /\d\d?/, nu = /\d\d\d\d?/, su = /\d\d\d\d\d\d?/, Po = /\d{1,3}/, Rl = /\d{1,4}/, Eo = /[+-]?\d{1,6}/, kn = /\d+/, Oo = /[+-]?\d+/, n1 = /Z|[+-]\d\d:?\d\d/gi, Lo = /Z|[+-]\d\d(?::?\d\d)?/gi, s1 = /[+-]?\d+(\.\d{1,3})?/, as = /[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, yo;
- yo = {};
- function Ft(r, f, E) {
- yo[r] = Zi(f) ? f : function(l, y) {
- return l && E ? E : f;
- };
- }
- function o1(r, f) {
- return me(yo, r) ? yo[r](f._strict, f._locale) : new RegExp(a1(r));
- }
- function a1(r) {
- return yi(
- r.replace("\\", "").replace(
- /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
- function(f, E, l, y, j) {
- return E || l || y || j;
- }
- )
- );
- }
- function yi(r) {
- return r.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
- }
- var bl = {};
- function we(r, f) {
- var E, l = f, y;
- for (typeof r == "string" && (r = [r]), ur(f) && (l = function(j, I) {
- I[f] = le(j);
- }), y = r.length, E = 0; E < y; E++)
- bl[r[E]] = l;
- }
- function ls(r, f) {
- we(r, function(E, l, y, j) {
- y._w = y._w || {}, f(E, y._w, y, j);
- });
- }
- function l1(r, f, E) {
- f != null && me(bl, r) && bl[r](f, E._a, E, r);
- }
- var Qe = 0, lr = 1, Fi = 2, Xe = 3, Bi = 4, hr = 5, Ur = 6, h1 = 7, c1 = 8;
- function p1(r, f) {
- return (r % f + f) % f;
- }
- var We;
- Array.prototype.indexOf ? We = Array.prototype.indexOf : We = function(r) {
- var f;
- for (f = 0; f < this.length; ++f)
- if (this[f] === r)
- return f;
- return -1;
- };
- function _o(r, f) {
- if (isNaN(r) || isNaN(f))
- return NaN;
- var E = p1(f, 12);
- return r += (f - E) / 12, E === 1 ? Ao(r) ? 29 : 28 : 31 - E % 7 % 2;
- }
- Zt("M", ["MM", 2], "Mo", function() {
- return this.month() + 1;
- });
- Zt("MMM", 0, 0, function(r) {
- return this.localeData().monthsShort(this, r);
- });
- Zt("MMMM", 0, 0, function(r) {
- return this.localeData().months(this, r);
- });
- ti("month", "M");
- ei("month", 8);
- Ft("M", Pe);
- Ft("MM", Pe, vi);
- Ft("MMM", function(r, f) {
- return f.monthsShortRegex(r);
- });
- Ft("MMMM", function(r, f) {
- return f.monthsRegex(r);
- });
- we(["M", "MM"], function(r, f) {
- f[lr] = le(r) - 1;
- });
- we(["MMM", "MMMM"], function(r, f, E, l) {
- var y = E._locale.monthsParse(r, l, E._strict);
- y != null ? f[lr] = y : se(E).invalidMonth = r;
- });
- var u1 = "January_February_March_April_May_June_July_August_September_October_November_December".split(
- "_"
- ), ou = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), au = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, d1 = as, f1 = as;
- function g1(r, f) {
- return r ? ji(this._months) ? this._months[r.month()] : this._months[(this._months.isFormat || au).test(f) ? "format" : "standalone"][r.month()] : ji(this._months) ? this._months : this._months.standalone;
- }
- function m1(r, f) {
- return r ? ji(this._monthsShort) ? this._monthsShort[r.month()] : this._monthsShort[au.test(f) ? "format" : "standalone"][r.month()] : ji(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
- }
- function y1(r, f, E) {
- var l, y, j, I = r.toLocaleLowerCase();
- if (!this._monthsParse)
- for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], l = 0; l < 12; ++l)
- j = $i([2e3, l]), this._shortMonthsParse[l] = this.monthsShort(
- j,
- ""
- ).toLocaleLowerCase(), this._longMonthsParse[l] = this.months(j, "").toLocaleLowerCase();
- return E ? f === "MMM" ? (y = We.call(this._shortMonthsParse, I), y !== -1 ? y : null) : (y = We.call(this._longMonthsParse, I), y !== -1 ? y : null) : f === "MMM" ? (y = We.call(this._shortMonthsParse, I), y !== -1 ? y : (y = We.call(this._longMonthsParse, I), y !== -1 ? y : null)) : (y = We.call(this._longMonthsParse, I), y !== -1 ? y : (y = We.call(this._shortMonthsParse, I), y !== -1 ? y : null));
- }
- function v1(r, f, E) {
- var l, y, j;
- if (this._monthsParseExact)
- return y1.call(this, r, f, E);
- for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), l = 0; l < 12; l++) {
- if (y = $i([2e3, l]), E && !this._longMonthsParse[l] && (this._longMonthsParse[l] = new RegExp(
- "^" + this.months(y, "").replace(".", "") + "$",
- "i"
- ), this._shortMonthsParse[l] = new RegExp(
- "^" + this.monthsShort(y, "").replace(".", "") + "$",
- "i"
- )), !E && !this._monthsParse[l] && (j = "^" + this.months(y, "") + "|^" + this.monthsShort(y, ""), this._monthsParse[l] = new RegExp(j.replace(".", ""), "i")), E && f === "MMMM" && this._longMonthsParse[l].test(r))
- return l;
- if (E && f === "MMM" && this._shortMonthsParse[l].test(r))
- return l;
- if (!E && this._monthsParse[l].test(r))
- return l;
- }
- }
- function lu(r, f) {
- var E;
- if (!r.isValid())
- return r;
- if (typeof f == "string") {
- if (/^\d+$/.test(f))
- f = le(f);
- else if (f = r.localeData().monthsParse(f), !ur(f))
- return r;
- }
- return E = Math.min(r.date(), _o(r.year(), f)), r._d["set" + (r._isUTC ? "UTC" : "") + "Month"](f, E), r;
- }
- function hu(r) {
- return r != null ? (lu(this, r), Xt.updateOffset(this, !0), this) : mo(this, "Month");
- }
- function x1() {
- return _o(this.year(), this.month());
- }
- function b1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || cu.call(this), r ? this._monthsShortStrictRegex : this._monthsShortRegex) : (me(this, "_monthsShortRegex") || (this._monthsShortRegex = d1), this._monthsShortStrictRegex && r ? this._monthsShortStrictRegex : this._monthsShortRegex);
- }
- function S1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || cu.call(this), r ? this._monthsStrictRegex : this._monthsRegex) : (me(this, "_monthsRegex") || (this._monthsRegex = f1), this._monthsStrictRegex && r ? this._monthsStrictRegex : this._monthsRegex);
- }
- function cu() {
- function r(I, Z) {
- return Z.length - I.length;
- }
- var f = [], E = [], l = [], y, j;
- for (y = 0; y < 12; y++)
- j = $i([2e3, y]), f.push(this.monthsShort(j, "")), E.push(this.months(j, "")), l.push(this.months(j, "")), l.push(this.monthsShort(j, ""));
- for (f.sort(r), E.sort(r), l.sort(r), y = 0; y < 12; y++)
- f[y] = yi(f[y]), E[y] = yi(E[y]);
- for (y = 0; y < 24; y++)
- l[y] = yi(l[y]);
- this._monthsRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
- "^(" + E.join("|") + ")",
- "i"
- ), this._monthsShortStrictRegex = new RegExp(
- "^(" + f.join("|") + ")",
- "i"
- );
- }
- Zt("Y", 0, 0, function() {
- var r = this.year();
- return r <= 9999 ? Vi(r, 4) : "+" + r;
- });
- Zt(0, ["YY", 2], 0, function() {
- return this.year() % 100;
- });
- Zt(0, ["YYYY", 4], 0, "year");
- Zt(0, ["YYYYY", 5], 0, "year");
- Zt(0, ["YYYYYY", 6, !0], 0, "year");
- ti("year", "y");
- ei("year", 1);
- Ft("Y", Oo);
- Ft("YY", Pe, vi);
- Ft("YYYY", Rl, Il);
- Ft("YYYYY", Eo, To);
- Ft("YYYYYY", Eo, To);
- we(["YYYYY", "YYYYYY"], Qe);
- we("YYYY", function(r, f) {
- f[Qe] = r.length === 2 ? Xt.parseTwoDigitYear(r) : le(r);
- });
- we("YY", function(r, f) {
- f[Qe] = Xt.parseTwoDigitYear(r);
- });
- we("Y", function(r, f) {
- f[Qe] = parseInt(r, 10);
- });
- function qn(r) {
- return Ao(r) ? 366 : 365;
- }
- Xt.parseTwoDigitYear = function(r) {
- return le(r) + (le(r) > 68 ? 1900 : 2e3);
- };
- var pu = Cn("FullYear", !0);
- function w1() {
- return Ao(this.year());
- }
- function M1(r, f, E, l, y, j, I) {
- var Z;
- return r < 100 && r >= 0 ? (Z = new Date(r + 400, f, E, l, y, j, I), isFinite(Z.getFullYear()) && Z.setFullYear(r)) : Z = new Date(r, f, E, l, y, j, I), Z;
- }
- function ts(r) {
- var f, E;
- return r < 100 && r >= 0 ? (E = Array.prototype.slice.call(arguments), E[0] = r + 400, f = new Date(Date.UTC.apply(null, E)), isFinite(f.getUTCFullYear()) && f.setUTCFullYear(r)) : f = new Date(Date.UTC.apply(null, arguments)), f;
- }
- function vo(r, f, E) {
- var l = 7 + f - E, y = (7 + ts(r, 0, l).getUTCDay() - f) % 7;
- return -y + l - 1;
- }
- function uu(r, f, E, l, y) {
- var j = (7 + E - l) % 7, I = vo(r, l, y), Z = 1 + 7 * (f - 1) + j + I, H, U;
- return Z <= 0 ? (H = r - 1, U = qn(H) + Z) : Z > qn(r) ? (H = r + 1, U = Z - qn(r)) : (H = r, U = Z), {
- year: H,
- dayOfYear: U
- };
- }
- function es(r, f, E) {
- var l = vo(r.year(), f, E), y = Math.floor((r.dayOfYear() - l - 1) / 7) + 1, j, I;
- return y < 1 ? (I = r.year() - 1, j = y + cr(I, f, E)) : y > cr(r.year(), f, E) ? (j = y - cr(r.year(), f, E), I = r.year() + 1) : (I = r.year(), j = y), {
- week: j,
- year: I
- };
- }
- function cr(r, f, E) {
- var l = vo(r, f, E), y = vo(r + 1, f, E);
- return (qn(r) - l + y) / 7;
- }
- Zt("w", ["ww", 2], "wo", "week");
- Zt("W", ["WW", 2], "Wo", "isoWeek");
- ti("week", "w");
- ti("isoWeek", "W");
- ei("week", 5);
- ei("isoWeek", 5);
- Ft("w", Pe);
- Ft("ww", Pe, vi);
- Ft("W", Pe);
- Ft("WW", Pe, vi);
- ls(
- ["w", "ww", "W", "WW"],
- function(r, f, E, l) {
- f[l.substr(0, 1)] = le(r);
- }
- );
- function C1(r) {
- return es(r, this._week.dow, this._week.doy).week;
- }
- var k1 = {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6
- // The week that contains Jan 6th is the first week of the year.
- };
- function A1() {
- return this._week.dow;
- }
- function T1() {
- return this._week.doy;
- }
- function P1(r) {
- var f = this.localeData().week(this);
- return r == null ? f : this.add((r - f) * 7, "d");
- }
- function E1(r) {
- var f = es(this, 1, 4).week;
- return r == null ? f : this.add((r - f) * 7, "d");
- }
- Zt("d", 0, "do", "day");
- Zt("dd", 0, 0, function(r) {
- return this.localeData().weekdaysMin(this, r);
- });
- Zt("ddd", 0, 0, function(r) {
- return this.localeData().weekdaysShort(this, r);
- });
- Zt("dddd", 0, 0, function(r) {
- return this.localeData().weekdays(this, r);
- });
- Zt("e", 0, 0, "weekday");
- Zt("E", 0, 0, "isoWeekday");
- ti("day", "d");
- ti("weekday", "e");
- ti("isoWeekday", "E");
- ei("day", 11);
- ei("weekday", 11);
- ei("isoWeekday", 11);
- Ft("d", Pe);
- Ft("e", Pe);
- Ft("E", Pe);
- Ft("dd", function(r, f) {
- return f.weekdaysMinRegex(r);
- });
- Ft("ddd", function(r, f) {
- return f.weekdaysShortRegex(r);
- });
- Ft("dddd", function(r, f) {
- return f.weekdaysRegex(r);
- });
- ls(["dd", "ddd", "dddd"], function(r, f, E, l) {
- var y = E._locale.weekdaysParse(r, l, E._strict);
- y != null ? f.d = y : se(E).invalidWeekday = r;
- });
- ls(["d", "e", "E"], function(r, f, E, l) {
- f[l] = le(r);
- });
- function O1(r, f) {
- return typeof r != "string" ? r : isNaN(r) ? (r = f.weekdaysParse(r), typeof r == "number" ? r : null) : parseInt(r, 10);
- }
- function L1(r, f) {
- return typeof r == "string" ? f.weekdaysParse(r) % 7 || 7 : isNaN(r) ? null : r;
- }
- function Nl(r, f) {
- return r.slice(f, 7).concat(r.slice(0, f));
- }
- var _1 = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), du = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), D1 = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), I1 = as, R1 = as, N1 = as;
- function B1(r, f) {
- var E = ji(this._weekdays) ? this._weekdays : this._weekdays[r && r !== !0 && this._weekdays.isFormat.test(f) ? "format" : "standalone"];
- return r === !0 ? Nl(E, this._week.dow) : r ? E[r.day()] : E;
- }
- function j1(r) {
- return r === !0 ? Nl(this._weekdaysShort, this._week.dow) : r ? this._weekdaysShort[r.day()] : this._weekdaysShort;
- }
- function W1(r) {
- return r === !0 ? Nl(this._weekdaysMin, this._week.dow) : r ? this._weekdaysMin[r.day()] : this._weekdaysMin;
- }
- function z1(r, f, E) {
- var l, y, j, I = r.toLocaleLowerCase();
- if (!this._weekdaysParse)
- for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], l = 0; l < 7; ++l)
- j = $i([2e3, 1]).day(l), this._minWeekdaysParse[l] = this.weekdaysMin(
- j,
- ""
- ).toLocaleLowerCase(), this._shortWeekdaysParse[l] = this.weekdaysShort(
- j,
- ""
- ).toLocaleLowerCase(), this._weekdaysParse[l] = this.weekdays(j, "").toLocaleLowerCase();
- return E ? f === "dddd" ? (y = We.call(this._weekdaysParse, I), y !== -1 ? y : null) : f === "ddd" ? (y = We.call(this._shortWeekdaysParse, I), y !== -1 ? y : null) : (y = We.call(this._minWeekdaysParse, I), y !== -1 ? y : null) : f === "dddd" ? (y = We.call(this._weekdaysParse, I), y !== -1 || (y = We.call(this._shortWeekdaysParse, I), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, I), y !== -1 ? y : null)) : f === "ddd" ? (y = We.call(this._shortWeekdaysParse, I), y !== -1 || (y = We.call(this._weekdaysParse, I), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, I), y !== -1 ? y : null)) : (y = We.call(this._minWeekdaysParse, I), y !== -1 || (y = We.call(this._weekdaysParse, I), y !== -1) ? y : (y = We.call(this._shortWeekdaysParse, I), y !== -1 ? y : null));
- }
- function Y1(r, f, E) {
- var l, y, j;
- if (this._weekdaysParseExact)
- return z1.call(this, r, f, E);
- for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), l = 0; l < 7; l++) {
- if (y = $i([2e3, 1]).day(l), E && !this._fullWeekdaysParse[l] && (this._fullWeekdaysParse[l] = new RegExp(
- "^" + this.weekdays(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._shortWeekdaysParse[l] = new RegExp(
- "^" + this.weekdaysShort(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._minWeekdaysParse[l] = new RegExp(
- "^" + this.weekdaysMin(y, "").replace(".", "\\.?") + "$",
- "i"
- )), this._weekdaysParse[l] || (j = "^" + this.weekdays(y, "") + "|^" + this.weekdaysShort(y, "") + "|^" + this.weekdaysMin(y, ""), this._weekdaysParse[l] = new RegExp(j.replace(".", ""), "i")), E && f === "dddd" && this._fullWeekdaysParse[l].test(r))
- return l;
- if (E && f === "ddd" && this._shortWeekdaysParse[l].test(r))
- return l;
- if (E && f === "dd" && this._minWeekdaysParse[l].test(r))
- return l;
- if (!E && this._weekdaysParse[l].test(r))
- return l;
- }
- }
- function X1(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var f = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- return r != null ? (r = O1(r, this.localeData()), this.add(r - f, "d")) : f;
- }
- function G1(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var f = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return r == null ? f : this.add(r - f, "d");
- }
- function H1(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- var f = L1(r, this.localeData());
- return this.day(this.day() % 7 ? f : f - 7);
- } else
- return this.day() || 7;
- }
- function F1(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Bl.call(this), r ? this._weekdaysStrictRegex : this._weekdaysRegex) : (me(this, "_weekdaysRegex") || (this._weekdaysRegex = I1), this._weekdaysStrictRegex && r ? this._weekdaysStrictRegex : this._weekdaysRegex);
- }
- function U1(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Bl.call(this), r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (me(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = R1), this._weekdaysShortStrictRegex && r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
- }
- function V1(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Bl.call(this), r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (me(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = N1), this._weekdaysMinStrictRegex && r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
- }
- function Bl() {
- function r(F, N) {
- return N.length - F.length;
- }
- var f = [], E = [], l = [], y = [], j, I, Z, H, U;
- for (j = 0; j < 7; j++)
- I = $i([2e3, 1]).day(j), Z = yi(this.weekdaysMin(I, "")), H = yi(this.weekdaysShort(I, "")), U = yi(this.weekdays(I, "")), f.push(Z), E.push(H), l.push(U), y.push(Z), y.push(H), y.push(U);
- f.sort(r), E.sort(r), l.sort(r), y.sort(r), this._weekdaysRegex = new RegExp("^(" + y.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
- "^(" + l.join("|") + ")",
- "i"
- ), this._weekdaysShortStrictRegex = new RegExp(
- "^(" + E.join("|") + ")",
- "i"
- ), this._weekdaysMinStrictRegex = new RegExp(
- "^(" + f.join("|") + ")",
- "i"
- );
- }
- function jl() {
- return this.hours() % 12 || 12;
- }
- function $1() {
- return this.hours() || 24;
- }
- Zt("H", ["HH", 2], 0, "hour");
- Zt("h", ["hh", 2], 0, jl);
- Zt("k", ["kk", 2], 0, $1);
- Zt("hmm", 0, 0, function() {
- return "" + jl.apply(this) + Vi(this.minutes(), 2);
- });
- Zt("hmmss", 0, 0, function() {
- return "" + jl.apply(this) + Vi(this.minutes(), 2) + Vi(this.seconds(), 2);
- });
- Zt("Hmm", 0, 0, function() {
- return "" + this.hours() + Vi(this.minutes(), 2);
- });
- Zt("Hmmss", 0, 0, function() {
- return "" + this.hours() + Vi(this.minutes(), 2) + Vi(this.seconds(), 2);
- });
- function fu(r, f) {
- Zt(r, 0, 0, function() {
- return this.localeData().meridiem(
- this.hours(),
- this.minutes(),
- f
- );
- });
- }
- fu("a", !0);
- fu("A", !1);
- ti("hour", "h");
- ei("hour", 13);
- function gu(r, f) {
- return f._meridiemParse;
- }
- Ft("a", gu);
- Ft("A", gu);
- Ft("H", Pe);
- Ft("h", Pe);
- Ft("k", Pe);
- Ft("HH", Pe, vi);
- Ft("hh", Pe, vi);
- Ft("kk", Pe, vi);
- Ft("hmm", nu);
- Ft("hmmss", su);
- Ft("Hmm", nu);
- Ft("Hmmss", su);
- we(["H", "HH"], Xe);
- we(["k", "kk"], function(r, f, E) {
- var l = le(r);
- f[Xe] = l === 24 ? 0 : l;
- });
- we(["a", "A"], function(r, f, E) {
- E._isPm = E._locale.isPM(r), E._meridiem = r;
- });
- we(["h", "hh"], function(r, f, E) {
- f[Xe] = le(r), se(E).bigHour = !0;
- });
- we("hmm", function(r, f, E) {
- var l = r.length - 2;
- f[Xe] = le(r.substr(0, l)), f[Bi] = le(r.substr(l)), se(E).bigHour = !0;
- });
- we("hmmss", function(r, f, E) {
- var l = r.length - 4, y = r.length - 2;
- f[Xe] = le(r.substr(0, l)), f[Bi] = le(r.substr(l, 2)), f[hr] = le(r.substr(y)), se(E).bigHour = !0;
- });
- we("Hmm", function(r, f, E) {
- var l = r.length - 2;
- f[Xe] = le(r.substr(0, l)), f[Bi] = le(r.substr(l));
- });
- we("Hmmss", function(r, f, E) {
- var l = r.length - 4, y = r.length - 2;
- f[Xe] = le(r.substr(0, l)), f[Bi] = le(r.substr(l, 2)), f[hr] = le(r.substr(y));
- });
- function Z1(r) {
- return (r + "").toLowerCase().charAt(0) === "p";
- }
- var K1 = /[ap]\.?m?\.?/i, J1 = Cn("Hours", !0);
- function q1(r, f, E) {
- return r > 11 ? E ? "pm" : "PM" : E ? "am" : "AM";
- }
- var mu = {
- calendar: Y0,
- longDateFormat: F0,
- invalidDate: V0,
- ordinal: Z0,
- dayOfMonthOrdinalParse: K0,
- relativeTime: q0,
- months: u1,
- monthsShort: ou,
- week: k1,
- weekdays: _1,
- weekdaysMin: D1,
- weekdaysShort: du,
- meridiemParse: K1
- }, Oe = {}, Vn = {}, is;
- function Q1(r, f) {
- var E, l = Math.min(r.length, f.length);
- for (E = 0; E < l; E += 1)
- if (r[E] !== f[E])
- return E;
- return l;
- }
- function _p(r) {
- return r && r.toLowerCase().replace("_", "-");
- }
- function tb(r) {
- for (var f = 0, E, l, y, j; f < r.length; ) {
- for (j = _p(r[f]).split("-"), E = j.length, l = _p(r[f + 1]), l = l ? l.split("-") : null; E > 0; ) {
- if (y = Do(j.slice(0, E).join("-")), y)
- return y;
- if (l && l.length >= E && Q1(j, l) >= E - 1)
- break;
- E--;
- }
- f++;
- }
- return is;
- }
- function eb(r) {
- return r.match("^[^/\\\\]*$") != null;
- }
- function Do(r) {
- var f = null, E;
- if (Oe[r] === void 0 && typeof module < "u" && module && module.exports && eb(r))
- try {
- f = is._abbr, E = require, E("./locale/" + r), Lr(f);
- } catch {
- Oe[r] = null;
- }
- return Oe[r];
- }
- function Lr(r, f) {
- var E;
- return r && (hi(f) ? E = gr(r) : E = Wl(r, f), E ? is = E : typeof console < "u" && console.warn && console.warn(
- "Locale " + r + " not found. Did you forget to load it?"
- )), is._abbr;
- }
- function Wl(r, f) {
- if (f !== null) {
- var E, l = mu;
- if (f.abbr = r, Oe[r] != null)
- qp(
- "defineLocaleOverride",
- "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
- ), l = Oe[r]._config;
- else if (f.parentLocale != null)
- if (Oe[f.parentLocale] != null)
- l = Oe[f.parentLocale]._config;
- else if (E = Do(f.parentLocale), E != null)
- l = E._config;
- else
- return Vn[f.parentLocale] || (Vn[f.parentLocale] = []), Vn[f.parentLocale].push({
- name: r,
- config: f
- }), null;
- return Oe[r] = new Ll(vl(l, f)), Vn[r] && Vn[r].forEach(function(y) {
- Wl(y.name, y.config);
- }), Lr(r), Oe[r];
- } else
- return delete Oe[r], null;
- }
- function ib(r, f) {
- if (f != null) {
- var E, l, y = mu;
- Oe[r] != null && Oe[r].parentLocale != null ? Oe[r].set(vl(Oe[r]._config, f)) : (l = Do(r), l != null && (y = l._config), f = vl(y, f), l == null && (f.abbr = r), E = new Ll(f), E.parentLocale = Oe[r], Oe[r] = E), Lr(r);
- } else
- Oe[r] != null && (Oe[r].parentLocale != null ? (Oe[r] = Oe[r].parentLocale, r === Lr() && Lr(r)) : Oe[r] != null && delete Oe[r]);
- return Oe[r];
- }
- function gr(r) {
- var f;
- if (r && r._locale && r._locale._abbr && (r = r._locale._abbr), !r)
- return is;
- if (!ji(r)) {
- if (f = Do(r), f)
- return f;
- r = [r];
- }
- return tb(r);
- }
- function rb() {
- return xl(Oe);
- }
- function zl(r) {
- var f, E = r._a;
- return E && se(r).overflow === -2 && (f = E[lr] < 0 || E[lr] > 11 ? lr : E[Fi] < 1 || E[Fi] > _o(E[Qe], E[lr]) ? Fi : E[Xe] < 0 || E[Xe] > 24 || E[Xe] === 24 && (E[Bi] !== 0 || E[hr] !== 0 || E[Ur] !== 0) ? Xe : E[Bi] < 0 || E[Bi] > 59 ? Bi : E[hr] < 0 || E[hr] > 59 ? hr : E[Ur] < 0 || E[Ur] > 999 ? Ur : -1, se(r)._overflowDayOfYear && (f < Qe || f > Fi) && (f = Fi), se(r)._overflowWeeks && f === -1 && (f = h1), se(r)._overflowWeekday && f === -1 && (f = c1), se(r).overflow = f), r;
- }
- var nb = /^\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)?)?$/, sb = /^\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)?)?$/, ob = /Z|[+-]\d\d(?::?\d\d)?/, ro = [
- ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
- ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
- ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
- ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
- ["YYYY-DDD", /\d{4}-\d{3}/],
- ["YYYY-MM", /\d{4}-\d\d/, !1],
- ["YYYYYYMMDD", /[+-]\d{10}/],
- ["YYYYMMDD", /\d{8}/],
- ["GGGG[W]WWE", /\d{4}W\d{3}/],
- ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
- ["YYYYDDD", /\d{7}/],
- ["YYYYMM", /\d{6}/, !1],
- ["YYYY", /\d{4}/, !1]
- ], rl = [
- ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
- ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
- ["HH:mm:ss", /\d\d:\d\d:\d\d/],
- ["HH:mm", /\d\d:\d\d/],
- ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
- ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
- ["HHmmss", /\d\d\d\d\d\d/],
- ["HHmm", /\d\d\d\d/],
- ["HH", /\d\d/]
- ], ab = /^\/?Date\((-?\d+)/i, lb = /^(?:(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}))$/, hb = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60
- };
- function yu(r) {
- var f, E, l = r._i, y = nb.exec(l) || sb.exec(l), j, I, Z, H, U = ro.length, F = rl.length;
- if (y) {
- for (se(r).iso = !0, f = 0, E = U; f < E; f++)
- if (ro[f][1].exec(y[1])) {
- I = ro[f][0], j = ro[f][2] !== !1;
- break;
- }
- if (I == null) {
- r._isValid = !1;
- return;
- }
- if (y[3]) {
- for (f = 0, E = F; f < E; f++)
- if (rl[f][1].exec(y[3])) {
- Z = (y[2] || " ") + rl[f][0];
- break;
- }
- if (Z == null) {
- r._isValid = !1;
- return;
- }
- }
- if (!j && Z != null) {
- r._isValid = !1;
- return;
- }
- if (y[4])
- if (ob.exec(y[4]))
- H = "Z";
- else {
- r._isValid = !1;
- return;
- }
- r._f = I + (Z || "") + (H || ""), Xl(r);
- } else
- r._isValid = !1;
- }
- function cb(r, f, E, l, y, j) {
- var I = [
- pb(r),
- ou.indexOf(f),
- parseInt(E, 10),
- parseInt(l, 10),
- parseInt(y, 10)
- ];
- return j && I.push(parseInt(j, 10)), I;
- }
- function pb(r) {
- var f = parseInt(r, 10);
- return f <= 49 ? 2e3 + f : f <= 999 ? 1900 + f : f;
- }
- function ub(r) {
- return r.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
- }
- function db(r, f, E) {
- if (r) {
- var l = du.indexOf(r), y = new Date(
- f[0],
- f[1],
- f[2]
- ).getDay();
- if (l !== y)
- return se(E).weekdayMismatch = !0, E._isValid = !1, !1;
- }
- return !0;
- }
- function fb(r, f, E) {
- if (r)
- return hb[r];
- if (f)
- return 0;
- var l = parseInt(E, 10), y = l % 100, j = (l - y) / 100;
- return j * 60 + y;
- }
- function vu(r) {
- var f = lb.exec(ub(r._i)), E;
- if (f) {
- if (E = cb(
- f[4],
- f[3],
- f[2],
- f[5],
- f[6],
- f[7]
- ), !db(f[1], E, r))
- return;
- r._a = E, r._tzm = fb(f[8], f[9], f[10]), r._d = ts.apply(null, r._a), r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), se(r).rfc2822 = !0;
- } else
- r._isValid = !1;
- }
- function gb(r) {
- var f = ab.exec(r._i);
- if (f !== null) {
- r._d = /* @__PURE__ */ new Date(+f[1]);
- return;
- }
- if (yu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- if (vu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- r._strict ? r._isValid = !1 : Xt.createFromInputFallback(r);
- }
- Xt.createFromInputFallback = Oi(
- "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
- function(r) {
- r._d = /* @__PURE__ */ new Date(r._i + (r._useUTC ? " UTC" : ""));
- }
- );
- function gn(r, f, E) {
- return r ?? f ?? E;
- }
- function mb(r) {
- var f = new Date(Xt.now());
- return r._useUTC ? [
- f.getUTCFullYear(),
- f.getUTCMonth(),
- f.getUTCDate()
- ] : [f.getFullYear(), f.getMonth(), f.getDate()];
- }
- function Yl(r) {
- var f, E, l = [], y, j, I;
- if (!r._d) {
- for (y = mb(r), r._w && r._a[Fi] == null && r._a[lr] == null && yb(r), r._dayOfYear != null && (I = gn(r._a[Qe], y[Qe]), (r._dayOfYear > qn(I) || r._dayOfYear === 0) && (se(r)._overflowDayOfYear = !0), E = ts(I, 0, r._dayOfYear), r._a[lr] = E.getUTCMonth(), r._a[Fi] = E.getUTCDate()), f = 0; f < 3 && r._a[f] == null; ++f)
- r._a[f] = l[f] = y[f];
- for (; f < 7; f++)
- r._a[f] = l[f] = r._a[f] == null ? f === 2 ? 1 : 0 : r._a[f];
- r._a[Xe] === 24 && r._a[Bi] === 0 && r._a[hr] === 0 && r._a[Ur] === 0 && (r._nextDay = !0, r._a[Xe] = 0), r._d = (r._useUTC ? ts : M1).apply(
- null,
- l
- ), j = r._useUTC ? r._d.getUTCDay() : r._d.getDay(), r._tzm != null && r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), r._nextDay && (r._a[Xe] = 24), r._w && typeof r._w.d < "u" && r._w.d !== j && (se(r).weekdayMismatch = !0);
- }
- }
- function yb(r) {
- var f, E, l, y, j, I, Z, H, U;
- f = r._w, f.GG != null || f.W != null || f.E != null ? (j = 1, I = 4, E = gn(
- f.GG,
- r._a[Qe],
- es(Te(), 1, 4).year
- ), l = gn(f.W, 1), y = gn(f.E, 1), (y < 1 || y > 7) && (H = !0)) : (j = r._locale._week.dow, I = r._locale._week.doy, U = es(Te(), j, I), E = gn(f.gg, r._a[Qe], U.year), l = gn(f.w, U.week), f.d != null ? (y = f.d, (y < 0 || y > 6) && (H = !0)) : f.e != null ? (y = f.e + j, (f.e < 0 || f.e > 6) && (H = !0)) : y = j), l < 1 || l > cr(E, j, I) ? se(r)._overflowWeeks = !0 : H != null ? se(r)._overflowWeekday = !0 : (Z = uu(E, l, y, j, I), r._a[Qe] = Z.year, r._dayOfYear = Z.dayOfYear);
- }
- Xt.ISO_8601 = function() {
- };
- Xt.RFC_2822 = function() {
- };
- function Xl(r) {
- if (r._f === Xt.ISO_8601) {
- yu(r);
- return;
- }
- if (r._f === Xt.RFC_2822) {
- vu(r);
- return;
- }
- r._a = [], se(r).empty = !0;
- var f = "" + r._i, E, l, y, j, I, Z = f.length, H = 0, U, F;
- for (y = Qp(r._f, r._locale).match(_l) || [], F = y.length, E = 0; E < F; E++)
- j = y[E], l = (f.match(o1(j, r)) || [])[0], l && (I = f.substr(0, f.indexOf(l)), I.length > 0 && se(r).unusedInput.push(I), f = f.slice(
- f.indexOf(l) + l.length
- ), H += l.length), vn[j] ? (l ? se(r).empty = !1 : se(r).unusedTokens.push(j), l1(j, l, r)) : r._strict && !l && se(r).unusedTokens.push(j);
- se(r).charsLeftOver = Z - H, f.length > 0 && se(r).unusedInput.push(f), r._a[Xe] <= 12 && se(r).bigHour === !0 && r._a[Xe] > 0 && (se(r).bigHour = void 0), se(r).parsedDateParts = r._a.slice(0), se(r).meridiem = r._meridiem, r._a[Xe] = vb(
- r._locale,
- r._a[Xe],
- r._meridiem
- ), U = se(r).era, U !== null && (r._a[Qe] = r._locale.erasConvertYear(U, r._a[Qe])), Yl(r), zl(r);
- }
- function vb(r, f, E) {
- var l;
- return E == null ? f : r.meridiemHour != null ? r.meridiemHour(f, E) : (r.isPM != null && (l = r.isPM(E), l && f < 12 && (f += 12), !l && f === 12 && (f = 0)), f);
- }
- function xb(r) {
- var f, E, l, y, j, I, Z = !1, H = r._f.length;
- if (H === 0) {
- se(r).invalidFormat = !0, r._d = /* @__PURE__ */ new Date(NaN);
- return;
- }
- for (y = 0; y < H; y++)
- j = 0, I = !1, f = Ol({}, r), r._useUTC != null && (f._useUTC = r._useUTC), f._f = r._f[y], Xl(f), El(f) && (I = !0), j += se(f).charsLeftOver, j += se(f).unusedTokens.length * 10, se(f).score = j, Z ? j < l && (l = j, E = f) : (l == null || j < l || I) && (l = j, E = f, I && (Z = !0));
- Er(r, E || f);
- }
- function bb(r) {
- if (!r._d) {
- var f = Dl(r._i), E = f.day === void 0 ? f.date : f.day;
- r._a = Kp(
- [f.year, f.month, E, f.hour, f.minute, f.second, f.millisecond],
- function(l) {
- return l && parseInt(l, 10);
- }
- ), Yl(r);
- }
- }
- function Sb(r) {
- var f = new os(zl(xu(r)));
- return f._nextDay && (f.add(1, "d"), f._nextDay = void 0), f;
- }
- function xu(r) {
- var f = r._i, E = r._f;
- return r._locale = r._locale || gr(r._l), f === null || E === void 0 && f === "" ? ko({ nullInput: !0 }) : (typeof f == "string" && (r._i = f = r._locale.preparse(f)), Wi(f) ? new os(zl(f)) : (ss(f) ? r._d = f : ji(E) ? xb(r) : E ? Xl(r) : wb(r), El(r) || (r._d = null), r));
- }
- function wb(r) {
- var f = r._i;
- hi(f) ? r._d = new Date(Xt.now()) : ss(f) ? r._d = new Date(f.valueOf()) : typeof f == "string" ? gb(r) : ji(f) ? (r._a = Kp(f.slice(0), function(E) {
- return parseInt(E, 10);
- }), Yl(r)) : Zr(f) ? bb(r) : ur(f) ? r._d = new Date(f) : Xt.createFromInputFallback(r);
- }
- function bu(r, f, E, l, y) {
- var j = {};
- return (f === !0 || f === !1) && (l = f, f = void 0), (E === !0 || E === !1) && (l = E, E = void 0), (Zr(r) && Pl(r) || ji(r) && r.length === 0) && (r = void 0), j._isAMomentObject = !0, j._useUTC = j._isUTC = y, j._l = E, j._i = r, j._f = f, j._strict = l, Sb(j);
- }
- function Te(r, f, E, l) {
- return bu(r, f, E, l, !1);
- }
- var Mb = Oi(
- "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
- function() {
- var r = Te.apply(null, arguments);
- return this.isValid() && r.isValid() ? r < this ? this : r : ko();
- }
- ), Cb = Oi(
- "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
- function() {
- var r = Te.apply(null, arguments);
- return this.isValid() && r.isValid() ? r > this ? this : r : ko();
- }
- );
- function Su(r, f) {
- var E, l;
- if (f.length === 1 && ji(f[0]) && (f = f[0]), !f.length)
- return Te();
- for (E = f[0], l = 1; l < f.length; ++l)
- (!f[l].isValid() || f[l][r](E)) && (E = f[l]);
- return E;
- }
- function kb() {
- var r = [].slice.call(arguments, 0);
- return Su("isBefore", r);
- }
- function Ab() {
- var r = [].slice.call(arguments, 0);
- return Su("isAfter", r);
- }
- var Tb = function() {
- return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
- }, $n = [
- "year",
- "quarter",
- "month",
- "week",
- "day",
- "hour",
- "minute",
- "second",
- "millisecond"
- ];
- function Pb(r) {
- var f, E = !1, l, y = $n.length;
- for (f in r)
- if (me(r, f) && !(We.call($n, f) !== -1 && (r[f] == null || !isNaN(r[f]))))
- return !1;
- for (l = 0; l < y; ++l)
- if (r[$n[l]]) {
- if (E)
- return !1;
- parseFloat(r[$n[l]]) !== le(r[$n[l]]) && (E = !0);
- }
- return !0;
- }
- function Eb() {
- return this._isValid;
- }
- function Ob() {
- return zi(NaN);
- }
- function Io(r) {
- var f = Dl(r), E = f.year || 0, l = f.quarter || 0, y = f.month || 0, j = f.week || f.isoWeek || 0, I = f.day || 0, Z = f.hour || 0, H = f.minute || 0, U = f.second || 0, F = f.millisecond || 0;
- this._isValid = Pb(f), this._milliseconds = +F + U * 1e3 + // 1000
- H * 6e4 + // 1000 * 60
- Z * 1e3 * 60 * 60, this._days = +I + j * 7, this._months = +y + l * 3 + E * 12, this._data = {}, this._locale = gr(), this._bubble();
- }
- function oo(r) {
- return r instanceof Io;
- }
- function Sl(r) {
- return r < 0 ? Math.round(-1 * r) * -1 : Math.round(r);
- }
- function Lb(r, f, E) {
- var l = Math.min(r.length, f.length), y = Math.abs(r.length - f.length), j = 0, I;
- for (I = 0; I < l; I++)
- (E && r[I] !== f[I] || !E && le(r[I]) !== le(f[I])) && j++;
- return j + y;
- }
- function wu(r, f) {
- Zt(r, 0, 0, function() {
- var E = this.utcOffset(), l = "+";
- return E < 0 && (E = -E, l = "-"), l + Vi(~~(E / 60), 2) + f + Vi(~~E % 60, 2);
- });
- }
- wu("Z", ":");
- wu("ZZ", "");
- Ft("Z", Lo);
- Ft("ZZ", Lo);
- we(["Z", "ZZ"], function(r, f, E) {
- E._useUTC = !0, E._tzm = Gl(Lo, r);
- });
- var _b = /([\+\-]|\d\d)/gi;
- function Gl(r, f) {
- var E = (f || "").match(r), l, y, j;
- return E === null ? null : (l = E[E.length - 1] || [], y = (l + "").match(_b) || ["-", 0, 0], j = +(y[1] * 60) + le(y[2]), j === 0 ? 0 : y[0] === "+" ? j : -j);
- }
- function Hl(r, f) {
- var E, l;
- return f._isUTC ? (E = f.clone(), l = (Wi(r) || ss(r) ? r.valueOf() : Te(r).valueOf()) - E.valueOf(), E._d.setTime(E._d.valueOf() + l), Xt.updateOffset(E, !1), E) : Te(r).local();
- }
- function wl(r) {
- return -Math.round(r._d.getTimezoneOffset());
- }
- Xt.updateOffset = function() {
- };
- function Db(r, f, E) {
- var l = this._offset || 0, y;
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- if (typeof r == "string") {
- if (r = Gl(Lo, r), r === null)
- return this;
- } else
- Math.abs(r) < 16 && !E && (r = r * 60);
- return !this._isUTC && f && (y = wl(this)), this._offset = r, this._isUTC = !0, y != null && this.add(y, "m"), l !== r && (!f || this._changeInProgress ? ku(
- this,
- zi(r - l, "m"),
- 1,
- !1
- ) : this._changeInProgress || (this._changeInProgress = !0, Xt.updateOffset(this, !0), this._changeInProgress = null)), this;
- } else
- return this._isUTC ? l : wl(this);
- }
- function Ib(r, f) {
- return r != null ? (typeof r != "string" && (r = -r), this.utcOffset(r, f), this) : -this.utcOffset();
- }
- function Rb(r) {
- return this.utcOffset(0, r);
- }
- function Nb(r) {
- return this._isUTC && (this.utcOffset(0, r), this._isUTC = !1, r && this.subtract(wl(this), "m")), this;
- }
- function Bb() {
- if (this._tzm != null)
- this.utcOffset(this._tzm, !1, !0);
- else if (typeof this._i == "string") {
- var r = Gl(n1, this._i);
- r != null ? this.utcOffset(r) : this.utcOffset(0, !0);
- }
- return this;
- }
- function jb(r) {
- return this.isValid() ? (r = r ? Te(r).utcOffset() : 0, (this.utcOffset() - r) % 60 === 0) : !1;
- }
- function Wb() {
- return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
- }
- function zb() {
- if (!hi(this._isDSTShifted))
- return this._isDSTShifted;
- var r = {}, f;
- return Ol(r, this), r = xu(r), r._a ? (f = r._isUTC ? $i(r._a) : Te(r._a), this._isDSTShifted = this.isValid() && Lb(r._a, f.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
- }
- function Yb() {
- return this.isValid() ? !this._isUTC : !1;
- }
- function Xb() {
- return this.isValid() ? this._isUTC : !1;
- }
- function Mu() {
- return this.isValid() ? this._isUTC && this._offset === 0 : !1;
- }
- var Gb = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, Hb = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
- function zi(r, f) {
- var E = r, l = null, y, j, I;
- return oo(r) ? E = {
- ms: r._milliseconds,
- d: r._days,
- M: r._months
- } : ur(r) || !isNaN(+r) ? (E = {}, f ? E[f] = +r : E.milliseconds = +r) : (l = Gb.exec(r)) ? (y = l[1] === "-" ? -1 : 1, E = {
- y: 0,
- d: le(l[Fi]) * y,
- h: le(l[Xe]) * y,
- m: le(l[Bi]) * y,
- s: le(l[hr]) * y,
- ms: le(Sl(l[Ur] * 1e3)) * y
- // the millisecond decimal point is included in the match
- }) : (l = Hb.exec(r)) ? (y = l[1] === "-" ? -1 : 1, E = {
- y: Hr(l[2], y),
- M: Hr(l[3], y),
- w: Hr(l[4], y),
- d: Hr(l[5], y),
- h: Hr(l[6], y),
- m: Hr(l[7], y),
- s: Hr(l[8], y)
- }) : E == null ? E = {} : typeof E == "object" && ("from" in E || "to" in E) && (I = Fb(
- Te(E.from),
- Te(E.to)
- ), E = {}, E.ms = I.milliseconds, E.M = I.months), j = new Io(E), oo(r) && me(r, "_locale") && (j._locale = r._locale), oo(r) && me(r, "_isValid") && (j._isValid = r._isValid), j;
- }
- zi.fn = Io.prototype;
- zi.invalid = Ob;
- function Hr(r, f) {
- var E = r && parseFloat(r.replace(",", "."));
- return (isNaN(E) ? 0 : E) * f;
- }
- function Dp(r, f) {
- var E = {};
- return E.months = f.month() - r.month() + (f.year() - r.year()) * 12, r.clone().add(E.months, "M").isAfter(f) && --E.months, E.milliseconds = +f - +r.clone().add(E.months, "M"), E;
- }
- function Fb(r, f) {
- var E;
- return r.isValid() && f.isValid() ? (f = Hl(f, r), r.isBefore(f) ? E = Dp(r, f) : (E = Dp(f, r), E.milliseconds = -E.milliseconds, E.months = -E.months), E) : { milliseconds: 0, months: 0 };
- }
- function Cu(r, f) {
- return function(E, l) {
- var y, j;
- return l !== null && !isNaN(+l) && (qp(
- f,
- "moment()." + f + "(period, number) is deprecated. Please use moment()." + f + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
- ), j = E, E = l, l = j), y = zi(E, l), ku(this, y, r), this;
- };
- }
- function ku(r, f, E, l) {
- var y = f._milliseconds, j = Sl(f._days), I = Sl(f._months);
- r.isValid() && (l = l ?? !0, I && lu(r, mo(r, "Month") + I * E), j && eu(r, "Date", mo(r, "Date") + j * E), y && r._d.setTime(r._d.valueOf() + y * E), l && Xt.updateOffset(r, j || I));
- }
- var Ub = Cu(1, "add"), Vb = Cu(-1, "subtract");
- function Au(r) {
- return typeof r == "string" || r instanceof String;
- }
- function $b(r) {
- return Wi(r) || ss(r) || Au(r) || ur(r) || Kb(r) || Zb(r) || r === null || r === void 0;
- }
- function Zb(r) {
- var f = Zr(r) && !Pl(r), E = !1, l = [
- "years",
- "year",
- "y",
- "months",
- "month",
- "M",
- "days",
- "day",
- "d",
- "dates",
- "date",
- "D",
- "hours",
- "hour",
- "h",
- "minutes",
- "minute",
- "m",
- "seconds",
- "second",
- "s",
- "milliseconds",
- "millisecond",
- "ms"
- ], y, j, I = l.length;
- for (y = 0; y < I; y += 1)
- j = l[y], E = E || me(r, j);
- return f && E;
- }
- function Kb(r) {
- var f = ji(r), E = !1;
- return f && (E = r.filter(function(l) {
- return !ur(l) && Au(r);
- }).length === 0), f && E;
- }
- function Jb(r) {
- var f = Zr(r) && !Pl(r), E = !1, l = [
- "sameDay",
- "nextDay",
- "lastDay",
- "nextWeek",
- "lastWeek",
- "sameElse"
- ], y, j;
- for (y = 0; y < l.length; y += 1)
- j = l[y], E = E || me(r, j);
- return f && E;
- }
- function qb(r, f) {
- var E = r.diff(f, "days", !0);
- return E < -6 ? "sameElse" : E < -1 ? "lastWeek" : E < 0 ? "lastDay" : E < 1 ? "sameDay" : E < 2 ? "nextDay" : E < 7 ? "nextWeek" : "sameElse";
- }
- function Qb(r, f) {
- arguments.length === 1 && (arguments[0] ? $b(arguments[0]) ? (r = arguments[0], f = void 0) : Jb(arguments[0]) && (f = arguments[0], r = void 0) : (r = void 0, f = void 0));
- var E = r || Te(), l = Hl(E, this).startOf("day"), y = Xt.calendarFormat(this, l) || "sameElse", j = f && (Zi(f[y]) ? f[y].call(this, E) : f[y]);
- return this.format(
- j || this.localeData().calendar(y, this, Te(E))
- );
- }
- function tS() {
- return new os(this);
- }
- function eS(r, f) {
- var E = Wi(r) ? r : Te(r);
- return this.isValid() && E.isValid() ? (f = Li(f) || "millisecond", f === "millisecond" ? this.valueOf() > E.valueOf() : E.valueOf() < this.clone().startOf(f).valueOf()) : !1;
- }
- function iS(r, f) {
- var E = Wi(r) ? r : Te(r);
- return this.isValid() && E.isValid() ? (f = Li(f) || "millisecond", f === "millisecond" ? this.valueOf() < E.valueOf() : this.clone().endOf(f).valueOf() < E.valueOf()) : !1;
- }
- function rS(r, f, E, l) {
- var y = Wi(r) ? r : Te(r), j = Wi(f) ? f : Te(f);
- return this.isValid() && y.isValid() && j.isValid() ? (l = l || "()", (l[0] === "(" ? this.isAfter(y, E) : !this.isBefore(y, E)) && (l[1] === ")" ? this.isBefore(j, E) : !this.isAfter(j, E))) : !1;
- }
- function nS(r, f) {
- var E = Wi(r) ? r : Te(r), l;
- return this.isValid() && E.isValid() ? (f = Li(f) || "millisecond", f === "millisecond" ? this.valueOf() === E.valueOf() : (l = E.valueOf(), this.clone().startOf(f).valueOf() <= l && l <= this.clone().endOf(f).valueOf())) : !1;
- }
- function sS(r, f) {
- return this.isSame(r, f) || this.isAfter(r, f);
- }
- function oS(r, f) {
- return this.isSame(r, f) || this.isBefore(r, f);
- }
- function aS(r, f, E) {
- var l, y, j;
- if (!this.isValid())
- return NaN;
- if (l = Hl(r, this), !l.isValid())
- return NaN;
- switch (y = (l.utcOffset() - this.utcOffset()) * 6e4, f = Li(f), f) {
- case "year":
- j = ao(this, l) / 12;
- break;
- case "month":
- j = ao(this, l);
- break;
- case "quarter":
- j = ao(this, l) / 3;
- break;
- case "second":
- j = (this - l) / 1e3;
- break;
- case "minute":
- j = (this - l) / 6e4;
- break;
- case "hour":
- j = (this - l) / 36e5;
- break;
- case "day":
- j = (this - l - y) / 864e5;
- break;
- case "week":
- j = (this - l - y) / 6048e5;
- break;
- default:
- j = this - l;
- }
- return E ? j : Ti(j);
- }
- function ao(r, f) {
- if (r.date() < f.date())
- return -ao(f, r);
- var E = (f.year() - r.year()) * 12 + (f.month() - r.month()), l = r.clone().add(E, "months"), y, j;
- return f - l < 0 ? (y = r.clone().add(E - 1, "months"), j = (f - l) / (l - y)) : (y = r.clone().add(E + 1, "months"), j = (f - l) / (y - l)), -(E + j) || 0;
- }
- Xt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
- Xt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
- function lS() {
- return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
- }
- function hS(r) {
- if (!this.isValid())
- return null;
- var f = r !== !0, E = f ? this.clone().utc() : this;
- return E.year() < 0 || E.year() > 9999 ? so(
- E,
- f ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
- ) : Zi(Date.prototype.toISOString) ? f ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", so(E, "Z")) : so(
- E,
- f ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
- );
- }
- function cS() {
- if (!this.isValid())
- return "moment.invalid(/* " + this._i + " */)";
- var r = "moment", f = "", E, l, y, j;
- return this.isLocal() || (r = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", f = "Z"), E = "[" + r + '("]', l = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", y = "-MM-DD[T]HH:mm:ss.SSS", j = f + '[")]', this.format(E + l + y + j);
- }
- function pS(r) {
- r || (r = this.isUtc() ? Xt.defaultFormatUtc : Xt.defaultFormat);
- var f = so(this, r);
- return this.localeData().postformat(f);
- }
- function uS(r, f) {
- return this.isValid() && (Wi(r) && r.isValid() || Te(r).isValid()) ? zi({ to: this, from: r }).locale(this.locale()).humanize(!f) : this.localeData().invalidDate();
- }
- function dS(r) {
- return this.from(Te(), r);
- }
- function fS(r, f) {
- return this.isValid() && (Wi(r) && r.isValid() || Te(r).isValid()) ? zi({ from: this, to: r }).locale(this.locale()).humanize(!f) : this.localeData().invalidDate();
- }
- function gS(r) {
- return this.to(Te(), r);
- }
- function Tu(r) {
- var f;
- return r === void 0 ? this._locale._abbr : (f = gr(r), f != null && (this._locale = f), this);
- }
- var Pu = Oi(
- "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
- function(r) {
- return r === void 0 ? this.localeData() : this.locale(r);
- }
- );
- function Eu() {
- return this._locale;
- }
- var xo = 1e3, xn = 60 * xo, bo = 60 * xn, Ou = (365 * 400 + 97) * 24 * bo;
- function bn(r, f) {
- return (r % f + f) % f;
- }
- function Lu(r, f, E) {
- return r < 100 && r >= 0 ? new Date(r + 400, f, E) - Ou : new Date(r, f, E).valueOf();
- }
- function _u(r, f, E) {
- return r < 100 && r >= 0 ? Date.UTC(r + 400, f, E) - Ou : Date.UTC(r, f, E);
- }
- function mS(r) {
- var f, E;
- if (r = Li(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (E = this._isUTC ? _u : Lu, r) {
- case "year":
- f = E(this.year(), 0, 1);
- break;
- case "quarter":
- f = E(
- this.year(),
- this.month() - this.month() % 3,
- 1
- );
- break;
- case "month":
- f = E(this.year(), this.month(), 1);
- break;
- case "week":
- f = E(
- this.year(),
- this.month(),
- this.date() - this.weekday()
- );
- break;
- case "isoWeek":
- f = E(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1)
- );
- break;
- case "day":
- case "date":
- f = E(this.year(), this.month(), this.date());
- break;
- case "hour":
- f = this._d.valueOf(), f -= bn(
- f + (this._isUTC ? 0 : this.utcOffset() * xn),
- bo
- );
- break;
- case "minute":
- f = this._d.valueOf(), f -= bn(f, xn);
- break;
- case "second":
- f = this._d.valueOf(), f -= bn(f, xo);
- break;
- }
- return this._d.setTime(f), Xt.updateOffset(this, !0), this;
- }
- function yS(r) {
- var f, E;
- if (r = Li(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (E = this._isUTC ? _u : Lu, r) {
- case "year":
- f = E(this.year() + 1, 0, 1) - 1;
- break;
- case "quarter":
- f = E(
- this.year(),
- this.month() - this.month() % 3 + 3,
- 1
- ) - 1;
- break;
- case "month":
- f = E(this.year(), this.month() + 1, 1) - 1;
- break;
- case "week":
- f = E(
- this.year(),
- this.month(),
- this.date() - this.weekday() + 7
- ) - 1;
- break;
- case "isoWeek":
- f = E(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1) + 7
- ) - 1;
- break;
- case "day":
- case "date":
- f = E(this.year(), this.month(), this.date() + 1) - 1;
- break;
- case "hour":
- f = this._d.valueOf(), f += bo - bn(
- f + (this._isUTC ? 0 : this.utcOffset() * xn),
- bo
- ) - 1;
- break;
- case "minute":
- f = this._d.valueOf(), f += xn - bn(f, xn) - 1;
- break;
- case "second":
- f = this._d.valueOf(), f += xo - bn(f, xo) - 1;
- break;
- }
- return this._d.setTime(f), Xt.updateOffset(this, !0), this;
- }
- function vS() {
- return this._d.valueOf() - (this._offset || 0) * 6e4;
- }
- function xS() {
- return Math.floor(this.valueOf() / 1e3);
- }
- function bS() {
- return new Date(this.valueOf());
- }
- function SS() {
- var r = this;
- return [
- r.year(),
- r.month(),
- r.date(),
- r.hour(),
- r.minute(),
- r.second(),
- r.millisecond()
- ];
- }
- function wS() {
- var r = this;
- return {
- years: r.year(),
- months: r.month(),
- date: r.date(),
- hours: r.hours(),
- minutes: r.minutes(),
- seconds: r.seconds(),
- milliseconds: r.milliseconds()
- };
- }
- function MS() {
- return this.isValid() ? this.toISOString() : null;
- }
- function CS() {
- return El(this);
- }
- function kS() {
- return Er({}, se(this));
- }
- function AS() {
- return se(this).overflow;
- }
- function TS() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict
- };
- }
- Zt("N", 0, 0, "eraAbbr");
- Zt("NN", 0, 0, "eraAbbr");
- Zt("NNN", 0, 0, "eraAbbr");
- Zt("NNNN", 0, 0, "eraName");
- Zt("NNNNN", 0, 0, "eraNarrow");
- Zt("y", ["y", 1], "yo", "eraYear");
- Zt("y", ["yy", 2], 0, "eraYear");
- Zt("y", ["yyy", 3], 0, "eraYear");
- Zt("y", ["yyyy", 4], 0, "eraYear");
- Ft("N", Fl);
- Ft("NN", Fl);
- Ft("NNN", Fl);
- Ft("NNNN", jS);
- Ft("NNNNN", WS);
- we(
- ["N", "NN", "NNN", "NNNN", "NNNNN"],
- function(r, f, E, l) {
- var y = E._locale.erasParse(r, l, E._strict);
- y ? se(E).era = y : se(E).invalidEra = r;
- }
- );
- Ft("y", kn);
- Ft("yy", kn);
- Ft("yyy", kn);
- Ft("yyyy", kn);
- Ft("yo", zS);
- we(["y", "yy", "yyy", "yyyy"], Qe);
- we(["yo"], function(r, f, E, l) {
- var y;
- E._locale._eraYearOrdinalRegex && (y = r.match(E._locale._eraYearOrdinalRegex)), E._locale.eraYearOrdinalParse ? f[Qe] = E._locale.eraYearOrdinalParse(r, y) : f[Qe] = parseInt(r, 10);
- });
- function PS(r, f) {
- var E, l, y, j = this._eras || gr("en")._eras;
- for (E = 0, l = j.length; E < l; ++E) {
- switch (typeof j[E].since) {
- case "string":
- y = Xt(j[E].since).startOf("day"), j[E].since = y.valueOf();
- break;
- }
- switch (typeof j[E].until) {
- case "undefined":
- j[E].until = 1 / 0;
- break;
- case "string":
- y = Xt(j[E].until).startOf("day").valueOf(), j[E].until = y.valueOf();
- break;
- }
- }
- return j;
- }
- function ES(r, f, E) {
- var l, y, j = this.eras(), I, Z, H;
- for (r = r.toUpperCase(), l = 0, y = j.length; l < y; ++l)
- if (I = j[l].name.toUpperCase(), Z = j[l].abbr.toUpperCase(), H = j[l].narrow.toUpperCase(), E)
- switch (f) {
- case "N":
- case "NN":
- case "NNN":
- if (Z === r)
- return j[l];
- break;
- case "NNNN":
- if (I === r)
- return j[l];
- break;
- case "NNNNN":
- if (H === r)
- return j[l];
- break;
- }
- else if ([I, Z, H].indexOf(r) >= 0)
- return j[l];
- }
- function OS(r, f) {
- var E = r.since <= r.until ? 1 : -1;
- return f === void 0 ? Xt(r.since).year() : Xt(r.since).year() + (f - r.offset) * E;
- }
- function LS() {
- var r, f, E, l = this.localeData().eras();
- for (r = 0, f = l.length; r < f; ++r)
- if (E = this.clone().startOf("day").valueOf(), l[r].since <= E && E <= l[r].until || l[r].until <= E && E <= l[r].since)
- return l[r].name;
- return "";
- }
- function _S() {
- var r, f, E, l = this.localeData().eras();
- for (r = 0, f = l.length; r < f; ++r)
- if (E = this.clone().startOf("day").valueOf(), l[r].since <= E && E <= l[r].until || l[r].until <= E && E <= l[r].since)
- return l[r].narrow;
- return "";
- }
- function DS() {
- var r, f, E, l = this.localeData().eras();
- for (r = 0, f = l.length; r < f; ++r)
- if (E = this.clone().startOf("day").valueOf(), l[r].since <= E && E <= l[r].until || l[r].until <= E && E <= l[r].since)
- return l[r].abbr;
- return "";
- }
- function IS() {
- var r, f, E, l, y = this.localeData().eras();
- for (r = 0, f = y.length; r < f; ++r)
- if (E = y[r].since <= y[r].until ? 1 : -1, l = this.clone().startOf("day").valueOf(), y[r].since <= l && l <= y[r].until || y[r].until <= l && l <= y[r].since)
- return (this.year() - Xt(y[r].since).year()) * E + y[r].offset;
- return this.year();
- }
- function RS(r) {
- return me(this, "_erasNameRegex") || Ul.call(this), r ? this._erasNameRegex : this._erasRegex;
- }
- function NS(r) {
- return me(this, "_erasAbbrRegex") || Ul.call(this), r ? this._erasAbbrRegex : this._erasRegex;
- }
- function BS(r) {
- return me(this, "_erasNarrowRegex") || Ul.call(this), r ? this._erasNarrowRegex : this._erasRegex;
- }
- function Fl(r, f) {
- return f.erasAbbrRegex(r);
- }
- function jS(r, f) {
- return f.erasNameRegex(r);
- }
- function WS(r, f) {
- return f.erasNarrowRegex(r);
- }
- function zS(r, f) {
- return f._eraYearOrdinalRegex || kn;
- }
- function Ul() {
- var r = [], f = [], E = [], l = [], y, j, I = this.eras();
- for (y = 0, j = I.length; y < j; ++y)
- f.push(yi(I[y].name)), r.push(yi(I[y].abbr)), E.push(yi(I[y].narrow)), l.push(yi(I[y].name)), l.push(yi(I[y].abbr)), l.push(yi(I[y].narrow));
- this._erasRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + f.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
- "^(" + E.join("|") + ")",
- "i"
- );
- }
- Zt(0, ["gg", 2], 0, function() {
- return this.weekYear() % 100;
- });
- Zt(0, ["GG", 2], 0, function() {
- return this.isoWeekYear() % 100;
- });
- function Ro(r, f) {
- Zt(0, [r, r.length], 0, f);
- }
- Ro("gggg", "weekYear");
- Ro("ggggg", "weekYear");
- Ro("GGGG", "isoWeekYear");
- Ro("GGGGG", "isoWeekYear");
- ti("weekYear", "gg");
- ti("isoWeekYear", "GG");
- ei("weekYear", 1);
- ei("isoWeekYear", 1);
- Ft("G", Oo);
- Ft("g", Oo);
- Ft("GG", Pe, vi);
- Ft("gg", Pe, vi);
- Ft("GGGG", Rl, Il);
- Ft("gggg", Rl, Il);
- Ft("GGGGG", Eo, To);
- Ft("ggggg", Eo, To);
- ls(
- ["gggg", "ggggg", "GGGG", "GGGGG"],
- function(r, f, E, l) {
- f[l.substr(0, 2)] = le(r);
- }
- );
- ls(["gg", "GG"], function(r, f, E, l) {
- f[l] = Xt.parseTwoDigitYear(r);
- });
- function YS(r) {
- return Du.call(
- this,
- r,
- this.week(),
- this.weekday(),
- this.localeData()._week.dow,
- this.localeData()._week.doy
- );
- }
- function XS(r) {
- return Du.call(
- this,
- r,
- this.isoWeek(),
- this.isoWeekday(),
- 1,
- 4
- );
- }
- function GS() {
- return cr(this.year(), 1, 4);
- }
- function HS() {
- return cr(this.isoWeekYear(), 1, 4);
- }
- function FS() {
- var r = this.localeData()._week;
- return cr(this.year(), r.dow, r.doy);
- }
- function US() {
- var r = this.localeData()._week;
- return cr(this.weekYear(), r.dow, r.doy);
- }
- function Du(r, f, E, l, y) {
- var j;
- return r == null ? es(this, l, y).year : (j = cr(r, l, y), f > j && (f = j), VS.call(this, r, f, E, l, y));
- }
- function VS(r, f, E, l, y) {
- var j = uu(r, f, E, l, y), I = ts(j.year, 0, j.dayOfYear);
- return this.year(I.getUTCFullYear()), this.month(I.getUTCMonth()), this.date(I.getUTCDate()), this;
- }
- Zt("Q", 0, "Qo", "quarter");
- ti("quarter", "Q");
- ei("quarter", 7);
- Ft("Q", iu);
- we("Q", function(r, f) {
- f[lr] = (le(r) - 1) * 3;
- });
- function $S(r) {
- return r == null ? Math.ceil((this.month() + 1) / 3) : this.month((r - 1) * 3 + this.month() % 3);
- }
- Zt("D", ["DD", 2], "Do", "date");
- ti("date", "D");
- ei("date", 9);
- Ft("D", Pe);
- Ft("DD", Pe, vi);
- Ft("Do", function(r, f) {
- return r ? f._dayOfMonthOrdinalParse || f._ordinalParse : f._dayOfMonthOrdinalParseLenient;
- });
- we(["D", "DD"], Fi);
- we("Do", function(r, f) {
- f[Fi] = le(r.match(Pe)[0]);
- });
- var Iu = Cn("Date", !0);
- Zt("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
- ti("dayOfYear", "DDD");
- ei("dayOfYear", 4);
- Ft("DDD", Po);
- Ft("DDDD", ru);
- we(["DDD", "DDDD"], function(r, f, E) {
- E._dayOfYear = le(r);
- });
- function ZS(r) {
- var f = Math.round(
- (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
- ) + 1;
- return r == null ? f : this.add(r - f, "d");
- }
- Zt("m", ["mm", 2], 0, "minute");
- ti("minute", "m");
- ei("minute", 14);
- Ft("m", Pe);
- Ft("mm", Pe, vi);
- we(["m", "mm"], Bi);
- var KS = Cn("Minutes", !1);
- Zt("s", ["ss", 2], 0, "second");
- ti("second", "s");
- ei("second", 15);
- Ft("s", Pe);
- Ft("ss", Pe, vi);
- we(["s", "ss"], hr);
- var JS = Cn("Seconds", !1);
- Zt("S", 0, 0, function() {
- return ~~(this.millisecond() / 100);
- });
- Zt(0, ["SS", 2], 0, function() {
- return ~~(this.millisecond() / 10);
- });
- Zt(0, ["SSS", 3], 0, "millisecond");
- Zt(0, ["SSSS", 4], 0, function() {
- return this.millisecond() * 10;
- });
- Zt(0, ["SSSSS", 5], 0, function() {
- return this.millisecond() * 100;
- });
- Zt(0, ["SSSSSS", 6], 0, function() {
- return this.millisecond() * 1e3;
- });
- Zt(0, ["SSSSSSS", 7], 0, function() {
- return this.millisecond() * 1e4;
- });
- Zt(0, ["SSSSSSSS", 8], 0, function() {
- return this.millisecond() * 1e5;
- });
- Zt(0, ["SSSSSSSSS", 9], 0, function() {
- return this.millisecond() * 1e6;
- });
- ti("millisecond", "ms");
- ei("millisecond", 16);
- Ft("S", Po, iu);
- Ft("SS", Po, vi);
- Ft("SSS", Po, ru);
- var Or, Ru;
- for (Or = "SSSS"; Or.length <= 9; Or += "S")
- Ft(Or, kn);
- function qS(r, f) {
- f[Ur] = le(("0." + r) * 1e3);
- }
- for (Or = "S"; Or.length <= 9; Or += "S")
- we(Or, qS);
- Ru = Cn("Milliseconds", !1);
- Zt("z", 0, 0, "zoneAbbr");
- Zt("zz", 0, 0, "zoneName");
- function QS() {
- return this._isUTC ? "UTC" : "";
- }
- function tw() {
- return this._isUTC ? "Coordinated Universal Time" : "";
- }
- var jt = os.prototype;
- jt.add = Ub;
- jt.calendar = Qb;
- jt.clone = tS;
- jt.diff = aS;
- jt.endOf = yS;
- jt.format = pS;
- jt.from = uS;
- jt.fromNow = dS;
- jt.to = fS;
- jt.toNow = gS;
- jt.get = i1;
- jt.invalidAt = AS;
- jt.isAfter = eS;
- jt.isBefore = iS;
- jt.isBetween = rS;
- jt.isSame = nS;
- jt.isSameOrAfter = sS;
- jt.isSameOrBefore = oS;
- jt.isValid = CS;
- jt.lang = Pu;
- jt.locale = Tu;
- jt.localeData = Eu;
- jt.max = Cb;
- jt.min = Mb;
- jt.parsingFlags = kS;
- jt.set = r1;
- jt.startOf = mS;
- jt.subtract = Vb;
- jt.toArray = SS;
- jt.toObject = wS;
- jt.toDate = bS;
- jt.toISOString = hS;
- jt.inspect = cS;
- typeof Symbol < "u" && Symbol.for != null && (jt[Symbol.for("nodejs.util.inspect.custom")] = function() {
- return "Moment<" + this.format() + ">";
- });
- jt.toJSON = MS;
- jt.toString = lS;
- jt.unix = xS;
- jt.valueOf = vS;
- jt.creationData = TS;
- jt.eraName = LS;
- jt.eraNarrow = _S;
- jt.eraAbbr = DS;
- jt.eraYear = IS;
- jt.year = pu;
- jt.isLeapYear = w1;
- jt.weekYear = YS;
- jt.isoWeekYear = XS;
- jt.quarter = jt.quarters = $S;
- jt.month = hu;
- jt.daysInMonth = x1;
- jt.week = jt.weeks = P1;
- jt.isoWeek = jt.isoWeeks = E1;
- jt.weeksInYear = FS;
- jt.weeksInWeekYear = US;
- jt.isoWeeksInYear = GS;
- jt.isoWeeksInISOWeekYear = HS;
- jt.date = Iu;
- jt.day = jt.days = X1;
- jt.weekday = G1;
- jt.isoWeekday = H1;
- jt.dayOfYear = ZS;
- jt.hour = jt.hours = J1;
- jt.minute = jt.minutes = KS;
- jt.second = jt.seconds = JS;
- jt.millisecond = jt.milliseconds = Ru;
- jt.utcOffset = Db;
- jt.utc = Rb;
- jt.local = Nb;
- jt.parseZone = Bb;
- jt.hasAlignedHourOffset = jb;
- jt.isDST = Wb;
- jt.isLocal = Yb;
- jt.isUtcOffset = Xb;
- jt.isUtc = Mu;
- jt.isUTC = Mu;
- jt.zoneAbbr = QS;
- jt.zoneName = tw;
- jt.dates = Oi(
- "dates accessor is deprecated. Use date instead.",
- Iu
- );
- jt.months = Oi(
- "months accessor is deprecated. Use month instead",
- hu
- );
- jt.years = Oi(
- "years accessor is deprecated. Use year instead",
- pu
- );
- jt.zone = Oi(
- "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
- Ib
- );
- jt.isDSTShifted = Oi(
- "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
- zb
- );
- function ew(r) {
- return Te(r * 1e3);
- }
- function iw() {
- return Te.apply(null, arguments).parseZone();
- }
- function Nu(r) {
- return r;
- }
- var ye = Ll.prototype;
- ye.calendar = X0;
- ye.longDateFormat = U0;
- ye.invalidDate = $0;
- ye.ordinal = J0;
- ye.preparse = Nu;
- ye.postformat = Nu;
- ye.relativeTime = Q0;
- ye.pastFuture = t1;
- ye.set = z0;
- ye.eras = PS;
- ye.erasParse = ES;
- ye.erasConvertYear = OS;
- ye.erasAbbrRegex = NS;
- ye.erasNameRegex = RS;
- ye.erasNarrowRegex = BS;
- ye.months = g1;
- ye.monthsShort = m1;
- ye.monthsParse = v1;
- ye.monthsRegex = S1;
- ye.monthsShortRegex = b1;
- ye.week = C1;
- ye.firstDayOfYear = T1;
- ye.firstDayOfWeek = A1;
- ye.weekdays = B1;
- ye.weekdaysMin = W1;
- ye.weekdaysShort = j1;
- ye.weekdaysParse = Y1;
- ye.weekdaysRegex = F1;
- ye.weekdaysShortRegex = U1;
- ye.weekdaysMinRegex = V1;
- ye.isPM = Z1;
- ye.meridiem = q1;
- function So(r, f, E, l) {
- var y = gr(), j = $i().set(l, f);
- return y[E](j, r);
- }
- function Bu(r, f, E) {
- if (ur(r) && (f = r, r = void 0), r = r || "", f != null)
- return So(r, f, E, "month");
- var l, y = [];
- for (l = 0; l < 12; l++)
- y[l] = So(r, l, E, "month");
- return y;
- }
- function Vl(r, f, E, l) {
- typeof r == "boolean" ? (ur(f) && (E = f, f = void 0), f = f || "") : (f = r, E = f, r = !1, ur(f) && (E = f, f = void 0), f = f || "");
- var y = gr(), j = r ? y._week.dow : 0, I, Z = [];
- if (E != null)
- return So(f, (E + j) % 7, l, "day");
- for (I = 0; I < 7; I++)
- Z[I] = So(f, (I + j) % 7, l, "day");
- return Z;
- }
- function rw(r, f) {
- return Bu(r, f, "months");
- }
- function nw(r, f) {
- return Bu(r, f, "monthsShort");
- }
- function sw(r, f, E) {
- return Vl(r, f, E, "weekdays");
- }
- function ow(r, f, E) {
- return Vl(r, f, E, "weekdaysShort");
- }
- function aw(r, f, E) {
- return Vl(r, f, E, "weekdaysMin");
- }
- Lr("en", {
- eras: [
- {
- since: "0001-01-01",
- until: 1 / 0,
- offset: 1,
- name: "Anno Domini",
- narrow: "AD",
- abbr: "AD"
- },
- {
- since: "0000-12-31",
- until: -1 / 0,
- offset: 1,
- name: "Before Christ",
- narrow: "BC",
- abbr: "BC"
- }
- ],
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function(r) {
- var f = r % 10, E = le(r % 100 / 10) === 1 ? "th" : f === 1 ? "st" : f === 2 ? "nd" : f === 3 ? "rd" : "th";
- return r + E;
- }
- });
- Xt.lang = Oi(
- "moment.lang is deprecated. Use moment.locale instead.",
- Lr
- );
- Xt.langData = Oi(
- "moment.langData is deprecated. Use moment.localeData instead.",
- gr
- );
- var sr = Math.abs;
- function lw() {
- var r = this._data;
- return this._milliseconds = sr(this._milliseconds), this._days = sr(this._days), this._months = sr(this._months), r.milliseconds = sr(r.milliseconds), r.seconds = sr(r.seconds), r.minutes = sr(r.minutes), r.hours = sr(r.hours), r.months = sr(r.months), r.years = sr(r.years), this;
- }
- function ju(r, f, E, l) {
- var y = zi(f, E);
- return r._milliseconds += l * y._milliseconds, r._days += l * y._days, r._months += l * y._months, r._bubble();
- }
- function hw(r, f) {
- return ju(this, r, f, 1);
- }
- function cw(r, f) {
- return ju(this, r, f, -1);
- }
- function Ip(r) {
- return r < 0 ? Math.floor(r) : Math.ceil(r);
- }
- function pw() {
- var r = this._milliseconds, f = this._days, E = this._months, l = this._data, y, j, I, Z, H;
- return r >= 0 && f >= 0 && E >= 0 || r <= 0 && f <= 0 && E <= 0 || (r += Ip(Ml(E) + f) * 864e5, f = 0, E = 0), l.milliseconds = r % 1e3, y = Ti(r / 1e3), l.seconds = y % 60, j = Ti(y / 60), l.minutes = j % 60, I = Ti(j / 60), l.hours = I % 24, f += Ti(I / 24), H = Ti(Wu(f)), E += H, f -= Ip(Ml(H)), Z = Ti(E / 12), E %= 12, l.days = f, l.months = E, l.years = Z, this;
- }
- function Wu(r) {
- return r * 4800 / 146097;
- }
- function Ml(r) {
- return r * 146097 / 4800;
- }
- function uw(r) {
- if (!this.isValid())
- return NaN;
- var f, E, l = this._milliseconds;
- if (r = Li(r), r === "month" || r === "quarter" || r === "year")
- switch (f = this._days + l / 864e5, E = this._months + Wu(f), r) {
- case "month":
- return E;
- case "quarter":
- return E / 3;
- case "year":
- return E / 12;
- }
- else
- switch (f = this._days + Math.round(Ml(this._months)), r) {
- case "week":
- return f / 7 + l / 6048e5;
- case "day":
- return f + l / 864e5;
- case "hour":
- return f * 24 + l / 36e5;
- case "minute":
- return f * 1440 + l / 6e4;
- case "second":
- return f * 86400 + l / 1e3;
- case "millisecond":
- return Math.floor(f * 864e5) + l;
- default:
- throw new Error("Unknown unit " + r);
- }
- }
- function dw() {
- return this.isValid() ? this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + le(this._months / 12) * 31536e6 : NaN;
- }
- function mr(r) {
- return function() {
- return this.as(r);
- };
- }
- var fw = mr("ms"), gw = mr("s"), mw = mr("m"), yw = mr("h"), vw = mr("d"), xw = mr("w"), bw = mr("M"), Sw = mr("Q"), ww = mr("y");
- function Mw() {
- return zi(this);
- }
- function Cw(r) {
- return r = Li(r), this.isValid() ? this[r + "s"]() : NaN;
- }
- function Kr(r) {
- return function() {
- return this.isValid() ? this._data[r] : NaN;
- };
- }
- var kw = Kr("milliseconds"), Aw = Kr("seconds"), Tw = Kr("minutes"), Pw = Kr("hours"), Ew = Kr("days"), Ow = Kr("months"), Lw = Kr("years");
- function _w() {
- return Ti(this.days() / 7);
- }
- var or = Math.round, mn = {
- ss: 44,
- // a few seconds to seconds
- s: 45,
- // seconds to minute
- m: 45,
- // minutes to hour
- h: 22,
- // hours to day
- d: 26,
- // days to month/week
- w: null,
- // weeks to month
- M: 11
- // months to year
- };
- function Dw(r, f, E, l, y) {
- return y.relativeTime(f || 1, !!E, r, l);
- }
- function Iw(r, f, E, l) {
- var y = zi(r).abs(), j = or(y.as("s")), I = or(y.as("m")), Z = or(y.as("h")), H = or(y.as("d")), U = or(y.as("M")), F = or(y.as("w")), N = or(y.as("y")), R = j <= E.ss && ["s", j] || j < E.s && ["ss", j] || I <= 1 && ["m"] || I < E.m && ["mm", I] || Z <= 1 && ["h"] || Z < E.h && ["hh", Z] || H <= 1 && ["d"] || H < E.d && ["dd", H];
- return E.w != null && (R = R || F <= 1 && ["w"] || F < E.w && ["ww", F]), R = R || U <= 1 && ["M"] || U < E.M && ["MM", U] || N <= 1 && ["y"] || ["yy", N], R[2] = f, R[3] = +r > 0, R[4] = l, Dw.apply(null, R);
- }
- function Rw(r) {
- return r === void 0 ? or : typeof r == "function" ? (or = r, !0) : !1;
- }
- function Nw(r, f) {
- return mn[r] === void 0 ? !1 : f === void 0 ? mn[r] : (mn[r] = f, r === "s" && (mn.ss = f - 1), !0);
- }
- function Bw(r, f) {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var E = !1, l = mn, y, j;
- return typeof r == "object" && (f = r, r = !1), typeof r == "boolean" && (E = r), typeof f == "object" && (l = Object.assign({}, mn, f), f.s != null && f.ss == null && (l.ss = f.s - 1)), y = this.localeData(), j = Iw(this, !E, l, y), E && (j = y.pastFuture(+this, j)), y.postformat(j);
- }
- var nl = Math.abs;
- function fn(r) {
- return (r > 0) - (r < 0) || +r;
- }
- function No() {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var r = nl(this._milliseconds) / 1e3, f = nl(this._days), E = nl(this._months), l, y, j, I, Z = this.asSeconds(), H, U, F, N;
- return Z ? (l = Ti(r / 60), y = Ti(l / 60), r %= 60, l %= 60, j = Ti(E / 12), E %= 12, I = r ? r.toFixed(3).replace(/\.?0+$/, "") : "", H = Z < 0 ? "-" : "", U = fn(this._months) !== fn(Z) ? "-" : "", F = fn(this._days) !== fn(Z) ? "-" : "", N = fn(this._milliseconds) !== fn(Z) ? "-" : "", H + "P" + (j ? U + j + "Y" : "") + (E ? U + E + "M" : "") + (f ? F + f + "D" : "") + (y || l || r ? "T" : "") + (y ? N + y + "H" : "") + (l ? N + l + "M" : "") + (r ? N + I + "S" : "")) : "P0D";
- }
- var de = Io.prototype;
- de.isValid = Eb;
- de.abs = lw;
- de.add = hw;
- de.subtract = cw;
- de.as = uw;
- de.asMilliseconds = fw;
- de.asSeconds = gw;
- de.asMinutes = mw;
- de.asHours = yw;
- de.asDays = vw;
- de.asWeeks = xw;
- de.asMonths = bw;
- de.asQuarters = Sw;
- de.asYears = ww;
- de.valueOf = dw;
- de._bubble = pw;
- de.clone = Mw;
- de.get = Cw;
- de.milliseconds = kw;
- de.seconds = Aw;
- de.minutes = Tw;
- de.hours = Pw;
- de.days = Ew;
- de.weeks = _w;
- de.months = Ow;
- de.years = Lw;
- de.humanize = Bw;
- de.toISOString = No;
- de.toString = No;
- de.toJSON = No;
- de.locale = Tu;
- de.localeData = Eu;
- de.toIsoString = Oi(
- "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
- No
- );
- de.lang = Pu;
- Zt("X", 0, 0, "unix");
- Zt("x", 0, 0, "valueOf");
- Ft("x", Oo);
- Ft("X", s1);
- we("X", function(r, f, E) {
- E._d = new Date(parseFloat(r) * 1e3);
- });
- we("x", function(r, f, E) {
- E._d = new Date(le(r));
- });
- //! moment.js
- Xt.version = "2.29.4";
- j0(Te);
- Xt.fn = jt;
- Xt.min = kb;
- Xt.max = Ab;
- Xt.now = Tb;
- Xt.utc = $i;
- Xt.unix = ew;
- Xt.months = rw;
- Xt.isDate = ss;
- Xt.locale = Lr;
- Xt.invalid = ko;
- Xt.duration = zi;
- Xt.isMoment = Wi;
- Xt.weekdays = sw;
- Xt.parseZone = iw;
- Xt.localeData = gr;
- Xt.isDuration = oo;
- Xt.monthsShort = nw;
- Xt.weekdaysMin = aw;
- Xt.defineLocale = Wl;
- Xt.updateLocale = ib;
- Xt.locales = rb;
- Xt.weekdaysShort = ow;
- Xt.normalizeUnits = Li;
- Xt.relativeTimeRounding = Rw;
- Xt.relativeTimeThreshold = Nw;
- Xt.calendarFormat = qb;
- Xt.prototype = jt;
- Xt.HTML5_FMT = {
- DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
- // <input type="datetime-local" />
- DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
- // <input type="datetime-local" step="1" />
- DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
- // <input type="datetime-local" step="0.001" />
- DATE: "YYYY-MM-DD",
- // <input type="date" />
- TIME: "HH:mm",
- // <input type="time" />
- TIME_SECONDS: "HH:mm:ss",
- // <input type="time" step="1" />
- TIME_MS: "HH:mm:ss.SSS",
- // <input type="time" step="0.001" />
- WEEK: "GGGG-[W]WW",
- // <input type="week" />
- MONTH: "YYYY-MM"
- // <input type="month" />
- };
- var wo = {}, jw = {
- get exports() {
- return wo;
- },
- set exports(r) {
- wo = r;
- }
- };
- /**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- (function(r, f) {
- (function() {
- var E, l = "4.17.21", y = 200, j = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", I = "Expected a function", Z = "Invalid `variable` option passed into `_.template`", H = "__lodash_hash_undefined__", U = 500, F = "__lodash_placeholder__", N = 1, R = 2, S = 4, v = 1, d = 2, u = 1, A = 2, O = 4, B = 8, C = 16, b = 32, w = 64, x = 128, a = 256, c = 512, p = 30, i = "...", h = 800, o = 16, t = 1, s = 2, n = 3, T = 1 / 0, _ = 9007199254740991, D = 17976931348623157e292, W = 0 / 0, P = 4294967295, X = P - 1, g = P >>> 1, m = [
- ["ary", x],
- ["bind", u],
- ["bindKey", A],
- ["curry", B],
- ["curryRight", C],
- ["flip", c],
- ["partial", b],
- ["partialRight", w],
- ["rearg", a]
- ], L = "[object Arguments]", Y = "[object Array]", V = "[object AsyncFunction]", Q = "[object Boolean]", k = "[object Date]", G = "[object DOMException]", z = "[object Error]", $ = "[object Function]", q = "[object GeneratorFunction]", it = "[object Map]", et = "[object Number]", nt = "[object Null]", rt = "[object Object]", ct = "[object Promise]", gt = "[object Proxy]", dt = "[object RegExp]", ht = "[object Set]", at = "[object String]", J = "[object Symbol]", tt = "[object Undefined]", ot = "[object WeakMap]", lt = "[object WeakSet]", pt = "[object ArrayBuffer]", yt = "[object DataView]", vt = "[object Float32Array]", Ct = "[object Float64Array]", Pt = "[object Int8Array]", At = "[object Int16Array]", St = "[object Int32Array]", Dt = "[object Uint8Array]", Lt = "[object Uint8ClampedArray]", Nt = "[object Uint16Array]", Et = "[object Uint32Array]", Kt = /\b__p \+= '';/g, Gt = /\b(__p \+=) '' \+/g, Wt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Jt = /&(?:amp|lt|gt|quot|#39);/g, be = /[&<>"']/g, zt = RegExp(Jt.source), Vt = RegExp(be.source), Me = /<%-([\s\S]+?)%>/g, _r = /<%([\s\S]+?)%>/g, ps = /<%=([\s\S]+?)%>/g, Tn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Pn = /^\w*$/, $e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, En = /[\\^$.*+?()[\]{}|]/g, On = RegExp(En.source), Jr = /^\s+/, us = /\s/, Xo = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Dr = /\{\n\/\* \[wrapped with (.+)\] \*/, Yi = /,? & /, ds = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Ln = /[()=,{}\[\]\/\s]/, Ir = /\\(\\)?/g, $t = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ue = /\w*$/, ge = /^[-+]0x[0-9a-f]+$/i, Re = /^0b[01]+$/i, De = /^\[object .+?Constructor\]$/, qr = /^0o[0-7]+$/i, dd = /^(?:0|[1-9]\d*)$/, fd = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, fs = /($^)/, gd = /['\n\r\u2028\u2029\\]/g, gs = "\\ud800-\\udfff", md = "\\u0300-\\u036f", yd = "\\ufe20-\\ufe2f", vd = "\\u20d0-\\u20ff", nh = md + yd + vd, sh = "\\u2700-\\u27bf", oh = "a-z\\xdf-\\xf6\\xf8-\\xff", xd = "\\xac\\xb1\\xd7\\xf7", bd = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Sd = "\\u2000-\\u206f", wd = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", ah = "A-Z\\xc0-\\xd6\\xd8-\\xde", lh = "\\ufe0e\\ufe0f", hh = xd + bd + Sd + wd, Go = "['’]", Md = "[" + gs + "]", ch = "[" + hh + "]", ms = "[" + nh + "]", ph = "\\d+", Cd = "[" + sh + "]", uh = "[" + oh + "]", dh = "[^" + gs + hh + ph + sh + oh + ah + "]", Ho = "\\ud83c[\\udffb-\\udfff]", kd = "(?:" + ms + "|" + Ho + ")", fh = "[^" + gs + "]", Fo = "(?:\\ud83c[\\udde6-\\uddff]){2}", Uo = "[\\ud800-\\udbff][\\udc00-\\udfff]", Qr = "[" + ah + "]", gh = "\\u200d", mh = "(?:" + uh + "|" + dh + ")", Ad = "(?:" + Qr + "|" + dh + ")", yh = "(?:" + Go + "(?:d|ll|m|re|s|t|ve))?", vh = "(?:" + Go + "(?:D|LL|M|RE|S|T|VE))?", xh = kd + "?", bh = "[" + lh + "]?", Td = "(?:" + gh + "(?:" + [fh, Fo, Uo].join("|") + ")" + bh + xh + ")*", Pd = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ed = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Sh = bh + xh + Td, Od = "(?:" + [Cd, Fo, Uo].join("|") + ")" + Sh, Ld = "(?:" + [fh + ms + "?", ms, Fo, Uo, Md].join("|") + ")", _d = RegExp(Go, "g"), Dd = RegExp(ms, "g"), Vo = RegExp(Ho + "(?=" + Ho + ")|" + Ld + Sh, "g"), Id = RegExp([
- Qr + "?" + uh + "+" + yh + "(?=" + [ch, Qr, "$"].join("|") + ")",
- Ad + "+" + vh + "(?=" + [ch, Qr + mh, "$"].join("|") + ")",
- Qr + "?" + mh + "+" + yh,
- Qr + "+" + vh,
- Ed,
- Pd,
- ph,
- Od
- ].join("|"), "g"), Rd = RegExp("[" + gh + gs + nh + lh + "]"), Nd = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Bd = [
- "Array",
- "Buffer",
- "DataView",
- "Date",
- "Error",
- "Float32Array",
- "Float64Array",
- "Function",
- "Int8Array",
- "Int16Array",
- "Int32Array",
- "Map",
- "Math",
- "Object",
- "Promise",
- "RegExp",
- "Set",
- "String",
- "Symbol",
- "TypeError",
- "Uint8Array",
- "Uint8ClampedArray",
- "Uint16Array",
- "Uint32Array",
- "WeakMap",
- "_",
- "clearTimeout",
- "isFinite",
- "parseInt",
- "setTimeout"
- ], jd = -1, Ae = {};
- Ae[vt] = Ae[Ct] = Ae[Pt] = Ae[At] = Ae[St] = Ae[Dt] = Ae[Lt] = Ae[Nt] = Ae[Et] = !0, Ae[L] = Ae[Y] = Ae[pt] = Ae[Q] = Ae[yt] = Ae[k] = Ae[z] = Ae[$] = Ae[it] = Ae[et] = Ae[rt] = Ae[dt] = Ae[ht] = Ae[at] = Ae[ot] = !1;
- var ke = {};
- ke[L] = ke[Y] = ke[pt] = ke[yt] = ke[Q] = ke[k] = ke[vt] = ke[Ct] = ke[Pt] = ke[At] = ke[St] = ke[it] = ke[et] = ke[rt] = ke[dt] = ke[ht] = ke[at] = ke[J] = ke[Dt] = ke[Lt] = ke[Nt] = ke[Et] = !0, ke[z] = ke[$] = ke[ot] = !1;
- var Wd = {
- // Latin-1 Supplement block.
- À: "A",
- Á: "A",
- Â: "A",
- Ã: "A",
- Ä: "A",
- Å: "A",
- à: "a",
- á: "a",
- â: "a",
- ã: "a",
- ä: "a",
- å: "a",
- Ç: "C",
- ç: "c",
- Ð: "D",
- ð: "d",
- È: "E",
- É: "E",
- Ê: "E",
- Ë: "E",
- è: "e",
- é: "e",
- ê: "e",
- ë: "e",
- Ì: "I",
- Í: "I",
- Î: "I",
- Ï: "I",
- ì: "i",
- í: "i",
- î: "i",
- ï: "i",
- Ñ: "N",
- ñ: "n",
- Ò: "O",
- Ó: "O",
- Ô: "O",
- Õ: "O",
- Ö: "O",
- Ø: "O",
- ò: "o",
- ó: "o",
- ô: "o",
- õ: "o",
- ö: "o",
- ø: "o",
- Ù: "U",
- Ú: "U",
- Û: "U",
- Ü: "U",
- ù: "u",
- ú: "u",
- û: "u",
- ü: "u",
- Ý: "Y",
- ý: "y",
- ÿ: "y",
- Æ: "Ae",
- æ: "ae",
- Þ: "Th",
- þ: "th",
- ß: "ss",
- // Latin Extended-A block.
- Ā: "A",
- Ă: "A",
- Ą: "A",
- ā: "a",
- ă: "a",
- ą: "a",
- Ć: "C",
- Ĉ: "C",
- Ċ: "C",
- Č: "C",
- ć: "c",
- ĉ: "c",
- ċ: "c",
- č: "c",
- Ď: "D",
- Đ: "D",
- ď: "d",
- đ: "d",
- Ē: "E",
- Ĕ: "E",
- Ė: "E",
- Ę: "E",
- Ě: "E",
- ē: "e",
- ĕ: "e",
- ė: "e",
- ę: "e",
- ě: "e",
- Ĝ: "G",
- Ğ: "G",
- Ġ: "G",
- Ģ: "G",
- ĝ: "g",
- ğ: "g",
- ġ: "g",
- ģ: "g",
- Ĥ: "H",
- Ħ: "H",
- ĥ: "h",
- ħ: "h",
- Ĩ: "I",
- Ī: "I",
- Ĭ: "I",
- Į: "I",
- İ: "I",
- ĩ: "i",
- ī: "i",
- ĭ: "i",
- į: "i",
- ı: "i",
- Ĵ: "J",
- ĵ: "j",
- Ķ: "K",
- ķ: "k",
- ĸ: "k",
- Ĺ: "L",
- Ļ: "L",
- Ľ: "L",
- Ŀ: "L",
- Ł: "L",
- ĺ: "l",
- ļ: "l",
- ľ: "l",
- ŀ: "l",
- ł: "l",
- Ń: "N",
- Ņ: "N",
- Ň: "N",
- Ŋ: "N",
- ń: "n",
- ņ: "n",
- ň: "n",
- ŋ: "n",
- Ō: "O",
- Ŏ: "O",
- Ő: "O",
- ō: "o",
- ŏ: "o",
- ő: "o",
- Ŕ: "R",
- Ŗ: "R",
- Ř: "R",
- ŕ: "r",
- ŗ: "r",
- ř: "r",
- Ś: "S",
- Ŝ: "S",
- Ş: "S",
- Š: "S",
- ś: "s",
- ŝ: "s",
- ş: "s",
- š: "s",
- Ţ: "T",
- Ť: "T",
- Ŧ: "T",
- ţ: "t",
- ť: "t",
- ŧ: "t",
- Ũ: "U",
- Ū: "U",
- Ŭ: "U",
- Ů: "U",
- Ű: "U",
- Ų: "U",
- ũ: "u",
- ū: "u",
- ŭ: "u",
- ů: "u",
- ű: "u",
- ų: "u",
- Ŵ: "W",
- ŵ: "w",
- Ŷ: "Y",
- ŷ: "y",
- Ÿ: "Y",
- Ź: "Z",
- Ż: "Z",
- Ž: "Z",
- ź: "z",
- ż: "z",
- ž: "z",
- IJ: "IJ",
- ij: "ij",
- Œ: "Oe",
- œ: "oe",
- ʼn: "'n",
- ſ: "s"
- }, zd = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- }, Yd = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'"
- }, Xd = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029"
- }, Gd = parseFloat, Hd = parseInt, wh = typeof Fr == "object" && Fr && Fr.Object === Object && Fr, Fd = typeof self == "object" && self && self.Object === Object && self, Ue = wh || Fd || Function("return this")(), $o = f && !f.nodeType && f, Rr = $o && !0 && r && !r.nodeType && r, Mh = Rr && Rr.exports === $o, Zo = Mh && wh.process, xi = function() {
- try {
- var wt = Rr && Rr.require && Rr.require("util").types;
- return wt || Zo && Zo.binding && Zo.binding("util");
- } catch {
- }
- }(), Ch = xi && xi.isArrayBuffer, kh = xi && xi.isDate, Ah = xi && xi.isMap, Th = xi && xi.isRegExp, Ph = xi && xi.isSet, Eh = xi && xi.isTypedArray;
- function pi(wt, Ot, Tt) {
- switch (Tt.length) {
- case 0:
- return wt.call(Ot);
- case 1:
- return wt.call(Ot, Tt[0]);
- case 2:
- return wt.call(Ot, Tt[0], Tt[1]);
- case 3:
- return wt.call(Ot, Tt[0], Tt[1], Tt[2]);
- }
- return wt.apply(Ot, Tt);
- }
- function Ud(wt, Ot, Tt, Ht) {
- for (var ee = -1, ve = wt == null ? 0 : wt.length; ++ee < ve; ) {
- var ze = wt[ee];
- Ot(Ht, ze, Tt(ze), wt);
- }
- return Ht;
- }
- function bi(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht && Ot(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function Vd(wt, Ot) {
- for (var Tt = wt == null ? 0 : wt.length; Tt-- && Ot(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function Oh(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (!Ot(wt[Tt], Tt, wt))
- return !1;
- return !0;
- }
- function vr(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- Ot(ze, Tt, wt) && (ve[ee++] = ze);
- }
- return ve;
- }
- function ys(wt, Ot) {
- var Tt = wt == null ? 0 : wt.length;
- return !!Tt && tn(wt, Ot, 0) > -1;
- }
- function Ko(wt, Ot, Tt) {
- for (var Ht = -1, ee = wt == null ? 0 : wt.length; ++Ht < ee; )
- if (Tt(Ot, wt[Ht]))
- return !0;
- return !1;
- }
- function Ee(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = Array(Ht); ++Tt < Ht; )
- ee[Tt] = Ot(wt[Tt], Tt, wt);
- return ee;
- }
- function xr(wt, Ot) {
- for (var Tt = -1, Ht = Ot.length, ee = wt.length; ++Tt < Ht; )
- wt[ee + Tt] = Ot[Tt];
- return wt;
- }
- function Jo(wt, Ot, Tt, Ht) {
- var ee = -1, ve = wt == null ? 0 : wt.length;
- for (Ht && ve && (Tt = wt[++ee]); ++ee < ve; )
- Tt = Ot(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function $d(wt, Ot, Tt, Ht) {
- var ee = wt == null ? 0 : wt.length;
- for (Ht && ee && (Tt = wt[--ee]); ee--; )
- Tt = Ot(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function qo(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (Ot(wt[Tt], Tt, wt))
- return !0;
- return !1;
- }
- var Zd = Qo("length");
- function Kd(wt) {
- return wt.split("");
- }
- function Jd(wt) {
- return wt.match(ds) || [];
- }
- function Lh(wt, Ot, Tt) {
- var Ht;
- return Tt(wt, function(ee, ve, ze) {
- if (Ot(ee, ve, ze))
- return Ht = ve, !1;
- }), Ht;
- }
- function vs(wt, Ot, Tt, Ht) {
- for (var ee = wt.length, ve = Tt + (Ht ? 1 : -1); Ht ? ve-- : ++ve < ee; )
- if (Ot(wt[ve], ve, wt))
- return ve;
- return -1;
- }
- function tn(wt, Ot, Tt) {
- return Ot === Ot ? cf(wt, Ot, Tt) : vs(wt, _h, Tt);
- }
- function qd(wt, Ot, Tt, Ht) {
- for (var ee = Tt - 1, ve = wt.length; ++ee < ve; )
- if (Ht(wt[ee], Ot))
- return ee;
- return -1;
- }
- function _h(wt) {
- return wt !== wt;
- }
- function Dh(wt, Ot) {
- var Tt = wt == null ? 0 : wt.length;
- return Tt ? ea(wt, Ot) / Tt : W;
- }
- function Qo(wt) {
- return function(Ot) {
- return Ot == null ? E : Ot[wt];
- };
- }
- function ta(wt) {
- return function(Ot) {
- return wt == null ? E : wt[Ot];
- };
- }
- function Ih(wt, Ot, Tt, Ht, ee) {
- return ee(wt, function(ve, ze, Ce) {
- Tt = Ht ? (Ht = !1, ve) : Ot(Tt, ve, ze, Ce);
- }), Tt;
- }
- function Qd(wt, Ot) {
- var Tt = wt.length;
- for (wt.sort(Ot); Tt--; )
- wt[Tt] = wt[Tt].value;
- return wt;
- }
- function ea(wt, Ot) {
- for (var Tt, Ht = -1, ee = wt.length; ++Ht < ee; ) {
- var ve = Ot(wt[Ht]);
- ve !== E && (Tt = Tt === E ? ve : Tt + ve);
- }
- return Tt;
- }
- function ia(wt, Ot) {
- for (var Tt = -1, Ht = Array(wt); ++Tt < wt; )
- Ht[Tt] = Ot(Tt);
- return Ht;
- }
- function tf(wt, Ot) {
- return Ee(Ot, function(Tt) {
- return [Tt, wt[Tt]];
- });
- }
- function Rh(wt) {
- return wt && wt.slice(0, Wh(wt) + 1).replace(Jr, "");
- }
- function ui(wt) {
- return function(Ot) {
- return wt(Ot);
- };
- }
- function ra(wt, Ot) {
- return Ee(Ot, function(Tt) {
- return wt[Tt];
- });
- }
- function _n(wt, Ot) {
- return wt.has(Ot);
- }
- function Nh(wt, Ot) {
- for (var Tt = -1, Ht = wt.length; ++Tt < Ht && tn(Ot, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function Bh(wt, Ot) {
- for (var Tt = wt.length; Tt-- && tn(Ot, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function ef(wt, Ot) {
- for (var Tt = wt.length, Ht = 0; Tt--; )
- wt[Tt] === Ot && ++Ht;
- return Ht;
- }
- var rf = ta(Wd), nf = ta(zd);
- function sf(wt) {
- return "\\" + Xd[wt];
- }
- function of(wt, Ot) {
- return wt == null ? E : wt[Ot];
- }
- function en(wt) {
- return Rd.test(wt);
- }
- function af(wt) {
- return Nd.test(wt);
- }
- function lf(wt) {
- for (var Ot, Tt = []; !(Ot = wt.next()).done; )
- Tt.push(Ot.value);
- return Tt;
- }
- function na(wt) {
- var Ot = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht, ee) {
- Tt[++Ot] = [ee, Ht];
- }), Tt;
- }
- function jh(wt, Ot) {
- return function(Tt) {
- return wt(Ot(Tt));
- };
- }
- function br(wt, Ot) {
- for (var Tt = -1, Ht = wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- (ze === Ot || ze === F) && (wt[Tt] = F, ve[ee++] = Tt);
- }
- return ve;
- }
- function xs(wt) {
- var Ot = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Ot] = Ht;
- }), Tt;
- }
- function hf(wt) {
- var Ot = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Ot] = [Ht, Ht];
- }), Tt;
- }
- function cf(wt, Ot, Tt) {
- for (var Ht = Tt - 1, ee = wt.length; ++Ht < ee; )
- if (wt[Ht] === Ot)
- return Ht;
- return -1;
- }
- function pf(wt, Ot, Tt) {
- for (var Ht = Tt + 1; Ht--; )
- if (wt[Ht] === Ot)
- return Ht;
- return Ht;
- }
- function rn(wt) {
- return en(wt) ? df(wt) : Zd(wt);
- }
- function _i(wt) {
- return en(wt) ? ff(wt) : Kd(wt);
- }
- function Wh(wt) {
- for (var Ot = wt.length; Ot-- && us.test(wt.charAt(Ot)); )
- ;
- return Ot;
- }
- var uf = ta(Yd);
- function df(wt) {
- for (var Ot = Vo.lastIndex = 0; Vo.test(wt); )
- ++Ot;
- return Ot;
- }
- function ff(wt) {
- return wt.match(Vo) || [];
- }
- function gf(wt) {
- return wt.match(Id) || [];
- }
- var mf = function wt(Ot) {
- Ot = Ot == null ? Ue : nn.defaults(Ue.Object(), Ot, nn.pick(Ue, Bd));
- var Tt = Ot.Array, Ht = Ot.Date, ee = Ot.Error, ve = Ot.Function, ze = Ot.Math, Ce = Ot.Object, sa = Ot.RegExp, yf = Ot.String, Si = Ot.TypeError, bs = Tt.prototype, vf = ve.prototype, sn = Ce.prototype, Ss = Ot["__core-js_shared__"], ws = vf.toString, Se = sn.hasOwnProperty, xf = 0, zh = function() {
- var e = /[^.]+$/.exec(Ss && Ss.keys && Ss.keys.IE_PROTO || "");
- return e ? "Symbol(src)_1." + e : "";
- }(), Ms = sn.toString, bf = ws.call(Ce), Sf = Ue._, wf = sa(
- "^" + ws.call(Se).replace(En, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), Cs = Mh ? Ot.Buffer : E, Sr = Ot.Symbol, ks = Ot.Uint8Array, Yh = Cs ? Cs.allocUnsafe : E, As = jh(Ce.getPrototypeOf, Ce), Xh = Ce.create, Gh = sn.propertyIsEnumerable, Ts = bs.splice, Hh = Sr ? Sr.isConcatSpreadable : E, Dn = Sr ? Sr.iterator : E, Nr = Sr ? Sr.toStringTag : E, Ps = function() {
- try {
- var e = Yr(Ce, "defineProperty");
- return e({}, "", {}), e;
- } catch {
- }
- }(), Mf = Ot.clearTimeout !== Ue.clearTimeout && Ot.clearTimeout, Cf = Ht && Ht.now !== Ue.Date.now && Ht.now, kf = Ot.setTimeout !== Ue.setTimeout && Ot.setTimeout, Es = ze.ceil, Os = ze.floor, oa = Ce.getOwnPropertySymbols, Af = Cs ? Cs.isBuffer : E, Fh = Ot.isFinite, Tf = bs.join, Pf = jh(Ce.keys, Ce), Ye = ze.max, Ze = ze.min, Ef = Ht.now, Of = Ot.parseInt, Uh = ze.random, Lf = bs.reverse, aa = Yr(Ot, "DataView"), In = Yr(Ot, "Map"), la = Yr(Ot, "Promise"), on = Yr(Ot, "Set"), Rn = Yr(Ot, "WeakMap"), Nn = Yr(Ce, "create"), Ls = Rn && new Rn(), an = {}, _f = Xr(aa), Df = Xr(In), If = Xr(la), Rf = Xr(on), Nf = Xr(Rn), _s = Sr ? Sr.prototype : E, Bn = _s ? _s.valueOf : E, Vh = _s ? _s.toString : E;
- function ft(e) {
- if (Ne(e) && !ie(e) && !(e instanceof ce)) {
- if (e instanceof wi)
- return e;
- if (Se.call(e, "__wrapped__"))
- return $c(e);
- }
- return new wi(e);
- }
- var ln = function() {
- function e() {
- }
- return function(M) {
- if (!Ie(M))
- return {};
- if (Xh)
- return Xh(M);
- e.prototype = M;
- var K = new e();
- return e.prototype = E, K;
- };
- }();
- function Ds() {
- }
- function wi(e, M) {
- this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!M, this.__index__ = 0, this.__values__ = E;
- }
- ft.templateSettings = {
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- escape: Me,
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- evaluate: _r,
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- interpolate: ps,
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- variable: "",
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- imports: {
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- _: ft
- }
- }, ft.prototype = Ds.prototype, ft.prototype.constructor = ft, wi.prototype = ln(Ds.prototype), wi.prototype.constructor = wi;
- function ce(e) {
- this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = P, this.__views__ = [];
- }
- function Bf() {
- var e = new ce(this.__wrapped__);
- return e.__actions__ = si(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = si(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = si(this.__views__), e;
- }
- function jf() {
- if (this.__filtered__) {
- var e = new ce(this);
- e.__dir__ = -1, e.__filtered__ = !0;
- } else
- e = this.clone(), e.__dir__ *= -1;
- return e;
- }
- function Wf() {
- var e = this.__wrapped__.value(), M = this.__dir__, K = ie(e), st = M < 0, ut = K ? e.length : 0, mt = Jg(0, ut, this.__views__), xt = mt.start, bt = mt.end, Mt = bt - xt, It = st ? bt : xt - 1, Rt = this.__iteratees__, Bt = Rt.length, Yt = 0, Ut = Ze(Mt, this.__takeCount__);
- if (!K || !st && ut == Mt && Ut == Mt)
- return yc(e, this.__actions__);
- var Qt = [];
- t:
- for (; Mt-- && Yt < Ut; ) {
- It += M;
- for (var oe = -1, te = e[It]; ++oe < Bt; ) {
- var he = Rt[oe], pe = he.iteratee, gi = he.type, ni = pe(te);
- if (gi == s)
- te = ni;
- else if (!ni) {
- if (gi == t)
- continue t;
- break t;
- }
- }
- Qt[Yt++] = te;
- }
- return Qt;
- }
- ce.prototype = ln(Ds.prototype), ce.prototype.constructor = ce;
- function Br(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++M < K; ) {
- var st = e[M];
- this.set(st[0], st[1]);
- }
- }
- function zf() {
- this.__data__ = Nn ? Nn(null) : {}, this.size = 0;
- }
- function Yf(e) {
- var M = this.has(e) && delete this.__data__[e];
- return this.size -= M ? 1 : 0, M;
- }
- function Xf(e) {
- var M = this.__data__;
- if (Nn) {
- var K = M[e];
- return K === H ? E : K;
- }
- return Se.call(M, e) ? M[e] : E;
- }
- function Gf(e) {
- var M = this.__data__;
- return Nn ? M[e] !== E : Se.call(M, e);
- }
- function Hf(e, M) {
- var K = this.__data__;
- return this.size += this.has(e) ? 0 : 1, K[e] = Nn && M === E ? H : M, this;
- }
- Br.prototype.clear = zf, Br.prototype.delete = Yf, Br.prototype.get = Xf, Br.prototype.has = Gf, Br.prototype.set = Hf;
- function Ki(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++M < K; ) {
- var st = e[M];
- this.set(st[0], st[1]);
- }
- }
- function Ff() {
- this.__data__ = [], this.size = 0;
- }
- function Uf(e) {
- var M = this.__data__, K = Is(M, e);
- if (K < 0)
- return !1;
- var st = M.length - 1;
- return K == st ? M.pop() : Ts.call(M, K, 1), --this.size, !0;
- }
- function Vf(e) {
- var M = this.__data__, K = Is(M, e);
- return K < 0 ? E : M[K][1];
- }
- function $f(e) {
- return Is(this.__data__, e) > -1;
- }
- function Zf(e, M) {
- var K = this.__data__, st = Is(K, e);
- return st < 0 ? (++this.size, K.push([e, M])) : K[st][1] = M, this;
- }
- Ki.prototype.clear = Ff, Ki.prototype.delete = Uf, Ki.prototype.get = Vf, Ki.prototype.has = $f, Ki.prototype.set = Zf;
- function Ji(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++M < K; ) {
- var st = e[M];
- this.set(st[0], st[1]);
- }
- }
- function Kf() {
- this.size = 0, this.__data__ = {
- hash: new Br(),
- map: new (In || Ki)(),
- string: new Br()
- };
- }
- function Jf(e) {
- var M = Us(this, e).delete(e);
- return this.size -= M ? 1 : 0, M;
- }
- function qf(e) {
- return Us(this, e).get(e);
- }
- function Qf(e) {
- return Us(this, e).has(e);
- }
- function tg(e, M) {
- var K = Us(this, e), st = K.size;
- return K.set(e, M), this.size += K.size == st ? 0 : 1, this;
- }
- Ji.prototype.clear = Kf, Ji.prototype.delete = Jf, Ji.prototype.get = qf, Ji.prototype.has = Qf, Ji.prototype.set = tg;
- function jr(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.__data__ = new Ji(); ++M < K; )
- this.add(e[M]);
- }
- function eg(e) {
- return this.__data__.set(e, H), this;
- }
- function ig(e) {
- return this.__data__.has(e);
- }
- jr.prototype.add = jr.prototype.push = eg, jr.prototype.has = ig;
- function Di(e) {
- var M = this.__data__ = new Ki(e);
- this.size = M.size;
- }
- function rg() {
- this.__data__ = new Ki(), this.size = 0;
- }
- function ng(e) {
- var M = this.__data__, K = M.delete(e);
- return this.size = M.size, K;
- }
- function sg(e) {
- return this.__data__.get(e);
- }
- function og(e) {
- return this.__data__.has(e);
- }
- function ag(e, M) {
- var K = this.__data__;
- if (K instanceof Ki) {
- var st = K.__data__;
- if (!In || st.length < y - 1)
- return st.push([e, M]), this.size = ++K.size, this;
- K = this.__data__ = new Ji(st);
- }
- return K.set(e, M), this.size = K.size, this;
- }
- Di.prototype.clear = rg, Di.prototype.delete = ng, Di.prototype.get = sg, Di.prototype.has = og, Di.prototype.set = ag;
- function $h(e, M) {
- var K = ie(e), st = !K && Gr(e), ut = !K && !st && Ar(e), mt = !K && !st && !ut && un(e), xt = K || st || ut || mt, bt = xt ? ia(e.length, yf) : [], Mt = bt.length;
- for (var It in e)
- (M || Se.call(e, It)) && !(xt && // Safari 9 has enumerable `arguments.length` in strict mode.
- (It == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
- ut && (It == "offset" || It == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
- mt && (It == "buffer" || It == "byteLength" || It == "byteOffset") || // Skip index properties.
- er(It, Mt))) && bt.push(It);
- return bt;
- }
- function Zh(e) {
- var M = e.length;
- return M ? e[xa(0, M - 1)] : E;
- }
- function lg(e, M) {
- return Vs(si(e), Wr(M, 0, e.length));
- }
- function hg(e) {
- return Vs(si(e));
- }
- function ha(e, M, K) {
- (K !== E && !Ii(e[M], K) || K === E && !(M in e)) && qi(e, M, K);
- }
- function jn(e, M, K) {
- var st = e[M];
- (!(Se.call(e, M) && Ii(st, K)) || K === E && !(M in e)) && qi(e, M, K);
- }
- function Is(e, M) {
- for (var K = e.length; K--; )
- if (Ii(e[K][0], M))
- return K;
- return -1;
- }
- function cg(e, M, K, st) {
- return wr(e, function(ut, mt, xt) {
- M(st, ut, K(ut), xt);
- }), st;
- }
- function Kh(e, M) {
- return e && Gi(M, He(M), e);
- }
- function pg(e, M) {
- return e && Gi(M, ai(M), e);
- }
- function qi(e, M, K) {
- M == "__proto__" && Ps ? Ps(e, M, {
- configurable: !0,
- enumerable: !0,
- value: K,
- writable: !0
- }) : e[M] = K;
- }
- function ca(e, M) {
- for (var K = -1, st = M.length, ut = Tt(st), mt = e == null; ++K < st; )
- ut[K] = mt ? E : Ha(e, M[K]);
- return ut;
- }
- function Wr(e, M, K) {
- return e === e && (K !== E && (e = e <= K ? e : K), M !== E && (e = e >= M ? e : M)), e;
- }
- function Mi(e, M, K, st, ut, mt) {
- var xt, bt = M & N, Mt = M & R, It = M & S;
- if (K && (xt = ut ? K(e, st, ut, mt) : K(e)), xt !== E)
- return xt;
- if (!Ie(e))
- return e;
- var Rt = ie(e);
- if (Rt) {
- if (xt = Qg(e), !bt)
- return si(e, xt);
- } else {
- var Bt = Ke(e), Yt = Bt == $ || Bt == q;
- if (Ar(e))
- return bc(e, bt);
- if (Bt == rt || Bt == L || Yt && !ut) {
- if (xt = Mt || Yt ? {} : Wc(e), !bt)
- return Mt ? Xg(e, pg(xt, e)) : Yg(e, Kh(xt, e));
- } else {
- if (!ke[Bt])
- return ut ? e : {};
- xt = tm(e, Bt, bt);
- }
- }
- mt || (mt = new Di());
- var Ut = mt.get(e);
- if (Ut)
- return Ut;
- mt.set(e, xt), fp(e) ? e.forEach(function(te) {
- xt.add(Mi(te, M, K, te, e, mt));
- }) : up(e) && e.forEach(function(te, he) {
- xt.set(he, Mi(te, M, K, he, e, mt));
- });
- var Qt = It ? Mt ? Oa : Ea : Mt ? ai : He, oe = Rt ? E : Qt(e);
- return bi(oe || e, function(te, he) {
- oe && (he = te, te = e[he]), jn(xt, he, Mi(te, M, K, he, e, mt));
- }), xt;
- }
- function ug(e) {
- var M = He(e);
- return function(K) {
- return Jh(K, e, M);
- };
- }
- function Jh(e, M, K) {
- var st = K.length;
- if (e == null)
- return !st;
- for (e = Ce(e); st--; ) {
- var ut = K[st], mt = M[ut], xt = e[ut];
- if (xt === E && !(ut in e) || !mt(xt))
- return !1;
- }
- return !0;
- }
- function qh(e, M, K) {
- if (typeof e != "function")
- throw new Si(I);
- return Fn(function() {
- e.apply(E, K);
- }, M);
- }
- function Wn(e, M, K, st) {
- var ut = -1, mt = ys, xt = !0, bt = e.length, Mt = [], It = M.length;
- if (!bt)
- return Mt;
- K && (M = Ee(M, ui(K))), st ? (mt = Ko, xt = !1) : M.length >= y && (mt = _n, xt = !1, M = new jr(M));
- t:
- for (; ++ut < bt; ) {
- var Rt = e[ut], Bt = K == null ? Rt : K(Rt);
- if (Rt = st || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var Yt = It; Yt--; )
- if (M[Yt] === Bt)
- continue t;
- Mt.push(Rt);
- } else
- mt(M, Bt, st) || Mt.push(Rt);
- }
- return Mt;
- }
- var wr = kc(Xi), Qh = kc(ua, !0);
- function dg(e, M) {
- var K = !0;
- return wr(e, function(st, ut, mt) {
- return K = !!M(st, ut, mt), K;
- }), K;
- }
- function Rs(e, M, K) {
- for (var st = -1, ut = e.length; ++st < ut; ) {
- var mt = e[st], xt = M(mt);
- if (xt != null && (bt === E ? xt === xt && !fi(xt) : K(xt, bt)))
- var bt = xt, Mt = mt;
- }
- return Mt;
- }
- function fg(e, M, K, st) {
- var ut = e.length;
- for (K = ne(K), K < 0 && (K = -K > ut ? 0 : ut + K), st = st === E || st > ut ? ut : ne(st), st < 0 && (st += ut), st = K > st ? 0 : mp(st); K < st; )
- e[K++] = M;
- return e;
- }
- function tc(e, M) {
- var K = [];
- return wr(e, function(st, ut, mt) {
- M(st, ut, mt) && K.push(st);
- }), K;
- }
- function Ve(e, M, K, st, ut) {
- var mt = -1, xt = e.length;
- for (K || (K = im), ut || (ut = []); ++mt < xt; ) {
- var bt = e[mt];
- M > 0 && K(bt) ? M > 1 ? Ve(bt, M - 1, K, st, ut) : xr(ut, bt) : st || (ut[ut.length] = bt);
- }
- return ut;
- }
- var pa = Ac(), ec = Ac(!0);
- function Xi(e, M) {
- return e && pa(e, M, He);
- }
- function ua(e, M) {
- return e && ec(e, M, He);
- }
- function Ns(e, M) {
- return vr(M, function(K) {
- return ir(e[K]);
- });
- }
- function zr(e, M) {
- M = Cr(M, e);
- for (var K = 0, st = M.length; e != null && K < st; )
- e = e[Hi(M[K++])];
- return K && K == st ? e : E;
- }
- function ic(e, M, K) {
- var st = M(e);
- return ie(e) ? st : xr(st, K(e));
- }
- function ii(e) {
- return e == null ? e === E ? tt : nt : Nr && Nr in Ce(e) ? Kg(e) : hm(e);
- }
- function da(e, M) {
- return e > M;
- }
- function gg(e, M) {
- return e != null && Se.call(e, M);
- }
- function mg(e, M) {
- return e != null && M in Ce(e);
- }
- function yg(e, M, K) {
- return e >= Ze(M, K) && e < Ye(M, K);
- }
- function fa(e, M, K) {
- for (var st = K ? Ko : ys, ut = e[0].length, mt = e.length, xt = mt, bt = Tt(mt), Mt = 1 / 0, It = []; xt--; ) {
- var Rt = e[xt];
- xt && M && (Rt = Ee(Rt, ui(M))), Mt = Ze(Rt.length, Mt), bt[xt] = !K && (M || ut >= 120 && Rt.length >= 120) ? new jr(xt && Rt) : E;
- }
- Rt = e[0];
- var Bt = -1, Yt = bt[0];
- t:
- for (; ++Bt < ut && It.length < Mt; ) {
- var Ut = Rt[Bt], Qt = M ? M(Ut) : Ut;
- if (Ut = K || Ut !== 0 ? Ut : 0, !(Yt ? _n(Yt, Qt) : st(It, Qt, K))) {
- for (xt = mt; --xt; ) {
- var oe = bt[xt];
- if (!(oe ? _n(oe, Qt) : st(e[xt], Qt, K)))
- continue t;
- }
- Yt && Yt.push(Qt), It.push(Ut);
- }
- }
- return It;
- }
- function vg(e, M, K, st) {
- return Xi(e, function(ut, mt, xt) {
- M(st, K(ut), mt, xt);
- }), st;
- }
- function zn(e, M, K) {
- M = Cr(M, e), e = Gc(e, M);
- var st = e == null ? e : e[Hi(ki(M))];
- return st == null ? E : pi(st, e, K);
- }
- function rc(e) {
- return Ne(e) && ii(e) == L;
- }
- function xg(e) {
- return Ne(e) && ii(e) == pt;
- }
- function bg(e) {
- return Ne(e) && ii(e) == k;
- }
- function Yn(e, M, K, st, ut) {
- return e === M ? !0 : e == null || M == null || !Ne(e) && !Ne(M) ? e !== e && M !== M : Sg(e, M, K, st, Yn, ut);
- }
- function Sg(e, M, K, st, ut, mt) {
- var xt = ie(e), bt = ie(M), Mt = xt ? Y : Ke(e), It = bt ? Y : Ke(M);
- Mt = Mt == L ? rt : Mt, It = It == L ? rt : It;
- var Rt = Mt == rt, Bt = It == rt, Yt = Mt == It;
- if (Yt && Ar(e)) {
- if (!Ar(M))
- return !1;
- xt = !0, Rt = !1;
- }
- if (Yt && !Rt)
- return mt || (mt = new Di()), xt || un(e) ? Nc(e, M, K, st, ut, mt) : $g(e, M, Mt, K, st, ut, mt);
- if (!(K & v)) {
- var Ut = Rt && Se.call(e, "__wrapped__"), Qt = Bt && Se.call(M, "__wrapped__");
- if (Ut || Qt) {
- var oe = Ut ? e.value() : e, te = Qt ? M.value() : M;
- return mt || (mt = new Di()), ut(oe, te, K, st, mt);
- }
- }
- return Yt ? (mt || (mt = new Di()), Zg(e, M, K, st, ut, mt)) : !1;
- }
- function wg(e) {
- return Ne(e) && Ke(e) == it;
- }
- function ga(e, M, K, st) {
- var ut = K.length, mt = ut, xt = !st;
- if (e == null)
- return !mt;
- for (e = Ce(e); ut--; ) {
- var bt = K[ut];
- if (xt && bt[2] ? bt[1] !== e[bt[0]] : !(bt[0] in e))
- return !1;
- }
- for (; ++ut < mt; ) {
- bt = K[ut];
- var Mt = bt[0], It = e[Mt], Rt = bt[1];
- if (xt && bt[2]) {
- if (It === E && !(Mt in e))
- return !1;
- } else {
- var Bt = new Di();
- if (st)
- var Yt = st(It, Rt, Mt, e, M, Bt);
- if (!(Yt === E ? Yn(Rt, It, v | d, st, Bt) : Yt))
- return !1;
- }
- }
- return !0;
- }
- function nc(e) {
- if (!Ie(e) || nm(e))
- return !1;
- var M = ir(e) ? wf : De;
- return M.test(Xr(e));
- }
- function Mg(e) {
- return Ne(e) && ii(e) == dt;
- }
- function Cg(e) {
- return Ne(e) && Ke(e) == ht;
- }
- function kg(e) {
- return Ne(e) && Qs(e.length) && !!Ae[ii(e)];
- }
- function sc(e) {
- return typeof e == "function" ? e : e == null ? li : typeof e == "object" ? ie(e) ? lc(e[0], e[1]) : ac(e) : Tp(e);
- }
- function ma(e) {
- if (!Hn(e))
- return Pf(e);
- var M = [];
- for (var K in Ce(e))
- Se.call(e, K) && K != "constructor" && M.push(K);
- return M;
- }
- function Ag(e) {
- if (!Ie(e))
- return lm(e);
- var M = Hn(e), K = [];
- for (var st in e)
- st == "constructor" && (M || !Se.call(e, st)) || K.push(st);
- return K;
- }
- function ya(e, M) {
- return e < M;
- }
- function oc(e, M) {
- var K = -1, st = oi(e) ? Tt(e.length) : [];
- return wr(e, function(ut, mt, xt) {
- st[++K] = M(ut, mt, xt);
- }), st;
- }
- function ac(e) {
- var M = _a(e);
- return M.length == 1 && M[0][2] ? Yc(M[0][0], M[0][1]) : function(K) {
- return K === e || ga(K, e, M);
- };
- }
- function lc(e, M) {
- return Ia(e) && zc(M) ? Yc(Hi(e), M) : function(K) {
- var st = Ha(K, e);
- return st === E && st === M ? Fa(K, e) : Yn(M, st, v | d);
- };
- }
- function Bs(e, M, K, st, ut) {
- e !== M && pa(M, function(mt, xt) {
- if (ut || (ut = new Di()), Ie(mt))
- Tg(e, M, xt, K, Bs, st, ut);
- else {
- var bt = st ? st(Na(e, xt), mt, xt + "", e, M, ut) : E;
- bt === E && (bt = mt), ha(e, xt, bt);
- }
- }, ai);
- }
- function Tg(e, M, K, st, ut, mt, xt) {
- var bt = Na(e, K), Mt = Na(M, K), It = xt.get(Mt);
- if (It) {
- ha(e, K, It);
- return;
- }
- var Rt = mt ? mt(bt, Mt, K + "", e, M, xt) : E, Bt = Rt === E;
- if (Bt) {
- var Yt = ie(Mt), Ut = !Yt && Ar(Mt), Qt = !Yt && !Ut && un(Mt);
- Rt = Mt, Yt || Ut || Qt ? ie(bt) ? Rt = bt : Be(bt) ? Rt = si(bt) : Ut ? (Bt = !1, Rt = bc(Mt, !0)) : Qt ? (Bt = !1, Rt = Sc(Mt, !0)) : Rt = [] : Un(Mt) || Gr(Mt) ? (Rt = bt, Gr(bt) ? Rt = yp(bt) : (!Ie(bt) || ir(bt)) && (Rt = Wc(Mt))) : Bt = !1;
- }
- Bt && (xt.set(Mt, Rt), ut(Rt, Mt, st, mt, xt), xt.delete(Mt)), ha(e, K, Rt);
- }
- function hc(e, M) {
- var K = e.length;
- if (K)
- return M += M < 0 ? K : 0, er(M, K) ? e[M] : E;
- }
- function cc(e, M, K) {
- M.length ? M = Ee(M, function(mt) {
- return ie(mt) ? function(xt) {
- return zr(xt, mt.length === 1 ? mt[0] : mt);
- } : mt;
- }) : M = [li];
- var st = -1;
- M = Ee(M, ui(qt()));
- var ut = oc(e, function(mt, xt, bt) {
- var Mt = Ee(M, function(It) {
- return It(mt);
- });
- return { criteria: Mt, index: ++st, value: mt };
- });
- return Qd(ut, function(mt, xt) {
- return zg(mt, xt, K);
- });
- }
- function Pg(e, M) {
- return pc(e, M, function(K, st) {
- return Fa(e, st);
- });
- }
- function pc(e, M, K) {
- for (var st = -1, ut = M.length, mt = {}; ++st < ut; ) {
- var xt = M[st], bt = zr(e, xt);
- K(bt, xt) && Xn(mt, Cr(xt, e), bt);
- }
- return mt;
- }
- function Eg(e) {
- return function(M) {
- return zr(M, e);
- };
- }
- function va(e, M, K, st) {
- var ut = st ? qd : tn, mt = -1, xt = M.length, bt = e;
- for (e === M && (M = si(M)), K && (bt = Ee(e, ui(K))); ++mt < xt; )
- for (var Mt = 0, It = M[mt], Rt = K ? K(It) : It; (Mt = ut(bt, Rt, Mt, st)) > -1; )
- bt !== e && Ts.call(bt, Mt, 1), Ts.call(e, Mt, 1);
- return e;
- }
- function uc(e, M) {
- for (var K = e ? M.length : 0, st = K - 1; K--; ) {
- var ut = M[K];
- if (K == st || ut !== mt) {
- var mt = ut;
- er(ut) ? Ts.call(e, ut, 1) : wa(e, ut);
- }
- }
- return e;
- }
- function xa(e, M) {
- return e + Os(Uh() * (M - e + 1));
- }
- function Og(e, M, K, st) {
- for (var ut = -1, mt = Ye(Es((M - e) / (K || 1)), 0), xt = Tt(mt); mt--; )
- xt[st ? mt : ++ut] = e, e += K;
- return xt;
- }
- function ba(e, M) {
- var K = "";
- if (!e || M < 1 || M > _)
- return K;
- do
- M % 2 && (K += e), M = Os(M / 2), M && (e += e);
- while (M);
- return K;
- }
- function ae(e, M) {
- return Ba(Xc(e, M, li), e + "");
- }
- function Lg(e) {
- return Zh(dn(e));
- }
- function _g(e, M) {
- var K = dn(e);
- return Vs(K, Wr(M, 0, K.length));
- }
- function Xn(e, M, K, st) {
- if (!Ie(e))
- return e;
- M = Cr(M, e);
- for (var ut = -1, mt = M.length, xt = mt - 1, bt = e; bt != null && ++ut < mt; ) {
- var Mt = Hi(M[ut]), It = K;
- if (Mt === "__proto__" || Mt === "constructor" || Mt === "prototype")
- return e;
- if (ut != xt) {
- var Rt = bt[Mt];
- It = st ? st(Rt, Mt, bt) : E, It === E && (It = Ie(Rt) ? Rt : er(M[ut + 1]) ? [] : {});
- }
- jn(bt, Mt, It), bt = bt[Mt];
- }
- return e;
- }
- var dc = Ls ? function(e, M) {
- return Ls.set(e, M), e;
- } : li, Dg = Ps ? function(e, M) {
- return Ps(e, "toString", {
- configurable: !0,
- enumerable: !1,
- value: Va(M),
- writable: !0
- });
- } : li;
- function Ig(e) {
- return Vs(dn(e));
- }
- function Ci(e, M, K) {
- var st = -1, ut = e.length;
- M < 0 && (M = -M > ut ? 0 : ut + M), K = K > ut ? ut : K, K < 0 && (K += ut), ut = M > K ? 0 : K - M >>> 0, M >>>= 0;
- for (var mt = Tt(ut); ++st < ut; )
- mt[st] = e[st + M];
- return mt;
- }
- function Rg(e, M) {
- var K;
- return wr(e, function(st, ut, mt) {
- return K = M(st, ut, mt), !K;
- }), !!K;
- }
- function js(e, M, K) {
- var st = 0, ut = e == null ? st : e.length;
- if (typeof M == "number" && M === M && ut <= g) {
- for (; st < ut; ) {
- var mt = st + ut >>> 1, xt = e[mt];
- xt !== null && !fi(xt) && (K ? xt <= M : xt < M) ? st = mt + 1 : ut = mt;
- }
- return ut;
- }
- return Sa(e, M, li, K);
- }
- function Sa(e, M, K, st) {
- var ut = 0, mt = e == null ? 0 : e.length;
- if (mt === 0)
- return 0;
- M = K(M);
- for (var xt = M !== M, bt = M === null, Mt = fi(M), It = M === E; ut < mt; ) {
- var Rt = Os((ut + mt) / 2), Bt = K(e[Rt]), Yt = Bt !== E, Ut = Bt === null, Qt = Bt === Bt, oe = fi(Bt);
- if (xt)
- var te = st || Qt;
- else
- It ? te = Qt && (st || Yt) : bt ? te = Qt && Yt && (st || !Ut) : Mt ? te = Qt && Yt && !Ut && (st || !oe) : Ut || oe ? te = !1 : te = st ? Bt <= M : Bt < M;
- te ? ut = Rt + 1 : mt = Rt;
- }
- return Ze(mt, X);
- }
- function fc(e, M) {
- for (var K = -1, st = e.length, ut = 0, mt = []; ++K < st; ) {
- var xt = e[K], bt = M ? M(xt) : xt;
- if (!K || !Ii(bt, Mt)) {
- var Mt = bt;
- mt[ut++] = xt === 0 ? 0 : xt;
- }
- }
- return mt;
- }
- function gc(e) {
- return typeof e == "number" ? e : fi(e) ? W : +e;
- }
- function di(e) {
- if (typeof e == "string")
- return e;
- if (ie(e))
- return Ee(e, di) + "";
- if (fi(e))
- return Vh ? Vh.call(e) : "";
- var M = e + "";
- return M == "0" && 1 / e == -T ? "-0" : M;
- }
- function Mr(e, M, K) {
- var st = -1, ut = ys, mt = e.length, xt = !0, bt = [], Mt = bt;
- if (K)
- xt = !1, ut = Ko;
- else if (mt >= y) {
- var It = M ? null : Ug(e);
- if (It)
- return xs(It);
- xt = !1, ut = _n, Mt = new jr();
- } else
- Mt = M ? [] : bt;
- t:
- for (; ++st < mt; ) {
- var Rt = e[st], Bt = M ? M(Rt) : Rt;
- if (Rt = K || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var Yt = Mt.length; Yt--; )
- if (Mt[Yt] === Bt)
- continue t;
- M && Mt.push(Bt), bt.push(Rt);
- } else
- ut(Mt, Bt, K) || (Mt !== bt && Mt.push(Bt), bt.push(Rt));
- }
- return bt;
- }
- function wa(e, M) {
- return M = Cr(M, e), e = Gc(e, M), e == null || delete e[Hi(ki(M))];
- }
- function mc(e, M, K, st) {
- return Xn(e, M, K(zr(e, M)), st);
- }
- function Ws(e, M, K, st) {
- for (var ut = e.length, mt = st ? ut : -1; (st ? mt-- : ++mt < ut) && M(e[mt], mt, e); )
- ;
- return K ? Ci(e, st ? 0 : mt, st ? mt + 1 : ut) : Ci(e, st ? mt + 1 : 0, st ? ut : mt);
- }
- function yc(e, M) {
- var K = e;
- return K instanceof ce && (K = K.value()), Jo(M, function(st, ut) {
- return ut.func.apply(ut.thisArg, xr([st], ut.args));
- }, K);
- }
- function Ma(e, M, K) {
- var st = e.length;
- if (st < 2)
- return st ? Mr(e[0]) : [];
- for (var ut = -1, mt = Tt(st); ++ut < st; )
- for (var xt = e[ut], bt = -1; ++bt < st; )
- bt != ut && (mt[ut] = Wn(mt[ut] || xt, e[bt], M, K));
- return Mr(Ve(mt, 1), M, K);
- }
- function vc(e, M, K) {
- for (var st = -1, ut = e.length, mt = M.length, xt = {}; ++st < ut; ) {
- var bt = st < mt ? M[st] : E;
- K(xt, e[st], bt);
- }
- return xt;
- }
- function Ca(e) {
- return Be(e) ? e : [];
- }
- function ka(e) {
- return typeof e == "function" ? e : li;
- }
- function Cr(e, M) {
- return ie(e) ? e : Ia(e, M) ? [e] : Vc(xe(e));
- }
- var Ng = ae;
- function kr(e, M, K) {
- var st = e.length;
- return K = K === E ? st : K, !M && K >= st ? e : Ci(e, M, K);
- }
- var xc = Mf || function(e) {
- return Ue.clearTimeout(e);
- };
- function bc(e, M) {
- if (M)
- return e.slice();
- var K = e.length, st = Yh ? Yh(K) : new e.constructor(K);
- return e.copy(st), st;
- }
- function Aa(e) {
- var M = new e.constructor(e.byteLength);
- return new ks(M).set(new ks(e)), M;
- }
- function Bg(e, M) {
- var K = M ? Aa(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.byteLength);
- }
- function jg(e) {
- var M = new e.constructor(e.source, ue.exec(e));
- return M.lastIndex = e.lastIndex, M;
- }
- function Wg(e) {
- return Bn ? Ce(Bn.call(e)) : {};
- }
- function Sc(e, M) {
- var K = M ? Aa(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.length);
- }
- function wc(e, M) {
- if (e !== M) {
- var K = e !== E, st = e === null, ut = e === e, mt = fi(e), xt = M !== E, bt = M === null, Mt = M === M, It = fi(M);
- if (!bt && !It && !mt && e > M || mt && xt && Mt && !bt && !It || st && xt && Mt || !K && Mt || !ut)
- return 1;
- if (!st && !mt && !It && e < M || It && K && ut && !st && !mt || bt && K && ut || !xt && ut || !Mt)
- return -1;
- }
- return 0;
- }
- function zg(e, M, K) {
- for (var st = -1, ut = e.criteria, mt = M.criteria, xt = ut.length, bt = K.length; ++st < xt; ) {
- var Mt = wc(ut[st], mt[st]);
- if (Mt) {
- if (st >= bt)
- return Mt;
- var It = K[st];
- return Mt * (It == "desc" ? -1 : 1);
- }
- }
- return e.index - M.index;
- }
- function Mc(e, M, K, st) {
- for (var ut = -1, mt = e.length, xt = K.length, bt = -1, Mt = M.length, It = Ye(mt - xt, 0), Rt = Tt(Mt + It), Bt = !st; ++bt < Mt; )
- Rt[bt] = M[bt];
- for (; ++ut < xt; )
- (Bt || ut < mt) && (Rt[K[ut]] = e[ut]);
- for (; It--; )
- Rt[bt++] = e[ut++];
- return Rt;
- }
- function Cc(e, M, K, st) {
- for (var ut = -1, mt = e.length, xt = -1, bt = K.length, Mt = -1, It = M.length, Rt = Ye(mt - bt, 0), Bt = Tt(Rt + It), Yt = !st; ++ut < Rt; )
- Bt[ut] = e[ut];
- for (var Ut = ut; ++Mt < It; )
- Bt[Ut + Mt] = M[Mt];
- for (; ++xt < bt; )
- (Yt || ut < mt) && (Bt[Ut + K[xt]] = e[ut++]);
- return Bt;
- }
- function si(e, M) {
- var K = -1, st = e.length;
- for (M || (M = Tt(st)); ++K < st; )
- M[K] = e[K];
- return M;
- }
- function Gi(e, M, K, st) {
- var ut = !K;
- K || (K = {});
- for (var mt = -1, xt = M.length; ++mt < xt; ) {
- var bt = M[mt], Mt = st ? st(K[bt], e[bt], bt, K, e) : E;
- Mt === E && (Mt = e[bt]), ut ? qi(K, bt, Mt) : jn(K, bt, Mt);
- }
- return K;
- }
- function Yg(e, M) {
- return Gi(e, Da(e), M);
- }
- function Xg(e, M) {
- return Gi(e, Bc(e), M);
- }
- function zs(e, M) {
- return function(K, st) {
- var ut = ie(K) ? Ud : cg, mt = M ? M() : {};
- return ut(K, e, qt(st, 2), mt);
- };
- }
- function hn(e) {
- return ae(function(M, K) {
- var st = -1, ut = K.length, mt = ut > 1 ? K[ut - 1] : E, xt = ut > 2 ? K[2] : E;
- for (mt = e.length > 3 && typeof mt == "function" ? (ut--, mt) : E, xt && ri(K[0], K[1], xt) && (mt = ut < 3 ? E : mt, ut = 1), M = Ce(M); ++st < ut; ) {
- var bt = K[st];
- bt && e(M, bt, st, mt);
- }
- return M;
- });
- }
- function kc(e, M) {
- return function(K, st) {
- if (K == null)
- return K;
- if (!oi(K))
- return e(K, st);
- for (var ut = K.length, mt = M ? ut : -1, xt = Ce(K); (M ? mt-- : ++mt < ut) && st(xt[mt], mt, xt) !== !1; )
- ;
- return K;
- };
- }
- function Ac(e) {
- return function(M, K, st) {
- for (var ut = -1, mt = Ce(M), xt = st(M), bt = xt.length; bt--; ) {
- var Mt = xt[e ? bt : ++ut];
- if (K(mt[Mt], Mt, mt) === !1)
- break;
- }
- return M;
- };
- }
- function Gg(e, M, K) {
- var st = M & u, ut = Gn(e);
- function mt() {
- var xt = this && this !== Ue && this instanceof mt ? ut : e;
- return xt.apply(st ? K : this, arguments);
- }
- return mt;
- }
- function Tc(e) {
- return function(M) {
- M = xe(M);
- var K = en(M) ? _i(M) : E, st = K ? K[0] : M.charAt(0), ut = K ? kr(K, 1).join("") : M.slice(1);
- return st[e]() + ut;
- };
- }
- function cn(e) {
- return function(M) {
- return Jo(kp(Cp(M).replace(_d, "")), e, "");
- };
- }
- function Gn(e) {
- return function() {
- var M = arguments;
- switch (M.length) {
- case 0:
- return new e();
- case 1:
- return new e(M[0]);
- case 2:
- return new e(M[0], M[1]);
- case 3:
- return new e(M[0], M[1], M[2]);
- case 4:
- return new e(M[0], M[1], M[2], M[3]);
- case 5:
- return new e(M[0], M[1], M[2], M[3], M[4]);
- case 6:
- return new e(M[0], M[1], M[2], M[3], M[4], M[5]);
- case 7:
- return new e(M[0], M[1], M[2], M[3], M[4], M[5], M[6]);
- }
- var K = ln(e.prototype), st = e.apply(K, M);
- return Ie(st) ? st : K;
- };
- }
- function Hg(e, M, K) {
- var st = Gn(e);
- function ut() {
- for (var mt = arguments.length, xt = Tt(mt), bt = mt, Mt = pn(ut); bt--; )
- xt[bt] = arguments[bt];
- var It = mt < 3 && xt[0] !== Mt && xt[mt - 1] !== Mt ? [] : br(xt, Mt);
- if (mt -= It.length, mt < K)
- return _c(
- e,
- M,
- Ys,
- ut.placeholder,
- E,
- xt,
- It,
- E,
- E,
- K - mt
- );
- var Rt = this && this !== Ue && this instanceof ut ? st : e;
- return pi(Rt, this, xt);
- }
- return ut;
- }
- function Pc(e) {
- return function(M, K, st) {
- var ut = Ce(M);
- if (!oi(M)) {
- var mt = qt(K, 3);
- M = He(M), K = function(bt) {
- return mt(ut[bt], bt, ut);
- };
- }
- var xt = e(M, K, st);
- return xt > -1 ? ut[mt ? M[xt] : xt] : E;
- };
- }
- function Ec(e) {
- return tr(function(M) {
- var K = M.length, st = K, ut = wi.prototype.thru;
- for (e && M.reverse(); st--; ) {
- var mt = M[st];
- if (typeof mt != "function")
- throw new Si(I);
- if (ut && !xt && Fs(mt) == "wrapper")
- var xt = new wi([], !0);
- }
- for (st = xt ? st : K; ++st < K; ) {
- mt = M[st];
- var bt = Fs(mt), Mt = bt == "wrapper" ? La(mt) : E;
- Mt && Ra(Mt[0]) && Mt[1] == (x | B | b | a) && !Mt[4].length && Mt[9] == 1 ? xt = xt[Fs(Mt[0])].apply(xt, Mt[3]) : xt = mt.length == 1 && Ra(mt) ? xt[bt]() : xt.thru(mt);
- }
- return function() {
- var It = arguments, Rt = It[0];
- if (xt && It.length == 1 && ie(Rt))
- return xt.plant(Rt).value();
- for (var Bt = 0, Yt = K ? M[Bt].apply(this, It) : Rt; ++Bt < K; )
- Yt = M[Bt].call(this, Yt);
- return Yt;
- };
- });
- }
- function Ys(e, M, K, st, ut, mt, xt, bt, Mt, It) {
- var Rt = M & x, Bt = M & u, Yt = M & A, Ut = M & (B | C), Qt = M & c, oe = Yt ? E : Gn(e);
- function te() {
- for (var he = arguments.length, pe = Tt(he), gi = he; gi--; )
- pe[gi] = arguments[gi];
- if (Ut)
- var ni = pn(te), mi = ef(pe, ni);
- if (st && (pe = Mc(pe, st, ut, Ut)), mt && (pe = Cc(pe, mt, xt, Ut)), he -= mi, Ut && he < It) {
- var je = br(pe, ni);
- return _c(
- e,
- M,
- Ys,
- te.placeholder,
- K,
- pe,
- je,
- bt,
- Mt,
- It - he
- );
- }
- var Ri = Bt ? K : this, nr = Yt ? Ri[e] : e;
- return he = pe.length, bt ? pe = cm(pe, bt) : Qt && he > 1 && pe.reverse(), Rt && Mt < he && (pe.length = Mt), this && this !== Ue && this instanceof te && (nr = oe || Gn(nr)), nr.apply(Ri, pe);
- }
- return te;
- }
- function Oc(e, M) {
- return function(K, st) {
- return vg(K, e, M(st), {});
- };
- }
- function Xs(e, M) {
- return function(K, st) {
- var ut;
- if (K === E && st === E)
- return M;
- if (K !== E && (ut = K), st !== E) {
- if (ut === E)
- return st;
- typeof K == "string" || typeof st == "string" ? (K = di(K), st = di(st)) : (K = gc(K), st = gc(st)), ut = e(K, st);
- }
- return ut;
- };
- }
- function Ta(e) {
- return tr(function(M) {
- return M = Ee(M, ui(qt())), ae(function(K) {
- var st = this;
- return e(M, function(ut) {
- return pi(ut, st, K);
- });
- });
- });
- }
- function Gs(e, M) {
- M = M === E ? " " : di(M);
- var K = M.length;
- if (K < 2)
- return K ? ba(M, e) : M;
- var st = ba(M, Es(e / rn(M)));
- return en(M) ? kr(_i(st), 0, e).join("") : st.slice(0, e);
- }
- function Fg(e, M, K, st) {
- var ut = M & u, mt = Gn(e);
- function xt() {
- for (var bt = -1, Mt = arguments.length, It = -1, Rt = st.length, Bt = Tt(Rt + Mt), Yt = this && this !== Ue && this instanceof xt ? mt : e; ++It < Rt; )
- Bt[It] = st[It];
- for (; Mt--; )
- Bt[It++] = arguments[++bt];
- return pi(Yt, ut ? K : this, Bt);
- }
- return xt;
- }
- function Lc(e) {
- return function(M, K, st) {
- return st && typeof st != "number" && ri(M, K, st) && (K = st = E), M = rr(M), K === E ? (K = M, M = 0) : K = rr(K), st = st === E ? M < K ? 1 : -1 : rr(st), Og(M, K, st, e);
- };
- }
- function Hs(e) {
- return function(M, K) {
- return typeof M == "string" && typeof K == "string" || (M = Ai(M), K = Ai(K)), e(M, K);
- };
- }
- function _c(e, M, K, st, ut, mt, xt, bt, Mt, It) {
- var Rt = M & B, Bt = Rt ? xt : E, Yt = Rt ? E : xt, Ut = Rt ? mt : E, Qt = Rt ? E : mt;
- M |= Rt ? b : w, M &= ~(Rt ? w : b), M & O || (M &= ~(u | A));
- var oe = [
- e,
- M,
- ut,
- Ut,
- Bt,
- Qt,
- Yt,
- bt,
- Mt,
- It
- ], te = K.apply(E, oe);
- return Ra(e) && Hc(te, oe), te.placeholder = st, Fc(te, e, M);
- }
- function Pa(e) {
- var M = ze[e];
- return function(K, st) {
- if (K = Ai(K), st = st == null ? 0 : Ze(ne(st), 292), st && Fh(K)) {
- var ut = (xe(K) + "e").split("e"), mt = M(ut[0] + "e" + (+ut[1] + st));
- return ut = (xe(mt) + "e").split("e"), +(ut[0] + "e" + (+ut[1] - st));
- }
- return M(K);
- };
- }
- var Ug = on && 1 / xs(new on([, -0]))[1] == T ? function(e) {
- return new on(e);
- } : Ka;
- function Dc(e) {
- return function(M) {
- var K = Ke(M);
- return K == it ? na(M) : K == ht ? hf(M) : tf(M, e(M));
- };
- }
- function Qi(e, M, K, st, ut, mt, xt, bt) {
- var Mt = M & A;
- if (!Mt && typeof e != "function")
- throw new Si(I);
- var It = st ? st.length : 0;
- if (It || (M &= ~(b | w), st = ut = E), xt = xt === E ? xt : Ye(ne(xt), 0), bt = bt === E ? bt : ne(bt), It -= ut ? ut.length : 0, M & w) {
- var Rt = st, Bt = ut;
- st = ut = E;
- }
- var Yt = Mt ? E : La(e), Ut = [
- e,
- M,
- K,
- st,
- ut,
- Rt,
- Bt,
- mt,
- xt,
- bt
- ];
- if (Yt && am(Ut, Yt), e = Ut[0], M = Ut[1], K = Ut[2], st = Ut[3], ut = Ut[4], bt = Ut[9] = Ut[9] === E ? Mt ? 0 : e.length : Ye(Ut[9] - It, 0), !bt && M & (B | C) && (M &= ~(B | C)), !M || M == u)
- var Qt = Gg(e, M, K);
- else
- M == B || M == C ? Qt = Hg(e, M, bt) : (M == b || M == (u | b)) && !ut.length ? Qt = Fg(e, M, K, st) : Qt = Ys.apply(E, Ut);
- var oe = Yt ? dc : Hc;
- return Fc(oe(Qt, Ut), e, M);
- }
- function Ic(e, M, K, st) {
- return e === E || Ii(e, sn[K]) && !Se.call(st, K) ? M : e;
- }
- function Rc(e, M, K, st, ut, mt) {
- return Ie(e) && Ie(M) && (mt.set(M, e), Bs(e, M, E, Rc, mt), mt.delete(M)), e;
- }
- function Vg(e) {
- return Un(e) ? E : e;
- }
- function Nc(e, M, K, st, ut, mt) {
- var xt = K & v, bt = e.length, Mt = M.length;
- if (bt != Mt && !(xt && Mt > bt))
- return !1;
- var It = mt.get(e), Rt = mt.get(M);
- if (It && Rt)
- return It == M && Rt == e;
- var Bt = -1, Yt = !0, Ut = K & d ? new jr() : E;
- for (mt.set(e, M), mt.set(M, e); ++Bt < bt; ) {
- var Qt = e[Bt], oe = M[Bt];
- if (st)
- var te = xt ? st(oe, Qt, Bt, M, e, mt) : st(Qt, oe, Bt, e, M, mt);
- if (te !== E) {
- if (te)
- continue;
- Yt = !1;
- break;
- }
- if (Ut) {
- if (!qo(M, function(he, pe) {
- if (!_n(Ut, pe) && (Qt === he || ut(Qt, he, K, st, mt)))
- return Ut.push(pe);
- })) {
- Yt = !1;
- break;
- }
- } else if (!(Qt === oe || ut(Qt, oe, K, st, mt))) {
- Yt = !1;
- break;
- }
- }
- return mt.delete(e), mt.delete(M), Yt;
- }
- function $g(e, M, K, st, ut, mt, xt) {
- switch (K) {
- case yt:
- if (e.byteLength != M.byteLength || e.byteOffset != M.byteOffset)
- return !1;
- e = e.buffer, M = M.buffer;
- case pt:
- return !(e.byteLength != M.byteLength || !mt(new ks(e), new ks(M)));
- case Q:
- case k:
- case et:
- return Ii(+e, +M);
- case z:
- return e.name == M.name && e.message == M.message;
- case dt:
- case at:
- return e == M + "";
- case it:
- var bt = na;
- case ht:
- var Mt = st & v;
- if (bt || (bt = xs), e.size != M.size && !Mt)
- return !1;
- var It = xt.get(e);
- if (It)
- return It == M;
- st |= d, xt.set(e, M);
- var Rt = Nc(bt(e), bt(M), st, ut, mt, xt);
- return xt.delete(e), Rt;
- case J:
- if (Bn)
- return Bn.call(e) == Bn.call(M);
- }
- return !1;
- }
- function Zg(e, M, K, st, ut, mt) {
- var xt = K & v, bt = Ea(e), Mt = bt.length, It = Ea(M), Rt = It.length;
- if (Mt != Rt && !xt)
- return !1;
- for (var Bt = Mt; Bt--; ) {
- var Yt = bt[Bt];
- if (!(xt ? Yt in M : Se.call(M, Yt)))
- return !1;
- }
- var Ut = mt.get(e), Qt = mt.get(M);
- if (Ut && Qt)
- return Ut == M && Qt == e;
- var oe = !0;
- mt.set(e, M), mt.set(M, e);
- for (var te = xt; ++Bt < Mt; ) {
- Yt = bt[Bt];
- var he = e[Yt], pe = M[Yt];
- if (st)
- var gi = xt ? st(pe, he, Yt, M, e, mt) : st(he, pe, Yt, e, M, mt);
- if (!(gi === E ? he === pe || ut(he, pe, K, st, mt) : gi)) {
- oe = !1;
- break;
- }
- te || (te = Yt == "constructor");
- }
- if (oe && !te) {
- var ni = e.constructor, mi = M.constructor;
- ni != mi && "constructor" in e && "constructor" in M && !(typeof ni == "function" && ni instanceof ni && typeof mi == "function" && mi instanceof mi) && (oe = !1);
- }
- return mt.delete(e), mt.delete(M), oe;
- }
- function tr(e) {
- return Ba(Xc(e, E, Jc), e + "");
- }
- function Ea(e) {
- return ic(e, He, Da);
- }
- function Oa(e) {
- return ic(e, ai, Bc);
- }
- var La = Ls ? function(e) {
- return Ls.get(e);
- } : Ka;
- function Fs(e) {
- for (var M = e.name + "", K = an[M], st = Se.call(an, M) ? K.length : 0; st--; ) {
- var ut = K[st], mt = ut.func;
- if (mt == null || mt == e)
- return ut.name;
- }
- return M;
- }
- function pn(e) {
- var M = Se.call(ft, "placeholder") ? ft : e;
- return M.placeholder;
- }
- function qt() {
- var e = ft.iteratee || $a;
- return e = e === $a ? sc : e, arguments.length ? e(arguments[0], arguments[1]) : e;
- }
- function Us(e, M) {
- var K = e.__data__;
- return rm(M) ? K[typeof M == "string" ? "string" : "hash"] : K.map;
- }
- function _a(e) {
- for (var M = He(e), K = M.length; K--; ) {
- var st = M[K], ut = e[st];
- M[K] = [st, ut, zc(ut)];
- }
- return M;
- }
- function Yr(e, M) {
- var K = of(e, M);
- return nc(K) ? K : E;
- }
- function Kg(e) {
- var M = Se.call(e, Nr), K = e[Nr];
- try {
- e[Nr] = E;
- var st = !0;
- } catch {
- }
- var ut = Ms.call(e);
- return st && (M ? e[Nr] = K : delete e[Nr]), ut;
- }
- var Da = oa ? function(e) {
- return e == null ? [] : (e = Ce(e), vr(oa(e), function(M) {
- return Gh.call(e, M);
- }));
- } : Ja, Bc = oa ? function(e) {
- for (var M = []; e; )
- xr(M, Da(e)), e = As(e);
- return M;
- } : Ja, Ke = ii;
- (aa && Ke(new aa(new ArrayBuffer(1))) != yt || In && Ke(new In()) != it || la && Ke(la.resolve()) != ct || on && Ke(new on()) != ht || Rn && Ke(new Rn()) != ot) && (Ke = function(e) {
- var M = ii(e), K = M == rt ? e.constructor : E, st = K ? Xr(K) : "";
- if (st)
- switch (st) {
- case _f:
- return yt;
- case Df:
- return it;
- case If:
- return ct;
- case Rf:
- return ht;
- case Nf:
- return ot;
- }
- return M;
- });
- function Jg(e, M, K) {
- for (var st = -1, ut = K.length; ++st < ut; ) {
- var mt = K[st], xt = mt.size;
- switch (mt.type) {
- case "drop":
- e += xt;
- break;
- case "dropRight":
- M -= xt;
- break;
- case "take":
- M = Ze(M, e + xt);
- break;
- case "takeRight":
- e = Ye(e, M - xt);
- break;
- }
- }
- return { start: e, end: M };
- }
- function qg(e) {
- var M = e.match(Dr);
- return M ? M[1].split(Yi) : [];
- }
- function jc(e, M, K) {
- M = Cr(M, e);
- for (var st = -1, ut = M.length, mt = !1; ++st < ut; ) {
- var xt = Hi(M[st]);
- if (!(mt = e != null && K(e, xt)))
- break;
- e = e[xt];
- }
- return mt || ++st != ut ? mt : (ut = e == null ? 0 : e.length, !!ut && Qs(ut) && er(xt, ut) && (ie(e) || Gr(e)));
- }
- function Qg(e) {
- var M = e.length, K = new e.constructor(M);
- return M && typeof e[0] == "string" && Se.call(e, "index") && (K.index = e.index, K.input = e.input), K;
- }
- function Wc(e) {
- return typeof e.constructor == "function" && !Hn(e) ? ln(As(e)) : {};
- }
- function tm(e, M, K) {
- var st = e.constructor;
- switch (M) {
- case pt:
- return Aa(e);
- case Q:
- case k:
- return new st(+e);
- case yt:
- return Bg(e, K);
- case vt:
- case Ct:
- case Pt:
- case At:
- case St:
- case Dt:
- case Lt:
- case Nt:
- case Et:
- return Sc(e, K);
- case it:
- return new st();
- case et:
- case at:
- return new st(e);
- case dt:
- return jg(e);
- case ht:
- return new st();
- case J:
- return Wg(e);
- }
- }
- function em(e, M) {
- var K = M.length;
- if (!K)
- return e;
- var st = K - 1;
- return M[st] = (K > 1 ? "& " : "") + M[st], M = M.join(K > 2 ? ", " : " "), e.replace(Xo, `{
- /* [wrapped with ` + M + `] */
- `);
- }
- function im(e) {
- return ie(e) || Gr(e) || !!(Hh && e && e[Hh]);
- }
- function er(e, M) {
- var K = typeof e;
- return M = M ?? _, !!M && (K == "number" || K != "symbol" && dd.test(e)) && e > -1 && e % 1 == 0 && e < M;
- }
- function ri(e, M, K) {
- if (!Ie(K))
- return !1;
- var st = typeof M;
- return (st == "number" ? oi(K) && er(M, K.length) : st == "string" && M in K) ? Ii(K[M], e) : !1;
- }
- function Ia(e, M) {
- if (ie(e))
- return !1;
- var K = typeof e;
- return K == "number" || K == "symbol" || K == "boolean" || e == null || fi(e) ? !0 : Pn.test(e) || !Tn.test(e) || M != null && e in Ce(M);
- }
- function rm(e) {
- var M = typeof e;
- return M == "string" || M == "number" || M == "symbol" || M == "boolean" ? e !== "__proto__" : e === null;
- }
- function Ra(e) {
- var M = Fs(e), K = ft[M];
- if (typeof K != "function" || !(M in ce.prototype))
- return !1;
- if (e === K)
- return !0;
- var st = La(K);
- return !!st && e === st[0];
- }
- function nm(e) {
- return !!zh && zh in e;
- }
- var sm = Ss ? ir : qa;
- function Hn(e) {
- var M = e && e.constructor, K = typeof M == "function" && M.prototype || sn;
- return e === K;
- }
- function zc(e) {
- return e === e && !Ie(e);
- }
- function Yc(e, M) {
- return function(K) {
- return K == null ? !1 : K[e] === M && (M !== E || e in Ce(K));
- };
- }
- function om(e) {
- var M = Js(e, function(st) {
- return K.size === U && K.clear(), st;
- }), K = M.cache;
- return M;
- }
- function am(e, M) {
- var K = e[1], st = M[1], ut = K | st, mt = ut < (u | A | x), xt = st == x && K == B || st == x && K == a && e[7].length <= M[8] || st == (x | a) && M[7].length <= M[8] && K == B;
- if (!(mt || xt))
- return e;
- st & u && (e[2] = M[2], ut |= K & u ? 0 : O);
- var bt = M[3];
- if (bt) {
- var Mt = e[3];
- e[3] = Mt ? Mc(Mt, bt, M[4]) : bt, e[4] = Mt ? br(e[3], F) : M[4];
- }
- return bt = M[5], bt && (Mt = e[5], e[5] = Mt ? Cc(Mt, bt, M[6]) : bt, e[6] = Mt ? br(e[5], F) : M[6]), bt = M[7], bt && (e[7] = bt), st & x && (e[8] = e[8] == null ? M[8] : Ze(e[8], M[8])), e[9] == null && (e[9] = M[9]), e[0] = M[0], e[1] = ut, e;
- }
- function lm(e) {
- var M = [];
- if (e != null)
- for (var K in Ce(e))
- M.push(K);
- return M;
- }
- function hm(e) {
- return Ms.call(e);
- }
- function Xc(e, M, K) {
- return M = Ye(M === E ? e.length - 1 : M, 0), function() {
- for (var st = arguments, ut = -1, mt = Ye(st.length - M, 0), xt = Tt(mt); ++ut < mt; )
- xt[ut] = st[M + ut];
- ut = -1;
- for (var bt = Tt(M + 1); ++ut < M; )
- bt[ut] = st[ut];
- return bt[M] = K(xt), pi(e, this, bt);
- };
- }
- function Gc(e, M) {
- return M.length < 2 ? e : zr(e, Ci(M, 0, -1));
- }
- function cm(e, M) {
- for (var K = e.length, st = Ze(M.length, K), ut = si(e); st--; ) {
- var mt = M[st];
- e[st] = er(mt, K) ? ut[mt] : E;
- }
- return e;
- }
- function Na(e, M) {
- if (!(M === "constructor" && typeof e[M] == "function") && M != "__proto__")
- return e[M];
- }
- var Hc = Uc(dc), Fn = kf || function(e, M) {
- return Ue.setTimeout(e, M);
- }, Ba = Uc(Dg);
- function Fc(e, M, K) {
- var st = M + "";
- return Ba(e, em(st, pm(qg(st), K)));
- }
- function Uc(e) {
- var M = 0, K = 0;
- return function() {
- var st = Ef(), ut = o - (st - K);
- if (K = st, ut > 0) {
- if (++M >= h)
- return arguments[0];
- } else
- M = 0;
- return e.apply(E, arguments);
- };
- }
- function Vs(e, M) {
- var K = -1, st = e.length, ut = st - 1;
- for (M = M === E ? st : M; ++K < M; ) {
- var mt = xa(K, ut), xt = e[mt];
- e[mt] = e[K], e[K] = xt;
- }
- return e.length = M, e;
- }
- var Vc = om(function(e) {
- var M = [];
- return e.charCodeAt(0) === 46 && M.push(""), e.replace($e, function(K, st, ut, mt) {
- M.push(ut ? mt.replace(Ir, "$1") : st || K);
- }), M;
- });
- function Hi(e) {
- if (typeof e == "string" || fi(e))
- return e;
- var M = e + "";
- return M == "0" && 1 / e == -T ? "-0" : M;
- }
- function Xr(e) {
- if (e != null) {
- try {
- return ws.call(e);
- } catch {
- }
- try {
- return e + "";
- } catch {
- }
- }
- return "";
- }
- function pm(e, M) {
- return bi(m, function(K) {
- var st = "_." + K[0];
- M & K[1] && !ys(e, st) && e.push(st);
- }), e.sort();
- }
- function $c(e) {
- if (e instanceof ce)
- return e.clone();
- var M = new wi(e.__wrapped__, e.__chain__);
- return M.__actions__ = si(e.__actions__), M.__index__ = e.__index__, M.__values__ = e.__values__, M;
- }
- function um(e, M, K) {
- (K ? ri(e, M, K) : M === E) ? M = 1 : M = Ye(ne(M), 0);
- var st = e == null ? 0 : e.length;
- if (!st || M < 1)
- return [];
- for (var ut = 0, mt = 0, xt = Tt(Es(st / M)); ut < st; )
- xt[mt++] = Ci(e, ut, ut += M);
- return xt;
- }
- function dm(e) {
- for (var M = -1, K = e == null ? 0 : e.length, st = 0, ut = []; ++M < K; ) {
- var mt = e[M];
- mt && (ut[st++] = mt);
- }
- return ut;
- }
- function fm() {
- var e = arguments.length;
- if (!e)
- return [];
- for (var M = Tt(e - 1), K = arguments[0], st = e; st--; )
- M[st - 1] = arguments[st];
- return xr(ie(K) ? si(K) : [K], Ve(M, 1));
- }
- var gm = ae(function(e, M) {
- return Be(e) ? Wn(e, Ve(M, 1, Be, !0)) : [];
- }), mm = ae(function(e, M) {
- var K = ki(M);
- return Be(K) && (K = E), Be(e) ? Wn(e, Ve(M, 1, Be, !0), qt(K, 2)) : [];
- }), ym = ae(function(e, M) {
- var K = ki(M);
- return Be(K) && (K = E), Be(e) ? Wn(e, Ve(M, 1, Be, !0), E, K) : [];
- });
- function vm(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (M = K || M === E ? 1 : ne(M), Ci(e, M < 0 ? 0 : M, st)) : [];
- }
- function xm(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (M = K || M === E ? 1 : ne(M), M = st - M, Ci(e, 0, M < 0 ? 0 : M)) : [];
- }
- function bm(e, M) {
- return e && e.length ? Ws(e, qt(M, 3), !0, !0) : [];
- }
- function Sm(e, M) {
- return e && e.length ? Ws(e, qt(M, 3), !0) : [];
- }
- function wm(e, M, K, st) {
- var ut = e == null ? 0 : e.length;
- return ut ? (K && typeof K != "number" && ri(e, M, K) && (K = 0, st = ut), fg(e, M, K, st)) : [];
- }
- function Zc(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = K == null ? 0 : ne(K);
- return ut < 0 && (ut = Ye(st + ut, 0)), vs(e, qt(M, 3), ut);
- }
- function Kc(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = st - 1;
- return K !== E && (ut = ne(K), ut = K < 0 ? Ye(st + ut, 0) : Ze(ut, st - 1)), vs(e, qt(M, 3), ut, !0);
- }
- function Jc(e) {
- var M = e == null ? 0 : e.length;
- return M ? Ve(e, 1) : [];
- }
- function Mm(e) {
- var M = e == null ? 0 : e.length;
- return M ? Ve(e, T) : [];
- }
- function Cm(e, M) {
- var K = e == null ? 0 : e.length;
- return K ? (M = M === E ? 1 : ne(M), Ve(e, M)) : [];
- }
- function km(e) {
- for (var M = -1, K = e == null ? 0 : e.length, st = {}; ++M < K; ) {
- var ut = e[M];
- st[ut[0]] = ut[1];
- }
- return st;
- }
- function qc(e) {
- return e && e.length ? e[0] : E;
- }
- function Am(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = K == null ? 0 : ne(K);
- return ut < 0 && (ut = Ye(st + ut, 0)), tn(e, M, ut);
- }
- function Tm(e) {
- var M = e == null ? 0 : e.length;
- return M ? Ci(e, 0, -1) : [];
- }
- var Pm = ae(function(e) {
- var M = Ee(e, Ca);
- return M.length && M[0] === e[0] ? fa(M) : [];
- }), Em = ae(function(e) {
- var M = ki(e), K = Ee(e, Ca);
- return M === ki(K) ? M = E : K.pop(), K.length && K[0] === e[0] ? fa(K, qt(M, 2)) : [];
- }), Om = ae(function(e) {
- var M = ki(e), K = Ee(e, Ca);
- return M = typeof M == "function" ? M : E, M && K.pop(), K.length && K[0] === e[0] ? fa(K, E, M) : [];
- });
- function Lm(e, M) {
- return e == null ? "" : Tf.call(e, M);
- }
- function ki(e) {
- var M = e == null ? 0 : e.length;
- return M ? e[M - 1] : E;
- }
- function _m(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = st;
- return K !== E && (ut = ne(K), ut = ut < 0 ? Ye(st + ut, 0) : Ze(ut, st - 1)), M === M ? pf(e, M, ut) : vs(e, _h, ut, !0);
- }
- function Dm(e, M) {
- return e && e.length ? hc(e, ne(M)) : E;
- }
- var Im = ae(Qc);
- function Qc(e, M) {
- return e && e.length && M && M.length ? va(e, M) : e;
- }
- function Rm(e, M, K) {
- return e && e.length && M && M.length ? va(e, M, qt(K, 2)) : e;
- }
- function Nm(e, M, K) {
- return e && e.length && M && M.length ? va(e, M, E, K) : e;
- }
- var Bm = tr(function(e, M) {
- var K = e == null ? 0 : e.length, st = ca(e, M);
- return uc(e, Ee(M, function(ut) {
- return er(ut, K) ? +ut : ut;
- }).sort(wc)), st;
- });
- function jm(e, M) {
- var K = [];
- if (!(e && e.length))
- return K;
- var st = -1, ut = [], mt = e.length;
- for (M = qt(M, 3); ++st < mt; ) {
- var xt = e[st];
- M(xt, st, e) && (K.push(xt), ut.push(st));
- }
- return uc(e, ut), K;
- }
- function ja(e) {
- return e == null ? e : Lf.call(e);
- }
- function Wm(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (K && typeof K != "number" && ri(e, M, K) ? (M = 0, K = st) : (M = M == null ? 0 : ne(M), K = K === E ? st : ne(K)), Ci(e, M, K)) : [];
- }
- function zm(e, M) {
- return js(e, M);
- }
- function Ym(e, M, K) {
- return Sa(e, M, qt(K, 2));
- }
- function Xm(e, M) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var st = js(e, M);
- if (st < K && Ii(e[st], M))
- return st;
- }
- return -1;
- }
- function Gm(e, M) {
- return js(e, M, !0);
- }
- function Hm(e, M, K) {
- return Sa(e, M, qt(K, 2), !0);
- }
- function Fm(e, M) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var st = js(e, M, !0) - 1;
- if (Ii(e[st], M))
- return st;
- }
- return -1;
- }
- function Um(e) {
- return e && e.length ? fc(e) : [];
- }
- function Vm(e, M) {
- return e && e.length ? fc(e, qt(M, 2)) : [];
- }
- function $m(e) {
- var M = e == null ? 0 : e.length;
- return M ? Ci(e, 1, M) : [];
- }
- function Zm(e, M, K) {
- return e && e.length ? (M = K || M === E ? 1 : ne(M), Ci(e, 0, M < 0 ? 0 : M)) : [];
- }
- function Km(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (M = K || M === E ? 1 : ne(M), M = st - M, Ci(e, M < 0 ? 0 : M, st)) : [];
- }
- function Jm(e, M) {
- return e && e.length ? Ws(e, qt(M, 3), !1, !0) : [];
- }
- function qm(e, M) {
- return e && e.length ? Ws(e, qt(M, 3)) : [];
- }
- var Qm = ae(function(e) {
- return Mr(Ve(e, 1, Be, !0));
- }), ty = ae(function(e) {
- var M = ki(e);
- return Be(M) && (M = E), Mr(Ve(e, 1, Be, !0), qt(M, 2));
- }), ey = ae(function(e) {
- var M = ki(e);
- return M = typeof M == "function" ? M : E, Mr(Ve(e, 1, Be, !0), E, M);
- });
- function iy(e) {
- return e && e.length ? Mr(e) : [];
- }
- function ry(e, M) {
- return e && e.length ? Mr(e, qt(M, 2)) : [];
- }
- function ny(e, M) {
- return M = typeof M == "function" ? M : E, e && e.length ? Mr(e, E, M) : [];
- }
- function Wa(e) {
- if (!(e && e.length))
- return [];
- var M = 0;
- return e = vr(e, function(K) {
- if (Be(K))
- return M = Ye(K.length, M), !0;
- }), ia(M, function(K) {
- return Ee(e, Qo(K));
- });
- }
- function tp(e, M) {
- if (!(e && e.length))
- return [];
- var K = Wa(e);
- return M == null ? K : Ee(K, function(st) {
- return pi(M, E, st);
- });
- }
- var sy = ae(function(e, M) {
- return Be(e) ? Wn(e, M) : [];
- }), oy = ae(function(e) {
- return Ma(vr(e, Be));
- }), ay = ae(function(e) {
- var M = ki(e);
- return Be(M) && (M = E), Ma(vr(e, Be), qt(M, 2));
- }), ly = ae(function(e) {
- var M = ki(e);
- return M = typeof M == "function" ? M : E, Ma(vr(e, Be), E, M);
- }), hy = ae(Wa);
- function cy(e, M) {
- return vc(e || [], M || [], jn);
- }
- function py(e, M) {
- return vc(e || [], M || [], Xn);
- }
- var uy = ae(function(e) {
- var M = e.length, K = M > 1 ? e[M - 1] : E;
- return K = typeof K == "function" ? (e.pop(), K) : E, tp(e, K);
- });
- function ep(e) {
- var M = ft(e);
- return M.__chain__ = !0, M;
- }
- function dy(e, M) {
- return M(e), e;
- }
- function $s(e, M) {
- return M(e);
- }
- var fy = tr(function(e) {
- var M = e.length, K = M ? e[0] : 0, st = this.__wrapped__, ut = function(mt) {
- return ca(mt, e);
- };
- return M > 1 || this.__actions__.length || !(st instanceof ce) || !er(K) ? this.thru(ut) : (st = st.slice(K, +K + (M ? 1 : 0)), st.__actions__.push({
- func: $s,
- args: [ut],
- thisArg: E
- }), new wi(st, this.__chain__).thru(function(mt) {
- return M && !mt.length && mt.push(E), mt;
- }));
- });
- function gy() {
- return ep(this);
- }
- function my() {
- return new wi(this.value(), this.__chain__);
- }
- function yy() {
- this.__values__ === E && (this.__values__ = gp(this.value()));
- var e = this.__index__ >= this.__values__.length, M = e ? E : this.__values__[this.__index__++];
- return { done: e, value: M };
- }
- function vy() {
- return this;
- }
- function xy(e) {
- for (var M, K = this; K instanceof Ds; ) {
- var st = $c(K);
- st.__index__ = 0, st.__values__ = E, M ? ut.__wrapped__ = st : M = st;
- var ut = st;
- K = K.__wrapped__;
- }
- return ut.__wrapped__ = e, M;
- }
- function by() {
- var e = this.__wrapped__;
- if (e instanceof ce) {
- var M = e;
- return this.__actions__.length && (M = new ce(this)), M = M.reverse(), M.__actions__.push({
- func: $s,
- args: [ja],
- thisArg: E
- }), new wi(M, this.__chain__);
- }
- return this.thru(ja);
- }
- function Sy() {
- return yc(this.__wrapped__, this.__actions__);
- }
- var wy = zs(function(e, M, K) {
- Se.call(e, K) ? ++e[K] : qi(e, K, 1);
- });
- function My(e, M, K) {
- var st = ie(e) ? Oh : dg;
- return K && ri(e, M, K) && (M = E), st(e, qt(M, 3));
- }
- function Cy(e, M) {
- var K = ie(e) ? vr : tc;
- return K(e, qt(M, 3));
- }
- var ky = Pc(Zc), Ay = Pc(Kc);
- function Ty(e, M) {
- return Ve(Zs(e, M), 1);
- }
- function Py(e, M) {
- return Ve(Zs(e, M), T);
- }
- function Ey(e, M, K) {
- return K = K === E ? 1 : ne(K), Ve(Zs(e, M), K);
- }
- function ip(e, M) {
- var K = ie(e) ? bi : wr;
- return K(e, qt(M, 3));
- }
- function rp(e, M) {
- var K = ie(e) ? Vd : Qh;
- return K(e, qt(M, 3));
- }
- var Oy = zs(function(e, M, K) {
- Se.call(e, K) ? e[K].push(M) : qi(e, K, [M]);
- });
- function Ly(e, M, K, st) {
- e = oi(e) ? e : dn(e), K = K && !st ? ne(K) : 0;
- var ut = e.length;
- return K < 0 && (K = Ye(ut + K, 0)), to(e) ? K <= ut && e.indexOf(M, K) > -1 : !!ut && tn(e, M, K) > -1;
- }
- var _y = ae(function(e, M, K) {
- var st = -1, ut = typeof M == "function", mt = oi(e) ? Tt(e.length) : [];
- return wr(e, function(xt) {
- mt[++st] = ut ? pi(M, xt, K) : zn(xt, M, K);
- }), mt;
- }), Dy = zs(function(e, M, K) {
- qi(e, K, M);
- });
- function Zs(e, M) {
- var K = ie(e) ? Ee : oc;
- return K(e, qt(M, 3));
- }
- function Iy(e, M, K, st) {
- return e == null ? [] : (ie(M) || (M = M == null ? [] : [M]), K = st ? E : K, ie(K) || (K = K == null ? [] : [K]), cc(e, M, K));
- }
- var Ry = zs(function(e, M, K) {
- e[K ? 0 : 1].push(M);
- }, function() {
- return [[], []];
- });
- function Ny(e, M, K) {
- var st = ie(e) ? Jo : Ih, ut = arguments.length < 3;
- return st(e, qt(M, 4), K, ut, wr);
- }
- function By(e, M, K) {
- var st = ie(e) ? $d : Ih, ut = arguments.length < 3;
- return st(e, qt(M, 4), K, ut, Qh);
- }
- function jy(e, M) {
- var K = ie(e) ? vr : tc;
- return K(e, qs(qt(M, 3)));
- }
- function Wy(e) {
- var M = ie(e) ? Zh : Lg;
- return M(e);
- }
- function zy(e, M, K) {
- (K ? ri(e, M, K) : M === E) ? M = 1 : M = ne(M);
- var st = ie(e) ? lg : _g;
- return st(e, M);
- }
- function Yy(e) {
- var M = ie(e) ? hg : Ig;
- return M(e);
- }
- function Xy(e) {
- if (e == null)
- return 0;
- if (oi(e))
- return to(e) ? rn(e) : e.length;
- var M = Ke(e);
- return M == it || M == ht ? e.size : ma(e).length;
- }
- function Gy(e, M, K) {
- var st = ie(e) ? qo : Rg;
- return K && ri(e, M, K) && (M = E), st(e, qt(M, 3));
- }
- var Hy = ae(function(e, M) {
- if (e == null)
- return [];
- var K = M.length;
- return K > 1 && ri(e, M[0], M[1]) ? M = [] : K > 2 && ri(M[0], M[1], M[2]) && (M = [M[0]]), cc(e, Ve(M, 1), []);
- }), Ks = Cf || function() {
- return Ue.Date.now();
- };
- function Fy(e, M) {
- if (typeof M != "function")
- throw new Si(I);
- return e = ne(e), function() {
- if (--e < 1)
- return M.apply(this, arguments);
- };
- }
- function np(e, M, K) {
- return M = K ? E : M, M = e && M == null ? e.length : M, Qi(e, x, E, E, E, E, M);
- }
- function sp(e, M) {
- var K;
- if (typeof M != "function")
- throw new Si(I);
- return e = ne(e), function() {
- return --e > 0 && (K = M.apply(this, arguments)), e <= 1 && (M = E), K;
- };
- }
- var za = ae(function(e, M, K) {
- var st = u;
- if (K.length) {
- var ut = br(K, pn(za));
- st |= b;
- }
- return Qi(e, st, M, K, ut);
- }), op = ae(function(e, M, K) {
- var st = u | A;
- if (K.length) {
- var ut = br(K, pn(op));
- st |= b;
- }
- return Qi(M, st, e, K, ut);
- });
- function ap(e, M, K) {
- M = K ? E : M;
- var st = Qi(e, B, E, E, E, E, E, M);
- return st.placeholder = ap.placeholder, st;
- }
- function lp(e, M, K) {
- M = K ? E : M;
- var st = Qi(e, C, E, E, E, E, E, M);
- return st.placeholder = lp.placeholder, st;
- }
- function hp(e, M, K) {
- var st, ut, mt, xt, bt, Mt, It = 0, Rt = !1, Bt = !1, Yt = !0;
- if (typeof e != "function")
- throw new Si(I);
- M = Ai(M) || 0, Ie(K) && (Rt = !!K.leading, Bt = "maxWait" in K, mt = Bt ? Ye(Ai(K.maxWait) || 0, M) : mt, Yt = "trailing" in K ? !!K.trailing : Yt);
- function Ut(je) {
- var Ri = st, nr = ut;
- return st = ut = E, It = je, xt = e.apply(nr, Ri), xt;
- }
- function Qt(je) {
- return It = je, bt = Fn(he, M), Rt ? Ut(je) : xt;
- }
- function oe(je) {
- var Ri = je - Mt, nr = je - It, Pp = M - Ri;
- return Bt ? Ze(Pp, mt - nr) : Pp;
- }
- function te(je) {
- var Ri = je - Mt, nr = je - It;
- return Mt === E || Ri >= M || Ri < 0 || Bt && nr >= mt;
- }
- function he() {
- var je = Ks();
- if (te(je))
- return pe(je);
- bt = Fn(he, oe(je));
- }
- function pe(je) {
- return bt = E, Yt && st ? Ut(je) : (st = ut = E, xt);
- }
- function gi() {
- bt !== E && xc(bt), It = 0, st = Mt = ut = bt = E;
- }
- function ni() {
- return bt === E ? xt : pe(Ks());
- }
- function mi() {
- var je = Ks(), Ri = te(je);
- if (st = arguments, ut = this, Mt = je, Ri) {
- if (bt === E)
- return Qt(Mt);
- if (Bt)
- return xc(bt), bt = Fn(he, M), Ut(Mt);
- }
- return bt === E && (bt = Fn(he, M)), xt;
- }
- return mi.cancel = gi, mi.flush = ni, mi;
- }
- var Uy = ae(function(e, M) {
- return qh(e, 1, M);
- }), Vy = ae(function(e, M, K) {
- return qh(e, Ai(M) || 0, K);
- });
- function $y(e) {
- return Qi(e, c);
- }
- function Js(e, M) {
- if (typeof e != "function" || M != null && typeof M != "function")
- throw new Si(I);
- var K = function() {
- var st = arguments, ut = M ? M.apply(this, st) : st[0], mt = K.cache;
- if (mt.has(ut))
- return mt.get(ut);
- var xt = e.apply(this, st);
- return K.cache = mt.set(ut, xt) || mt, xt;
- };
- return K.cache = new (Js.Cache || Ji)(), K;
- }
- Js.Cache = Ji;
- function qs(e) {
- if (typeof e != "function")
- throw new Si(I);
- return function() {
- var M = arguments;
- switch (M.length) {
- case 0:
- return !e.call(this);
- case 1:
- return !e.call(this, M[0]);
- case 2:
- return !e.call(this, M[0], M[1]);
- case 3:
- return !e.call(this, M[0], M[1], M[2]);
- }
- return !e.apply(this, M);
- };
- }
- function Zy(e) {
- return sp(2, e);
- }
- var Ky = Ng(function(e, M) {
- M = M.length == 1 && ie(M[0]) ? Ee(M[0], ui(qt())) : Ee(Ve(M, 1), ui(qt()));
- var K = M.length;
- return ae(function(st) {
- for (var ut = -1, mt = Ze(st.length, K); ++ut < mt; )
- st[ut] = M[ut].call(this, st[ut]);
- return pi(e, this, st);
- });
- }), Ya = ae(function(e, M) {
- var K = br(M, pn(Ya));
- return Qi(e, b, E, M, K);
- }), cp = ae(function(e, M) {
- var K = br(M, pn(cp));
- return Qi(e, w, E, M, K);
- }), Jy = tr(function(e, M) {
- return Qi(e, a, E, E, E, M);
- });
- function qy(e, M) {
- if (typeof e != "function")
- throw new Si(I);
- return M = M === E ? M : ne(M), ae(e, M);
- }
- function Qy(e, M) {
- if (typeof e != "function")
- throw new Si(I);
- return M = M == null ? 0 : Ye(ne(M), 0), ae(function(K) {
- var st = K[M], ut = kr(K, 0, M);
- return st && xr(ut, st), pi(e, this, ut);
- });
- }
- function tv(e, M, K) {
- var st = !0, ut = !0;
- if (typeof e != "function")
- throw new Si(I);
- return Ie(K) && (st = "leading" in K ? !!K.leading : st, ut = "trailing" in K ? !!K.trailing : ut), hp(e, M, {
- leading: st,
- maxWait: M,
- trailing: ut
- });
- }
- function ev(e) {
- return np(e, 1);
- }
- function iv(e, M) {
- return Ya(ka(M), e);
- }
- function rv() {
- if (!arguments.length)
- return [];
- var e = arguments[0];
- return ie(e) ? e : [e];
- }
- function nv(e) {
- return Mi(e, S);
- }
- function sv(e, M) {
- return M = typeof M == "function" ? M : E, Mi(e, S, M);
- }
- function ov(e) {
- return Mi(e, N | S);
- }
- function av(e, M) {
- return M = typeof M == "function" ? M : E, Mi(e, N | S, M);
- }
- function lv(e, M) {
- return M == null || Jh(e, M, He(M));
- }
- function Ii(e, M) {
- return e === M || e !== e && M !== M;
- }
- var hv = Hs(da), cv = Hs(function(e, M) {
- return e >= M;
- }), Gr = rc(function() {
- return arguments;
- }()) ? rc : function(e) {
- return Ne(e) && Se.call(e, "callee") && !Gh.call(e, "callee");
- }, ie = Tt.isArray, pv = Ch ? ui(Ch) : xg;
- function oi(e) {
- return e != null && Qs(e.length) && !ir(e);
- }
- function Be(e) {
- return Ne(e) && oi(e);
- }
- function uv(e) {
- return e === !0 || e === !1 || Ne(e) && ii(e) == Q;
- }
- var Ar = Af || qa, dv = kh ? ui(kh) : bg;
- function fv(e) {
- return Ne(e) && e.nodeType === 1 && !Un(e);
- }
- function gv(e) {
- if (e == null)
- return !0;
- if (oi(e) && (ie(e) || typeof e == "string" || typeof e.splice == "function" || Ar(e) || un(e) || Gr(e)))
- return !e.length;
- var M = Ke(e);
- if (M == it || M == ht)
- return !e.size;
- if (Hn(e))
- return !ma(e).length;
- for (var K in e)
- if (Se.call(e, K))
- return !1;
- return !0;
- }
- function mv(e, M) {
- return Yn(e, M);
- }
- function yv(e, M, K) {
- K = typeof K == "function" ? K : E;
- var st = K ? K(e, M) : E;
- return st === E ? Yn(e, M, E, K) : !!st;
- }
- function Xa(e) {
- if (!Ne(e))
- return !1;
- var M = ii(e);
- return M == z || M == G || typeof e.message == "string" && typeof e.name == "string" && !Un(e);
- }
- function vv(e) {
- return typeof e == "number" && Fh(e);
- }
- function ir(e) {
- if (!Ie(e))
- return !1;
- var M = ii(e);
- return M == $ || M == q || M == V || M == gt;
- }
- function pp(e) {
- return typeof e == "number" && e == ne(e);
- }
- function Qs(e) {
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= _;
- }
- function Ie(e) {
- var M = typeof e;
- return e != null && (M == "object" || M == "function");
- }
- function Ne(e) {
- return e != null && typeof e == "object";
- }
- var up = Ah ? ui(Ah) : wg;
- function xv(e, M) {
- return e === M || ga(e, M, _a(M));
- }
- function bv(e, M, K) {
- return K = typeof K == "function" ? K : E, ga(e, M, _a(M), K);
- }
- function Sv(e) {
- return dp(e) && e != +e;
- }
- function wv(e) {
- if (sm(e))
- throw new ee(j);
- return nc(e);
- }
- function Mv(e) {
- return e === null;
- }
- function Cv(e) {
- return e == null;
- }
- function dp(e) {
- return typeof e == "number" || Ne(e) && ii(e) == et;
- }
- function Un(e) {
- if (!Ne(e) || ii(e) != rt)
- return !1;
- var M = As(e);
- if (M === null)
- return !0;
- var K = Se.call(M, "constructor") && M.constructor;
- return typeof K == "function" && K instanceof K && ws.call(K) == bf;
- }
- var Ga = Th ? ui(Th) : Mg;
- function kv(e) {
- return pp(e) && e >= -_ && e <= _;
- }
- var fp = Ph ? ui(Ph) : Cg;
- function to(e) {
- return typeof e == "string" || !ie(e) && Ne(e) && ii(e) == at;
- }
- function fi(e) {
- return typeof e == "symbol" || Ne(e) && ii(e) == J;
- }
- var un = Eh ? ui(Eh) : kg;
- function Av(e) {
- return e === E;
- }
- function Tv(e) {
- return Ne(e) && Ke(e) == ot;
- }
- function Pv(e) {
- return Ne(e) && ii(e) == lt;
- }
- var Ev = Hs(ya), Ov = Hs(function(e, M) {
- return e <= M;
- });
- function gp(e) {
- if (!e)
- return [];
- if (oi(e))
- return to(e) ? _i(e) : si(e);
- if (Dn && e[Dn])
- return lf(e[Dn]());
- var M = Ke(e), K = M == it ? na : M == ht ? xs : dn;
- return K(e);
- }
- function rr(e) {
- if (!e)
- return e === 0 ? e : 0;
- if (e = Ai(e), e === T || e === -T) {
- var M = e < 0 ? -1 : 1;
- return M * D;
- }
- return e === e ? e : 0;
- }
- function ne(e) {
- var M = rr(e), K = M % 1;
- return M === M ? K ? M - K : M : 0;
- }
- function mp(e) {
- return e ? Wr(ne(e), 0, P) : 0;
- }
- function Ai(e) {
- if (typeof e == "number")
- return e;
- if (fi(e))
- return W;
- if (Ie(e)) {
- var M = typeof e.valueOf == "function" ? e.valueOf() : e;
- e = Ie(M) ? M + "" : M;
- }
- if (typeof e != "string")
- return e === 0 ? e : +e;
- e = Rh(e);
- var K = Re.test(e);
- return K || qr.test(e) ? Hd(e.slice(2), K ? 2 : 8) : ge.test(e) ? W : +e;
- }
- function yp(e) {
- return Gi(e, ai(e));
- }
- function Lv(e) {
- return e ? Wr(ne(e), -_, _) : e === 0 ? e : 0;
- }
- function xe(e) {
- return e == null ? "" : di(e);
- }
- var _v = hn(function(e, M) {
- if (Hn(M) || oi(M)) {
- Gi(M, He(M), e);
- return;
- }
- for (var K in M)
- Se.call(M, K) && jn(e, K, M[K]);
- }), vp = hn(function(e, M) {
- Gi(M, ai(M), e);
- }), eo = hn(function(e, M, K, st) {
- Gi(M, ai(M), e, st);
- }), Dv = hn(function(e, M, K, st) {
- Gi(M, He(M), e, st);
- }), Iv = tr(ca);
- function Rv(e, M) {
- var K = ln(e);
- return M == null ? K : Kh(K, M);
- }
- var Nv = ae(function(e, M) {
- e = Ce(e);
- var K = -1, st = M.length, ut = st > 2 ? M[2] : E;
- for (ut && ri(M[0], M[1], ut) && (st = 1); ++K < st; )
- for (var mt = M[K], xt = ai(mt), bt = -1, Mt = xt.length; ++bt < Mt; ) {
- var It = xt[bt], Rt = e[It];
- (Rt === E || Ii(Rt, sn[It]) && !Se.call(e, It)) && (e[It] = mt[It]);
- }
- return e;
- }), Bv = ae(function(e) {
- return e.push(E, Rc), pi(xp, E, e);
- });
- function jv(e, M) {
- return Lh(e, qt(M, 3), Xi);
- }
- function Wv(e, M) {
- return Lh(e, qt(M, 3), ua);
- }
- function zv(e, M) {
- return e == null ? e : pa(e, qt(M, 3), ai);
- }
- function Yv(e, M) {
- return e == null ? e : ec(e, qt(M, 3), ai);
- }
- function Xv(e, M) {
- return e && Xi(e, qt(M, 3));
- }
- function Gv(e, M) {
- return e && ua(e, qt(M, 3));
- }
- function Hv(e) {
- return e == null ? [] : Ns(e, He(e));
- }
- function Fv(e) {
- return e == null ? [] : Ns(e, ai(e));
- }
- function Ha(e, M, K) {
- var st = e == null ? E : zr(e, M);
- return st === E ? K : st;
- }
- function Uv(e, M) {
- return e != null && jc(e, M, gg);
- }
- function Fa(e, M) {
- return e != null && jc(e, M, mg);
- }
- var Vv = Oc(function(e, M, K) {
- M != null && typeof M.toString != "function" && (M = Ms.call(M)), e[M] = K;
- }, Va(li)), $v = Oc(function(e, M, K) {
- M != null && typeof M.toString != "function" && (M = Ms.call(M)), Se.call(e, M) ? e[M].push(K) : e[M] = [K];
- }, qt), Zv = ae(zn);
- function He(e) {
- return oi(e) ? $h(e) : ma(e);
- }
- function ai(e) {
- return oi(e) ? $h(e, !0) : Ag(e);
- }
- function Kv(e, M) {
- var K = {};
- return M = qt(M, 3), Xi(e, function(st, ut, mt) {
- qi(K, M(st, ut, mt), st);
- }), K;
- }
- function Jv(e, M) {
- var K = {};
- return M = qt(M, 3), Xi(e, function(st, ut, mt) {
- qi(K, ut, M(st, ut, mt));
- }), K;
- }
- var qv = hn(function(e, M, K) {
- Bs(e, M, K);
- }), xp = hn(function(e, M, K, st) {
- Bs(e, M, K, st);
- }), Qv = tr(function(e, M) {
- var K = {};
- if (e == null)
- return K;
- var st = !1;
- M = Ee(M, function(mt) {
- return mt = Cr(mt, e), st || (st = mt.length > 1), mt;
- }), Gi(e, Oa(e), K), st && (K = Mi(K, N | R | S, Vg));
- for (var ut = M.length; ut--; )
- wa(K, M[ut]);
- return K;
- });
- function tx(e, M) {
- return bp(e, qs(qt(M)));
- }
- var ex = tr(function(e, M) {
- return e == null ? {} : Pg(e, M);
- });
- function bp(e, M) {
- if (e == null)
- return {};
- var K = Ee(Oa(e), function(st) {
- return [st];
- });
- return M = qt(M), pc(e, K, function(st, ut) {
- return M(st, ut[0]);
- });
- }
- function ix(e, M, K) {
- M = Cr(M, e);
- var st = -1, ut = M.length;
- for (ut || (ut = 1, e = E); ++st < ut; ) {
- var mt = e == null ? E : e[Hi(M[st])];
- mt === E && (st = ut, mt = K), e = ir(mt) ? mt.call(e) : mt;
- }
- return e;
- }
- function rx(e, M, K) {
- return e == null ? e : Xn(e, M, K);
- }
- function nx(e, M, K, st) {
- return st = typeof st == "function" ? st : E, e == null ? e : Xn(e, M, K, st);
- }
- var Sp = Dc(He), wp = Dc(ai);
- function sx(e, M, K) {
- var st = ie(e), ut = st || Ar(e) || un(e);
- if (M = qt(M, 4), K == null) {
- var mt = e && e.constructor;
- ut ? K = st ? new mt() : [] : Ie(e) ? K = ir(mt) ? ln(As(e)) : {} : K = {};
- }
- return (ut ? bi : Xi)(e, function(xt, bt, Mt) {
- return M(K, xt, bt, Mt);
- }), K;
- }
- function ox(e, M) {
- return e == null ? !0 : wa(e, M);
- }
- function ax(e, M, K) {
- return e == null ? e : mc(e, M, ka(K));
- }
- function lx(e, M, K, st) {
- return st = typeof st == "function" ? st : E, e == null ? e : mc(e, M, ka(K), st);
- }
- function dn(e) {
- return e == null ? [] : ra(e, He(e));
- }
- function hx(e) {
- return e == null ? [] : ra(e, ai(e));
- }
- function cx(e, M, K) {
- return K === E && (K = M, M = E), K !== E && (K = Ai(K), K = K === K ? K : 0), M !== E && (M = Ai(M), M = M === M ? M : 0), Wr(Ai(e), M, K);
- }
- function px(e, M, K) {
- return M = rr(M), K === E ? (K = M, M = 0) : K = rr(K), e = Ai(e), yg(e, M, K);
- }
- function ux(e, M, K) {
- if (K && typeof K != "boolean" && ri(e, M, K) && (M = K = E), K === E && (typeof M == "boolean" ? (K = M, M = E) : typeof e == "boolean" && (K = e, e = E)), e === E && M === E ? (e = 0, M = 1) : (e = rr(e), M === E ? (M = e, e = 0) : M = rr(M)), e > M) {
- var st = e;
- e = M, M = st;
- }
- if (K || e % 1 || M % 1) {
- var ut = Uh();
- return Ze(e + ut * (M - e + Gd("1e-" + ((ut + "").length - 1))), M);
- }
- return xa(e, M);
- }
- var dx = cn(function(e, M, K) {
- return M = M.toLowerCase(), e + (K ? Mp(M) : M);
- });
- function Mp(e) {
- return Ua(xe(e).toLowerCase());
- }
- function Cp(e) {
- return e = xe(e), e && e.replace(fd, rf).replace(Dd, "");
- }
- function fx(e, M, K) {
- e = xe(e), M = di(M);
- var st = e.length;
- K = K === E ? st : Wr(ne(K), 0, st);
- var ut = K;
- return K -= M.length, K >= 0 && e.slice(K, ut) == M;
- }
- function gx(e) {
- return e = xe(e), e && Vt.test(e) ? e.replace(be, nf) : e;
- }
- function mx(e) {
- return e = xe(e), e && On.test(e) ? e.replace(En, "\\$&") : e;
- }
- var yx = cn(function(e, M, K) {
- return e + (K ? "-" : "") + M.toLowerCase();
- }), vx = cn(function(e, M, K) {
- return e + (K ? " " : "") + M.toLowerCase();
- }), xx = Tc("toLowerCase");
- function bx(e, M, K) {
- e = xe(e), M = ne(M);
- var st = M ? rn(e) : 0;
- if (!M || st >= M)
- return e;
- var ut = (M - st) / 2;
- return Gs(Os(ut), K) + e + Gs(Es(ut), K);
- }
- function Sx(e, M, K) {
- e = xe(e), M = ne(M);
- var st = M ? rn(e) : 0;
- return M && st < M ? e + Gs(M - st, K) : e;
- }
- function wx(e, M, K) {
- e = xe(e), M = ne(M);
- var st = M ? rn(e) : 0;
- return M && st < M ? Gs(M - st, K) + e : e;
- }
- function Mx(e, M, K) {
- return K || M == null ? M = 0 : M && (M = +M), Of(xe(e).replace(Jr, ""), M || 0);
- }
- function Cx(e, M, K) {
- return (K ? ri(e, M, K) : M === E) ? M = 1 : M = ne(M), ba(xe(e), M);
- }
- function kx() {
- var e = arguments, M = xe(e[0]);
- return e.length < 3 ? M : M.replace(e[1], e[2]);
- }
- var Ax = cn(function(e, M, K) {
- return e + (K ? "_" : "") + M.toLowerCase();
- });
- function Tx(e, M, K) {
- return K && typeof K != "number" && ri(e, M, K) && (M = K = E), K = K === E ? P : K >>> 0, K ? (e = xe(e), e && (typeof M == "string" || M != null && !Ga(M)) && (M = di(M), !M && en(e)) ? kr(_i(e), 0, K) : e.split(M, K)) : [];
- }
- var Px = cn(function(e, M, K) {
- return e + (K ? " " : "") + Ua(M);
- });
- function Ex(e, M, K) {
- return e = xe(e), K = K == null ? 0 : Wr(ne(K), 0, e.length), M = di(M), e.slice(K, K + M.length) == M;
- }
- function Ox(e, M, K) {
- var st = ft.templateSettings;
- K && ri(e, M, K) && (M = E), e = xe(e), M = eo({}, M, st, Ic);
- var ut = eo({}, M.imports, st.imports, Ic), mt = He(ut), xt = ra(ut, mt), bt, Mt, It = 0, Rt = M.interpolate || fs, Bt = "__p += '", Yt = sa(
- (M.escape || fs).source + "|" + Rt.source + "|" + (Rt === ps ? $t : fs).source + "|" + (M.evaluate || fs).source + "|$",
- "g"
- ), Ut = "//# sourceURL=" + (Se.call(M, "sourceURL") ? (M.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++jd + "]") + `
- `;
- e.replace(Yt, function(te, he, pe, gi, ni, mi) {
- return pe || (pe = gi), Bt += e.slice(It, mi).replace(gd, sf), he && (bt = !0, Bt += `' +
- __e(` + he + `) +
- '`), ni && (Mt = !0, Bt += `';
- ` + ni + `;
- __p += '`), pe && (Bt += `' +
- ((__t = (` + pe + `)) == null ? '' : __t) +
- '`), It = mi + te.length, te;
- }), Bt += `';
- `;
- var Qt = Se.call(M, "variable") && M.variable;
- if (!Qt)
- Bt = `with (obj) {
- ` + Bt + `
- }
- `;
- else if (Ln.test(Qt))
- throw new ee(Z);
- Bt = (Mt ? Bt.replace(Kt, "") : Bt).replace(Gt, "$1").replace(Wt, "$1;"), Bt = "function(" + (Qt || "obj") + `) {
- ` + (Qt ? "" : `obj || (obj = {});
- `) + "var __t, __p = ''" + (bt ? ", __e = _.escape" : "") + (Mt ? `, __j = Array.prototype.join;
- function print() { __p += __j.call(arguments, '') }
- ` : `;
- `) + Bt + `return __p
- }`;
- var oe = Ap(function() {
- return ve(mt, Ut + "return " + Bt).apply(E, xt);
- });
- if (oe.source = Bt, Xa(oe))
- throw oe;
- return oe;
- }
- function Lx(e) {
- return xe(e).toLowerCase();
- }
- function _x(e) {
- return xe(e).toUpperCase();
- }
- function Dx(e, M, K) {
- if (e = xe(e), e && (K || M === E))
- return Rh(e);
- if (!e || !(M = di(M)))
- return e;
- var st = _i(e), ut = _i(M), mt = Nh(st, ut), xt = Bh(st, ut) + 1;
- return kr(st, mt, xt).join("");
- }
- function Ix(e, M, K) {
- if (e = xe(e), e && (K || M === E))
- return e.slice(0, Wh(e) + 1);
- if (!e || !(M = di(M)))
- return e;
- var st = _i(e), ut = Bh(st, _i(M)) + 1;
- return kr(st, 0, ut).join("");
- }
- function Rx(e, M, K) {
- if (e = xe(e), e && (K || M === E))
- return e.replace(Jr, "");
- if (!e || !(M = di(M)))
- return e;
- var st = _i(e), ut = Nh(st, _i(M));
- return kr(st, ut).join("");
- }
- function Nx(e, M) {
- var K = p, st = i;
- if (Ie(M)) {
- var ut = "separator" in M ? M.separator : ut;
- K = "length" in M ? ne(M.length) : K, st = "omission" in M ? di(M.omission) : st;
- }
- e = xe(e);
- var mt = e.length;
- if (en(e)) {
- var xt = _i(e);
- mt = xt.length;
- }
- if (K >= mt)
- return e;
- var bt = K - rn(st);
- if (bt < 1)
- return st;
- var Mt = xt ? kr(xt, 0, bt).join("") : e.slice(0, bt);
- if (ut === E)
- return Mt + st;
- if (xt && (bt += Mt.length - bt), Ga(ut)) {
- if (e.slice(bt).search(ut)) {
- var It, Rt = Mt;
- for (ut.global || (ut = sa(ut.source, xe(ue.exec(ut)) + "g")), ut.lastIndex = 0; It = ut.exec(Rt); )
- var Bt = It.index;
- Mt = Mt.slice(0, Bt === E ? bt : Bt);
- }
- } else if (e.indexOf(di(ut), bt) != bt) {
- var Yt = Mt.lastIndexOf(ut);
- Yt > -1 && (Mt = Mt.slice(0, Yt));
- }
- return Mt + st;
- }
- function Bx(e) {
- return e = xe(e), e && zt.test(e) ? e.replace(Jt, uf) : e;
- }
- var jx = cn(function(e, M, K) {
- return e + (K ? " " : "") + M.toUpperCase();
- }), Ua = Tc("toUpperCase");
- function kp(e, M, K) {
- return e = xe(e), M = K ? E : M, M === E ? af(e) ? gf(e) : Jd(e) : e.match(M) || [];
- }
- var Ap = ae(function(e, M) {
- try {
- return pi(e, E, M);
- } catch (K) {
- return Xa(K) ? K : new ee(K);
- }
- }), Wx = tr(function(e, M) {
- return bi(M, function(K) {
- K = Hi(K), qi(e, K, za(e[K], e));
- }), e;
- });
- function zx(e) {
- var M = e == null ? 0 : e.length, K = qt();
- return e = M ? Ee(e, function(st) {
- if (typeof st[1] != "function")
- throw new Si(I);
- return [K(st[0]), st[1]];
- }) : [], ae(function(st) {
- for (var ut = -1; ++ut < M; ) {
- var mt = e[ut];
- if (pi(mt[0], this, st))
- return pi(mt[1], this, st);
- }
- });
- }
- function Yx(e) {
- return ug(Mi(e, N));
- }
- function Va(e) {
- return function() {
- return e;
- };
- }
- function Xx(e, M) {
- return e == null || e !== e ? M : e;
- }
- var Gx = Ec(), Hx = Ec(!0);
- function li(e) {
- return e;
- }
- function $a(e) {
- return sc(typeof e == "function" ? e : Mi(e, N));
- }
- function Fx(e) {
- return ac(Mi(e, N));
- }
- function Ux(e, M) {
- return lc(e, Mi(M, N));
- }
- var Vx = ae(function(e, M) {
- return function(K) {
- return zn(K, e, M);
- };
- }), $x = ae(function(e, M) {
- return function(K) {
- return zn(e, K, M);
- };
- });
- function Za(e, M, K) {
- var st = He(M), ut = Ns(M, st);
- K == null && !(Ie(M) && (ut.length || !st.length)) && (K = M, M = e, e = this, ut = Ns(M, He(M)));
- var mt = !(Ie(K) && "chain" in K) || !!K.chain, xt = ir(e);
- return bi(ut, function(bt) {
- var Mt = M[bt];
- e[bt] = Mt, xt && (e.prototype[bt] = function() {
- var It = this.__chain__;
- if (mt || It) {
- var Rt = e(this.__wrapped__), Bt = Rt.__actions__ = si(this.__actions__);
- return Bt.push({ func: Mt, args: arguments, thisArg: e }), Rt.__chain__ = It, Rt;
- }
- return Mt.apply(e, xr([this.value()], arguments));
- });
- }), e;
- }
- function Zx() {
- return Ue._ === this && (Ue._ = Sf), this;
- }
- function Ka() {
- }
- function Kx(e) {
- return e = ne(e), ae(function(M) {
- return hc(M, e);
- });
- }
- var Jx = Ta(Ee), qx = Ta(Oh), Qx = Ta(qo);
- function Tp(e) {
- return Ia(e) ? Qo(Hi(e)) : Eg(e);
- }
- function t0(e) {
- return function(M) {
- return e == null ? E : zr(e, M);
- };
- }
- var e0 = Lc(), i0 = Lc(!0);
- function Ja() {
- return [];
- }
- function qa() {
- return !1;
- }
- function r0() {
- return {};
- }
- function n0() {
- return "";
- }
- function s0() {
- return !0;
- }
- function o0(e, M) {
- if (e = ne(e), e < 1 || e > _)
- return [];
- var K = P, st = Ze(e, P);
- M = qt(M), e -= P;
- for (var ut = ia(st, M); ++K < e; )
- M(K);
- return ut;
- }
- function a0(e) {
- return ie(e) ? Ee(e, Hi) : fi(e) ? [e] : si(Vc(xe(e)));
- }
- function l0(e) {
- var M = ++xf;
- return xe(e) + M;
- }
- var h0 = Xs(function(e, M) {
- return e + M;
- }, 0), c0 = Pa("ceil"), p0 = Xs(function(e, M) {
- return e / M;
- }, 1), u0 = Pa("floor");
- function d0(e) {
- return e && e.length ? Rs(e, li, da) : E;
- }
- function f0(e, M) {
- return e && e.length ? Rs(e, qt(M, 2), da) : E;
- }
- function g0(e) {
- return Dh(e, li);
- }
- function m0(e, M) {
- return Dh(e, qt(M, 2));
- }
- function y0(e) {
- return e && e.length ? Rs(e, li, ya) : E;
- }
- function v0(e, M) {
- return e && e.length ? Rs(e, qt(M, 2), ya) : E;
- }
- var x0 = Xs(function(e, M) {
- return e * M;
- }, 1), b0 = Pa("round"), S0 = Xs(function(e, M) {
- return e - M;
- }, 0);
- function w0(e) {
- return e && e.length ? ea(e, li) : 0;
- }
- function M0(e, M) {
- return e && e.length ? ea(e, qt(M, 2)) : 0;
- }
- return ft.after = Fy, ft.ary = np, ft.assign = _v, ft.assignIn = vp, ft.assignInWith = eo, ft.assignWith = Dv, ft.at = Iv, ft.before = sp, ft.bind = za, ft.bindAll = Wx, ft.bindKey = op, ft.castArray = rv, ft.chain = ep, ft.chunk = um, ft.compact = dm, ft.concat = fm, ft.cond = zx, ft.conforms = Yx, ft.constant = Va, ft.countBy = wy, ft.create = Rv, ft.curry = ap, ft.curryRight = lp, ft.debounce = hp, ft.defaults = Nv, ft.defaultsDeep = Bv, ft.defer = Uy, ft.delay = Vy, ft.difference = gm, ft.differenceBy = mm, ft.differenceWith = ym, ft.drop = vm, ft.dropRight = xm, ft.dropRightWhile = bm, ft.dropWhile = Sm, ft.fill = wm, ft.filter = Cy, ft.flatMap = Ty, ft.flatMapDeep = Py, ft.flatMapDepth = Ey, ft.flatten = Jc, ft.flattenDeep = Mm, ft.flattenDepth = Cm, ft.flip = $y, ft.flow = Gx, ft.flowRight = Hx, ft.fromPairs = km, ft.functions = Hv, ft.functionsIn = Fv, ft.groupBy = Oy, ft.initial = Tm, ft.intersection = Pm, ft.intersectionBy = Em, ft.intersectionWith = Om, ft.invert = Vv, ft.invertBy = $v, ft.invokeMap = _y, ft.iteratee = $a, ft.keyBy = Dy, ft.keys = He, ft.keysIn = ai, ft.map = Zs, ft.mapKeys = Kv, ft.mapValues = Jv, ft.matches = Fx, ft.matchesProperty = Ux, ft.memoize = Js, ft.merge = qv, ft.mergeWith = xp, ft.method = Vx, ft.methodOf = $x, ft.mixin = Za, ft.negate = qs, ft.nthArg = Kx, ft.omit = Qv, ft.omitBy = tx, ft.once = Zy, ft.orderBy = Iy, ft.over = Jx, ft.overArgs = Ky, ft.overEvery = qx, ft.overSome = Qx, ft.partial = Ya, ft.partialRight = cp, ft.partition = Ry, ft.pick = ex, ft.pickBy = bp, ft.property = Tp, ft.propertyOf = t0, ft.pull = Im, ft.pullAll = Qc, ft.pullAllBy = Rm, ft.pullAllWith = Nm, ft.pullAt = Bm, ft.range = e0, ft.rangeRight = i0, ft.rearg = Jy, ft.reject = jy, ft.remove = jm, ft.rest = qy, ft.reverse = ja, ft.sampleSize = zy, ft.set = rx, ft.setWith = nx, ft.shuffle = Yy, ft.slice = Wm, ft.sortBy = Hy, ft.sortedUniq = Um, ft.sortedUniqBy = Vm, ft.split = Tx, ft.spread = Qy, ft.tail = $m, ft.take = Zm, ft.takeRight = Km, ft.takeRightWhile = Jm, ft.takeWhile = qm, ft.tap = dy, ft.throttle = tv, ft.thru = $s, ft.toArray = gp, ft.toPairs = Sp, ft.toPairsIn = wp, ft.toPath = a0, ft.toPlainObject = yp, ft.transform = sx, ft.unary = ev, ft.union = Qm, ft.unionBy = ty, ft.unionWith = ey, ft.uniq = iy, ft.uniqBy = ry, ft.uniqWith = ny, ft.unset = ox, ft.unzip = Wa, ft.unzipWith = tp, ft.update = ax, ft.updateWith = lx, ft.values = dn, ft.valuesIn = hx, ft.without = sy, ft.words = kp, ft.wrap = iv, ft.xor = oy, ft.xorBy = ay, ft.xorWith = ly, ft.zip = hy, ft.zipObject = cy, ft.zipObjectDeep = py, ft.zipWith = uy, ft.entries = Sp, ft.entriesIn = wp, ft.extend = vp, ft.extendWith = eo, Za(ft, ft), ft.add = h0, ft.attempt = Ap, ft.camelCase = dx, ft.capitalize = Mp, ft.ceil = c0, ft.clamp = cx, ft.clone = nv, ft.cloneDeep = ov, ft.cloneDeepWith = av, ft.cloneWith = sv, ft.conformsTo = lv, ft.deburr = Cp, ft.defaultTo = Xx, ft.divide = p0, ft.endsWith = fx, ft.eq = Ii, ft.escape = gx, ft.escapeRegExp = mx, ft.every = My, ft.find = ky, ft.findIndex = Zc, ft.findKey = jv, ft.findLast = Ay, ft.findLastIndex = Kc, ft.findLastKey = Wv, ft.floor = u0, ft.forEach = ip, ft.forEachRight = rp, ft.forIn = zv, ft.forInRight = Yv, ft.forOwn = Xv, ft.forOwnRight = Gv, ft.get = Ha, ft.gt = hv, ft.gte = cv, ft.has = Uv, ft.hasIn = Fa, ft.head = qc, ft.identity = li, ft.includes = Ly, ft.indexOf = Am, ft.inRange = px, ft.invoke = Zv, ft.isArguments = Gr, ft.isArray = ie, ft.isArrayBuffer = pv, ft.isArrayLike = oi, ft.isArrayLikeObject = Be, ft.isBoolean = uv, ft.isBuffer = Ar, ft.isDate = dv, ft.isElement = fv, ft.isEmpty = gv, ft.isEqual = mv, ft.isEqualWith = yv, ft.isError = Xa, ft.isFinite = vv, ft.isFunction = ir, ft.isInteger = pp, ft.isLength = Qs, ft.isMap = up, ft.isMatch = xv, ft.isMatchWith = bv, ft.isNaN = Sv, ft.isNative = wv, ft.isNil = Cv, ft.isNull = Mv, ft.isNumber = dp, ft.isObject = Ie, ft.isObjectLike = Ne, ft.isPlainObject = Un, ft.isRegExp = Ga, ft.isSafeInteger = kv, ft.isSet = fp, ft.isString = to, ft.isSymbol = fi, ft.isTypedArray = un, ft.isUndefined = Av, ft.isWeakMap = Tv, ft.isWeakSet = Pv, ft.join = Lm, ft.kebabCase = yx, ft.last = ki, ft.lastIndexOf = _m, ft.lowerCase = vx, ft.lowerFirst = xx, ft.lt = Ev, ft.lte = Ov, ft.max = d0, ft.maxBy = f0, ft.mean = g0, ft.meanBy = m0, ft.min = y0, ft.minBy = v0, ft.stubArray = Ja, ft.stubFalse = qa, ft.stubObject = r0, ft.stubString = n0, ft.stubTrue = s0, ft.multiply = x0, ft.nth = Dm, ft.noConflict = Zx, ft.noop = Ka, ft.now = Ks, ft.pad = bx, ft.padEnd = Sx, ft.padStart = wx, ft.parseInt = Mx, ft.random = ux, ft.reduce = Ny, ft.reduceRight = By, ft.repeat = Cx, ft.replace = kx, ft.result = ix, ft.round = b0, ft.runInContext = wt, ft.sample = Wy, ft.size = Xy, ft.snakeCase = Ax, ft.some = Gy, ft.sortedIndex = zm, ft.sortedIndexBy = Ym, ft.sortedIndexOf = Xm, ft.sortedLastIndex = Gm, ft.sortedLastIndexBy = Hm, ft.sortedLastIndexOf = Fm, ft.startCase = Px, ft.startsWith = Ex, ft.subtract = S0, ft.sum = w0, ft.sumBy = M0, ft.template = Ox, ft.times = o0, ft.toFinite = rr, ft.toInteger = ne, ft.toLength = mp, ft.toLower = Lx, ft.toNumber = Ai, ft.toSafeInteger = Lv, ft.toString = xe, ft.toUpper = _x, ft.trim = Dx, ft.trimEnd = Ix, ft.trimStart = Rx, ft.truncate = Nx, ft.unescape = Bx, ft.uniqueId = l0, ft.upperCase = jx, ft.upperFirst = Ua, ft.each = ip, ft.eachRight = rp, ft.first = qc, Za(ft, function() {
- var e = {};
- return Xi(ft, function(M, K) {
- Se.call(ft.prototype, K) || (e[K] = M);
- }), e;
- }(), { chain: !1 }), ft.VERSION = l, bi(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
- ft[e].placeholder = ft;
- }), bi(["drop", "take"], function(e, M) {
- ce.prototype[e] = function(K) {
- K = K === E ? 1 : Ye(ne(K), 0);
- var st = this.__filtered__ && !M ? new ce(this) : this.clone();
- return st.__filtered__ ? st.__takeCount__ = Ze(K, st.__takeCount__) : st.__views__.push({
- size: Ze(K, P),
- type: e + (st.__dir__ < 0 ? "Right" : "")
- }), st;
- }, ce.prototype[e + "Right"] = function(K) {
- return this.reverse()[e](K).reverse();
- };
- }), bi(["filter", "map", "takeWhile"], function(e, M) {
- var K = M + 1, st = K == t || K == n;
- ce.prototype[e] = function(ut) {
- var mt = this.clone();
- return mt.__iteratees__.push({
- iteratee: qt(ut, 3),
- type: K
- }), mt.__filtered__ = mt.__filtered__ || st, mt;
- };
- }), bi(["head", "last"], function(e, M) {
- var K = "take" + (M ? "Right" : "");
- ce.prototype[e] = function() {
- return this[K](1).value()[0];
- };
- }), bi(["initial", "tail"], function(e, M) {
- var K = "drop" + (M ? "" : "Right");
- ce.prototype[e] = function() {
- return this.__filtered__ ? new ce(this) : this[K](1);
- };
- }), ce.prototype.compact = function() {
- return this.filter(li);
- }, ce.prototype.find = function(e) {
- return this.filter(e).head();
- }, ce.prototype.findLast = function(e) {
- return this.reverse().find(e);
- }, ce.prototype.invokeMap = ae(function(e, M) {
- return typeof e == "function" ? new ce(this) : this.map(function(K) {
- return zn(K, e, M);
- });
- }), ce.prototype.reject = function(e) {
- return this.filter(qs(qt(e)));
- }, ce.prototype.slice = function(e, M) {
- e = ne(e);
- var K = this;
- return K.__filtered__ && (e > 0 || M < 0) ? new ce(K) : (e < 0 ? K = K.takeRight(-e) : e && (K = K.drop(e)), M !== E && (M = ne(M), K = M < 0 ? K.dropRight(-M) : K.take(M - e)), K);
- }, ce.prototype.takeRightWhile = function(e) {
- return this.reverse().takeWhile(e).reverse();
- }, ce.prototype.toArray = function() {
- return this.take(P);
- }, Xi(ce.prototype, function(e, M) {
- var K = /^(?:filter|find|map|reject)|While$/.test(M), st = /^(?:head|last)$/.test(M), ut = ft[st ? "take" + (M == "last" ? "Right" : "") : M], mt = st || /^find/.test(M);
- ut && (ft.prototype[M] = function() {
- var xt = this.__wrapped__, bt = st ? [1] : arguments, Mt = xt instanceof ce, It = bt[0], Rt = Mt || ie(xt), Bt = function(he) {
- var pe = ut.apply(ft, xr([he], bt));
- return st && Yt ? pe[0] : pe;
- };
- Rt && K && typeof It == "function" && It.length != 1 && (Mt = Rt = !1);
- var Yt = this.__chain__, Ut = !!this.__actions__.length, Qt = mt && !Yt, oe = Mt && !Ut;
- if (!mt && Rt) {
- xt = oe ? xt : new ce(this);
- var te = e.apply(xt, bt);
- return te.__actions__.push({ func: $s, args: [Bt], thisArg: E }), new wi(te, Yt);
- }
- return Qt && oe ? e.apply(this, bt) : (te = this.thru(Bt), Qt ? st ? te.value()[0] : te.value() : te);
- });
- }), bi(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
- var M = bs[e], K = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", st = /^(?:pop|shift)$/.test(e);
- ft.prototype[e] = function() {
- var ut = arguments;
- if (st && !this.__chain__) {
- var mt = this.value();
- return M.apply(ie(mt) ? mt : [], ut);
- }
- return this[K](function(xt) {
- return M.apply(ie(xt) ? xt : [], ut);
- });
- };
- }), Xi(ce.prototype, function(e, M) {
- var K = ft[M];
- if (K) {
- var st = K.name + "";
- Se.call(an, st) || (an[st] = []), an[st].push({ name: M, func: K });
- }
- }), an[Ys(E, A).name] = [{
- name: "wrapper",
- func: E
- }], ce.prototype.clone = Bf, ce.prototype.reverse = jf, ce.prototype.value = Wf, ft.prototype.at = fy, ft.prototype.chain = gy, ft.prototype.commit = my, ft.prototype.next = yy, ft.prototype.plant = xy, ft.prototype.reverse = by, ft.prototype.toJSON = ft.prototype.valueOf = ft.prototype.value = Sy, ft.prototype.first = ft.prototype.head, Dn && (ft.prototype[Dn] = vy), ft;
- }, nn = mf();
- Rr ? ((Rr.exports = nn)._ = nn, $o._ = nn) : Ue._ = nn;
- }).call(Fr);
- })(jw, wo);
- const rs = wo;
- B0($r);
- I0($r);
- _0($r);
- N0($r);
- let lo = null, _e = Le(null), Fe = Le("zh"), sl = Le(""), re = Le(null);
- const kt = C0({
- //极值数据
- leftIndex: -1,
- //左侧上下限对应下标
- rightIndex: -1,
- //右侧上下限对应下标
- rightTwoIndex: -1,
- //右2上下限对应下标
- hasLeftAxis: !1,
- hasRightAxis: !1,
- hasRightTwoAxis: !1,
- hasXAxis: !1,
- leftMin: 0,
- leftMax: 0,
- rightMin: 0,
- rightMax: 0,
- rightTwoMin: 0,
- rightTwoMax: 0,
- xMin: 0,
- xMax: 0
- });
- let ci = !1, zu = Le(!1);
- const $l = Le(document.body.clientWidth < 1200 ? "phone" : "pc");
- function Ww() {
- return {
- options: re,
- axisLimitState: kt,
- chartRender: zw,
- setLimitData: aM,
- isUseSelfLimit: zu
- };
- }
- function zw({ data: r, renderId: f, lang: E = "zh", changeLangIsCheck: l, showChartTitle: y = !0, shouldUseSelfLimit: j = !1 }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, kt.hasLeftAxis = !1, kt.hasRightAxis = !1, kt.hasRightTwoAxis = !1, kt.hasXAxis = !1, zu.value || (kt.leftMin = 0, kt.leftMax = 0, kt.rightMin = 0, kt.rightMax = 0, kt.rightTwoMin = 0, kt.rightTwoMax = 0, kt.xMin = 0, kt.xMax = 0);
- let I = {};
- Fe.value = E, sl.value = f, _e.value = r, ci = j, [1, 11, 12].includes(r.ChartInfo.Source) ? I = {
- 1: Rp,
- 2: $w,
- 3: al,
- 4: al,
- 5: Zw,
- 6: al,
- 7: qw,
- 10: rM,
- 11: sM,
- 14: Uw
- }[r.ChartInfo.ChartType](r) : [2, 5].includes(r.ChartInfo.Source) ? I = eM(r) : [3].includes(r.ChartInfo.Source) ? I = iM(r) : [4, 6, 7, 8].includes(r.ChartInfo.Source) ? I = Rp(r) : [9].includes(r.ChartInfo.Source) ? I = Vw(r) : r.ChartInfo.Source === 10 && (kt.hasLeftAxis = !0, kt.leftMin = r.ChartInfo.LeftMin ? Number(r.ChartInfo.LeftMin) : Number(r.DataResp.YMinValue), kt.leftMax = r.ChartInfo.LeftMax ? Number(r.ChartInfo.LeftMax) : Number(r.DataResp.YMaxValue), kt.hasXAxis = !0, kt.xMin = r.ChartInfo.XMin ? Number(r.ChartInfo.XMin) : Number(r.DataResp.XMinValue), kt.xMax = r.ChartInfo.XMax ? Number(r.ChartInfo.XMax) : Number(r.DataResp.XMaxValue), I = nM(r));
- let Z = Yw();
- return re.value = { ...go, ...Z, ...I }, Fw(y), Hw(l), $r.setOptions({ global: { useUTC: r.ChartInfo.ChartType == 2 } }), (I.series ? I.series.some((U) => U.chartType === "linear") : !1) ? lo = $r.chart(sl.value, re.value) : lo = $r.stockChart(sl.value, re.value), lo;
- }
- function Yw() {
- if (!_e.value.ChartInfo.ChartThemeStyle)
- return {};
- let r = JSON.parse(_e.value.ChartInfo.ChartThemeStyle);
- return {
- legend: {
- ...go.legend,
- ...r.legendOptions
- },
- chart: {
- ...go.chart,
- ...r.drawOption
- },
- colors: r.colorsOptions
- };
- }
- function Pi(r, f) {
- const { MarkersLines: E, ChartType: l } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return E ? JSON.parse(E).filter((H) => H.isShow && H.axis === r).map((H) => {
- let U = r === 3 && f === "datetime", F;
- if (U) {
- let N = l === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- F = l === 2 ? (/* @__PURE__ */ new Date(`${N}-${H.value}`)).getTime() : new Date(H.value).getTime();
- } else
- F = Number(H.value);
- return {
- value: F,
- dashStyle: H.dashStyle,
- width: Number(H.lineWidth),
- color: H.color,
- label: {
- text: H.text || "",
- verticalAlign: H.textPosition,
- style: {
- color: H.textColor,
- fontSize: H.textFontSize
- }
- }
- };
- }) : [];
- }
- function Ei(r, f) {
- const { MarkersAreas: E, ChartType: l } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return E ? JSON.parse(E).filter((H) => H.isShow && H.axis === r).map((H) => {
- let U = r === 3 && f === "datetime", F, N;
- if (U) {
- let S = l === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- F = l === 2 ? (/* @__PURE__ */ new Date(`${S}-${H.fromValue}`)).getTime() : new Date(H.fromValue).getTime(), N = l === 2 ? (/* @__PURE__ */ new Date(`${S}-${H.toValue}`)).getTime() : new Date(H.toValue).getTime();
- } else
- F = Number(H.fromValue), N = Number(H.toValue);
- let R = {
- top: 12,
- middle: 0,
- bottom: -10
- };
- return {
- from: F,
- to: N,
- color: H.color,
- label: {
- text: H.text || "",
- verticalAlign: H.textPosition,
- y: R[H.textPosition],
- style: {
- color: H.textColor,
- fontSize: H.textFontSize
- }
- }
- };
- }) : [];
- }
- function Yu({ LatestDate: r, PredictChartColor: f }) {
- return {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot",
- color: f
- }]
- };
- }
- function Xw(r) {
- return r ? {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot"
- }]
- } : {};
- }
- function Xu(r, f, E) {
- let l = Xt(f).diff(Xt(r), "years", !0);
- return !!([5, 6].includes(E) && l <= 1);
- }
- function ol(r, f) {
- const { IsAxis: E, IsOrder: l, EdbInfoType: y, LeadValue: j, LeadUnit: I } = r, Z = f == "zh" ? {
- 0: "右轴",
- 2: "右2轴"
- } : {
- 0: "RHS",
- 2: "2-RHS"
- }, H = f == "zh" ? {
- 1: "逆序"
- } : {
- 1: "REV"
- }, U = f == "zh" ? {
- 0: "领先"
- } : {
- 0: "Lead"
- }, F = f === "zh" ? I : P0[I];
- let N = Z[E] || "", R = H[Number(l)] ? `${N ? "," : ""}${H[Number(l)]}` : "", S = U[y] ? `${N || R ? "," : ""}${U[y]}${j}${F}` : "";
- return N || R || S ? `(${N}${R}${S})` : "";
- }
- function Mo(r, f, E = "zh") {
- let l = "";
- const y = r.EdbNameEn ? `${r.EdbNameEn}${ol(r, "en")}` : "", j = f.length > 1 ? `${r.EdbAliasName || r.EdbName}(${r.SourceName})${ol(r, "zh")}` : `${r.EdbAliasName || r.EdbName}${ol(r, "zh")}`;
- if (l = E == "zh" ? j : y || j, l.length > 20) {
- let I = [];
- for (let Z = 0; Z < l.length / 20; Z++)
- I.push(l.slice(Z * 20, Z * 20 + 20));
- l = I.join("<br>");
- }
- return l;
- }
- function Zl(r) {
- let f = r.filter((y) => y.IsAxis === 1), E = r.filter((y) => !y.IsAxis), l = r.filter((y) => y.IsAxis === 2);
- return [f, E, l].flat(1 / 0);
- }
- function Gw() {
- let r = !0;
- return _e.value.ChartInfo.ChartNameEn || (r = !1), _e.value.EdbInfoList.forEach((f) => {
- f.EdbNameEn || (r = !1), _e.value.ChartInfo.ChartType !== 10 && f.Unit && !f.UnitEn && (r = !1);
- }), r;
- }
- function Hw(r) {
- if (r && !Gw())
- return;
- const { ChartType: f, Source: E } = _e.value.ChartInfo;
- E == 1 && (f == 5 ? (re.value.yAxis.title.text = Fe.value == "zh" ? re.value.yAxis.title.textZh : re.value.yAxis.title.textEn, re.value.xAxis.title.text = Fe.value == "zh" ? re.value.xAxis.title.textZh : re.value.xAxis.title.textEn, re.value.series.forEach((l) => {
- l.name = Fe.value == "zh" ? l.nameZh : l.nameEn;
- }), re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterZh : re.value.tooltip.formatterEn) : (re.value.yAxis.forEach((l) => {
- l.title.text = Fe.value == "zh" ? l.title.textZh : l.title.textEn;
- }), f != 2 && re.value.series.forEach((l) => {
- l.name = Fe.value == "zh" ? l.nameZh : l.nameEn != "无英文名称" ? l.nameEn : `<span style="color:#999">${l.nameEn}</span>`;
- }), f === 10 && (re.value.xAxis.title.text = Fe.value == "zh" ? re.value.xAxis.title.textZh : re.value.xAxis.title.textEn, re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterCh : re.value.tooltip.formatterEn, re.value.series.forEach((l) => {
- l.linkedTo || l.data.forEach((y) => {
- y.dataLabels.format = Fe.value == "zh" ? y.dataLabels.formatZh : y.dataLabels.formatEn || "无英文标签", y.dataLabels.color = Fe.value === "en" && !y.dataLabels.formatEn ? "#999" : "#333";
- });
- })), [7, 11].includes(f) && (re.value.xAxis.categories = _e.value.XEdbIdValue.map((l) => Fe.value == "zh" ? _e.value.EdbInfoList.find((y) => y.EdbInfoId === l).EdbAliasName || _e.value.EdbInfoList.find((y) => y.EdbInfoId === l).EdbName : _e.value.EdbInfoList.find((y) => y.EdbInfoId === l).EdbNameEn)))), [2, 3, 4].includes(E) && (re.value.yAxis.forEach((l) => {
- l.title.text = Fe.value == "zh" ? l.title.textZh : l.title.textEn || l.title.textZh;
- }), re.value.series.forEach((l) => {
- l.name = Fe.value == "en" && l.nameEn || l.nameZh;
- }), re.value.tooltip.formatter = Fe.value == "en" ? re.value.tooltip.formatterEn : re.value.tooltip.formatterZh, E == 2 && (re.value.xAxis.categories = Vr.value.filter((l) => l.IsHide === 0).map((l) => Fe.value == "en" ? l.NameEn : l.Name)), [3].includes(E) && (re.value.xAxis.title.text = Fe.value == "en" && re.value.xAxis.title.textEn || re.value.xAxis.title.textZh));
- }
- function Fw(r) {
- if (r) {
- const f = _e.value.ChartInfo;
- re.value.title.textZh = f.ChartName, re.value.title.textEn = f.ChartNameEn, re.value.title.text = Fe.value == "zh" ? re.value.title.textZh : re.value.title.textEn || re.value.title.textZh;
- } else
- re.value.title.text = "";
- }
- function Uw(r) {
- const f = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { XDataList: E, UnitList: l, SeriesList: y, IsHeap: j } = r.DataResp;
- kt.leftIndex = y.findIndex((N) => N.IsAxis === 1), kt.rightIndex = y.findIndex((N) => !N.IsAxis), kt.rightTwoIndex = y.findIndex((N) => N.IsAxis === 2), kt.leftIndex != -1 && (kt.hasLeftAxis = !0), kt.rightIndex != -1 && (kt.hasRightAxis = !0), kt.rightTwoIndex != -1 && (kt.hasRightTwoAxis = !0);
- const I = {
- categories: E.map((N) => this.currentLang == "en" ? N.NameEn : N.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...f && f.xAxisOptions.style
- }
- },
- plotBands: Ei(3),
- plotLines: Pi(3)
- };
- let Z = [], H = [];
- const U = y.some((N) => N.IsAxis === 2) ? Zl(y) : rs.cloneDeep(y);
- return U.forEach((N, R) => {
- const S = U.findIndex(
- (x) => x.IsAxis === N.IsAxis
- ), v = {
- 1: ["LeftName", "LeftNameEn"],
- 0: ["RightName", "RightNameEn"],
- 2: ["RightTwoName", "RightTwoNameEn"]
- };
- let d = 0, u = 0;
- const A = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- A[N.IsAxis] && (d = kt[`${A[N.IsAxis][0]}`] || 0, u = kt[`${A[N.IsAxis][1]}`] || 0);
- let O = {
- ...fr,
- title: {
- text: l[v[N.IsAxis][0]],
- textCh: l[v[N.IsAxis][0]],
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: l[v[N.IsAxis][0]] ? l[v[N.IsAxis][1]] : "",
- // 英文
- style: {
- ...f && f.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -12,
- // x: (item.IsAxis===0 && this.rightTwoIndex>-1) ? -chartData[this.rightTwoIndex].Unit.length*12 : 0,
- textAlign: N.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1
- },
- labels: {
- formatter: function(x) {
- return x.value;
- },
- align: "center",
- x: [0, 2].includes(N.IsAxis) ? 5 : -5,
- style: {
- ...f && f.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(N.IsAxis),
- min: Number(d),
- max: Number(u),
- tickWidth: 1,
- visible: S === R,
- plotBands: Ei(N.IsAxis),
- plotLines: Pi(N.IsAxis)
- }, B = R;
- j == 1 && (B = 0);
- let C = N.DataList || [];
- C.forEach((x, a) => {
- N.NoDataEdbIndex.includes(a) && (C[a] = null);
- });
- const b = f ? R % f.lineOptionList.length : R;
- let w = {
- data: C,
- type: N.ChartStyle || "",
- dashStyle: f && f.lineOptionList[b].dashStyle || "Solid",
- chartType: "linear",
- yAxis: B,
- name: N.SeriesName,
- nameZh: N.SeriesName,
- nameEn: N.SeriesNameEn,
- unitName: l[v[N.IsAxis][0]],
- unitNameCh: l[v[N.IsAxis][0]],
- unitNameEn: l[v[N.IsAxis][0]] ? l[v[N.IsAxis][1]] : "",
- color: N.ChartColor,
- lineWidth: Number(N.ChartWidth) || f && f.lineOptionList[b].lineWidth,
- borderWidth: 1,
- borderColor: N.ChartColor,
- marker: {
- //展示数据点
- enabled: !!(N.ChartStyle != "column" && N.IsPoint),
- radius: f && f.lineOptionList[b].radius || 5
- },
- dataLabels: {
- //展示数值
- enabled: !!N.IsNumber,
- align: N.ChartStyle == "column" ? "center" : void 0,
- y: N.ChartStyle == "column" ? -20 : 0,
- inside: N.ChartStyle == "column" ? !1 : void 0,
- crop: N.ChartStyle != "column"
- },
- stacking: j == 1 ? "normal" : void 0,
- zIndex: ["line", "spline"].includes(N.ChartStyle) ? 1 : 0
- //防止组合图曲线被遮住
- };
- Z.push(O), H.push(w);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let N = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((R) => {
- const S = H.find((v) => v.name === R.series.name);
- N = N + `<br><span style="color:${R.color}">●</span>${S.name}:${R.y} ${S.unitNameCh}`;
- }), N;
- },
- formatterCh: function() {
- let N = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((R) => {
- const S = H.find((v) => v.name === R.series.name);
- N = N + `<br><span style="color:${R.color}">●</span>${S.nameCh}:${R.y} ${S.unitNameCh}`;
- }), N;
- },
- formatterEn: function() {
- let N = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((R) => {
- const S = H.find((v) => v.name === R.series.name);
- N = N + `<br><span style="color:${R.color}">●</span>${S.nameEn}:${R.y} ${S.unitNameEn}`;
- }), N;
- },
- shared: !0
- },
- series: H,
- yAxis: Z,
- xAxis: I
- };
- }
- function Vw(r) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const f = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { DataList: E, LeftMaxValue: l, LeftMinValue: y, RightMaxValue: j, RightMinValue: I } = r.DataResp, Z = {
- ...Mn,
- tickWidth: 1,
- labels: {
- style: {
- ...f && f.xAxisOptions.style
- }
- }
- };
- let H = [], U = [];
- return E.forEach((N, R) => {
- let S = {
- ...fr,
- title: {
- text: N.Unit,
- textCh: N.Unit,
- // 中文
- textEn: N.UnitEn || N.Unit,
- align: "high",
- rotation: 0,
- y: -15,
- reserveSpace: !1,
- style: {
- ...f && f.yAxisOptions.style
- }
- },
- labels: {
- style: {
- ...f && f.yAxisOptions.style
- }
- },
- opposite: N.IsAxis !== 1,
- min: Number(R === 0 ? y : I),
- max: Number(R === 0 ? l : j),
- tickWidth: 1
- };
- const v = f ? R % f.lineOptionList.length : R;
- let d = {
- data: N.Value.map((u) => [u.X, u.Y]),
- dashStyle: f && f.lineOptionList[v].dashStyle || "Solid",
- type: f && f.lineOptionList[v].lineType || "spline",
- yAxis: R,
- name: N.Name,
- nameZh: N.Name,
- nameEn: N.NameEn || N.Name,
- color: N.Color,
- lineWidth: f && f.lineOptionList[v].lineWidth || 3,
- chartType: "linear",
- zIndex: 1
- };
- U.push(d), H.push(S);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let N = E[0].Value.map((d) => d.X), R = N[1] - N[0], v = `<b>${`[${this.x},${this.x + R}]`}</b>`;
- return this.points.forEach((d) => {
- v += `<br><span style="color:${d.color}">●</span>${d.series.name}: ${d.y}%<br>`;
- }), v;
- },
- shared: !0
- },
- series: U,
- yAxis: H,
- xAxis: Z
- };
- }
- function Rp(r) {
- const f = r.ChartInfo.Source === 1, E = [4, 6, 7, 8].includes(r.ChartInfo.Source) ? [r.DataResp] : r.EdbInfoList;
- let l = [], y = [], j = {}, I = E.findIndex((d) => d.IsAxis === 1), Z = E.findIndex((d) => !d.IsAxis), H = E.findIndex((d) => d.IsAxis === 2);
- kt.leftIndex = I, kt.rightIndex = Z, kt.rightTwoIndex = H;
- const U = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let F = [], N = E.some((d) => d.IsAxis === 2) ? Zl(E) : E;
- N.forEach((d, u) => {
- let A = N.findIndex((t) => t.IsAxis === d.IsAxis), O = d.EdbName, B = N.filter(
- (t) => O === t.EdbName
- ), C = Mo(d, B, "zh"), b = Mo(d, B, "en"), w = d.EdbInfoCategoryType === 1 ? Yu(d) : {};
- const x = U ? u % U.lineOptionList.length : u;
- let a = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: U && U.lineOptionList[x].lineType || "spline",
- dashStyle: U && U.lineOptionList[x].dashStyle || "Solid",
- yAxis: u,
- name: C,
- nameZh: C,
- nameEn: b,
- color: d.ChartColor,
- lineWidth: Number(d.ChartWidth) || U && U.lineOptionList[x].lineWidth || 1,
- visible: !0,
- LatestDate: d.LatestDate,
- LatestValue: d.LatestValue,
- marker: U && U.lineOptionList[x].dataMark && U.lineOptionList[x].dataMark != "none" ? {
- enabled: !0,
- symbol: U.lineOptionList[x].markType || "circle",
- fillColor: U.lineOptionList[x].markColor,
- radius: U.lineOptionList[x].markSize
- } : {},
- ...w
- };
- d.DataList = d.DataList || [];
- for (let t of d.DataList)
- a.data.push([t.DataTimestamp, t.Value]);
- l.push(a), d.IsAxis, console.log("useSelfLimit", ci);
- let c = 0, p = 0;
- if ((!ci || !f) && (c = d.MinData, p = d.MaxData), ci && f) {
- const t = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- t[d.IsAxis] && (c = kt[`${t[d.IsAxis][0]}`] || 0, p = kt[`${t[d.IsAxis][1]}`] || 0);
- }
- const i = r.ChartInfo.Source === 12 ? d.ConvertUnit : d.ConvertUnit || d.Unit, h = r.ChartInfo.Source === 12 ? d.ConvertEnUnit : d.ConvertEnUnit || d.UnitEn || d.ConvertUnit || d.Unit;
- let o = {
- ...fr,
- IsAxis: d.IsAxis,
- labels: {
- formatter: function(t) {
- return A !== u ? "" : t.value;
- },
- align: "center",
- x: [0, 2].includes(d.IsAxis) ? 5 : -5,
- style: {
- ...U && U.yAxisOptions.style
- }
- },
- tickWidth: A !== u ? 0 : 1,
- title: {
- text: A !== u ? "" : `${i}`,
- textZh: i,
- //中文单位
- textEn: i ? h : "",
- //英文单位,但如果无中文单位则不显示
- align: "high",
- rotation: 0,
- y: -15,
- x: d.IsAxis === 0 && H > -1 ? -N[H].Unit.length * 12 : 0,
- textAlign: d.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...U && U.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(d.IsAxis),
- reversed: d.IsOrder,
- min: Number(c),
- max: Number(p),
- visible: A === u,
- chartEdbInfo: d,
- //指标数据用于在保存时读取指标数据
- plotBands: Ei(d.IsAxis),
- plotLines: Pi(d.IsAxis)
- };
- y.push(o), d.DataList.length > 0 && (F.push(d.DataList[0].DataTimestamp), F.push(d.DataList[d.DataList.length - 1].DataTimestamp));
- });
- let R = Math.min.apply(null, F), S = Math.max.apply(null, F);
- const v = Xu(R, S, r.ChartInfo.DateType);
- return j = {
- ...$p,
- labels: {
- formatter: function(d) {
- return v ? Qn.dateFormat("%m/%d", d.value) : Qn.dateFormat("%y/%m", d.value);
- },
- style: {
- ...U && U.xAxisOptions.style
- }
- },
- tickInterval: $l.value === "phone" ? (S - R) / 6 / (24 * 3600 * 1e3) > 30 ? (S - R) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Ei(3, "datetime"),
- plotLines: Pi(3, "datetime")
- }, y.forEach((d) => {
- d.IsAxis === 1 ? (kt.hasLeftAxis = !0, (!ci || !f) && (kt.leftMin = E[I].MinData, kt.leftMax = E[I].MaxData, d.min = E[I].MinData, d.max = E[I].MaxData)) : d.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, (!ci || !f) && (kt.rightTwoMin = E[H].MinData, kt.rightTwoMax = E[H].MaxData, d.min = E[H].MinData, d.max = E[H].MaxData)) : (kt.hasRightAxis = !0, (!ci || !f) && (kt.rightMin = E[Z].MinData, kt.rightMax = E[Z].MaxData, d.min = E[Z].MinData, d.max = E[Z].MaxData));
- }), {
- series: l,
- xAxis: [j],
- yAxis: y,
- rangeSelector: { enabled: !1 }
- };
- }
- function $w(r) {
- var b;
- kt.leftIndex = 0;
- const { RightAxis: f = {} } = r.DataResp || {};
- kt.rightIndex = f.IsShow ? 1 : -1, kt.rightTwoIndex = -1;
- const E = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let l = {};
- const y = r.EdbInfoList[0], j = r.ChartInfo.Calendar || "公历", I = E && E.colorsOptions.reverse();
- let Z = [], H = [];
- const U = j === "农历" ? y.DataList.filter((w, x) => x > 0) : y.DataList;
- E && (E.lineOptionList = E.lineOptionList.reverse().slice(-U.length));
- let F = 0;
- U.forEach((w, x) => {
- let a = y.EdbInfoCategoryType === 1 ? Xw(w.CuttingDataTimestamp) : {};
- const c = E ? x % E.lineOptionList.length : x;
- let p = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: E && E.lineOptionList[c].lineType || y.ChartStyle,
- dashStyle: E && E.lineOptionList[c].dashStyle || "Solid",
- yAxis: 0,
- name: w.ChartLegend,
- lineWidth: E && E.lineOptionList[c].lineWidth || 1,
- // color:colorsArr.slice(-chartDataHandle.length)[lineIndex], //与PC端的配置不同步,导致两边 十条之后的线条颜色不对应
- visible: !0,
- marker: E && E.lineOptionList[c].dataMark && E.lineOptionList[c].dataMark != "none" ? {
- enabled: !0,
- symbol: E.lineOptionList[c].markType || "circle",
- fillColor: E.lineOptionList[c].markColor,
- radius: E.lineOptionList[c].markSize
- } : {},
- ...a
- };
- if (w.DataList = w.DataList || [], (w.DataList || []).length > 0) {
- let h = w.DataList[w.DataList.length - 1].DataTimestamp - w.DataList[0].DataTimestamp;
- F = Math.max(F, h);
- }
- for (let h of w.DataList)
- p.data.push([h.DataTimestamp, h.Value]);
- Z.push(p);
- }), l.colors = I.slice(-U.length);
- const { MaxMinLimits: N = {}, SamePeriodAverage: R = {}, SamePeriodStandardDeviation: S = {} } = r.DataResp || {};
- if (N.IsShow && N.List && N.List.length) {
- let w = {
- type: "arearange",
- //上下限是一个范围
- data: [],
- name: N.Legend || "同期上下限",
- color: N.Color || "#075EEE",
- fillOpacity: no(N.Color || "") > 0.75 ? 0.75 : no(N.Color || "")
- //透明度最高0.75
- };
- N.List.forEach((x) => {
- w.data.push([x.DataTimestamp, x.MinValue, x.MaxValue]);
- }), Z.push(w);
- }
- if (R.IsShow && R.List) {
- let w = {
- type: "line",
- data: [],
- lineWidth: R.LineWidth,
- dashStyle: R.LineType,
- name: R.Legend || "同期均值",
- color: R.Color || "#075EEE"
- };
- R.List.forEach((x) => {
- w.data.push([x.DataTimestamp, x.Value]);
- }), Z.push(w);
- }
- if (S.IsShow && S.List) {
- let w = {
- type: "arearange",
- //标准差也是一个范围
- data: [],
- name: S.Legend || "同期标准差",
- color: S.Color || "#075EEE",
- fillOpacity: no(S.Color || "") > 0.75 ? 0.75 : no(S.Color || "")
- };
- S.List.forEach((x) => {
- w.data.push([x.DataTimestamp, x.MinValue, x.MaxValue]);
- }), Z.push(w);
- }
- if (f.IsShow) {
- let x = {
- ...f.Style === "column" ? {
- //柱形
- type: "column",
- color: f.ChartColor
- } : {
- //标记点
- type: "spline",
- lineWidth: f.LineWidth,
- dashStyle: f.LineStyle,
- color: f.IsConnected ? f.LineColor : "rgba(255, 255, 255, 0)",
- //没有连线颜色设置为透明
- marker: {
- enabled: !0,
- symbol: f.Shape,
- fillColor: f.ChartColor,
- radius: f.Size
- }
- },
- name: f.Legend || "",
- data: [],
- yAxis: 1
- };
- ((f.IndicatorType === 1 ? f.EdbInfoList[0].DataList : (b = r.EdbInfoList[1]) == null ? void 0 : b.DataList) || []).forEach((c) => {
- x.data.push([c.DataTimestamp, c.Value]);
- }), Z.push(x);
- }
- let v = 0, d = 0, u = 0, A = 0;
- ci ? (v = kt.leftMin || 0, d = kt.leftMax || 0, kt.rightIndex !== -1 && (u = kt.rightMin || 0, A = kt.rightMax || 0)) : (v = y.MinData, d = y.MaxData);
- const O = y.ConvertUnit || y.Unit, B = y.ConvertEnUnit || y.UnitEn || y.ConvertUnit || y.Unit;
- if (H = [{
- IsAxis: y.IsAxis,
- labels: {
- align: "center",
- y: 5,
- style: {
- ...E && E.yAxisOptions.style
- }
- },
- title: {
- text: `${O}`,
- textZh: O,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: O ? B || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...E && E.yAxisOptions.style
- }
- },
- max: Number(d),
- min: Number(v),
- plotBands: Ei(1),
- plotLines: Pi(1),
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- opposite: !1,
- reversed: !1,
- visible: !0,
- gridLineWidth: 0,
- tickWidth: 1,
- tickLength: 5,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- //显示最后刻度值
- tickPixelInterval: 50
- // chartEdbInfo:item//指标数据
- }], f.IsShow) {
- const w = (f.IndicatorType === 1 ? f.EdbInfoList[0] : r.EdbInfoList[1]) || { Unit: "" };
- f.IndicatorType === 1 ? w.Unit = f.NumFormat === 1 ? "%" : "" : w.Unit = r.EdbInfoList[1] && (r.EdbInfoList[1].ConvertUnit || r.EdbInfoList[1].Unit) || "", H.push({
- ...T0.yAxis,
- opposite: !0,
- //右轴
- labels: {
- align: "center",
- y: 5,
- style: {
- ...E && E.yAxisOptions.style
- }
- },
- title: {
- text: w.Unit || "",
- style: {
- ...E && E.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "right",
- reserveSpace: !1
- },
- max: Number(A),
- min: Number(u)
- });
- }
- l.series = Z, l.yAxis = H, kt.hasLeftAxis = !0, ci || (kt.leftMin = Number(y.MinData), kt.leftMax = Number(y.MaxData));
- let C = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- },
- labels: {
- formatter: (w) => Qn.dateFormat("%m/%d", w.value),
- style: {
- ...E && E.xAxisOptions.style
- }
- },
- tickInterval: $l.value === "phone" ? F / 6 : void 0,
- //季节图
- plotBands: Ei(3, "datetime"),
- plotLines: Pi(3, "datetime")
- };
- return l.xAxis = [C], l.tooltip = {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%m/%d",
- week: "%m/%d",
- month: "%m/%d",
- year: "%m/%d"
- },
- xDateFormat: "%m/%d"
- }, {
- ...l
- // title: {
- // enabled: true,
- // text:e.ChartInfo.ChartName
- // },
- // legend:{
- // enabled:true,
- // verticalAlign: 'top',
- // y:-10,
- // x:(10 * data.Unit.length)/2
- // }
- };
- }
- function al(r) {
- const f = r.EdbInfoList;
- let l = {
- 3: "areaspline",
- 4: "column",
- 6: ""
- }[r.ChartInfo.ChartType];
- const y = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let j = [], I = [], Z = {}, H, U, F, N = [], R = f.some((u) => u.IsAxis === 2) ? Zl(f) : f;
- R.forEach((u, A) => {
- let O = R.findIndex((n) => n.IsAxis === u.IsAxis), B = A;
- [3, 4].includes(r.ChartInfo.ChartType) ? B = 0 : r.ChartInfo.ChartType === 6 && ["areaspline", "column"].includes(u.ChartStyle) && (B = R.findIndex((n) => n.ChartStyle === u.ChartStyle)), u.IsAxis = B === A ? u.IsAxis : R[B].IsAxis, u.IsOrder = B === A ? u.IsOrder : R[B].IsOrder, H = [3, 4].includes(r.ChartInfo.ChartType) ? R[B].IsAxis ? B : -1 : f.findIndex((n) => n.IsAxis === 1), U = [3, 4].includes(r.ChartInfo.ChartType) ? R[B].IsAxis ? -1 : B : f.findIndex((n) => !n.IsAxis), F = [3, 4].includes(r.ChartInfo.ChartType) ? -1 : f.findIndex((n) => n.IsAxis === 2), kt.leftIndex = H, kt.rightIndex = U, kt.rightTwoIndex = F;
- let C = u.EdbName, b = R.filter(
- (n) => C === n.EdbName
- ), w = Mo(u, b, "zh"), x = Mo(u, b, "en"), a = u.EdbInfoCategoryType === 1 ? Yu(u) : {};
- const c = y ? A % y.lineOptionList.length : A;
- let p = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: l || u.ChartStyle,
- yAxis: B,
- name: w,
- nameZh: w,
- nameEn: x,
- color: u.ChartColor,
- lineWidth: Number(u.ChartWidth) || y && y.lineOptionList[c].lineWidth || 1,
- fillColor: r.ChartInfo.ChartType === 3 || r.ChartInfo.ChartType === 6 && u.ChartStyle === "areaspline" ? u.ChartColor : void 0,
- visible: !0,
- LatestDate: u.LatestDate,
- LatestValue: u.LatestValue,
- ...a,
- stacking: r.ChartInfo.ChartType == 6 && !r.DataResp.IsHeap ? void 0 : "normal"
- };
- u.DataList = u.DataList || [];
- for (let n of u.DataList)
- p.data.push([n.DataTimestamp, n.Value]);
- j.push(p);
- let i = 0, h = 0;
- if (!ci)
- i = R[O].MinData, h = R[O].MaxData;
- else {
- const n = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- n[u.IsAxis] && (i = kt[`${n[u.IsAxis][0]}`] || 0, h = kt[`${n[u.IsAxis][1]}`] || 0);
- }
- u.IsAxis;
- const o = u.ConvertUnit || u.Unit, t = u.ConvertEnUnit || u.UnitEn || u.ConvertUnit || u.Unit;
- let s = {
- ...fr,
- IsAxis: u.IsAxis,
- labels: {
- formatter: function(n) {
- return O !== A ? "" : n.value;
- },
- align: "center",
- x: [0, 2].includes(u.IsAxis) ? 5 : -5,
- style: {
- ...y && y.yAxisOptions.style
- }
- },
- title: {
- // text: sameSideIndex !== index ? '' : `${item.Unit}`,
- text: o,
- textZh: o,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: o ? t || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -15,
- x: u.IsAxis === 0 && F > -1 ? -R[F].Unit.length * 12 : 0,
- textAlign: u.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...y && y.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(u.IsAxis),
- reversed: u.IsOrder,
- min: Number(i),
- max: Number(h),
- tickWidth: O !== A ? 0 : 1,
- visible: B === A && O === A,
- plotBands: Ei(u.IsAxis),
- plotLines: Pi(u.IsAxis),
- chartEdbInfo: u
- //指标数据用于在保存时读取指标数据
- };
- I.push(s), u.DataList.length > 0 && (N.push(u.DataList[0].DataTimestamp), N.push(u.DataList[u.DataList.length - 1].DataTimestamp));
- });
- let S = Math.min.apply(null, N), v = Math.max.apply(null, N);
- const d = Xu(S, v, r.ChartInfo.DateType);
- return Z = {
- ...$p,
- labels: {
- formatter: function(u) {
- return d ? Qn.dateFormat("%m/%d", u.value) : Qn.dateFormat("%y/%m", u.value);
- },
- style: {
- ...y && y.xAxisOptions.style
- }
- },
- tickInterval: $l.value === "phone" ? (v - S) / 6 / (24 * 3600 * 1e3) > 30 ? (v - S) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Ei(3, "datetime"),
- plotLines: Pi(3, "datetime")
- }, I.forEach((u) => {
- u.IsAxis === 1 ? (kt.hasLeftAxis = !0, ci || (kt.leftMin = f[H].MinData, kt.leftMax = f[H].MaxData, u.min = f[H].MinData, u.max = f[H].MaxData)) : u.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, ci || (kt.rightTwoMin = f[F].MinData, kt.rightTwoMax = f[F].MaxData, u.min = f[F].MinData, u.max = f[F].MaxData)) : (kt.hasRightAxis = !0, ci || (kt.rightMin = f[U].MinData, kt.rightMax = f[U].MaxData, u.min = f[U].MinData, u.max = f[U].MaxData));
- }), {
- series: j,
- xAxis: Z,
- yAxis: I,
- rangeSelector: { enabled: !1 }
- };
- }
- function Zw(r) {
- kt.leftIndex = 1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const f = r.EdbInfoList, { ChartInfo: E } = r, l = E.ChartThemeStyle ? JSON.parse(E.ChartThemeStyle) : null;
- kt.hasLeftAxis = !0;
- const y = [];
- let j = {}, I = rs.cloneDeep(f)[0].DataList || [], Z = rs.cloneDeep(f)[1].DataList || [];
- I.forEach((B) => {
- Z.forEach((C) => {
- if (B.DataTimestamp === C.DataTimestamp) {
- let b = B.Value + "_" + C.Value;
- j[b] ? j[b].push(Xt(B.DataTimestamp).format("YYYY/MM/DD")) : j[b] = [Xt(B.DataTimestamp).format("YYYY/MM/DD")], y.push({
- x: B.Value,
- y: C.Value
- });
- }
- });
- }), y.sort((B, C) => B - C);
- let H = {
- formatter: function() {
- return `<strong>${j[this.x + "_" + this.y].length > 4 ? j[this.x + "_" + this.y].slice(0, 4).join() + "..." : j[this.x + "_" + this.y].join()}</strong><br>
- ${f[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${f[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 中文
- formatterCh: function() {
- return `<strong>${j[this.x + "_" + this.y].length > 4 ? j[this.x + "_" + this.y].slice(0, 4).join() + "..." : j[this.x + "_" + this.y].join()}</strong><br>
- ${f[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${f[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 英文
- formatterEn: function() {
- let B = `${f[0].EdbNameEn}`, C = `${f[1].EdbNameEn}`;
- return `<strong>${j[this.x + "_" + this.y].length > 4 ? j[this.x + "_" + this.y].slice(0, 4).join() + "..." : j[this.x + "_" + this.y].join()}</strong><br>
- ${B}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${C}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- }
- };
- const { IsOrder: U, ChartColor: F } = f[0];
- let N = 0, R = 0;
- ci ? (N = kt.leftMin || 0, R = kt.leftMax || 0) : (N = r.ChartInfo.LeftMin || 0, R = r.ChartInfo.LeftMax || 0), console.log("check limit", N, R);
- const S = f[1].ConvertUnit || f[1].Unit, v = f[1].ConvertEnUnit || f[1].UnitEn || f[1].ConvertUnit || f[1].Unit;
- let d = {
- title: {
- text: `${S}`,
- textZh: S,
- textEn: S ? v : "",
- align: "high",
- rotation: 0,
- y: -15,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(B) {
- return B.value;
- },
- align: "center",
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: U,
- min: Number(N),
- max: Number(R),
- tickWidth: 1,
- tickLength: 5,
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- visible: !0,
- gridLineWidth: 0,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- tickPixelInterval: 50,
- plotBands: Ei(1),
- plotLines: Pi(1)
- }, u = {
- data: [],
- type: "scatter",
- name: `${E.ChartName}${U ? "(逆序)" : ""}`,
- nameZh: `${E.ChartName}${U ? "(逆序)" : ""}`,
- nameEn: E.ChartNameEn ? `${E.ChartNameEn}${U ? "(reverse)" : ""}` : "",
- color: F,
- visible: !0,
- chartType: "linear",
- marker: {
- radius: l && l.lineOptionList[0].radius || 5
- }
- };
- y.forEach((B) => {
- u.data.push([B.x, B.y]);
- });
- const A = f[0].ConvertUnit || f[0].Unit, O = f[0].ConvertEnUnit || f[0].UnitEn || f[0].ConvertUnit || f[0].Unit;
- return {
- title: {
- text: ""
- },
- series: [u],
- yAxis: d,
- xAxis: {
- ...Mn,
- title: {
- text: `${A}`,
- textZh: A,
- textEn: A ? O : "",
- align: "high",
- rotation: 0,
- x: 0,
- offset: 20,
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- }
- },
- tooltip: H
- };
- }
- const Gu = Le([]), Hu = Le([]), Kw = Le([]);
- function Jw(r) {
- var F, N, R;
- let f = [];
- const E = rs.cloneDeep(Gu.value), l = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let y = {
- ...Mn,
- categories: Hu.value,
- tickWidth: 1,
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- }
- };
- const { leftMin: j, leftMax: I } = kt, Z = (F = r.ChartInfo) == null ? void 0 : F.Unit, H = ((N = r.ChartInfo) == null ? void 0 : N.UnitEn) || ((R = r.ChartInfo) == null ? void 0 : R.Unit);
- let U = {
- ...fr,
- title: {
- text: Z,
- textZh: Z,
- textEn: H,
- align: "high",
- rotation: 0,
- y: -12,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(S) {
- return S.value;
- },
- align: "center",
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- min: Number(j),
- max: Number(I),
- opposite: !1,
- tickWidth: 1,
- plotBands: Ei(1),
- plotLines: Pi(1)
- };
- return E.forEach((S) => {
- let v = {
- data: S.Value,
- type: "column",
- yAxis: 0,
- name: S.Name || S.Date,
- nameZh: S.Name || S.Date,
- nameEn: S.Date,
- color: S.Color,
- chartType: "linear",
- visible: !0
- };
- f.push(v);
- }), {
- title: {
- text: ""
- },
- plotOptions: {
- column: {
- stacking: null
- }
- },
- series: f,
- yAxis: [U],
- xAxis: y
- };
- }
- function qw(r) {
- const { XEdbIdValue: f, YDataList: E, EdbInfoList: l, ChartInfo: y } = r;
- let j = f.map((I) => l.find((Z) => Z.EdbInfoId === I).EdbAliasName);
- return kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, Gu.value = E, Hu.value = j, Kw.value = l, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), Jw(r);
- }
- const Fu = Le([]), Vr = Le([]), Ni = Le([]), Qw = (r, f) => {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const E = _e.value.ChartInfo.ChartThemeStyle ? JSON.parse(_e.value.ChartInfo.ChartThemeStyle) : null;
- let l = [];
- const y = rs.cloneDeep(Fu.value);
- console.log(y);
- let j = {
- ...Mn,
- categories: Vr.value.filter((H) => H.IsHide === 0).map((H) => H.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...E && E.xAxisOptions.style
- }
- }
- }, I = {
- ...fr,
- title: {
- text: Ni.value[0].Unit,
- textZh: Ni.value[0].Unit,
- textEn: Ni.value[0].Unit ? Ni.value[0].UnitEn || "英文单位" : "",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...E && E.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(H) {
- return H.value;
- },
- align: "center",
- style: {
- ...E && E.yAxisOptions.style
- }
- },
- min: Number(r),
- max: Number(f),
- opposite: !1,
- tickWidth: 1
- };
- return y.forEach((H, U) => {
- let F = tM(H);
- const N = E ? U % E.lineOptionList.length : U;
- let R = {
- data: F,
- type: E && E.lineOptionList[N].lineType || "spline",
- dashStyle: E && E.lineOptionList[N].dashStyle || "Solid",
- yAxis: 0,
- name: H.Name,
- nameZh: H.Name,
- nameEn: H.NameEn,
- color: H.Color,
- chartType: "linear",
- lineWidth: E && E.lineOptionList[N].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- l.push(R);
- }), {
- title: {
- text: ""
- },
- series: l,
- yAxis: [I],
- xAxis: j,
- tooltip: {
- formatter: function() {
- const H = this;
- let U = "";
- return H.points.forEach((F) => {
- let N = y.find((v) => v.Name === F.series.name), R = Vr.value.findIndex((v) => v.Name === H.x);
- const S = N.XEdbInfoIdList[R];
- if (S) {
- const v = Ni.value.some((u) => u.EdbInfoId === S);
- let d = _e.value.ChartInfo.Source === 5 ? v ? N.NameList[R] : `${_e.value.DataResp.ProfitName}(${N.NameList[R]})` : Ni.value.find((u) => u.EdbInfoId === N.XEdbInfoIdList[R]).EdbName;
- U += `<b>${d}</b>`, N.NoDataEdbList.includes(N.XEdbInfoIdList[R]) ? U += `<br><span style="color:${F.color}">●</span>${N.Date}: 无<br>` : U += `<br><span style="color:${F.color}">●</span>${N.Date}: ${F.y}<br>`;
- }
- }), U || "无合约";
- },
- formatterCh: function() {
- const H = this;
- let U = "";
- return H.points.forEach((F) => {
- let N = y.find((v) => v.Name === F.series.name), R = Vr.value.findIndex((v) => v.Name === H.x);
- const S = N.XEdbInfoIdList[R];
- if (S) {
- const v = Ni.value.some((u) => u.EdbInfoId === S);
- let d = _e.value.ChartInfo.Source === 5 ? v ? N.NameList[R] : `${_e.value.DataResp.ProfitName}(${N.NameList[R]})` : Ni.value.find((u) => u.EdbInfoId === N.XEdbInfoIdList[R]).EdbName;
- U += `<b>${d}</b>`, N.NoDataEdbList.includes(N.XEdbInfoIdList[R]) ? U += `<br><span style="color:${F.color}">●</span>${N.Date}: 无<br>` : U += `<br><span style="color:${F.color}">●</span>${N.Date}: ${F.y}<br>`;
- }
- }), U || "无合约";
- },
- formatterEn: function() {
- const H = this;
- let U = "";
- return H.points.forEach((F) => {
- let N = y.find((v) => v.NameEn === F.series.name), R = Vr.value.findIndex((v) => v.NameEn === H.x);
- const S = N.XEdbInfoIdList[R];
- if (S) {
- const v = Ni.value.some((u) => u.EdbInfoId === S);
- let d = _e.value.ChartInfo.Source === 5 ? v ? N.NameList[R] : `${_e.value.DataResp.ProfitNameEn}(${N.NameList[R]})` : Ni.value.find((u) => u.EdbInfoId === N.XEdbInfoIdList[R]).EdbNameEn;
- U += `<b>${d}</b>`, N.NoDataEdbList.includes(N.XEdbInfoIdList[R]) ? U += `<br><span style="color:${F.color}">●</span>${N.Date}: 无<br>` : U += `<br><span style="color:${F.color}">●</span>${N.Date}: ${F.y}<br>`;
- }
- }), U || "无合约";
- },
- shared: !0
- }
- };
- };
- function tM(r) {
- let f = r.XEdbInfoIdList.filter((I) => !r.NoDataEdbList.includes(I)), E = r.XEdbInfoIdList.findIndex((I) => I === f[0]), l = r.XEdbInfoIdList.findIndex((I) => I === f[f.length - 1]), y = r.Value.map((I, Z) => Z < E || Z > l ? null : I), j = [];
- return Vr.value.forEach((I, Z) => {
- I.IsHide !== 1 && j.push(y[Z]);
- }), j;
- }
- function eM(r) {
- const { XDataList: f, YDataList: E, EdbInfoList: l, ChartInfo: y, DataResp: j } = r;
- return Ni.value = l, Fu.value = y.Source === 5 ? j.YDataList : E, Vr.value = y.Source === 5 ? j.XDataList : f, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), Qw(y.LeftMin, y.LeftMax);
- }
- function iM(r) {
- const f = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- let E = {
- categories: r.ChartInfo.Source === 3 ? r.XEdbIdValue : r.DataResp.XDateTimeValue,
- tickWidth: 1,
- title: {
- text: r.ChartInfo.Source === 3 ? `期数(${r.CorrelationChartInfo.LeadUnit})` : null,
- textZh: r.ChartInfo.Source === 3 ? `期数(${r.CorrelationChartInfo.LeadUnit})` : null,
- textEn: r.ChartInfo.Source === 3 ? `stage(${Ep[r.CorrelationChartInfo.LeadUnit]})` : null,
- align: "high",
- rotation: 0,
- x: 0,
- y: 10,
- offset: 20,
- style: {
- ...f && f.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...f && f.xAxisOptions.style
- }
- },
- tickInterval: 1,
- offset: 0,
- tickmarkPlacement: "on"
- }, l = {
- ...fr,
- title: {
- text: "相关性系数",
- textZh: "相关性系数",
- textEn: "Correlation coefficient",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...f && f.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(U) {
- return U.value;
- },
- align: "center",
- style: {
- ...f && f.yAxisOptions.style
- }
- },
- opposite: !1,
- tickWidth: 1
- }, y = [];
- r.YDataList.forEach((U, F) => {
- const N = f ? F % f.lineOptionList.length : F;
- let R = {
- data: U.Value,
- type: f && f.lineOptionList[N].lineType || "spline",
- dashStyle: f && f.lineOptionList[N].dashStyle || "Solid",
- yAxis: 0,
- name: U.Name || r.ChartInfo.ChartName,
- nameZh: U.Name || r.ChartInfo.ChartName,
- nameEn: U.NameEn || r.ChartInfo.ChartNameEn,
- color: U.Color,
- chartType: "linear",
- lineWidth: f && f.lineOptionList[N].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- y.push(R);
- });
- const { LeadValue: j, LeadUnit: I } = r.CorrelationChartInfo, { Source: Z } = r.ChartInfo;
- let H = {
- formatter: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${Z === 3 ? this.x + "期" : j + I}</p>`;
- },
- formatterCh: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${Z === 3 ? this.x + "期" : j + I}</p>`;
- },
- formatterEn: function() {
- return `<p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${Z === 3 ? this.x + "stage" : j + Ep[I]}</p>`;
- }
- };
- return fo(() => {
- re.value = {
- isRelevanceChart: r.ChartInfo.Source === 3,
- title: {
- text: ""
- },
- series: y,
- yAxis: [l],
- xAxis: E,
- tooltip: H
- }, lo.update(re.value, !0);
- }), {
- isRelevanceChart: !0,
- title: {
- text: ""
- },
- series: y,
- yAxis: [l],
- xAxis: E,
- tooltip: H
- };
- }
- function rM({ DataResp: r, ChartInfo: f }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const E = f.ChartThemeStyle ? JSON.parse(f.ChartThemeStyle) : null, { DataList: l, XName: y, XNameEn: j, XUnitName: I, XUnitNameEn: Z, YName: H, YNameEn: U, YUnitName: F, YUnitNameEn: N } = r, R = Number(r.YMinValue), S = Number(r.YMaxValue), v = Number(r.XMinValue), d = Number(r.XMaxValue);
- kt.hasLeftAxis = !0, kt.hasXAxis = !0, kt.leftMin = R, kt.leftMax = S, kt.xMin = v, kt.xMax = d;
- let u = {
- ...fr,
- title: {
- text: H,
- textZh: H,
- // 中文
- textEn: U || "",
- style: {
- ...E && E.yAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...E && E.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(R),
- max: Number(S),
- tickWidth: 1,
- plotBands: Ei(1),
- plotLines: Pi(1)
- }, A = {
- ...Mn,
- title: {
- text: y,
- textZh: y,
- // 中文
- textEn: j || "",
- style: {
- ...E && E.xAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...E && E.xAxisOptions.style
- }
- },
- min: Number(v),
- max: Number(d),
- plotBands: Ei(3),
- plotLines: Pi(3)
- }, O = [];
- return l.forEach((C, b) => {
- const w = E ? b % E.lineOptionList.length : b;
- let x = {
- data: [],
- type: "scatter",
- name: C.Name,
- nameZh: C.Name,
- nameEn: C.NameEn,
- color: C.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1,
- visible: !0,
- marker: {
- radius: E && E.lineOptionList[w].radius || 5
- }
- };
- if (C.EdbInfoList.forEach((a) => {
- x.data.push({
- x: a.XValue,
- y: a.YValue,
- dataLabels: {
- enabled: a.IsShow,
- allowOverlap: !0,
- align: "left",
- format: a.Name,
- formatZh: a.Name,
- formatEn: a.NameEn
- }
- });
- }), O.push(x), C.ShowTrendLine) {
- let c = {
- data: C.TrendLimitData.map((p, i) => i === C.TrendLimitData.length - 1 ? {
- x: p.X,
- y: p.Y,
- dataLabels: {
- enabled: C.ShowRSquare || C.ShowFitEquation,
- align: "left",
- color: C.Color,
- x: 20,
- y: 30,
- zIndex: 9,
- allowOverlap: !0,
- formatter: function() {
- let h = "";
- return C.ShowRSquare && C.ShowFitEquation ? h = `<span>${C.TrendLine}</span><br><span>R²=${C.RSquare}</span>` : C.ShowRSquare && !C.ShowFitEquation ? h = `<span>R²=${C.RSquare}</span>` : C.ShowFitEquation && !C.ShowRSquare && (h = `<span>${C.TrendLine}</span>`), h;
- }
- }
- } : {
- x: p.X,
- y: p.Y
- }),
- type: "spline",
- linkedTo: ":previous",
- color: C.Color,
- lineWidth: 1,
- chartType: "linear",
- enableMouseTracking: !1,
- dashStyle: "Dash",
- zIndex: 2,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- O.push(c);
- }
- }), {
- title: {
- text: ""
- },
- series: O,
- yAxis: [u],
- xAxis: A,
- tooltip: {
- formatter: function() {
- let b = l.find((x) => x.Name === this.series.name).EdbInfoList.find((x) => x.XValue === this.x && x.YValue === this.y), w = `<b>${b.Name}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${b.XName}: ${this.x} ${b.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${b.YName}: ${this.y} (${b.YDate})`, w;
- },
- formatterCh: function() {
- let b = l.find((x) => x.Name === this.series.name).EdbInfoList.find((x) => x.XValue === this.x && x.YValue === this.y), w = `<b>${b.Name}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${b.XName}: ${this.x} ${b.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${b.YName}: ${this.y} (${b.YDate})`, w;
- },
- formatterEn: function() {
- let b = l.find((x) => x.NameEn === this.series.name).EdbInfoList.find((x) => x.XValue === this.x && x.YValue === this.y), w = `<b>${b.NameEn}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${b.XNameEn}: ${this.x} ${b.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${b.YNameEn}: ${this.y} ${b.YDate}`, w;
- }
- }
- };
- }
- function nM({ DataResp: r, EdbInfoList: f, ChartInfo: E }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const l = E.ChartThemeStyle ? JSON.parse(E.ChartThemeStyle) : null, { DataList: y, XName: j, YName: I, XNameEn: Z, YNameEn: H, XMaxValue: U, XMinValue: F, YMaxValue: N, YMinValue: R } = r, { leftMin: S, leftMax: v, xMin: d, xMax: u } = kt;
- let A = {
- ...fr,
- title: {
- text: I,
- textCh: I,
- // 中文
- textEn: H || I,
- align: "middle",
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(S),
- max: Number(v),
- tickWidth: 1
- }, O = {
- ...Mn,
- title: {
- text: j,
- textCh: j,
- // 中文
- textEn: Z || j,
- align: "middle",
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- min: Number(d),
- max: Number(u)
- }, B = [];
- const C = {
- //标签对应文字
- 1: "最新",
- 3: "Fix"
- };
- return y.forEach((w) => {
- let x = {
- data: [],
- type: "scatter",
- name: w.Name,
- nameZh: w.Name,
- nameEn: w.NameEn || w.Name,
- color: w.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1
- };
- w.CoordinatePointData.forEach((a) => {
- x.data.push({
- x: a.X,
- y: a.Y,
- dataLabels: {
- enabled: a.ShowTips === 1,
- allowOverlap: !0,
- align: "left",
- format: C[a.DateType] || `-${a.DaysAgo}D`
- }
- });
- }), B.push(x);
- }), {
- title: {
- text: ""
- },
- series: B,
- yAxis: [A],
- xAxis: O,
- tooltip: {
- formatter: function() {
- let x = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), a = f.find((i) => i.EdbInfoId === x.XEdbInfoId), c = f.find((i) => i.EdbInfoId === x.YEdbInfoId), p = `<b>${this.series.name}</b>`;
- return p += `<br><span style="color:${this.color}">●</span>${a.EdbName}: ${this.x} ${x.XDate}<br>`, p += `<span style="color:${this.color}">●</span>${c.EdbName}: ${this.y} ${x.YDate}`, p;
- },
- formatterCh: function() {
- let x = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), a = f.find((i) => i.EdbInfoId === x.XEdbInfoId), c = f.find((i) => i.EdbInfoId === x.YEdbInfoId), p = `<b>${this.series.name}</b>`;
- return p += `<br><span style="color:${this.color}">●</span>${a.EdbName}: ${this.x} ${x.XDate}<br>`, p += `<span style="color:${this.color}">●</span>${c.EdbName}: ${this.y} ${x.YDate}`, p;
- },
- formatterEn: function() {
- let x = y.find((i) => i.NameEn === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), a = f.find((i) => i.EdbInfoId === x.XEdbInfoId), c = f.find((i) => i.EdbInfoId === x.YEdbInfoId), p = `<b>${this.series.name}</b>`;
- return p += `<br><span style="color:${this.color}">●</span>${a.EdbNameEn}: ${this.x} ${x.XDate}<br>`, p += `<span style="color:${this.color}">●</span>${c.EdbNameEn}: ${this.y} ${x.YDate}`, p;
- }
- }
- };
- }
- function sM({ DataResp: r, EdbInfoList: f, ChartInfo: E }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const { YDataList: l, XEdbIdValue: y } = r;
- let j = f.filter((F) => y.includes(F.EdbInfoId));
- kt.hasLeftAxis = !0, kt.leftMin = Number(E.LeftMin), kt.leftMax = Number(E.LeftMax);
- const I = E.ChartThemeStyle ? JSON.parse(E.ChartThemeStyle) : null;
- let Z = {
- lineWidth: 0,
- tickLength: 0,
- tickmarkPlacement: "on",
- categories: j.map((F) => F.EdbAliasName || F.EdbName),
- labels: {
- allowOverlap: !0,
- autoRotationLimit: 40,
- style: {
- ...I && I.xAxisOptions.style
- }
- }
- }, H = [{
- gridLineInterpolation: "polygon",
- gridLineWidth: 1,
- lineWidth: 0,
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- // tickAmount:4,
- title: {
- text: E.Unit,
- textCh: E.Unit,
- textEn: E.UnitEn,
- align: "high",
- rotation: 0,
- y: 5,
- x: 10,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...I && I.yAxisOptions.style
- }
- },
- labels: {
- allowOverlap: !0,
- style: {
- ...I && I.yAxisOptions.style
- }
- },
- min: Number(E.LeftMin),
- max: Number(E.LeftMax)
- }], U = [];
- return l.forEach((F, N) => {
- const R = I ? N % I.lineOptionList.length : N;
- let S = {
- name: F.Name || F.Date,
- nameZh: F.Name || F.Date,
- nameEn: F.Date,
- data: F.Value,
- pointPlacement: "on",
- type: I && I.lineOptionList[R].lineType || "line",
- dashStyle: I && I.lineOptionList[R].dashStyle || "Solid",
- yAxis: 0,
- color: F.Color,
- lineWidth: I && I.lineOptionList[R].lineWidth || 1,
- chartType: "linear"
- };
- U.push(S);
- }), {
- chart: {
- ...go.chart,
- ...I == null ? void 0 : I.drawOption,
- spacing: [2, 10, 2, 10],
- polar: !0
- },
- title: {
- text: ""
- },
- pane: {
- size: "85%"
- },
- series: U,
- yAxis: H,
- xAxis: Z
- };
- }
- function no(r = "rgba(51, 51, 51, 1)") {
- const f = r.match(/(\d(\.\d+)?)+/g) || ["", "", "", 1];
- return parseFloat(f[3] || 1);
- }
- function oM(r = [], f, E = {}) {
- if (f.ChartType === 5) {
- r[1] && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- const l = r.filter((I) => I.IsAxis === 1).map((I) => [Number(I.MinData), Number(I.MaxData)]), y = r.filter((I) => !I.IsAxis).map((I) => [Number(I.MinData), Number(I.MaxData)]), j = r.filter((I) => I.IsAxis === 2).map((I) => [Number(I.MinData), Number(I.MaxData)]);
- if (l.length) {
- const {
- Max: I,
- Min: Z
- } = Sn(l.flat());
- kt.leftMin = Z, kt.leftMax = I;
- }
- if (y.length) {
- const {
- Max: I,
- Min: Z
- } = Sn(y.flat());
- kt.rightMin = Z, kt.rightMax = I;
- }
- if (j.length) {
- const {
- Max: I,
- Min: Z
- } = Sn(j.flat());
- kt.rightTwoMin = Z, kt.rightTwoMax = I;
- }
- f.ChartType === 2 && E.RightAxis && E.RightAxis.IsAdd && E.RightAxis.IsShow && (E.RightAxis.IndicatorType === 1 ? (kt.rightMin = E.RightAxis.EdbInfoList[0].MinData || 0, kt.rightMax = E.RightAxis.EdbInfoList[0].MaxData || 0) : (kt.rightMin = r[1].MinData || 0, kt.rightMax = r[1].MaxData || 0));
- }
- function Sn(r) {
- return {
- Max: Math.max(...r),
- Min: Math.min(...r)
- };
- }
- function aM({ EdbInfoList: r, ChartInfo: f, DataResp: E }) {
- const {
- //左右轴极值字段
- LeftMin: l = 0,
- LeftMax: y = 0,
- RightMin: j = 0,
- RightMax: I = 0,
- Right2Min: Z = 0,
- Right2Max: H = 0,
- MinMaxSave: U
- } = f;
- U ? (kt.leftMin = Number(l), kt.leftMax = Number(y), kt.rightMin = Number(j), kt.rightMax = Number(I), kt.rightTwoMin = Number(Z), kt.rightTwoMax = Number(H), lM(r, f), console.log("check", kt.leftMin, kt.leftMax)) : oM(r, f, E || {});
- }
- function lM(r = [], f) {
- if (f.ChartType === 5) {
- r[1] && Number(kt.leftMin) === 0 && Number(kt.leftMax) === 0 && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- if (Number(kt.leftMin) === 0 && Number(kt.leftMax) === 0) {
- const E = r.filter((l) => l.IsAxis === 1).map((l) => [Number(l.MinData), Number(l.MaxData)]);
- if (E.length) {
- const { Max: l, Min: y } = Sn(E.flat());
- kt.leftMin = y, kt.leftMax = l;
- }
- }
- if (Number(kt.rightMin) === 0 && Number(kt.rightMax) === 0) {
- const E = r.filter((l) => !l.IsAxis).map((l) => [Number(l.MinData), Number(l.MaxData)]);
- if (E.length) {
- const { Max: l, Min: y } = Sn(E.flat());
- kt.rightMin = y, kt.rightMax = l;
- }
- }
- if (Number(kt.rightTwoMin) === 0 && Number(kt.rightTwoMax) === 0) {
- const E = r.filter((l) => l.IsAxis === 2).map((l) => [Number(l.MinData), Number(l.MaxData)]);
- if (E.length) {
- const { Max: l, Min: y } = Sn(E.flat());
- kt.rightTwoMin = y, kt.rightTwoMax = l;
- }
- }
- }
- function Uu(r, f) {
- return function() {
- return r.apply(f, arguments);
- };
- }
- const { toString: hM } = Object.prototype, { getPrototypeOf: Kl } = Object, Bo = ((r) => (f) => {
- const E = hM.call(f);
- return r[E] || (r[E] = E.slice(8, -1).toLowerCase());
- })(/* @__PURE__ */ Object.create(null)), yr = (r) => (r = r.toLowerCase(), (f) => Bo(f) === r), jo = (r) => (f) => typeof f === r, { isArray: An } = Array, ns = jo("undefined");
- function cM(r) {
- return r !== null && !ns(r) && r.constructor !== null && !ns(r.constructor) && dr(r.constructor.isBuffer) && r.constructor.isBuffer(r);
- }
- const Vu = yr("ArrayBuffer");
- function pM(r) {
- let f;
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? f = ArrayBuffer.isView(r) : f = r && r.buffer && Vu(r.buffer), f;
- }
- const uM = jo("string"), dr = jo("function"), $u = jo("number"), Jl = (r) => r !== null && typeof r == "object", dM = (r) => r === !0 || r === !1, ho = (r) => {
- if (Bo(r) !== "object")
- return !1;
- const f = Kl(r);
- return (f === null || f === Object.prototype || Object.getPrototypeOf(f) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
- }, fM = yr("Date"), gM = yr("File"), mM = yr("Blob"), yM = yr("FileList"), vM = (r) => Jl(r) && dr(r.pipe), xM = (r) => {
- let f;
- return r && (typeof FormData == "function" && r instanceof FormData || dr(r.append) && ((f = Bo(r)) === "formdata" || // detect form-data instance
- f === "object" && dr(r.toString) && r.toString() === "[object FormData]"));
- }, bM = yr("URLSearchParams"), SM = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- function hs(r, f, { allOwnKeys: E = !1 } = {}) {
- if (r === null || typeof r > "u")
- return;
- let l, y;
- if (typeof r != "object" && (r = [r]), An(r))
- for (l = 0, y = r.length; l < y; l++)
- f.call(null, r[l], l, r);
- else {
- const j = E ? Object.getOwnPropertyNames(r) : Object.keys(r), I = j.length;
- let Z;
- for (l = 0; l < I; l++)
- Z = j[l], f.call(null, r[Z], Z, r);
- }
- }
- function Zu(r, f) {
- f = f.toLowerCase();
- const E = Object.keys(r);
- let l = E.length, y;
- for (; l-- > 0; )
- if (y = E[l], f === y.toLowerCase())
- return y;
- return null;
- }
- const Ku = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ju = (r) => !ns(r) && r !== Ku;
- function Cl() {
- const { caseless: r } = Ju(this) && this || {}, f = {}, E = (l, y) => {
- const j = r && Zu(f, y) || y;
- ho(f[j]) && ho(l) ? f[j] = Cl(f[j], l) : ho(l) ? f[j] = Cl({}, l) : An(l) ? f[j] = l.slice() : f[j] = l;
- };
- for (let l = 0, y = arguments.length; l < y; l++)
- arguments[l] && hs(arguments[l], E);
- return f;
- }
- const wM = (r, f, E, { allOwnKeys: l } = {}) => (hs(f, (y, j) => {
- E && dr(y) ? r[j] = Uu(y, E) : r[j] = y;
- }, { allOwnKeys: l }), r), MM = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), CM = (r, f, E, l) => {
- r.prototype = Object.create(f.prototype, l), r.prototype.constructor = r, Object.defineProperty(r, "super", {
- value: f.prototype
- }), E && Object.assign(r.prototype, E);
- }, kM = (r, f, E, l) => {
- let y, j, I;
- const Z = {};
- if (f = f || {}, r == null)
- return f;
- do {
- for (y = Object.getOwnPropertyNames(r), j = y.length; j-- > 0; )
- I = y[j], (!l || l(I, r, f)) && !Z[I] && (f[I] = r[I], Z[I] = !0);
- r = E !== !1 && Kl(r);
- } while (r && (!E || E(r, f)) && r !== Object.prototype);
- return f;
- }, AM = (r, f, E) => {
- r = String(r), (E === void 0 || E > r.length) && (E = r.length), E -= f.length;
- const l = r.indexOf(f, E);
- return l !== -1 && l === E;
- }, TM = (r) => {
- if (!r)
- return null;
- if (An(r))
- return r;
- let f = r.length;
- if (!$u(f))
- return null;
- const E = new Array(f);
- for (; f-- > 0; )
- E[f] = r[f];
- return E;
- }, PM = ((r) => (f) => r && f instanceof r)(typeof Uint8Array < "u" && Kl(Uint8Array)), EM = (r, f) => {
- const l = (r && r[Symbol.iterator]).call(r);
- let y;
- for (; (y = l.next()) && !y.done; ) {
- const j = y.value;
- f.call(r, j[0], j[1]);
- }
- }, OM = (r, f) => {
- let E;
- const l = [];
- for (; (E = r.exec(f)) !== null; )
- l.push(E);
- return l;
- }, LM = yr("HTMLFormElement"), _M = (r) => r.toLowerCase().replace(
- /[-_\s]([a-z\d])(\w*)/g,
- function(E, l, y) {
- return l.toUpperCase() + y;
- }
- ), Np = (({ hasOwnProperty: r }) => (f, E) => r.call(f, E))(Object.prototype), DM = yr("RegExp"), qu = (r, f) => {
- const E = Object.getOwnPropertyDescriptors(r), l = {};
- hs(E, (y, j) => {
- f(y, j, r) !== !1 && (l[j] = y);
- }), Object.defineProperties(r, l);
- }, IM = (r) => {
- qu(r, (f, E) => {
- if (dr(r) && ["arguments", "caller", "callee"].indexOf(E) !== -1)
- return !1;
- const l = r[E];
- if (dr(l)) {
- if (f.enumerable = !1, "writable" in f) {
- f.writable = !1;
- return;
- }
- f.set || (f.set = () => {
- throw Error("Can not rewrite read-only method '" + E + "'");
- });
- }
- });
- }, RM = (r, f) => {
- const E = {}, l = (y) => {
- y.forEach((j) => {
- E[j] = !0;
- });
- };
- return An(r) ? l(r) : l(String(r).split(f)), E;
- }, NM = () => {
- }, BM = (r, f) => (r = +r, Number.isFinite(r) ? r : f), ll = "abcdefghijklmnopqrstuvwxyz", Bp = "0123456789", Qu = {
- DIGIT: Bp,
- ALPHA: ll,
- ALPHA_DIGIT: ll + ll.toUpperCase() + Bp
- }, jM = (r = 16, f = Qu.ALPHA_DIGIT) => {
- let E = "";
- const { length: l } = f;
- for (; r--; )
- E += f[Math.random() * l | 0];
- return E;
- };
- function WM(r) {
- return !!(r && dr(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
- }
- const zM = (r) => {
- const f = new Array(10), E = (l, y) => {
- if (Jl(l)) {
- if (f.indexOf(l) >= 0)
- return;
- if (!("toJSON" in l)) {
- f[y] = l;
- const j = An(l) ? [] : {};
- return hs(l, (I, Z) => {
- const H = E(I, y + 1);
- !ns(H) && (j[Z] = H);
- }), f[y] = void 0, j;
- }
- }
- return l;
- };
- return E(r, 0);
- }, _t = {
- isArray: An,
- isArrayBuffer: Vu,
- isBuffer: cM,
- isFormData: xM,
- isArrayBufferView: pM,
- isString: uM,
- isNumber: $u,
- isBoolean: dM,
- isObject: Jl,
- isPlainObject: ho,
- isUndefined: ns,
- isDate: fM,
- isFile: gM,
- isBlob: mM,
- isRegExp: DM,
- isFunction: dr,
- isStream: vM,
- isURLSearchParams: bM,
- isTypedArray: PM,
- isFileList: yM,
- forEach: hs,
- merge: Cl,
- extend: wM,
- trim: SM,
- stripBOM: MM,
- inherits: CM,
- toFlatObject: kM,
- kindOf: Bo,
- kindOfTest: yr,
- endsWith: AM,
- toArray: TM,
- forEachEntry: EM,
- matchAll: OM,
- isHTMLForm: LM,
- hasOwnProperty: Np,
- hasOwnProp: Np,
- // an alias to avoid ESLint no-prototype-builtins detection
- reduceDescriptors: qu,
- freezeMethods: IM,
- toObjectSet: RM,
- toCamelCase: _M,
- noop: NM,
- toFiniteNumber: BM,
- findKey: Zu,
- global: Ku,
- isContextDefined: Ju,
- ALPHABET: Qu,
- generateString: jM,
- isSpecCompliantForm: WM,
- toJSONObject: zM
- };
- function fe(r, f, E, l, y) {
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = r, this.name = "AxiosError", f && (this.code = f), E && (this.config = E), l && (this.request = l), y && (this.response = y);
- }
- _t.inherits(fe, Error, {
- toJSON: function() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: _t.toJSONObject(this.config),
- code: this.code,
- status: this.response && this.response.status ? this.response.status : null
- };
- }
- });
- const td = fe.prototype, ed = {};
- [
- "ERR_BAD_OPTION_VALUE",
- "ERR_BAD_OPTION",
- "ECONNABORTED",
- "ETIMEDOUT",
- "ERR_NETWORK",
- "ERR_FR_TOO_MANY_REDIRECTS",
- "ERR_DEPRECATED",
- "ERR_BAD_RESPONSE",
- "ERR_BAD_REQUEST",
- "ERR_CANCELED",
- "ERR_NOT_SUPPORT",
- "ERR_INVALID_URL"
- // eslint-disable-next-line func-names
- ].forEach((r) => {
- ed[r] = { value: r };
- });
- Object.defineProperties(fe, ed);
- Object.defineProperty(td, "isAxiosError", { value: !0 });
- fe.from = (r, f, E, l, y, j) => {
- const I = Object.create(td);
- return _t.toFlatObject(r, I, function(H) {
- return H !== Error.prototype;
- }, (Z) => Z !== "isAxiosError"), fe.call(I, r.message, f, E, l, y), I.cause = r, I.name = r.name, j && Object.assign(I, j), I;
- };
- const YM = null;
- function kl(r) {
- return _t.isPlainObject(r) || _t.isArray(r);
- }
- function id(r) {
- return _t.endsWith(r, "[]") ? r.slice(0, -2) : r;
- }
- function jp(r, f, E) {
- return r ? r.concat(f).map(function(y, j) {
- return y = id(y), !E && j ? "[" + y + "]" : y;
- }).join(E ? "." : "") : f;
- }
- function XM(r) {
- return _t.isArray(r) && !r.some(kl);
- }
- const GM = _t.toFlatObject(_t, {}, null, function(f) {
- return /^is[A-Z]/.test(f);
- });
- function Wo(r, f, E) {
- if (!_t.isObject(r))
- throw new TypeError("target must be an object");
- f = f || new FormData(), E = _t.toFlatObject(E, {
- metaTokens: !0,
- dots: !1,
- indexes: !1
- }, !1, function(d, u) {
- return !_t.isUndefined(u[d]);
- });
- const l = E.metaTokens, y = E.visitor || F, j = E.dots, I = E.indexes, H = (E.Blob || typeof Blob < "u" && Blob) && _t.isSpecCompliantForm(f);
- if (!_t.isFunction(y))
- throw new TypeError("visitor must be a function");
- function U(v) {
- if (v === null)
- return "";
- if (_t.isDate(v))
- return v.toISOString();
- if (!H && _t.isBlob(v))
- throw new fe("Blob is not supported. Use a Buffer instead.");
- return _t.isArrayBuffer(v) || _t.isTypedArray(v) ? H && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
- }
- function F(v, d, u) {
- let A = v;
- if (v && !u && typeof v == "object") {
- if (_t.endsWith(d, "{}"))
- d = l ? d : d.slice(0, -2), v = JSON.stringify(v);
- else if (_t.isArray(v) && XM(v) || (_t.isFileList(v) || _t.endsWith(d, "[]")) && (A = _t.toArray(v)))
- return d = id(d), A.forEach(function(B, C) {
- !(_t.isUndefined(B) || B === null) && f.append(
- // eslint-disable-next-line no-nested-ternary
- I === !0 ? jp([d], C, j) : I === null ? d : d + "[]",
- U(B)
- );
- }), !1;
- }
- return kl(v) ? !0 : (f.append(jp(u, d, j), U(v)), !1);
- }
- const N = [], R = Object.assign(GM, {
- defaultVisitor: F,
- convertValue: U,
- isVisitable: kl
- });
- function S(v, d) {
- if (!_t.isUndefined(v)) {
- if (N.indexOf(v) !== -1)
- throw Error("Circular reference detected in " + d.join("."));
- N.push(v), _t.forEach(v, function(A, O) {
- (!(_t.isUndefined(A) || A === null) && y.call(
- f,
- A,
- _t.isString(O) ? O.trim() : O,
- d,
- R
- )) === !0 && S(A, d ? d.concat(O) : [O]);
- }), N.pop();
- }
- }
- if (!_t.isObject(r))
- throw new TypeError("data must be an object");
- return S(r), f;
- }
- function Wp(r) {
- const f = {
- "!": "%21",
- "'": "%27",
- "(": "%28",
- ")": "%29",
- "~": "%7E",
- "%20": "+",
- "%00": "\0"
- };
- return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(l) {
- return f[l];
- });
- }
- function ql(r, f) {
- this._pairs = [], r && Wo(r, this, f);
- }
- const rd = ql.prototype;
- rd.append = function(f, E) {
- this._pairs.push([f, E]);
- };
- rd.toString = function(f) {
- const E = f ? function(l) {
- return f.call(this, l, Wp);
- } : Wp;
- return this._pairs.map(function(y) {
- return E(y[0]) + "=" + E(y[1]);
- }, "").join("&");
- };
- function HM(r) {
- return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function nd(r, f, E) {
- if (!f)
- return r;
- const l = E && E.encode || HM, y = E && E.serialize;
- let j;
- if (y ? j = y(f, E) : j = _t.isURLSearchParams(f) ? f.toString() : new ql(f, E).toString(l), j) {
- const I = r.indexOf("#");
- I !== -1 && (r = r.slice(0, I)), r += (r.indexOf("?") === -1 ? "?" : "&") + j;
- }
- return r;
- }
- class FM {
- constructor() {
- this.handlers = [];
- }
- /**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
- use(f, E, l) {
- return this.handlers.push({
- fulfilled: f,
- rejected: E,
- synchronous: l ? l.synchronous : !1,
- runWhen: l ? l.runWhen : null
- }), this.handlers.length - 1;
- }
- /**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- *
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
- */
- eject(f) {
- this.handlers[f] && (this.handlers[f] = null);
- }
- /**
- * Clear all interceptors from the stack
- *
- * @returns {void}
- */
- clear() {
- this.handlers && (this.handlers = []);
- }
- /**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- *
- * @returns {void}
- */
- forEach(f) {
- _t.forEach(this.handlers, function(l) {
- l !== null && f(l);
- });
- }
- }
- const zp = FM, sd = {
- silentJSONParsing: !0,
- forcedJSONParsing: !0,
- clarifyTimeoutError: !1
- }, UM = typeof URLSearchParams < "u" ? URLSearchParams : ql, VM = typeof FormData < "u" ? FormData : null, $M = typeof Blob < "u" ? Blob : null, ZM = (() => {
- let r;
- return typeof navigator < "u" && ((r = navigator.product) === "ReactNative" || r === "NativeScript" || r === "NS") ? !1 : typeof window < "u" && typeof document < "u";
- })(), KM = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Ui = {
- isBrowser: !0,
- classes: {
- URLSearchParams: UM,
- FormData: VM,
- Blob: $M
- },
- isStandardBrowserEnv: ZM,
- isStandardBrowserWebWorkerEnv: KM,
- protocols: ["http", "https", "file", "blob", "url", "data"]
- };
- function JM(r, f) {
- return Wo(r, new Ui.classes.URLSearchParams(), Object.assign({
- visitor: function(E, l, y, j) {
- return Ui.isNode && _t.isBuffer(E) ? (this.append(l, E.toString("base64")), !1) : j.defaultVisitor.apply(this, arguments);
- }
- }, f));
- }
- function qM(r) {
- return _t.matchAll(/\w+|\[(\w*)]/g, r).map((f) => f[0] === "[]" ? "" : f[1] || f[0]);
- }
- function QM(r) {
- const f = {}, E = Object.keys(r);
- let l;
- const y = E.length;
- let j;
- for (l = 0; l < y; l++)
- j = E[l], f[j] = r[j];
- return f;
- }
- function od(r) {
- function f(E, l, y, j) {
- let I = E[j++];
- const Z = Number.isFinite(+I), H = j >= E.length;
- return I = !I && _t.isArray(y) ? y.length : I, H ? (_t.hasOwnProp(y, I) ? y[I] = [y[I], l] : y[I] = l, !Z) : ((!y[I] || !_t.isObject(y[I])) && (y[I] = []), f(E, l, y[I], j) && _t.isArray(y[I]) && (y[I] = QM(y[I])), !Z);
- }
- if (_t.isFormData(r) && _t.isFunction(r.entries)) {
- const E = {};
- return _t.forEachEntry(r, (l, y) => {
- f(qM(l), y, E, 0);
- }), E;
- }
- return null;
- }
- const tC = {
- "Content-Type": void 0
- };
- function eC(r, f, E) {
- if (_t.isString(r))
- try {
- return (f || JSON.parse)(r), _t.trim(r);
- } catch (l) {
- if (l.name !== "SyntaxError")
- throw l;
- }
- return (E || JSON.stringify)(r);
- }
- const zo = {
- transitional: sd,
- adapter: ["xhr", "http"],
- transformRequest: [function(f, E) {
- const l = E.getContentType() || "", y = l.indexOf("application/json") > -1, j = _t.isObject(f);
- if (j && _t.isHTMLForm(f) && (f = new FormData(f)), _t.isFormData(f))
- return y && y ? JSON.stringify(od(f)) : f;
- if (_t.isArrayBuffer(f) || _t.isBuffer(f) || _t.isStream(f) || _t.isFile(f) || _t.isBlob(f))
- return f;
- if (_t.isArrayBufferView(f))
- return f.buffer;
- if (_t.isURLSearchParams(f))
- return E.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), f.toString();
- let Z;
- if (j) {
- if (l.indexOf("application/x-www-form-urlencoded") > -1)
- return JM(f, this.formSerializer).toString();
- if ((Z = _t.isFileList(f)) || l.indexOf("multipart/form-data") > -1) {
- const H = this.env && this.env.FormData;
- return Wo(
- Z ? { "files[]": f } : f,
- H && new H(),
- this.formSerializer
- );
- }
- }
- return j || y ? (E.setContentType("application/json", !1), eC(f)) : f;
- }],
- transformResponse: [function(f) {
- const E = this.transitional || zo.transitional, l = E && E.forcedJSONParsing, y = this.responseType === "json";
- if (f && _t.isString(f) && (l && !this.responseType || y)) {
- const I = !(E && E.silentJSONParsing) && y;
- try {
- return JSON.parse(f);
- } catch (Z) {
- if (I)
- throw Z.name === "SyntaxError" ? fe.from(Z, fe.ERR_BAD_RESPONSE, this, null, this.response) : Z;
- }
- }
- return f;
- }],
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
- xsrfCookieName: "XSRF-TOKEN",
- xsrfHeaderName: "X-XSRF-TOKEN",
- maxContentLength: -1,
- maxBodyLength: -1,
- env: {
- FormData: Ui.classes.FormData,
- Blob: Ui.classes.Blob
- },
- validateStatus: function(f) {
- return f >= 200 && f < 300;
- },
- headers: {
- common: {
- Accept: "application/json, text/plain, */*"
- }
- }
- };
- _t.forEach(["delete", "get", "head"], function(f) {
- zo.headers[f] = {};
- });
- _t.forEach(["post", "put", "patch"], function(f) {
- zo.headers[f] = _t.merge(tC);
- });
- const Ql = zo, iC = _t.toObjectSet([
- "age",
- "authorization",
- "content-length",
- "content-type",
- "etag",
- "expires",
- "from",
- "host",
- "if-modified-since",
- "if-unmodified-since",
- "last-modified",
- "location",
- "max-forwards",
- "proxy-authorization",
- "referer",
- "retry-after",
- "user-agent"
- ]), rC = (r) => {
- const f = {};
- let E, l, y;
- return r && r.split(`
- `).forEach(function(I) {
- y = I.indexOf(":"), E = I.substring(0, y).trim().toLowerCase(), l = I.substring(y + 1).trim(), !(!E || f[E] && iC[E]) && (E === "set-cookie" ? f[E] ? f[E].push(l) : f[E] = [l] : f[E] = f[E] ? f[E] + ", " + l : l);
- }), f;
- }, Yp = Symbol("internals");
- function Zn(r) {
- return r && String(r).trim().toLowerCase();
- }
- function co(r) {
- return r === !1 || r == null ? r : _t.isArray(r) ? r.map(co) : String(r);
- }
- function nC(r) {
- const f = /* @__PURE__ */ Object.create(null), E = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
- let l;
- for (; l = E.exec(r); )
- f[l[1]] = l[2];
- return f;
- }
- const sC = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
- function hl(r, f, E, l, y) {
- if (_t.isFunction(l))
- return l.call(this, f, E);
- if (y && (f = E), !!_t.isString(f)) {
- if (_t.isString(l))
- return f.indexOf(l) !== -1;
- if (_t.isRegExp(l))
- return l.test(f);
- }
- }
- function oC(r) {
- return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (f, E, l) => E.toUpperCase() + l);
- }
- function aC(r, f) {
- const E = _t.toCamelCase(" " + f);
- ["get", "set", "has"].forEach((l) => {
- Object.defineProperty(r, l + E, {
- value: function(y, j, I) {
- return this[l].call(this, f, y, j, I);
- },
- configurable: !0
- });
- });
- }
- class Yo {
- constructor(f) {
- f && this.set(f);
- }
- set(f, E, l) {
- const y = this;
- function j(Z, H, U) {
- const F = Zn(H);
- if (!F)
- throw new Error("header name must be a non-empty string");
- const N = _t.findKey(y, F);
- (!N || y[N] === void 0 || U === !0 || U === void 0 && y[N] !== !1) && (y[N || H] = co(Z));
- }
- const I = (Z, H) => _t.forEach(Z, (U, F) => j(U, F, H));
- return _t.isPlainObject(f) || f instanceof this.constructor ? I(f, E) : _t.isString(f) && (f = f.trim()) && !sC(f) ? I(rC(f), E) : f != null && j(E, f, l), this;
- }
- get(f, E) {
- if (f = Zn(f), f) {
- const l = _t.findKey(this, f);
- if (l) {
- const y = this[l];
- if (!E)
- return y;
- if (E === !0)
- return nC(y);
- if (_t.isFunction(E))
- return E.call(this, y, l);
- if (_t.isRegExp(E))
- return E.exec(y);
- throw new TypeError("parser must be boolean|regexp|function");
- }
- }
- }
- has(f, E) {
- if (f = Zn(f), f) {
- const l = _t.findKey(this, f);
- return !!(l && this[l] !== void 0 && (!E || hl(this, this[l], l, E)));
- }
- return !1;
- }
- delete(f, E) {
- const l = this;
- let y = !1;
- function j(I) {
- if (I = Zn(I), I) {
- const Z = _t.findKey(l, I);
- Z && (!E || hl(l, l[Z], Z, E)) && (delete l[Z], y = !0);
- }
- }
- return _t.isArray(f) ? f.forEach(j) : j(f), y;
- }
- clear(f) {
- const E = Object.keys(this);
- let l = E.length, y = !1;
- for (; l--; ) {
- const j = E[l];
- (!f || hl(this, this[j], j, f, !0)) && (delete this[j], y = !0);
- }
- return y;
- }
- normalize(f) {
- const E = this, l = {};
- return _t.forEach(this, (y, j) => {
- const I = _t.findKey(l, j);
- if (I) {
- E[I] = co(y), delete E[j];
- return;
- }
- const Z = f ? oC(j) : String(j).trim();
- Z !== j && delete E[j], E[Z] = co(y), l[Z] = !0;
- }), this;
- }
- concat(...f) {
- return this.constructor.concat(this, ...f);
- }
- toJSON(f) {
- const E = /* @__PURE__ */ Object.create(null);
- return _t.forEach(this, (l, y) => {
- l != null && l !== !1 && (E[y] = f && _t.isArray(l) ? l.join(", ") : l);
- }), E;
- }
- [Symbol.iterator]() {
- return Object.entries(this.toJSON())[Symbol.iterator]();
- }
- toString() {
- return Object.entries(this.toJSON()).map(([f, E]) => f + ": " + E).join(`
- `);
- }
- get [Symbol.toStringTag]() {
- return "AxiosHeaders";
- }
- static from(f) {
- return f instanceof this ? f : new this(f);
- }
- static concat(f, ...E) {
- const l = new this(f);
- return E.forEach((y) => l.set(y)), l;
- }
- static accessor(f) {
- const l = (this[Yp] = this[Yp] = {
- accessors: {}
- }).accessors, y = this.prototype;
- function j(I) {
- const Z = Zn(I);
- l[Z] || (aC(y, I), l[Z] = !0);
- }
- return _t.isArray(f) ? f.forEach(j) : j(f), this;
- }
- }
- Yo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
- _t.freezeMethods(Yo.prototype);
- _t.freezeMethods(Yo);
- const pr = Yo;
- function cl(r, f) {
- const E = this || Ql, l = f || E, y = pr.from(l.headers);
- let j = l.data;
- return _t.forEach(r, function(Z) {
- j = Z.call(E, j, y.normalize(), f ? f.status : void 0);
- }), y.normalize(), j;
- }
- function ad(r) {
- return !!(r && r.__CANCEL__);
- }
- function cs(r, f, E) {
- fe.call(this, r ?? "canceled", fe.ERR_CANCELED, f, E), this.name = "CanceledError";
- }
- _t.inherits(cs, fe, {
- __CANCEL__: !0
- });
- function lC(r, f, E) {
- const l = E.config.validateStatus;
- !E.status || !l || l(E.status) ? r(E) : f(new fe(
- "Request failed with status code " + E.status,
- [fe.ERR_BAD_REQUEST, fe.ERR_BAD_RESPONSE][Math.floor(E.status / 100) - 4],
- E.config,
- E.request,
- E
- ));
- }
- const hC = Ui.isStandardBrowserEnv ? (
- // Standard browser envs support document.cookie
- function() {
- return {
- write: function(E, l, y, j, I, Z) {
- const H = [];
- H.push(E + "=" + encodeURIComponent(l)), _t.isNumber(y) && H.push("expires=" + new Date(y).toGMTString()), _t.isString(j) && H.push("path=" + j), _t.isString(I) && H.push("domain=" + I), Z === !0 && H.push("secure"), document.cookie = H.join("; ");
- },
- read: function(E) {
- const l = document.cookie.match(new RegExp("(^|;\\s*)(" + E + ")=([^;]*)"));
- return l ? decodeURIComponent(l[3]) : null;
- },
- remove: function(E) {
- this.write(E, "", Date.now() - 864e5);
- }
- };
- }()
- ) : (
- // Non standard browser env (web workers, react-native) lack needed support.
- function() {
- return {
- write: function() {
- },
- read: function() {
- return null;
- },
- remove: function() {
- }
- };
- }()
- );
- function cC(r) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
- }
- function pC(r, f) {
- return f ? r.replace(/\/+$/, "") + "/" + f.replace(/^\/+/, "") : r;
- }
- function ld(r, f) {
- return r && !cC(f) ? pC(r, f) : f;
- }
- const uC = Ui.isStandardBrowserEnv ? (
- // Standard browser envs have full support of the APIs needed to test
- // whether the request URL is of the same origin as current location.
- function() {
- const f = /(msie|trident)/i.test(navigator.userAgent), E = document.createElement("a");
- let l;
- function y(j) {
- let I = j;
- return f && (E.setAttribute("href", I), I = E.href), E.setAttribute("href", I), {
- href: E.href,
- protocol: E.protocol ? E.protocol.replace(/:$/, "") : "",
- host: E.host,
- search: E.search ? E.search.replace(/^\?/, "") : "",
- hash: E.hash ? E.hash.replace(/^#/, "") : "",
- hostname: E.hostname,
- port: E.port,
- pathname: E.pathname.charAt(0) === "/" ? E.pathname : "/" + E.pathname
- };
- }
- return l = y(window.location.href), function(I) {
- const Z = _t.isString(I) ? y(I) : I;
- return Z.protocol === l.protocol && Z.host === l.host;
- };
- }()
- ) : (
- // Non standard browser envs (web workers, react-native) lack needed support.
- function() {
- return function() {
- return !0;
- };
- }()
- );
- function dC(r) {
- const f = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
- return f && f[1] || "";
- }
- function fC(r, f) {
- r = r || 10;
- const E = new Array(r), l = new Array(r);
- let y = 0, j = 0, I;
- return f = f !== void 0 ? f : 1e3, function(H) {
- const U = Date.now(), F = l[j];
- I || (I = U), E[y] = H, l[y] = U;
- let N = j, R = 0;
- for (; N !== y; )
- R += E[N++], N = N % r;
- if (y = (y + 1) % r, y === j && (j = (j + 1) % r), U - I < f)
- return;
- const S = F && U - F;
- return S ? Math.round(R * 1e3 / S) : void 0;
- };
- }
- function Xp(r, f) {
- let E = 0;
- const l = fC(50, 250);
- return (y) => {
- const j = y.loaded, I = y.lengthComputable ? y.total : void 0, Z = j - E, H = l(Z), U = j <= I;
- E = j;
- const F = {
- loaded: j,
- total: I,
- progress: I ? j / I : void 0,
- bytes: Z,
- rate: H || void 0,
- estimated: H && I && U ? (I - j) / H : void 0,
- event: y
- };
- F[f ? "download" : "upload"] = !0, r(F);
- };
- }
- const gC = typeof XMLHttpRequest < "u", mC = gC && function(r) {
- return new Promise(function(E, l) {
- let y = r.data;
- const j = pr.from(r.headers).normalize(), I = r.responseType;
- let Z;
- function H() {
- r.cancelToken && r.cancelToken.unsubscribe(Z), r.signal && r.signal.removeEventListener("abort", Z);
- }
- _t.isFormData(y) && (Ui.isStandardBrowserEnv || Ui.isStandardBrowserWebWorkerEnv) && j.setContentType(!1);
- let U = new XMLHttpRequest();
- if (r.auth) {
- const S = r.auth.username || "", v = r.auth.password ? unescape(encodeURIComponent(r.auth.password)) : "";
- j.set("Authorization", "Basic " + btoa(S + ":" + v));
- }
- const F = ld(r.baseURL, r.url);
- U.open(r.method.toUpperCase(), nd(F, r.params, r.paramsSerializer), !0), U.timeout = r.timeout;
- function N() {
- if (!U)
- return;
- const S = pr.from(
- "getAllResponseHeaders" in U && U.getAllResponseHeaders()
- ), d = {
- data: !I || I === "text" || I === "json" ? U.responseText : U.response,
- status: U.status,
- statusText: U.statusText,
- headers: S,
- config: r,
- request: U
- };
- lC(function(A) {
- E(A), H();
- }, function(A) {
- l(A), H();
- }, d), U = null;
- }
- if ("onloadend" in U ? U.onloadend = N : U.onreadystatechange = function() {
- !U || U.readyState !== 4 || U.status === 0 && !(U.responseURL && U.responseURL.indexOf("file:") === 0) || setTimeout(N);
- }, U.onabort = function() {
- U && (l(new fe("Request aborted", fe.ECONNABORTED, r, U)), U = null);
- }, U.onerror = function() {
- l(new fe("Network Error", fe.ERR_NETWORK, r, U)), U = null;
- }, U.ontimeout = function() {
- let v = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
- const d = r.transitional || sd;
- r.timeoutErrorMessage && (v = r.timeoutErrorMessage), l(new fe(
- v,
- d.clarifyTimeoutError ? fe.ETIMEDOUT : fe.ECONNABORTED,
- r,
- U
- )), U = null;
- }, Ui.isStandardBrowserEnv) {
- const S = (r.withCredentials || uC(F)) && r.xsrfCookieName && hC.read(r.xsrfCookieName);
- S && j.set(r.xsrfHeaderName, S);
- }
- y === void 0 && j.setContentType(null), "setRequestHeader" in U && _t.forEach(j.toJSON(), function(v, d) {
- U.setRequestHeader(d, v);
- }), _t.isUndefined(r.withCredentials) || (U.withCredentials = !!r.withCredentials), I && I !== "json" && (U.responseType = r.responseType), typeof r.onDownloadProgress == "function" && U.addEventListener("progress", Xp(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && U.upload && U.upload.addEventListener("progress", Xp(r.onUploadProgress)), (r.cancelToken || r.signal) && (Z = (S) => {
- U && (l(!S || S.type ? new cs(null, r, U) : S), U.abort(), U = null);
- }, r.cancelToken && r.cancelToken.subscribe(Z), r.signal && (r.signal.aborted ? Z() : r.signal.addEventListener("abort", Z)));
- const R = dC(F);
- if (R && Ui.protocols.indexOf(R) === -1) {
- l(new fe("Unsupported protocol " + R + ":", fe.ERR_BAD_REQUEST, r));
- return;
- }
- U.send(y || null);
- });
- }, po = {
- http: YM,
- xhr: mC
- };
- _t.forEach(po, (r, f) => {
- if (r) {
- try {
- Object.defineProperty(r, "name", { value: f });
- } catch {
- }
- Object.defineProperty(r, "adapterName", { value: f });
- }
- });
- const yC = {
- getAdapter: (r) => {
- r = _t.isArray(r) ? r : [r];
- const { length: f } = r;
- let E, l;
- for (let y = 0; y < f && (E = r[y], !(l = _t.isString(E) ? po[E.toLowerCase()] : E)); y++)
- ;
- if (!l)
- throw l === !1 ? new fe(
- `Adapter ${E} is not supported by the environment`,
- "ERR_NOT_SUPPORT"
- ) : new Error(
- _t.hasOwnProp(po, E) ? `Adapter '${E}' is not available in the build` : `Unknown adapter '${E}'`
- );
- if (!_t.isFunction(l))
- throw new TypeError("adapter is not a function");
- return l;
- },
- adapters: po
- };
- function pl(r) {
- if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
- throw new cs(null, r);
- }
- function Gp(r) {
- return pl(r), r.headers = pr.from(r.headers), r.data = cl.call(
- r,
- r.transformRequest
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), yC.getAdapter(r.adapter || Ql.adapter)(r).then(function(l) {
- return pl(r), l.data = cl.call(
- r,
- r.transformResponse,
- l
- ), l.headers = pr.from(l.headers), l;
- }, function(l) {
- return ad(l) || (pl(r), l && l.response && (l.response.data = cl.call(
- r,
- r.transformResponse,
- l.response
- ), l.response.headers = pr.from(l.response.headers))), Promise.reject(l);
- });
- }
- const Hp = (r) => r instanceof pr ? r.toJSON() : r;
- function wn(r, f) {
- f = f || {};
- const E = {};
- function l(U, F, N) {
- return _t.isPlainObject(U) && _t.isPlainObject(F) ? _t.merge.call({ caseless: N }, U, F) : _t.isPlainObject(F) ? _t.merge({}, F) : _t.isArray(F) ? F.slice() : F;
- }
- function y(U, F, N) {
- if (_t.isUndefined(F)) {
- if (!_t.isUndefined(U))
- return l(void 0, U, N);
- } else
- return l(U, F, N);
- }
- function j(U, F) {
- if (!_t.isUndefined(F))
- return l(void 0, F);
- }
- function I(U, F) {
- if (_t.isUndefined(F)) {
- if (!_t.isUndefined(U))
- return l(void 0, U);
- } else
- return l(void 0, F);
- }
- function Z(U, F, N) {
- if (N in f)
- return l(U, F);
- if (N in r)
- return l(void 0, U);
- }
- const H = {
- url: j,
- method: j,
- data: j,
- baseURL: I,
- transformRequest: I,
- transformResponse: I,
- paramsSerializer: I,
- timeout: I,
- timeoutMessage: I,
- withCredentials: I,
- adapter: I,
- responseType: I,
- xsrfCookieName: I,
- xsrfHeaderName: I,
- onUploadProgress: I,
- onDownloadProgress: I,
- decompress: I,
- maxContentLength: I,
- maxBodyLength: I,
- beforeRedirect: I,
- transport: I,
- httpAgent: I,
- httpsAgent: I,
- cancelToken: I,
- socketPath: I,
- responseEncoding: I,
- validateStatus: Z,
- headers: (U, F) => y(Hp(U), Hp(F), !0)
- };
- return _t.forEach(Object.keys(r).concat(Object.keys(f)), function(F) {
- const N = H[F] || y, R = N(r[F], f[F], F);
- _t.isUndefined(R) && N !== Z || (E[F] = R);
- }), E;
- }
- const hd = "1.3.6", th = {};
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((r, f) => {
- th[r] = function(l) {
- return typeof l === r || "a" + (f < 1 ? "n " : " ") + r;
- };
- });
- const Fp = {};
- th.transitional = function(f, E, l) {
- function y(j, I) {
- return "[Axios v" + hd + "] Transitional option '" + j + "'" + I + (l ? ". " + l : "");
- }
- return (j, I, Z) => {
- if (f === !1)
- throw new fe(
- y(I, " has been removed" + (E ? " in " + E : "")),
- fe.ERR_DEPRECATED
- );
- return E && !Fp[I] && (Fp[I] = !0, console.warn(
- y(
- I,
- " has been deprecated since v" + E + " and will be removed in the near future"
- )
- )), f ? f(j, I, Z) : !0;
- };
- };
- function vC(r, f, E) {
- if (typeof r != "object")
- throw new fe("options must be an object", fe.ERR_BAD_OPTION_VALUE);
- const l = Object.keys(r);
- let y = l.length;
- for (; y-- > 0; ) {
- const j = l[y], I = f[j];
- if (I) {
- const Z = r[j], H = Z === void 0 || I(Z, j, r);
- if (H !== !0)
- throw new fe("option " + j + " must be " + H, fe.ERR_BAD_OPTION_VALUE);
- continue;
- }
- if (E !== !0)
- throw new fe("Unknown option " + j, fe.ERR_BAD_OPTION);
- }
- }
- const Al = {
- assertOptions: vC,
- validators: th
- }, Tr = Al.validators;
- class Co {
- constructor(f) {
- this.defaults = f, this.interceptors = {
- request: new zp(),
- response: new zp()
- };
- }
- /**
- * Dispatch a request
- *
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
- * @param {?Object} config
- *
- * @returns {Promise} The Promise to be fulfilled
- */
- request(f, E) {
- typeof f == "string" ? (E = E || {}, E.url = f) : E = f || {}, E = wn(this.defaults, E);
- const { transitional: l, paramsSerializer: y, headers: j } = E;
- l !== void 0 && Al.assertOptions(l, {
- silentJSONParsing: Tr.transitional(Tr.boolean),
- forcedJSONParsing: Tr.transitional(Tr.boolean),
- clarifyTimeoutError: Tr.transitional(Tr.boolean)
- }, !1), y != null && (_t.isFunction(y) ? E.paramsSerializer = {
- serialize: y
- } : Al.assertOptions(y, {
- encode: Tr.function,
- serialize: Tr.function
- }, !0)), E.method = (E.method || this.defaults.method || "get").toLowerCase();
- let I;
- I = j && _t.merge(
- j.common,
- j[E.method]
- ), I && _t.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- (v) => {
- delete j[v];
- }
- ), E.headers = pr.concat(I, j);
- const Z = [];
- let H = !0;
- this.interceptors.request.forEach(function(d) {
- typeof d.runWhen == "function" && d.runWhen(E) === !1 || (H = H && d.synchronous, Z.unshift(d.fulfilled, d.rejected));
- });
- const U = [];
- this.interceptors.response.forEach(function(d) {
- U.push(d.fulfilled, d.rejected);
- });
- let F, N = 0, R;
- if (!H) {
- const v = [Gp.bind(this), void 0];
- for (v.unshift.apply(v, Z), v.push.apply(v, U), R = v.length, F = Promise.resolve(E); N < R; )
- F = F.then(v[N++], v[N++]);
- return F;
- }
- R = Z.length;
- let S = E;
- for (N = 0; N < R; ) {
- const v = Z[N++], d = Z[N++];
- try {
- S = v(S);
- } catch (u) {
- d.call(this, u);
- break;
- }
- }
- try {
- F = Gp.call(this, S);
- } catch (v) {
- return Promise.reject(v);
- }
- for (N = 0, R = U.length; N < R; )
- F = F.then(U[N++], U[N++]);
- return F;
- }
- getUri(f) {
- f = wn(this.defaults, f);
- const E = ld(f.baseURL, f.url);
- return nd(E, f.params, f.paramsSerializer);
- }
- }
- _t.forEach(["delete", "get", "head", "options"], function(f) {
- Co.prototype[f] = function(E, l) {
- return this.request(wn(l || {}, {
- method: f,
- url: E,
- data: (l || {}).data
- }));
- };
- });
- _t.forEach(["post", "put", "patch"], function(f) {
- function E(l) {
- return function(j, I, Z) {
- return this.request(wn(Z || {}, {
- method: f,
- headers: l ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url: j,
- data: I
- }));
- };
- }
- Co.prototype[f] = E(), Co.prototype[f + "Form"] = E(!0);
- });
- const uo = Co;
- class eh {
- constructor(f) {
- if (typeof f != "function")
- throw new TypeError("executor must be a function.");
- let E;
- this.promise = new Promise(function(j) {
- E = j;
- });
- const l = this;
- this.promise.then((y) => {
- if (!l._listeners)
- return;
- let j = l._listeners.length;
- for (; j-- > 0; )
- l._listeners[j](y);
- l._listeners = null;
- }), this.promise.then = (y) => {
- let j;
- const I = new Promise((Z) => {
- l.subscribe(Z), j = Z;
- }).then(y);
- return I.cancel = function() {
- l.unsubscribe(j);
- }, I;
- }, f(function(j, I, Z) {
- l.reason || (l.reason = new cs(j, I, Z), E(l.reason));
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason)
- throw this.reason;
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(f) {
- if (this.reason) {
- f(this.reason);
- return;
- }
- this._listeners ? this._listeners.push(f) : this._listeners = [f];
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(f) {
- if (!this._listeners)
- return;
- const E = this._listeners.indexOf(f);
- E !== -1 && this._listeners.splice(E, 1);
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let f;
- return {
- token: new eh(function(y) {
- f = y;
- }),
- cancel: f
- };
- }
- }
- const xC = eh;
- function bC(r) {
- return function(E) {
- return r.apply(null, E);
- };
- }
- function SC(r) {
- return _t.isObject(r) && r.isAxiosError === !0;
- }
- const Tl = {
- Continue: 100,
- SwitchingProtocols: 101,
- Processing: 102,
- EarlyHints: 103,
- Ok: 200,
- Created: 201,
- Accepted: 202,
- NonAuthoritativeInformation: 203,
- NoContent: 204,
- ResetContent: 205,
- PartialContent: 206,
- MultiStatus: 207,
- AlreadyReported: 208,
- ImUsed: 226,
- MultipleChoices: 300,
- MovedPermanently: 301,
- Found: 302,
- SeeOther: 303,
- NotModified: 304,
- UseProxy: 305,
- Unused: 306,
- TemporaryRedirect: 307,
- PermanentRedirect: 308,
- BadRequest: 400,
- Unauthorized: 401,
- PaymentRequired: 402,
- Forbidden: 403,
- NotFound: 404,
- MethodNotAllowed: 405,
- NotAcceptable: 406,
- ProxyAuthenticationRequired: 407,
- RequestTimeout: 408,
- Conflict: 409,
- Gone: 410,
- LengthRequired: 411,
- PreconditionFailed: 412,
- PayloadTooLarge: 413,
- UriTooLong: 414,
- UnsupportedMediaType: 415,
- RangeNotSatisfiable: 416,
- ExpectationFailed: 417,
- ImATeapot: 418,
- MisdirectedRequest: 421,
- UnprocessableEntity: 422,
- Locked: 423,
- FailedDependency: 424,
- TooEarly: 425,
- UpgradeRequired: 426,
- PreconditionRequired: 428,
- TooManyRequests: 429,
- RequestHeaderFieldsTooLarge: 431,
- UnavailableForLegalReasons: 451,
- InternalServerError: 500,
- NotImplemented: 501,
- BadGateway: 502,
- ServiceUnavailable: 503,
- GatewayTimeout: 504,
- HttpVersionNotSupported: 505,
- VariantAlsoNegotiates: 506,
- InsufficientStorage: 507,
- LoopDetected: 508,
- NotExtended: 510,
- NetworkAuthenticationRequired: 511
- };
- Object.entries(Tl).forEach(([r, f]) => {
- Tl[f] = r;
- });
- const wC = Tl;
- function cd(r) {
- const f = new uo(r), E = Uu(uo.prototype.request, f);
- return _t.extend(E, uo.prototype, f, { allOwnKeys: !0 }), _t.extend(E, f, null, { allOwnKeys: !0 }), E.create = function(y) {
- return cd(wn(r, y));
- }, E;
- }
- const Ge = cd(Ql);
- Ge.Axios = uo;
- Ge.CanceledError = cs;
- Ge.CancelToken = xC;
- Ge.isCancel = ad;
- Ge.VERSION = hd;
- Ge.toFormData = Wo;
- Ge.AxiosError = fe;
- Ge.Cancel = Ge.CanceledError;
- Ge.all = function(f) {
- return Promise.all(f);
- };
- Ge.spread = bC;
- Ge.isAxiosError = SC;
- Ge.mergeConfig = wn;
- Ge.AxiosHeaders = pr;
- Ge.formToJSON = (r) => od(_t.isHTMLForm(r) ? new FormData(r) : r);
- Ge.HttpStatusCode = wC;
- Ge.default = Ge;
- const MC = Ge;
- let CC = {
- baseURL: "/api",
- timeout: 10 * 60 * 1e3
- };
- const ih = MC.create(CC);
- ih.interceptors.request.use(
- function(r) {
- return r;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- ih.interceptors.response.use(
- function(r) {
- let f = r.data;
- return r.status !== 200 && console.error("网络异常"), f || console.error("服务器开了个小差"), f.Ret === 408 && console.error(f.Msg), f.Ret === 403 && console.error(f.Msg || "网络异常"), f;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- const rh = (r, f) => ih.post(r, f), kC = (r) => rh("/chart/detail", r), AC = (r) => rh("/eta_forum/chart/detail", r), TC = (r) => rh("/excel/detail", r);
- function pd(r) {
- if (r.indexOf("?") === -1)
- return {};
- const E = r.split("?")[1].split("&"), l = {};
- return E.forEach((y) => {
- const [j, I] = y.split("=");
- l[j] = decodeURIComponent(I);
- }), l;
- }
- const PC = `@charset "UTF-8";div[data-v-4a9f0e4d]{box-sizing:border-box}.hz-chart-wrap[data-v-4a9f0e4d]{font:initial;page-break-inside:avoid;max-width:1200PX;height:100%;overflow:hidden;position:relative;margin:0 auto;border:1PX solid rgba(0,0,0,.125)!important;background:#fff;border-radius:5PX;display:flex;flex-direction:column;font-family:PingFangSC-Regular,微软雅黑,宋体!important}.hz-chart-wrap .hz-chart-head[data-v-4a9f0e4d]{box-sizing:border-box;background-color:#f2f2f2;border-bottom:1px solid rgba(0,0,0,.125);cursor:pointer;min-height:40PX;display:flex;align-items:center;padding:2PX 10PX}.hz-chart-wrap .hz-chart-head .chart-title[data-v-4a9f0e4d]{width:100%}.hz-chart-wrap .chart-wrapper[data-v-4a9f0e4d]{position:relative;display:flex;height:100%;width:100%}.hz-chart-wrap .chart-wrapper .hz-chart-content[data-v-4a9f0e4d]{width:100%;flex:1}.hz-chart-wrap .chart-wrapper .mark[data-v-4a9f0e4d]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background-image:none;background-position:center center;background-repeat:no-repeat;background-size:contain;pointer-events:none;width:80%;height:80%}.hz-chart-wrap .notfound[data-v-4a9f0e4d]{flex:1;overflow:hidden;padding:10PX;color:#777;text-align:center}.hz-chart-wrap .chart-bottom-info[data-v-4a9f0e4d]{padding-right:10PX;padding-bottom:0;padding-left:25PX;display:flex}.hz-chart-wrap .chart-bottom-info .chart-instruction[data-v-4a9f0e4d]{max-width:80%;flex:1;text-align:right;margin-left:auto}.hz-chart-wrap .hz-chart-footer[data-v-4a9f0e4d]{padding-left:25PX;padding-right:10PX;padding-bottom:10PX;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:1px}.hz-chart-wrap .text_oneLine[data-v-4a9f0e4d]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
- `, ud = (r, f) => {
- const E = r.__vccOpts || r;
- for (const [l, y] of f)
- E[l] = y;
- return E;
- }, EC = { class: "hz-chart-head" }, OC = {
- key: 0,
- class: "chart-wrapper"
- }, LC = ["id"], _C = {
- key: 1,
- class: "notfound"
- }, DC = {
- key: 2,
- class: "chart-bottom-info bootom-source"
- }, IC = ["textContent"], RC = {
- __name: "EtaChart.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const { chartRender: f, setLimitData: E, isUseSelfLimit: l } = Ww(), y = r, j = pd(y.src), I = Le(null), Z = Le(""), H = Le(null), U = Le(null), F = Le(!1), N = Le(null), R = Le(null), S = Le(null);
- async function v() {
- if (!j.code) {
- F.value = !1;
- return;
- }
- try {
- const u = j.isETAForumChart && j.isETAForumChart == "true" ? await AC({
- UniqueCode: j.code,
- IsReplace: 1
- }) : await kC({
- UniqueCode: j.code,
- IsReplace: 1
- });
- if (u.Ret !== 200)
- return;
- H.value = u.Data.ChartInfo, U.value = u.Data.ChartInfo.Source === 1 ? u.Data.EdbInfoList : [u.Data.EdbInfoList[0]], Z.value = `hz-chart_${j.code}_${(/* @__PURE__ */ new Date()).getTime()}`, d(), F.value = !0, u.Data.ChartInfo.Source === 1 && ![7, 10, 11].includes(u.Data.ChartInfo.ChartType) ? (l.value = !0, E(u.Data)) : l.value = !1, fo(() => {
- f({
- data: u.Data,
- renderId: I.value,
- lang: j.language,
- changeLangIsCheck: !1,
- showChartTitle: !1,
- shouldUseSelfLimit: !0
- }), u.Data.WaterMark && (N.value.style.backgroundImage = `url(${u.Data.WaterMark})`);
- }), fo(() => {
- var A;
- S.value && (S.value.style.maxWidth = ((A = R.value) == null ? void 0 : A.clientWidth) + "px");
- });
- } catch {
- F.value = !1;
- }
- }
- const d = () => {
- j.language = j.fromPage || j.lang || "zh";
- };
- return v(), (u, A) => {
- var O, B, C, b;
- return Je(), qe("div", {
- class: "hz-chart-wrap",
- ref_key: "chartContainer",
- ref: R,
- style: Pr([y.style + ";height:" + y.height + "px", { margin: "0 0 10px 0" }])
- }, [
- ar("header", EC, [
- H.value ? (Je(), qe("span", {
- key: 0,
- class: "chart-title",
- style: Pr(H.value.ChartThemeStyle ? `
- text-align:${JSON.parse(H.value.ChartThemeStyle).titleOptions.align};
- font-size:${JSON.parse(H.value.ChartThemeStyle).titleOptions.style.fontSize}px;
- color:${JSON.parse(H.value.ChartThemeStyle).titleOptions.style.color}
- ` : "")
- }, yn(k0(j).language === "en" ? H.value.ChartNameEn : H.value.ChartName), 5)) : Kn("", !0)
- ]),
- F.value ? (Je(), qe("div", OC, [
- ar("div", {
- id: Z.value,
- ref_key: "chartContentEl",
- ref: I,
- class: "hz-chart-content"
- }, null, 8, LC),
- ar("div", {
- class: "mark",
- ref_key: "markDom",
- ref: N
- }, null, 512)
- ])) : (Je(), qe("div", _C, " 哎吆,你的图飞了,赶快去找管理员救命吧~ ")),
- (O = H.value) != null && O.Instructions && JSON.parse((B = H.value) == null ? void 0 : B.Instructions).isShow ? (Je(), qe("div", DC, [
- ar("div", {
- class: "chart-instruction text_oneLine",
- textContent: yn(JSON.parse(H.value.Instructions).text),
- style: Pr(`
- color: ${JSON.parse(H.value.Instructions).color};
- font-size: ${JSON.parse(H.value.Instructions).fontSize}px
- `)
- }, null, 12, IC)
- ])) : Kn("", !0),
- (C = H.value) != null && C.SourcesFrom && ((b = JSON.parse(H.value.SourcesFrom)) != null && b.isShow) ? (Je(), qe("div", {
- key: 3,
- class: "hz-chart-footer",
- ref_key: "chartFooter",
- ref: S,
- style: Pr(`
- color: ${JSON.parse(H.value.SourcesFrom).color};
- font-size: ${JSON.parse(H.value.SourcesFrom).fontSize}px;
- `)
- }, [
- A[0] || (A[0] = Up(" source:")),
- ar("em", null, yn(JSON.parse(H.value.SourcesFrom).text), 1)
- ], 4)) : Kn("", !0)
- ], 4);
- };
- }
- }, NC = /* @__PURE__ */ ud(RC, [["styles", [PC]], ["__scopeId", "data-v-4a9f0e4d"]]), BC = `@charset "UTF-8";.sheet-show-wrapper[data-v-98ab6c2e]{max-width:1200PX;overflow:hidden;position:relative;margin:0 auto;background:#fff;font-family:PingFangSC-Regular,微软雅黑,宋体!important}.sheet-show-wrapper .title[data-v-98ab6c2e]{font-size:17PX;font-weight:400;padding:0 10PX;margin:0 0 8PX}.sheet-show-wrapper .table-wrapper[data-v-98ab6c2e]{max-width:calc(100vw - 20PX);margin:0 auto;overflow:auto}.sheet-show-wrapper .table-wrapper table[data-v-98ab6c2e]{width:100%;font-size:14PX;color:#333;table-layout:auto}.sheet-show-wrapper .table-wrapper table td[data-v-98ab6c2e],.sheet-show-wrapper .table-wrapper table th[data-v-98ab6c2e]{width:auto;height:auto;padding:.4em 0;word-break:break-all;word-wrap:break-word;line-height:1.2em;border:1PX solid #dcdfe6;text-align:center;background-color:#fff;border-left:none;border-top:none}.sheet-show-wrapper .table-wrapper table td[data-v-98ab6c2e]:first-child,.sheet-show-wrapper .table-wrapper table th[data-v-98ab6c2e]:first-child{border-left:1PX solid #dcdfe6}.sheet-show-wrapper .table-wrapper table .data-cell[data-v-98ab6c2e]{color:#333}.sheet-show-wrapper .table-wrapper table .data-cell.one-bg[data-v-98ab6c2e]{background-color:#efeef1}.sheet-show-wrapper .table-wrapper table .data-cell.two-bg[data-v-98ab6c2e]{background-color:#fff}.sheet-show-wrapper .table-wrapper table .thead-sticky[data-v-98ab6c2e]{position:sticky;top:0}.sheet-show-wrapper .table-wrapper table .head-column[data-v-98ab6c2e]{background-color:#505b78;color:#fff}.sheet-show-wrapper .table-wrapper table .split-word span[data-v-98ab6c2e]{display:inline}.sheet-show-wrapper .sheet-source[data-v-98ab6c2e]{margin-top:5PX;min-width:150PX;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
- `, jC = { class: "table-wrapper" }, WC = ["colspan", "rowspan"], zC = {
- key: 0,
- class: "split-word"
- }, YC = { key: 1 }, XC = {
- __name: "EtaTable.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const E = pd(r.src), l = Le({}), y = Le(!1), j = Le(null), I = Le(null), Z = (U) => JSON.stringify({
- isShow: !0,
- text: U,
- color: "#606266",
- fontSize: 9
- });
- async function H() {
- const U = await TC({ UniqueCode: E.code, FromScene: Number(E.fromScene || "") });
- U.Ret === 200 && (l.value = U.Data, l.value.SourcesFrom || (l.value.SourcesFrom = U.Data.ExcelSource ? Z(U.Data.ExcelSource || "") : ""), y.value = !0, fo(() => {
- var F;
- console.log(j.value.clientWidth), I.value && (I.value.style.maxWidth = ((F = j.value) == null ? void 0 : F.clientWidth) + "px");
- }));
- }
- return H(), (U, F) => {
- var N, R;
- return y.value ? (Je(), qe("div", {
- key: 0,
- class: "sheet-show-wrapper",
- ref_key: "sheetRef",
- ref: j
- }, [
- ar("div", jC, [
- ar("table", {
- cellpadding: "0",
- cellspacing: "0",
- style: Pr(`font-size: ${((N = l.value.Config) == null ? void 0 : N.FontSize) || 12}PX`)
- }, [
- ar("tbody", null, [
- (Je(!0), qe(Qa, null, tl((R = l.value.TableInfo) == null ? void 0 : R.TableDataList, (S, v) => (Je(), qe("tr", { key: v }, [
- (Je(!0), qe(Qa, null, tl(S, (d, u) => (Je(), qe("td", {
- class: A0(["data-cell", {
- "one-bg": (v + 1) % 2 && v > 0,
- "tow-bg": (v + 1) % 2 !== 0 && v > 0,
- "head-column": v === 0
- }]),
- key: u,
- colspan: d.mc.cs || 1,
- rowspan: d.mc.rs || 1,
- style: Pr(`
- color: ${d.fc};
- font-weight: ${d.bl ? "bold" : "normal"};
- font-style: ${d.it ? "italic" : "normal"};
- background: ${d.bg};
- `)
- }, [
- d.ct.s ? (Je(), qe("div", zC, [
- (Je(!0), qe(Qa, null, tl(d.ct.s, (A, O) => (Je(), qe("span", {
- key: `${v}_${u}_${O}`,
- style: Pr(`
- color: ${A.fc};
- font-weight: ${A.bl ? "bold" : "normal"};
- font-style: ${A.it ? "italic" : "normal"};
- `)
- }, yn(A.v), 5))), 128))
- ])) : (Je(), qe("div", YC, yn(d.m), 1))
- ], 14, WC))), 128))
- ]))), 128))
- ])
- ], 4)
- ]),
- l.value.SourcesFrom && JSON.parse(l.value.SourcesFrom).isShow ? (Je(), qe("div", {
- key: 0,
- class: "sheet-source",
- ref_key: "sheetFooter",
- ref: I,
- style: Pr(`
- color: ${JSON.parse(l.value.SourcesFrom).color};
- font-size: ${JSON.parse(l.value.SourcesFrom).fontSize}px;
- `)
- }, [
- F[0] || (F[0] = Up(" source:")),
- ar("em", null, yn(JSON.parse(l.value.SourcesFrom).text), 1)
- ], 4)) : Kn("", !0)
- ], 512)) : Kn("", !0);
- };
- }
- }, GC = /* @__PURE__ */ ud(XC, [["styles", [BC]], ["__scopeId", "data-v-98ab6c2e"]]), HC = Vp(NC), FC = Vp(GC);
- function VC() {
- customElements.define("eta-chart", HC), customElements.define("eta-table", FC);
- }
- export {
- VC as registerEtaComp
- };
|