index-d690d64b.js 894 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680
  1. import {
  2. a6 as cB,
  3. a7 as cE,
  4. d as defineComponent,
  5. a8 as useConfig,
  6. a9 as useTheme,
  7. E as computed,
  8. aa as createKey,
  9. ab as useThemeClass,
  10. ac as h$1,
  11. ad as inputLight,
  12. r as ref,
  13. w as watch,
  14. f as createVNode,
  15. ae as NSkeleton,
  16. af as commonjsGlobal,
  17. q as onMounted,
  18. ag as openBlock,
  19. ah as createElementBlock,
  20. ai as normalizeStyle,
  21. aj as toRefs,
  22. M as nextTick,
  23. e as reactive,
  24. k as createTextVNode,
  25. c as useUserStore,
  26. ak as useDialog,
  27. al as NEllipsis,
  28. j as NButton,
  29. o as NImage,
  30. Q as NSpace,
  31. am as NTag,
  32. y as resolveComponent,
  33. V as isVNode,
  34. N as NForm,
  35. g as NFormItem,
  36. F as Fragment,
  37. an as NInputNumber,
  38. i as NInputGroup,
  39. h as NInput,
  40. m as NTabs,
  41. n as NTabPane,
  42. H as NDatePicker,
  43. z as NModal,
  44. b as useMessage,
  45. Z as onUnmounted,
  46. T as Transition,
  47. ao as NTooltip,
  48. ap as NDrawer,
  49. aq as NDrawerContent
  50. } from './index-95e721f9.js';
  51. import { C as CardType } from './index-c8870a16.js';
  52. import { N as NSlider } from './Slider-6165502a.js';
  53. import { T as TheSearch } from './index-a585796f.js';
  54. import { l as listData } from './data-c15517db.js';
  55. import { N as NScrollbar } from './Scrollbar-27c35a2f.js';
  56. import './index-73922017.js';
  57. const style = cB(
  58. 'input-group-label',
  59. `
  60. position: relative;
  61. user-select: none;
  62. -webkit-user-select: none;
  63. box-sizing: border-box;
  64. padding: 0 12px;
  65. display: inline-block;
  66. border-radius: var(--n-border-radius);
  67. background-color: var(--n-group-label-color);
  68. color: var(--n-group-label-text-color);
  69. font-size: var(--n-font-size);
  70. line-height: var(--n-height);
  71. height: var(--n-height);
  72. flex-shrink: 0;
  73. white-space: nowrap;
  74. transition:
  75. color .3s var(--n-bezier),
  76. background-color .3s var(--n-bezier),
  77. box-shadow .3s var(--n-bezier);
  78. `,
  79. [
  80. cE(
  81. 'border',
  82. `
  83. position: absolute;
  84. left: 0;
  85. right: 0;
  86. top: 0;
  87. bottom: 0;
  88. border-radius: inherit;
  89. border: var(--n-group-label-border);
  90. transition: border-color .3s var(--n-bezier);
  91. `
  92. )
  93. ]
  94. ),
  95. inputGroupLabelProps = Object.assign(Object.assign({}, useTheme.props), {
  96. size: { type: String, default: 'medium' },
  97. bordered: { type: Boolean, default: void 0 }
  98. }),
  99. NInputGroupLabel = defineComponent({
  100. name: 'InputGroupLabel',
  101. props: inputGroupLabelProps,
  102. setup(e) {
  103. const {
  104. mergedBorderedRef: t,
  105. mergedClsPrefixRef: r,
  106. inlineThemeDisabled: i
  107. } = useConfig(e),
  108. s = useTheme('Input', '-input-group-label', style, inputLight, e, r),
  109. n = computed(() => {
  110. const { size: o } = e,
  111. {
  112. common: { cubicBezierEaseInOut: l },
  113. self: {
  114. groupLabelColor: c,
  115. borderRadius: g,
  116. groupLabelTextColor: S,
  117. lineHeight: p,
  118. groupLabelBorder: P,
  119. [createKey('fontSize', o)]: b,
  120. [createKey('height', o)]: y
  121. }
  122. } = s.value;
  123. return {
  124. '--n-bezier': l,
  125. '--n-group-label-color': c,
  126. '--n-group-label-border': P,
  127. '--n-border-radius': g,
  128. '--n-group-label-text-color': S,
  129. '--n-font-size': b,
  130. '--n-line-height': p,
  131. '--n-height': y
  132. };
  133. }),
  134. a = i
  135. ? useThemeClass(
  136. 'input-group-label',
  137. computed(() => e.size[0]),
  138. n,
  139. e
  140. )
  141. : void 0;
  142. return {
  143. mergedClsPrefix: r,
  144. mergedBordered: t,
  145. cssVars: i ? void 0 : n,
  146. themeClass: a == null ? void 0 : a.themeClass,
  147. onRender: a == null ? void 0 : a.onRender
  148. };
  149. },
  150. render() {
  151. var e, t, r;
  152. const { mergedClsPrefix: i } = this;
  153. return (
  154. (e = this.onRender) === null || e === void 0 || e.call(this),
  155. h$1(
  156. 'div',
  157. {
  158. class: [`${i}-input-group-label`, this.themeClass],
  159. style: this.cssVars
  160. },
  161. (r = (t = this.$slots).default) === null || r === void 0
  162. ? void 0
  163. : r.call(t),
  164. this.mergedBordered
  165. ? h$1('div', { class: `${i}-input-group-label__border` })
  166. : null
  167. )
  168. );
  169. }
  170. }),
  171. playContent = '_playContent_10y90_1',
  172. assignHomework = '_assignHomework_10y90_10',
  173. sectionAnimateUp = '_sectionAnimateUp_10y90_23',
  174. coursewarePlay = '_coursewarePlay_10y90_29',
  175. playModel = '_playModel_10y90_35',
  176. headerContainer = '_headerContainer_10y90_44',
  177. backBtn = '_backBtn_10y90_61',
  178. headRight = '_headRight_10y90_73',
  179. rightBtn = '_rightBtn_10y90_82',
  180. menu = '_menu_10y90_94',
  181. tabsContent = '_tabsContent_10y90_104',
  182. wraps = '_wraps_10y90_115',
  183. itemDiv = '_itemDiv_10y90_122',
  184. itemActive = '_itemActive_10y90_135',
  185. acitveAnimation = '_acitveAnimation_10y90_138',
  186. show = '_show_10y90_141',
  187. hide$1 = '_hide_10y90_144',
  188. rightFixedBtns = '_rightFixedBtns_10y90_157',
  189. fullBtn = '_fullBtn_10y90_164',
  190. point = '_point_10y90_169',
  191. btnsDisabled = '_btnsDisabled_10y90_179',
  192. loadWrap = '_loadWrap_10y90_208',
  193. drawerContainer = '_drawerContainer_10y90_219',
  194. sectionAnimate$1 = '_sectionAnimate_10y90_23',
  195. switchDisplaySection = '_switchDisplaySection_10y90_264',
  196. displayBtn = '_displayBtn_10y90_272',
  197. attendClassModal = '_attendClassModal_10y90_284',
  198. modelAttendContent = '_modelAttendContent_10y90_308',
  199. modelAttendBtnGroup = '_modelAttendBtnGroup_10y90_314',
  200. trainClassModal = '_trainClassModal_10y90_322',
  201. styles$8 = {
  202. playContent,
  203. assignHomework,
  204. sectionAnimateUp,
  205. coursewarePlay,
  206. playModel,
  207. headerContainer,
  208. backBtn,
  209. headRight,
  210. rightBtn,
  211. menu,
  212. tabsContent,
  213. wraps,
  214. itemDiv,
  215. itemActive,
  216. acitveAnimation,
  217. show,
  218. hide: hide$1,
  219. rightFixedBtns,
  220. fullBtn,
  221. point,
  222. btnsDisabled,
  223. loadWrap,
  224. drawerContainer,
  225. sectionAnimate: sectionAnimate$1,
  226. switchDisplaySection,
  227. displayBtn,
  228. attendClassModal,
  229. modelAttendContent,
  230. modelAttendBtnGroup,
  231. trainClassModal
  232. },
  233. plyr = '',
  234. musicScore = '_musicScore_piq8y_1',
  235. container = '_container_piq8y_8',
  236. musicModel = '_musicModel_piq8y_16',
  237. errorModel = '_errorModel_piq8y_23',
  238. startBtn = '_startBtn_piq8y_35',
  239. loading = '_loading_piq8y_45',
  240. skeletonWrap = '_skeletonWrap_piq8y_51',
  241. skeleton = '_skeleton_piq8y_51',
  242. styles$7 = {
  243. musicScore,
  244. container,
  245. musicModel,
  246. errorModel,
  247. startBtn,
  248. loading,
  249. skeletonWrap,
  250. skeleton
  251. };
  252. var inBrowser = typeof window < 'u',
  253. visibility;
  254. function usePageVisibility() {
  255. if (!visibility && ((visibility = ref('visible')), inBrowser)) {
  256. const e = () => {
  257. visibility.value = document.hidden ? 'hidden' : 'visible';
  258. };
  259. e(), window.addEventListener('visibilitychange', e);
  260. }
  261. return visibility;
  262. }
  263. const MusicScore = defineComponent({
  264. name: 'musicScore',
  265. props: {
  266. music: { type: Object, default: () => ({}) },
  267. activeModel: { type: Boolean }
  268. },
  269. emits: ['setIframe'],
  270. setup(e, { emit: t }) {
  271. const r = ref(!1),
  272. i = usePageVisibility();
  273. watch(i, g => {
  274. console.log('🚀 ~ value:', g), g == 'hidden' && (r.value = !1);
  275. });
  276. const s = ref(),
  277. n = ref(!1),
  278. a = ref(!1),
  279. o = ref(!1),
  280. l =
  281. 'https://dev.kt.colexiu.com/instrument?platform=pc&modelType=practise',
  282. c = () => {
  283. fetch(l)
  284. .then(() => {
  285. (o.value = !0), (a.value = !1);
  286. })
  287. .catch(() => {
  288. a.value = !0;
  289. });
  290. };
  291. return (
  292. watch(e.music, () => {
  293. o.value || ((a.value = !1), e.music.display && c());
  294. }),
  295. () =>
  296. createVNode('div', { class: styles$7.musicScore }, [
  297. createVNode(
  298. 'iframe',
  299. {
  300. ref: s,
  301. onLoad: () => {
  302. t('setIframe', s.value), (n.value = !0);
  303. },
  304. class: [styles$7.container, 'musicIframe'],
  305. frameborder: '0',
  306. src: l
  307. },
  308. null
  309. ),
  310. createVNode('div', { class: styles$7.skeletonWrap }, [
  311. createVNode(NSkeleton, { text: !0, repeat: 8 }, null)
  312. ])
  313. ])
  314. );
  315. }
  316. }),
  317. iconMenu = '' + new URL('icon-menu-74c5e633.svg', import.meta.url).href,
  318. iconUp = '' + new URL('icon-up-c2aeb981.svg', import.meta.url).href,
  319. iconDown = '' + new URL('icon-down-c5693186.svg', import.meta.url).href,
  320. iconNote = '' + new URL('icon-note-e717c676.png', import.meta.url).href,
  321. iconWhiteboard =
  322. '' + new URL('icon-whiteboard-c1022e62.png', import.meta.url).href,
  323. iconAssignHomework =
  324. '' + new URL('icon-assignHomework-16a80795.svg', import.meta.url).href;
  325. var lottieExports = {},
  326. lottie = {
  327. get exports() {
  328. return lottieExports;
  329. },
  330. set exports(e) {
  331. lottieExports = e;
  332. }
  333. };
  334. (function (module, exports) {
  335. typeof navigator < 'u' &&
  336. (function (e, t) {
  337. module.exports = t();
  338. })(commonjsGlobal, function () {
  339. var svgNS = 'http://www.w3.org/2000/svg',
  340. locationHref = '',
  341. _useWebWorker = !1,
  342. initialDefaultFrame = -999999,
  343. setWebWorker = function (t) {
  344. _useWebWorker = !!t;
  345. },
  346. getWebWorker = function () {
  347. return _useWebWorker;
  348. },
  349. setLocationHref = function (t) {
  350. locationHref = t;
  351. },
  352. getLocationHref = function () {
  353. return locationHref;
  354. };
  355. function createTag(e) {
  356. return document.createElement(e);
  357. }
  358. function extendPrototype(e, t) {
  359. var r,
  360. i = e.length,
  361. s;
  362. for (r = 0; r < i; r += 1) {
  363. s = e[r].prototype;
  364. for (var n in s)
  365. Object.prototype.hasOwnProperty.call(s, n) &&
  366. (t.prototype[n] = s[n]);
  367. }
  368. }
  369. function getDescriptor(e, t) {
  370. return Object.getOwnPropertyDescriptor(e, t);
  371. }
  372. function createProxyFunction(e) {
  373. function t() {}
  374. return (t.prototype = e), t;
  375. }
  376. var audioControllerFactory = (function () {
  377. function e(t) {
  378. (this.audios = []),
  379. (this.audioFactory = t),
  380. (this._volume = 1),
  381. (this._isMuted = !1);
  382. }
  383. return (
  384. (e.prototype = {
  385. addAudio: function (r) {
  386. this.audios.push(r);
  387. },
  388. pause: function () {
  389. var r,
  390. i = this.audios.length;
  391. for (r = 0; r < i; r += 1) this.audios[r].pause();
  392. },
  393. resume: function () {
  394. var r,
  395. i = this.audios.length;
  396. for (r = 0; r < i; r += 1) this.audios[r].resume();
  397. },
  398. setRate: function (r) {
  399. var i,
  400. s = this.audios.length;
  401. for (i = 0; i < s; i += 1) this.audios[i].setRate(r);
  402. },
  403. createAudio: function (r) {
  404. return this.audioFactory
  405. ? this.audioFactory(r)
  406. : window.Howl
  407. ? new window.Howl({ src: [r] })
  408. : {
  409. isPlaying: !1,
  410. play: function () {
  411. this.isPlaying = !0;
  412. },
  413. seek: function () {
  414. this.isPlaying = !1;
  415. },
  416. playing: function () {},
  417. rate: function () {},
  418. setVolume: function () {}
  419. };
  420. },
  421. setAudioFactory: function (r) {
  422. this.audioFactory = r;
  423. },
  424. setVolume: function (r) {
  425. (this._volume = r), this._updateVolume();
  426. },
  427. mute: function () {
  428. (this._isMuted = !0), this._updateVolume();
  429. },
  430. unmute: function () {
  431. (this._isMuted = !1), this._updateVolume();
  432. },
  433. getVolume: function () {
  434. return this._volume;
  435. },
  436. _updateVolume: function () {
  437. var r,
  438. i = this.audios.length;
  439. for (r = 0; r < i; r += 1)
  440. this.audios[r].volume(this._volume * (this._isMuted ? 0 : 1));
  441. }
  442. }),
  443. function () {
  444. return new e();
  445. }
  446. );
  447. })(),
  448. createTypedArray = (function () {
  449. function e(r, i) {
  450. var s = 0,
  451. n = [],
  452. a;
  453. switch (r) {
  454. case 'int16':
  455. case 'uint8c':
  456. a = 1;
  457. break;
  458. default:
  459. a = 1.1;
  460. break;
  461. }
  462. for (s = 0; s < i; s += 1) n.push(a);
  463. return n;
  464. }
  465. function t(r, i) {
  466. return r === 'float32'
  467. ? new Float32Array(i)
  468. : r === 'int16'
  469. ? new Int16Array(i)
  470. : r === 'uint8c'
  471. ? new Uint8ClampedArray(i)
  472. : e(r, i);
  473. }
  474. return typeof Uint8ClampedArray == 'function' &&
  475. typeof Float32Array == 'function'
  476. ? t
  477. : e;
  478. })();
  479. function createSizedArray(e) {
  480. return Array.apply(null, { length: e });
  481. }
  482. function _typeof$6(e) {
  483. return (
  484. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  485. ? (_typeof$6 = function (r) {
  486. return typeof r;
  487. })
  488. : (_typeof$6 = function (r) {
  489. return r &&
  490. typeof Symbol == 'function' &&
  491. r.constructor === Symbol &&
  492. r !== Symbol.prototype
  493. ? 'symbol'
  494. : typeof r;
  495. }),
  496. _typeof$6(e)
  497. );
  498. }
  499. var subframeEnabled = !0,
  500. expressionsPlugin = null,
  501. expressionsInterfaces = null,
  502. idPrefix$1 = '',
  503. isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
  504. bmPow = Math.pow,
  505. bmSqrt = Math.sqrt,
  506. bmFloor = Math.floor,
  507. bmMax = Math.max,
  508. bmMin = Math.min,
  509. BMMath = {};
  510. (function () {
  511. var e = [
  512. 'abs',
  513. 'acos',
  514. 'acosh',
  515. 'asin',
  516. 'asinh',
  517. 'atan',
  518. 'atanh',
  519. 'atan2',
  520. 'ceil',
  521. 'cbrt',
  522. 'expm1',
  523. 'clz32',
  524. 'cos',
  525. 'cosh',
  526. 'exp',
  527. 'floor',
  528. 'fround',
  529. 'hypot',
  530. 'imul',
  531. 'log',
  532. 'log1p',
  533. 'log2',
  534. 'log10',
  535. 'max',
  536. 'min',
  537. 'pow',
  538. 'random',
  539. 'round',
  540. 'sign',
  541. 'sin',
  542. 'sinh',
  543. 'sqrt',
  544. 'tan',
  545. 'tanh',
  546. 'trunc',
  547. 'E',
  548. 'LN10',
  549. 'LN2',
  550. 'LOG10E',
  551. 'LOG2E',
  552. 'PI',
  553. 'SQRT1_2',
  554. 'SQRT2'
  555. ],
  556. t,
  557. r = e.length;
  558. for (t = 0; t < r; t += 1) BMMath[e[t]] = Math[e[t]];
  559. })(),
  560. (BMMath.random = Math.random),
  561. (BMMath.abs = function (e) {
  562. var t = _typeof$6(e);
  563. if (t === 'object' && e.length) {
  564. var r = createSizedArray(e.length),
  565. i,
  566. s = e.length;
  567. for (i = 0; i < s; i += 1) r[i] = Math.abs(e[i]);
  568. return r;
  569. }
  570. return Math.abs(e);
  571. });
  572. var defaultCurveSegments = 150,
  573. degToRads = Math.PI / 180,
  574. roundCorner = 0.5519;
  575. function styleDiv(e) {
  576. (e.style.position = 'absolute'),
  577. (e.style.top = 0),
  578. (e.style.left = 0),
  579. (e.style.display = 'block'),
  580. (e.style.transformOrigin = '0 0'),
  581. (e.style.webkitTransformOrigin = '0 0'),
  582. (e.style.backfaceVisibility = 'visible'),
  583. (e.style.webkitBackfaceVisibility = 'visible'),
  584. (e.style.transformStyle = 'preserve-3d'),
  585. (e.style.webkitTransformStyle = 'preserve-3d'),
  586. (e.style.mozTransformStyle = 'preserve-3d');
  587. }
  588. function BMEnterFrameEvent(e, t, r, i) {
  589. (this.type = e),
  590. (this.currentTime = t),
  591. (this.totalTime = r),
  592. (this.direction = i < 0 ? -1 : 1);
  593. }
  594. function BMCompleteEvent(e, t) {
  595. (this.type = e), (this.direction = t < 0 ? -1 : 1);
  596. }
  597. function BMCompleteLoopEvent(e, t, r, i) {
  598. (this.type = e),
  599. (this.currentLoop = r),
  600. (this.totalLoops = t),
  601. (this.direction = i < 0 ? -1 : 1);
  602. }
  603. function BMSegmentStartEvent(e, t, r) {
  604. (this.type = e), (this.firstFrame = t), (this.totalFrames = r);
  605. }
  606. function BMDestroyEvent(e, t) {
  607. (this.type = e), (this.target = t);
  608. }
  609. function BMRenderFrameErrorEvent(e, t) {
  610. (this.type = 'renderFrameError'),
  611. (this.nativeError = e),
  612. (this.currentTime = t);
  613. }
  614. function BMConfigErrorEvent(e) {
  615. (this.type = 'configError'), (this.nativeError = e);
  616. }
  617. var createElementID = (function () {
  618. var e = 0;
  619. return function () {
  620. return (e += 1), idPrefix$1 + '__lottie_element_' + e;
  621. };
  622. })();
  623. function HSVtoRGB(e, t, r) {
  624. var i, s, n, a, o, l, c, g;
  625. switch (
  626. ((a = Math.floor(e * 6)),
  627. (o = e * 6 - a),
  628. (l = r * (1 - t)),
  629. (c = r * (1 - o * t)),
  630. (g = r * (1 - (1 - o) * t)),
  631. a % 6)
  632. ) {
  633. case 0:
  634. (i = r), (s = g), (n = l);
  635. break;
  636. case 1:
  637. (i = c), (s = r), (n = l);
  638. break;
  639. case 2:
  640. (i = l), (s = r), (n = g);
  641. break;
  642. case 3:
  643. (i = l), (s = c), (n = r);
  644. break;
  645. case 4:
  646. (i = g), (s = l), (n = r);
  647. break;
  648. case 5:
  649. (i = r), (s = l), (n = c);
  650. break;
  651. }
  652. return [i, s, n];
  653. }
  654. function RGBtoHSV(e, t, r) {
  655. var i = Math.max(e, t, r),
  656. s = Math.min(e, t, r),
  657. n = i - s,
  658. a,
  659. o = i === 0 ? 0 : n / i,
  660. l = i / 255;
  661. switch (i) {
  662. case s:
  663. a = 0;
  664. break;
  665. case e:
  666. (a = t - r + n * (t < r ? 6 : 0)), (a /= 6 * n);
  667. break;
  668. case t:
  669. (a = r - e + n * 2), (a /= 6 * n);
  670. break;
  671. case r:
  672. (a = e - t + n * 4), (a /= 6 * n);
  673. break;
  674. }
  675. return [a, o, l];
  676. }
  677. function addSaturationToRGB(e, t) {
  678. var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
  679. return (
  680. (r[1] += t),
  681. r[1] > 1 ? (r[1] = 1) : r[1] <= 0 && (r[1] = 0),
  682. HSVtoRGB(r[0], r[1], r[2])
  683. );
  684. }
  685. function addBrightnessToRGB(e, t) {
  686. var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
  687. return (
  688. (r[2] += t),
  689. r[2] > 1 ? (r[2] = 1) : r[2] < 0 && (r[2] = 0),
  690. HSVtoRGB(r[0], r[1], r[2])
  691. );
  692. }
  693. function addHueToRGB(e, t) {
  694. var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
  695. return (
  696. (r[0] += t / 360),
  697. r[0] > 1 ? (r[0] -= 1) : r[0] < 0 && (r[0] += 1),
  698. HSVtoRGB(r[0], r[1], r[2])
  699. );
  700. }
  701. var rgbToHex = (function () {
  702. var e = [],
  703. t,
  704. r;
  705. for (t = 0; t < 256; t += 1)
  706. (r = t.toString(16)), (e[t] = r.length === 1 ? '0' + r : r);
  707. return function (i, s, n) {
  708. return (
  709. i < 0 && (i = 0),
  710. s < 0 && (s = 0),
  711. n < 0 && (n = 0),
  712. '#' + e[i] + e[s] + e[n]
  713. );
  714. };
  715. })(),
  716. setSubframeEnabled = function (t) {
  717. subframeEnabled = !!t;
  718. },
  719. getSubframeEnabled = function () {
  720. return subframeEnabled;
  721. },
  722. setExpressionsPlugin = function (t) {
  723. expressionsPlugin = t;
  724. },
  725. getExpressionsPlugin = function () {
  726. return expressionsPlugin;
  727. },
  728. setExpressionInterfaces = function (t) {
  729. expressionsInterfaces = t;
  730. },
  731. getExpressionInterfaces = function () {
  732. return expressionsInterfaces;
  733. },
  734. setDefaultCurveSegments = function (t) {
  735. defaultCurveSegments = t;
  736. },
  737. getDefaultCurveSegments = function () {
  738. return defaultCurveSegments;
  739. },
  740. setIdPrefix = function (t) {
  741. idPrefix$1 = t;
  742. };
  743. function createNS(e) {
  744. return document.createElementNS(svgNS, e);
  745. }
  746. function _typeof$5(e) {
  747. return (
  748. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  749. ? (_typeof$5 = function (r) {
  750. return typeof r;
  751. })
  752. : (_typeof$5 = function (r) {
  753. return r &&
  754. typeof Symbol == 'function' &&
  755. r.constructor === Symbol &&
  756. r !== Symbol.prototype
  757. ? 'symbol'
  758. : typeof r;
  759. }),
  760. _typeof$5(e)
  761. );
  762. }
  763. var dataManager = (function () {
  764. var e = 1,
  765. t = [],
  766. r,
  767. i,
  768. s = {
  769. onmessage: function () {},
  770. postMessage: function (P) {
  771. r({ data: P });
  772. }
  773. },
  774. n = {
  775. postMessage: function (P) {
  776. s.onmessage({ data: P });
  777. }
  778. };
  779. function a(p) {
  780. if (window.Worker && window.Blob && getWebWorker()) {
  781. var P = new Blob(
  782. ['var _workerSelf = self; self.onmessage = ', p.toString()],
  783. { type: 'text/javascript' }
  784. ),
  785. b = URL.createObjectURL(P);
  786. return new Worker(b);
  787. }
  788. return (r = p), s;
  789. }
  790. function o() {
  791. i ||
  792. ((i = a(function (P) {
  793. function b() {
  794. function A(B, F) {
  795. var k,
  796. C,
  797. M = B.length,
  798. R,
  799. L,
  800. j,
  801. z;
  802. for (C = 0; C < M; C += 1)
  803. if (((k = B[C]), 'ks' in k && !k.completed)) {
  804. if (((k.completed = !0), k.hasMask)) {
  805. var H = k.masksProperties;
  806. for (L = H.length, R = 0; R < L; R += 1)
  807. if (H[R].pt.k.i) E(H[R].pt.k);
  808. else
  809. for (z = H[R].pt.k.length, j = 0; j < z; j += 1)
  810. H[R].pt.k[j].s && E(H[R].pt.k[j].s[0]),
  811. H[R].pt.k[j].e && E(H[R].pt.k[j].e[0]);
  812. }
  813. k.ty === 0
  814. ? ((k.layers = m(k.refId, F)), A(k.layers, F))
  815. : k.ty === 4
  816. ? d(k.shapes)
  817. : k.ty === 5 && $(k);
  818. }
  819. }
  820. function u(B, F) {
  821. if (B) {
  822. var k = 0,
  823. C = B.length;
  824. for (k = 0; k < C; k += 1)
  825. B[k].t === 1 &&
  826. ((B[k].data.layers = m(B[k].data.refId, F)),
  827. A(B[k].data.layers, F));
  828. }
  829. }
  830. function f(B, F) {
  831. for (var k = 0, C = F.length; k < C; ) {
  832. if (F[k].id === B) return F[k];
  833. k += 1;
  834. }
  835. return null;
  836. }
  837. function m(B, F) {
  838. var k = f(B, F);
  839. return k
  840. ? k.layers.__used
  841. ? JSON.parse(JSON.stringify(k.layers))
  842. : ((k.layers.__used = !0), k.layers)
  843. : null;
  844. }
  845. function d(B) {
  846. var F,
  847. k = B.length,
  848. C,
  849. M;
  850. for (F = k - 1; F >= 0; F -= 1)
  851. if (B[F].ty === 'sh')
  852. if (B[F].ks.k.i) E(B[F].ks.k);
  853. else
  854. for (M = B[F].ks.k.length, C = 0; C < M; C += 1)
  855. B[F].ks.k[C].s && E(B[F].ks.k[C].s[0]),
  856. B[F].ks.k[C].e && E(B[F].ks.k[C].e[0]);
  857. else B[F].ty === 'gr' && d(B[F].it);
  858. }
  859. function E(B) {
  860. var F,
  861. k = B.i.length;
  862. for (F = 0; F < k; F += 1)
  863. (B.i[F][0] += B.v[F][0]),
  864. (B.i[F][1] += B.v[F][1]),
  865. (B.o[F][0] += B.v[F][0]),
  866. (B.o[F][1] += B.v[F][1]);
  867. }
  868. function T(B, F) {
  869. var k = F ? F.split('.') : [100, 100, 100];
  870. return B[0] > k[0]
  871. ? !0
  872. : k[0] > B[0]
  873. ? !1
  874. : B[1] > k[1]
  875. ? !0
  876. : k[1] > B[1]
  877. ? !1
  878. : B[2] > k[2]
  879. ? !0
  880. : k[2] > B[2]
  881. ? !1
  882. : null;
  883. }
  884. var x = (function () {
  885. var B = [4, 4, 14];
  886. function F(C) {
  887. var M = C.t.d;
  888. C.t.d = { k: [{ s: M, t: 0 }] };
  889. }
  890. function k(C) {
  891. var M,
  892. R = C.length;
  893. for (M = 0; M < R; M += 1) C[M].ty === 5 && F(C[M]);
  894. }
  895. return function (C) {
  896. if (T(B, C.v) && (k(C.layers), C.assets)) {
  897. var M,
  898. R = C.assets.length;
  899. for (M = 0; M < R; M += 1)
  900. C.assets[M].layers && k(C.assets[M].layers);
  901. }
  902. };
  903. })(),
  904. _ = (function () {
  905. var B = [4, 7, 99];
  906. return function (F) {
  907. if (F.chars && !T(B, F.v)) {
  908. var k,
  909. C = F.chars.length;
  910. for (k = 0; k < C; k += 1) {
  911. var M = F.chars[k];
  912. M.data &&
  913. M.data.shapes &&
  914. (d(M.data.shapes),
  915. (M.data.ip = 0),
  916. (M.data.op = 99999),
  917. (M.data.st = 0),
  918. (M.data.sr = 1),
  919. (M.data.ks = {
  920. p: { k: [0, 0], a: 0 },
  921. s: { k: [100, 100], a: 0 },
  922. a: { k: [0, 0], a: 0 },
  923. r: { k: 0, a: 0 },
  924. o: { k: 100, a: 0 }
  925. }),
  926. F.chars[k].t ||
  927. (M.data.shapes.push({ ty: 'no' }),
  928. M.data.shapes[0].it.push({
  929. p: { k: [0, 0], a: 0 },
  930. s: { k: [100, 100], a: 0 },
  931. a: { k: [0, 0], a: 0 },
  932. r: { k: 0, a: 0 },
  933. o: { k: 100, a: 0 },
  934. sk: { k: 0, a: 0 },
  935. sa: { k: 0, a: 0 },
  936. ty: 'tr'
  937. })));
  938. }
  939. }
  940. };
  941. })(),
  942. I = (function () {
  943. var B = [5, 7, 15];
  944. function F(C) {
  945. var M = C.t.p;
  946. typeof M.a == 'number' && (M.a = { a: 0, k: M.a }),
  947. typeof M.p == 'number' && (M.p = { a: 0, k: M.p }),
  948. typeof M.r == 'number' && (M.r = { a: 0, k: M.r });
  949. }
  950. function k(C) {
  951. var M,
  952. R = C.length;
  953. for (M = 0; M < R; M += 1) C[M].ty === 5 && F(C[M]);
  954. }
  955. return function (C) {
  956. if (T(B, C.v) && (k(C.layers), C.assets)) {
  957. var M,
  958. R = C.assets.length;
  959. for (M = 0; M < R; M += 1)
  960. C.assets[M].layers && k(C.assets[M].layers);
  961. }
  962. };
  963. })(),
  964. V = (function () {
  965. var B = [4, 1, 9];
  966. function F(C) {
  967. var M,
  968. R = C.length,
  969. L,
  970. j;
  971. for (M = 0; M < R; M += 1)
  972. if (C[M].ty === 'gr') F(C[M].it);
  973. else if (C[M].ty === 'fl' || C[M].ty === 'st')
  974. if (C[M].c.k && C[M].c.k[0].i)
  975. for (j = C[M].c.k.length, L = 0; L < j; L += 1)
  976. C[M].c.k[L].s &&
  977. ((C[M].c.k[L].s[0] /= 255),
  978. (C[M].c.k[L].s[1] /= 255),
  979. (C[M].c.k[L].s[2] /= 255),
  980. (C[M].c.k[L].s[3] /= 255)),
  981. C[M].c.k[L].e &&
  982. ((C[M].c.k[L].e[0] /= 255),
  983. (C[M].c.k[L].e[1] /= 255),
  984. (C[M].c.k[L].e[2] /= 255),
  985. (C[M].c.k[L].e[3] /= 255));
  986. else
  987. (C[M].c.k[0] /= 255),
  988. (C[M].c.k[1] /= 255),
  989. (C[M].c.k[2] /= 255),
  990. (C[M].c.k[3] /= 255);
  991. }
  992. function k(C) {
  993. var M,
  994. R = C.length;
  995. for (M = 0; M < R; M += 1)
  996. C[M].ty === 4 && F(C[M].shapes);
  997. }
  998. return function (C) {
  999. if (T(B, C.v) && (k(C.layers), C.assets)) {
  1000. var M,
  1001. R = C.assets.length;
  1002. for (M = 0; M < R; M += 1)
  1003. C.assets[M].layers && k(C.assets[M].layers);
  1004. }
  1005. };
  1006. })(),
  1007. D = (function () {
  1008. var B = [4, 4, 18];
  1009. function F(C) {
  1010. var M,
  1011. R = C.length,
  1012. L,
  1013. j;
  1014. for (M = R - 1; M >= 0; M -= 1)
  1015. if (C[M].ty === 'sh')
  1016. if (C[M].ks.k.i) C[M].ks.k.c = C[M].closed;
  1017. else
  1018. for (j = C[M].ks.k.length, L = 0; L < j; L += 1)
  1019. C[M].ks.k[L].s &&
  1020. (C[M].ks.k[L].s[0].c = C[M].closed),
  1021. C[M].ks.k[L].e &&
  1022. (C[M].ks.k[L].e[0].c = C[M].closed);
  1023. else C[M].ty === 'gr' && F(C[M].it);
  1024. }
  1025. function k(C) {
  1026. var M,
  1027. R,
  1028. L = C.length,
  1029. j,
  1030. z,
  1031. H,
  1032. U;
  1033. for (R = 0; R < L; R += 1) {
  1034. if (((M = C[R]), M.hasMask)) {
  1035. var q = M.masksProperties;
  1036. for (z = q.length, j = 0; j < z; j += 1)
  1037. if (q[j].pt.k.i) q[j].pt.k.c = q[j].cl;
  1038. else
  1039. for (U = q[j].pt.k.length, H = 0; H < U; H += 1)
  1040. q[j].pt.k[H].s &&
  1041. (q[j].pt.k[H].s[0].c = q[j].cl),
  1042. q[j].pt.k[H].e &&
  1043. (q[j].pt.k[H].e[0].c = q[j].cl);
  1044. }
  1045. M.ty === 4 && F(M.shapes);
  1046. }
  1047. }
  1048. return function (C) {
  1049. if (T(B, C.v) && (k(C.layers), C.assets)) {
  1050. var M,
  1051. R = C.assets.length;
  1052. for (M = 0; M < R; M += 1)
  1053. C.assets[M].layers && k(C.assets[M].layers);
  1054. }
  1055. };
  1056. })();
  1057. function N(B) {
  1058. B.__complete ||
  1059. (V(B),
  1060. x(B),
  1061. _(B),
  1062. I(B),
  1063. D(B),
  1064. A(B.layers, B.assets),
  1065. u(B.chars, B.assets),
  1066. (B.__complete = !0));
  1067. }
  1068. function $(B) {
  1069. B.t.a.length === 0 && 'm' in B.t.p;
  1070. }
  1071. var O = {};
  1072. return (
  1073. (O.completeData = N),
  1074. (O.checkColors = V),
  1075. (O.checkChars = _),
  1076. (O.checkPathProperties = I),
  1077. (O.checkShapes = D),
  1078. (O.completeLayers = A),
  1079. O
  1080. );
  1081. }
  1082. if (
  1083. (n.dataManager || (n.dataManager = b()),
  1084. n.assetLoader ||
  1085. (n.assetLoader = (function () {
  1086. function A(f) {
  1087. var m = f.getResponseHeader('content-type');
  1088. return (m &&
  1089. f.responseType === 'json' &&
  1090. m.indexOf('json') !== -1) ||
  1091. (f.response && _typeof$5(f.response) === 'object')
  1092. ? f.response
  1093. : f.response && typeof f.response == 'string'
  1094. ? JSON.parse(f.response)
  1095. : f.responseText
  1096. ? JSON.parse(f.responseText)
  1097. : null;
  1098. }
  1099. function u(f, m, d, E) {
  1100. var T,
  1101. x = new XMLHttpRequest();
  1102. try {
  1103. x.responseType = 'json';
  1104. } catch {}
  1105. x.onreadystatechange = function () {
  1106. if (x.readyState === 4)
  1107. if (x.status === 200) (T = A(x)), d(T);
  1108. else
  1109. try {
  1110. (T = A(x)), d(T);
  1111. } catch (_) {
  1112. E && E(_);
  1113. }
  1114. };
  1115. try {
  1116. x.open(['G', 'E', 'T'].join(''), f, !0);
  1117. } catch {
  1118. x.open(['G', 'E', 'T'].join(''), m + '/' + f, !0);
  1119. }
  1120. x.send();
  1121. }
  1122. return { load: u };
  1123. })()),
  1124. P.data.type === 'loadAnimation')
  1125. )
  1126. n.assetLoader.load(
  1127. P.data.path,
  1128. P.data.fullPath,
  1129. function (A) {
  1130. n.dataManager.completeData(A),
  1131. n.postMessage({
  1132. id: P.data.id,
  1133. payload: A,
  1134. status: 'success'
  1135. });
  1136. },
  1137. function () {
  1138. n.postMessage({ id: P.data.id, status: 'error' });
  1139. }
  1140. );
  1141. else if (P.data.type === 'complete') {
  1142. var y = P.data.animation;
  1143. n.dataManager.completeData(y),
  1144. n.postMessage({
  1145. id: P.data.id,
  1146. payload: y,
  1147. status: 'success'
  1148. });
  1149. } else
  1150. P.data.type === 'loadData' &&
  1151. n.assetLoader.load(
  1152. P.data.path,
  1153. P.data.fullPath,
  1154. function (A) {
  1155. n.postMessage({
  1156. id: P.data.id,
  1157. payload: A,
  1158. status: 'success'
  1159. });
  1160. },
  1161. function () {
  1162. n.postMessage({ id: P.data.id, status: 'error' });
  1163. }
  1164. );
  1165. })),
  1166. (i.onmessage = function (p) {
  1167. var P = p.data,
  1168. b = P.id,
  1169. y = t[b];
  1170. (t[b] = null),
  1171. P.status === 'success'
  1172. ? y.onComplete(P.payload)
  1173. : y.onError && y.onError();
  1174. }));
  1175. }
  1176. function l(p, P) {
  1177. e += 1;
  1178. var b = 'processId_' + e;
  1179. return (t[b] = { onComplete: p, onError: P }), b;
  1180. }
  1181. function c(p, P, b) {
  1182. o();
  1183. var y = l(P, b);
  1184. i.postMessage({
  1185. type: 'loadAnimation',
  1186. path: p,
  1187. fullPath: window.location.origin + window.location.pathname,
  1188. id: y
  1189. });
  1190. }
  1191. function g(p, P, b) {
  1192. o();
  1193. var y = l(P, b);
  1194. i.postMessage({
  1195. type: 'loadData',
  1196. path: p,
  1197. fullPath: window.location.origin + window.location.pathname,
  1198. id: y
  1199. });
  1200. }
  1201. function S(p, P, b) {
  1202. o();
  1203. var y = l(P, b);
  1204. i.postMessage({ type: 'complete', animation: p, id: y });
  1205. }
  1206. return { loadAnimation: c, loadData: g, completeAnimation: S };
  1207. })(),
  1208. ImagePreloader = (function () {
  1209. var e = (function () {
  1210. var u = createTag('canvas');
  1211. (u.width = 1), (u.height = 1);
  1212. var f = u.getContext('2d');
  1213. return (f.fillStyle = 'rgba(0,0,0,0)'), f.fillRect(0, 0, 1, 1), u;
  1214. })();
  1215. function t() {
  1216. (this.loadedAssets += 1),
  1217. this.loadedAssets === this.totalImages &&
  1218. this.loadedFootagesCount === this.totalFootages &&
  1219. this.imagesLoadedCb &&
  1220. this.imagesLoadedCb(null);
  1221. }
  1222. function r() {
  1223. (this.loadedFootagesCount += 1),
  1224. this.loadedAssets === this.totalImages &&
  1225. this.loadedFootagesCount === this.totalFootages &&
  1226. this.imagesLoadedCb &&
  1227. this.imagesLoadedCb(null);
  1228. }
  1229. function i(u, f, m) {
  1230. var d = '';
  1231. if (u.e) d = u.p;
  1232. else if (f) {
  1233. var E = u.p;
  1234. E.indexOf('images/') !== -1 && (E = E.split('/')[1]), (d = f + E);
  1235. } else (d = m), (d += u.u ? u.u : ''), (d += u.p);
  1236. return d;
  1237. }
  1238. function s(u) {
  1239. var f = 0,
  1240. m = setInterval(
  1241. function () {
  1242. var d = u.getBBox();
  1243. (d.width || f > 500) &&
  1244. (this._imageLoaded(), clearInterval(m)),
  1245. (f += 1);
  1246. }.bind(this),
  1247. 50
  1248. );
  1249. }
  1250. function n(u) {
  1251. var f = i(u, this.assetsPath, this.path),
  1252. m = createNS('image');
  1253. isSafari
  1254. ? this.testImageLoaded(m)
  1255. : m.addEventListener('load', this._imageLoaded, !1),
  1256. m.addEventListener(
  1257. 'error',
  1258. function () {
  1259. (d.img = e), this._imageLoaded();
  1260. }.bind(this),
  1261. !1
  1262. ),
  1263. m.setAttributeNS('http://www.w3.org/1999/xlink', 'href', f),
  1264. this._elementHelper.append
  1265. ? this._elementHelper.append(m)
  1266. : this._elementHelper.appendChild(m);
  1267. var d = { img: m, assetData: u };
  1268. return d;
  1269. }
  1270. function a(u) {
  1271. var f = i(u, this.assetsPath, this.path),
  1272. m = createTag('img');
  1273. (m.crossOrigin = 'anonymous'),
  1274. m.addEventListener('load', this._imageLoaded, !1),
  1275. m.addEventListener(
  1276. 'error',
  1277. function () {
  1278. (d.img = e), this._imageLoaded();
  1279. }.bind(this),
  1280. !1
  1281. ),
  1282. (m.src = f);
  1283. var d = { img: m, assetData: u };
  1284. return d;
  1285. }
  1286. function o(u) {
  1287. var f = { assetData: u },
  1288. m = i(u, this.assetsPath, this.path);
  1289. return (
  1290. dataManager.loadData(
  1291. m,
  1292. function (d) {
  1293. (f.img = d), this._footageLoaded();
  1294. }.bind(this),
  1295. function () {
  1296. (f.img = {}), this._footageLoaded();
  1297. }.bind(this)
  1298. ),
  1299. f
  1300. );
  1301. }
  1302. function l(u, f) {
  1303. this.imagesLoadedCb = f;
  1304. var m,
  1305. d = u.length;
  1306. for (m = 0; m < d; m += 1)
  1307. u[m].layers ||
  1308. (!u[m].t || u[m].t === 'seq'
  1309. ? ((this.totalImages += 1),
  1310. this.images.push(this._createImageData(u[m])))
  1311. : u[m].t === 3 &&
  1312. ((this.totalFootages += 1),
  1313. this.images.push(this.createFootageData(u[m]))));
  1314. }
  1315. function c(u) {
  1316. this.path = u || '';
  1317. }
  1318. function g(u) {
  1319. this.assetsPath = u || '';
  1320. }
  1321. function S(u) {
  1322. for (var f = 0, m = this.images.length; f < m; ) {
  1323. if (this.images[f].assetData === u) return this.images[f].img;
  1324. f += 1;
  1325. }
  1326. return null;
  1327. }
  1328. function p() {
  1329. (this.imagesLoadedCb = null), (this.images.length = 0);
  1330. }
  1331. function P() {
  1332. return this.totalImages === this.loadedAssets;
  1333. }
  1334. function b() {
  1335. return this.totalFootages === this.loadedFootagesCount;
  1336. }
  1337. function y(u, f) {
  1338. u === 'svg'
  1339. ? ((this._elementHelper = f),
  1340. (this._createImageData = this.createImageData.bind(this)))
  1341. : (this._createImageData = this.createImgData.bind(this));
  1342. }
  1343. function A() {
  1344. (this._imageLoaded = t.bind(this)),
  1345. (this._footageLoaded = r.bind(this)),
  1346. (this.testImageLoaded = s.bind(this)),
  1347. (this.createFootageData = o.bind(this)),
  1348. (this.assetsPath = ''),
  1349. (this.path = ''),
  1350. (this.totalImages = 0),
  1351. (this.totalFootages = 0),
  1352. (this.loadedAssets = 0),
  1353. (this.loadedFootagesCount = 0),
  1354. (this.imagesLoadedCb = null),
  1355. (this.images = []);
  1356. }
  1357. return (
  1358. (A.prototype = {
  1359. loadAssets: l,
  1360. setAssetsPath: g,
  1361. setPath: c,
  1362. loadedImages: P,
  1363. loadedFootages: b,
  1364. destroy: p,
  1365. getAsset: S,
  1366. createImgData: a,
  1367. createImageData: n,
  1368. imageLoaded: t,
  1369. footageLoaded: r,
  1370. setCacheType: y
  1371. }),
  1372. A
  1373. );
  1374. })();
  1375. function BaseEvent() {}
  1376. BaseEvent.prototype = {
  1377. triggerEvent: function (t, r) {
  1378. if (this._cbs[t])
  1379. for (var i = this._cbs[t], s = 0; s < i.length; s += 1) i[s](r);
  1380. },
  1381. addEventListener: function (t, r) {
  1382. return (
  1383. this._cbs[t] || (this._cbs[t] = []),
  1384. this._cbs[t].push(r),
  1385. function () {
  1386. this.removeEventListener(t, r);
  1387. }.bind(this)
  1388. );
  1389. },
  1390. removeEventListener: function (t, r) {
  1391. if (!r) this._cbs[t] = null;
  1392. else if (this._cbs[t]) {
  1393. for (var i = 0, s = this._cbs[t].length; i < s; )
  1394. this._cbs[t][i] === r &&
  1395. (this._cbs[t].splice(i, 1), (i -= 1), (s -= 1)),
  1396. (i += 1);
  1397. this._cbs[t].length || (this._cbs[t] = null);
  1398. }
  1399. }
  1400. };
  1401. var markerParser = (function () {
  1402. function e(t) {
  1403. for (
  1404. var r = t.split(`\r
  1405. `),
  1406. i = {},
  1407. s,
  1408. n = 0,
  1409. a = 0;
  1410. a < r.length;
  1411. a += 1
  1412. )
  1413. (s = r[a].split(':')),
  1414. s.length === 2 && ((i[s[0]] = s[1].trim()), (n += 1));
  1415. if (n === 0) throw new Error();
  1416. return i;
  1417. }
  1418. return function (t) {
  1419. for (var r = [], i = 0; i < t.length; i += 1) {
  1420. var s = t[i],
  1421. n = { time: s.tm, duration: s.dr };
  1422. try {
  1423. n.payload = JSON.parse(t[i].cm);
  1424. } catch {
  1425. try {
  1426. n.payload = e(t[i].cm);
  1427. } catch {
  1428. n.payload = { name: t[i].cm };
  1429. }
  1430. }
  1431. r.push(n);
  1432. }
  1433. return r;
  1434. };
  1435. })(),
  1436. ProjectInterface = (function () {
  1437. function e(t) {
  1438. this.compositions.push(t);
  1439. }
  1440. return function () {
  1441. function t(r) {
  1442. for (var i = 0, s = this.compositions.length; i < s; ) {
  1443. if (
  1444. this.compositions[i].data &&
  1445. this.compositions[i].data.nm === r
  1446. )
  1447. return (
  1448. this.compositions[i].prepareFrame &&
  1449. this.compositions[i].data.xt &&
  1450. this.compositions[i].prepareFrame(this.currentFrame),
  1451. this.compositions[i].compInterface
  1452. );
  1453. i += 1;
  1454. }
  1455. return null;
  1456. }
  1457. return (
  1458. (t.compositions = []),
  1459. (t.currentFrame = 0),
  1460. (t.registerComposition = e),
  1461. t
  1462. );
  1463. };
  1464. })(),
  1465. renderers = {},
  1466. registerRenderer = function (t, r) {
  1467. renderers[t] = r;
  1468. };
  1469. function getRenderer(e) {
  1470. return renderers[e];
  1471. }
  1472. function getRegisteredRenderer() {
  1473. if (renderers.canvas) return 'canvas';
  1474. for (var e in renderers) if (renderers[e]) return e;
  1475. return '';
  1476. }
  1477. function _typeof$4(e) {
  1478. return (
  1479. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  1480. ? (_typeof$4 = function (r) {
  1481. return typeof r;
  1482. })
  1483. : (_typeof$4 = function (r) {
  1484. return r &&
  1485. typeof Symbol == 'function' &&
  1486. r.constructor === Symbol &&
  1487. r !== Symbol.prototype
  1488. ? 'symbol'
  1489. : typeof r;
  1490. }),
  1491. _typeof$4(e)
  1492. );
  1493. }
  1494. var AnimationItem = function () {
  1495. (this._cbs = []),
  1496. (this.name = ''),
  1497. (this.path = ''),
  1498. (this.isLoaded = !1),
  1499. (this.currentFrame = 0),
  1500. (this.currentRawFrame = 0),
  1501. (this.firstFrame = 0),
  1502. (this.totalFrames = 0),
  1503. (this.frameRate = 0),
  1504. (this.frameMult = 0),
  1505. (this.playSpeed = 1),
  1506. (this.playDirection = 1),
  1507. (this.playCount = 0),
  1508. (this.animationData = {}),
  1509. (this.assets = []),
  1510. (this.isPaused = !0),
  1511. (this.autoplay = !1),
  1512. (this.loop = !0),
  1513. (this.renderer = null),
  1514. (this.animationID = createElementID()),
  1515. (this.assetsPath = ''),
  1516. (this.timeCompleted = 0),
  1517. (this.segmentPos = 0),
  1518. (this.isSubframeEnabled = getSubframeEnabled()),
  1519. (this.segments = []),
  1520. (this._idle = !0),
  1521. (this._completedLoop = !1),
  1522. (this.projectInterface = ProjectInterface()),
  1523. (this.imagePreloader = new ImagePreloader()),
  1524. (this.audioController = audioControllerFactory()),
  1525. (this.markers = []),
  1526. (this.configAnimation = this.configAnimation.bind(this)),
  1527. (this.onSetupError = this.onSetupError.bind(this)),
  1528. (this.onSegmentComplete = this.onSegmentComplete.bind(this)),
  1529. (this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0));
  1530. };
  1531. extendPrototype([BaseEvent], AnimationItem),
  1532. (AnimationItem.prototype.setParams = function (e) {
  1533. (e.wrapper || e.container) &&
  1534. (this.wrapper = e.wrapper || e.container);
  1535. var t = 'svg';
  1536. e.animType ? (t = e.animType) : e.renderer && (t = e.renderer);
  1537. var r = getRenderer(t);
  1538. (this.renderer = new r(this, e.rendererSettings)),
  1539. this.imagePreloader.setCacheType(t, this.renderer.globalData.defs),
  1540. this.renderer.setProjectInterface(this.projectInterface),
  1541. (this.animType = t),
  1542. e.loop === '' ||
  1543. e.loop === null ||
  1544. e.loop === void 0 ||
  1545. e.loop === !0
  1546. ? (this.loop = !0)
  1547. : e.loop === !1
  1548. ? (this.loop = !1)
  1549. : (this.loop = parseInt(e.loop, 10)),
  1550. (this.autoplay = 'autoplay' in e ? e.autoplay : !0),
  1551. (this.name = e.name ? e.name : ''),
  1552. (this.autoloadSegments = Object.prototype.hasOwnProperty.call(
  1553. e,
  1554. 'autoloadSegments'
  1555. )
  1556. ? e.autoloadSegments
  1557. : !0),
  1558. (this.assetsPath = e.assetsPath),
  1559. (this.initialSegment = e.initialSegment),
  1560. e.audioFactory &&
  1561. this.audioController.setAudioFactory(e.audioFactory),
  1562. e.animationData
  1563. ? this.setupAnimation(e.animationData)
  1564. : e.path &&
  1565. (e.path.lastIndexOf('\\') !== -1
  1566. ? (this.path = e.path.substr(0, e.path.lastIndexOf('\\') + 1))
  1567. : (this.path = e.path.substr(0, e.path.lastIndexOf('/') + 1)),
  1568. (this.fileName = e.path.substr(e.path.lastIndexOf('/') + 1)),
  1569. (this.fileName = this.fileName.substr(
  1570. 0,
  1571. this.fileName.lastIndexOf('.json')
  1572. )),
  1573. dataManager.loadAnimation(
  1574. e.path,
  1575. this.configAnimation,
  1576. this.onSetupError
  1577. ));
  1578. }),
  1579. (AnimationItem.prototype.onSetupError = function () {
  1580. this.trigger('data_failed');
  1581. }),
  1582. (AnimationItem.prototype.setupAnimation = function (e) {
  1583. dataManager.completeAnimation(e, this.configAnimation);
  1584. }),
  1585. (AnimationItem.prototype.setData = function (e, t) {
  1586. t && _typeof$4(t) !== 'object' && (t = JSON.parse(t));
  1587. var r = { wrapper: e, animationData: t },
  1588. i = e.attributes;
  1589. (r.path = i.getNamedItem('data-animation-path')
  1590. ? i.getNamedItem('data-animation-path').value
  1591. : i.getNamedItem('data-bm-path')
  1592. ? i.getNamedItem('data-bm-path').value
  1593. : i.getNamedItem('bm-path')
  1594. ? i.getNamedItem('bm-path').value
  1595. : ''),
  1596. (r.animType = i.getNamedItem('data-anim-type')
  1597. ? i.getNamedItem('data-anim-type').value
  1598. : i.getNamedItem('data-bm-type')
  1599. ? i.getNamedItem('data-bm-type').value
  1600. : i.getNamedItem('bm-type')
  1601. ? i.getNamedItem('bm-type').value
  1602. : i.getNamedItem('data-bm-renderer')
  1603. ? i.getNamedItem('data-bm-renderer').value
  1604. : i.getNamedItem('bm-renderer')
  1605. ? i.getNamedItem('bm-renderer').value
  1606. : getRegisteredRenderer() || 'canvas');
  1607. var s = i.getNamedItem('data-anim-loop')
  1608. ? i.getNamedItem('data-anim-loop').value
  1609. : i.getNamedItem('data-bm-loop')
  1610. ? i.getNamedItem('data-bm-loop').value
  1611. : i.getNamedItem('bm-loop')
  1612. ? i.getNamedItem('bm-loop').value
  1613. : '';
  1614. s === 'false'
  1615. ? (r.loop = !1)
  1616. : s === 'true'
  1617. ? (r.loop = !0)
  1618. : s !== '' && (r.loop = parseInt(s, 10));
  1619. var n = i.getNamedItem('data-anim-autoplay')
  1620. ? i.getNamedItem('data-anim-autoplay').value
  1621. : i.getNamedItem('data-bm-autoplay')
  1622. ? i.getNamedItem('data-bm-autoplay').value
  1623. : i.getNamedItem('bm-autoplay')
  1624. ? i.getNamedItem('bm-autoplay').value
  1625. : !0;
  1626. (r.autoplay = n !== 'false'),
  1627. (r.name = i.getNamedItem('data-name')
  1628. ? i.getNamedItem('data-name').value
  1629. : i.getNamedItem('data-bm-name')
  1630. ? i.getNamedItem('data-bm-name').value
  1631. : i.getNamedItem('bm-name')
  1632. ? i.getNamedItem('bm-name').value
  1633. : '');
  1634. var a = i.getNamedItem('data-anim-prerender')
  1635. ? i.getNamedItem('data-anim-prerender').value
  1636. : i.getNamedItem('data-bm-prerender')
  1637. ? i.getNamedItem('data-bm-prerender').value
  1638. : i.getNamedItem('bm-prerender')
  1639. ? i.getNamedItem('bm-prerender').value
  1640. : '';
  1641. a === 'false' && (r.prerender = !1),
  1642. r.path ? this.setParams(r) : this.trigger('destroy');
  1643. }),
  1644. (AnimationItem.prototype.includeLayers = function (e) {
  1645. e.op > this.animationData.op &&
  1646. ((this.animationData.op = e.op),
  1647. (this.totalFrames = Math.floor(e.op - this.animationData.ip)));
  1648. var t = this.animationData.layers,
  1649. r,
  1650. i = t.length,
  1651. s = e.layers,
  1652. n,
  1653. a = s.length;
  1654. for (n = 0; n < a; n += 1)
  1655. for (r = 0; r < i; ) {
  1656. if (t[r].id === s[n].id) {
  1657. t[r] = s[n];
  1658. break;
  1659. }
  1660. r += 1;
  1661. }
  1662. if (
  1663. ((e.chars || e.fonts) &&
  1664. (this.renderer.globalData.fontManager.addChars(e.chars),
  1665. this.renderer.globalData.fontManager.addFonts(
  1666. e.fonts,
  1667. this.renderer.globalData.defs
  1668. )),
  1669. e.assets)
  1670. )
  1671. for (i = e.assets.length, r = 0; r < i; r += 1)
  1672. this.animationData.assets.push(e.assets[r]);
  1673. (this.animationData.__complete = !1),
  1674. dataManager.completeAnimation(
  1675. this.animationData,
  1676. this.onSegmentComplete
  1677. );
  1678. }),
  1679. (AnimationItem.prototype.onSegmentComplete = function (e) {
  1680. this.animationData = e;
  1681. var t = getExpressionsPlugin();
  1682. t && t.initExpressions(this), this.loadNextSegment();
  1683. }),
  1684. (AnimationItem.prototype.loadNextSegment = function () {
  1685. var e = this.animationData.segments;
  1686. if (!e || e.length === 0 || !this.autoloadSegments) {
  1687. this.trigger('data_ready'), (this.timeCompleted = this.totalFrames);
  1688. return;
  1689. }
  1690. var t = e.shift();
  1691. this.timeCompleted = t.time * this.frameRate;
  1692. var r = this.path + this.fileName + '_' + this.segmentPos + '.json';
  1693. (this.segmentPos += 1),
  1694. dataManager.loadData(
  1695. r,
  1696. this.includeLayers.bind(this),
  1697. function () {
  1698. this.trigger('data_failed');
  1699. }.bind(this)
  1700. );
  1701. }),
  1702. (AnimationItem.prototype.loadSegments = function () {
  1703. var e = this.animationData.segments;
  1704. e || (this.timeCompleted = this.totalFrames), this.loadNextSegment();
  1705. }),
  1706. (AnimationItem.prototype.imagesLoaded = function () {
  1707. this.trigger('loaded_images'), this.checkLoaded();
  1708. }),
  1709. (AnimationItem.prototype.preloadImages = function () {
  1710. this.imagePreloader.setAssetsPath(this.assetsPath),
  1711. this.imagePreloader.setPath(this.path),
  1712. this.imagePreloader.loadAssets(
  1713. this.animationData.assets,
  1714. this.imagesLoaded.bind(this)
  1715. );
  1716. }),
  1717. (AnimationItem.prototype.configAnimation = function (e) {
  1718. if (this.renderer)
  1719. try {
  1720. (this.animationData = e),
  1721. this.initialSegment
  1722. ? ((this.totalFrames = Math.floor(
  1723. this.initialSegment[1] - this.initialSegment[0]
  1724. )),
  1725. (this.firstFrame = Math.round(this.initialSegment[0])))
  1726. : ((this.totalFrames = Math.floor(
  1727. this.animationData.op - this.animationData.ip
  1728. )),
  1729. (this.firstFrame = Math.round(this.animationData.ip))),
  1730. this.renderer.configAnimation(e),
  1731. e.assets || (e.assets = []),
  1732. (this.assets = this.animationData.assets),
  1733. (this.frameRate = this.animationData.fr),
  1734. (this.frameMult = this.animationData.fr / 1e3),
  1735. this.renderer.searchExtraCompositions(e.assets),
  1736. (this.markers = markerParser(e.markers || [])),
  1737. this.trigger('config_ready'),
  1738. this.preloadImages(),
  1739. this.loadSegments(),
  1740. this.updaFrameModifier(),
  1741. this.waitForFontsLoaded(),
  1742. this.isPaused && this.audioController.pause();
  1743. } catch (t) {
  1744. this.triggerConfigError(t);
  1745. }
  1746. }),
  1747. (AnimationItem.prototype.waitForFontsLoaded = function () {
  1748. this.renderer &&
  1749. (this.renderer.globalData.fontManager.isLoaded
  1750. ? this.checkLoaded()
  1751. : setTimeout(this.waitForFontsLoaded.bind(this), 20));
  1752. }),
  1753. (AnimationItem.prototype.checkLoaded = function () {
  1754. if (
  1755. !this.isLoaded &&
  1756. this.renderer.globalData.fontManager.isLoaded &&
  1757. (this.imagePreloader.loadedImages() ||
  1758. this.renderer.rendererType !== 'canvas') &&
  1759. this.imagePreloader.loadedFootages()
  1760. ) {
  1761. this.isLoaded = !0;
  1762. var e = getExpressionsPlugin();
  1763. e && e.initExpressions(this),
  1764. this.renderer.initItems(),
  1765. setTimeout(
  1766. function () {
  1767. this.trigger('DOMLoaded');
  1768. }.bind(this),
  1769. 0
  1770. ),
  1771. this.gotoFrame(),
  1772. this.autoplay && this.play();
  1773. }
  1774. }),
  1775. (AnimationItem.prototype.resize = function (e, t) {
  1776. var r = typeof e == 'number' ? e : void 0,
  1777. i = typeof t == 'number' ? t : void 0;
  1778. this.renderer.updateContainerSize(r, i);
  1779. }),
  1780. (AnimationItem.prototype.setSubframe = function (e) {
  1781. this.isSubframeEnabled = !!e;
  1782. }),
  1783. (AnimationItem.prototype.gotoFrame = function () {
  1784. (this.currentFrame = this.isSubframeEnabled
  1785. ? this.currentRawFrame
  1786. : ~~this.currentRawFrame),
  1787. this.timeCompleted !== this.totalFrames &&
  1788. this.currentFrame > this.timeCompleted &&
  1789. (this.currentFrame = this.timeCompleted),
  1790. this.trigger('enterFrame'),
  1791. this.renderFrame(),
  1792. this.trigger('drawnFrame');
  1793. }),
  1794. (AnimationItem.prototype.renderFrame = function () {
  1795. if (!(this.isLoaded === !1 || !this.renderer))
  1796. try {
  1797. this.renderer.renderFrame(this.currentFrame + this.firstFrame);
  1798. } catch (e) {
  1799. this.triggerRenderFrameError(e);
  1800. }
  1801. }),
  1802. (AnimationItem.prototype.play = function (e) {
  1803. (e && this.name !== e) ||
  1804. (this.isPaused === !0 &&
  1805. ((this.isPaused = !1),
  1806. this.trigger('_pause'),
  1807. this.audioController.resume(),
  1808. this._idle && ((this._idle = !1), this.trigger('_active'))));
  1809. }),
  1810. (AnimationItem.prototype.pause = function (e) {
  1811. (e && this.name !== e) ||
  1812. (this.isPaused === !1 &&
  1813. ((this.isPaused = !0),
  1814. this.trigger('_play'),
  1815. (this._idle = !0),
  1816. this.trigger('_idle'),
  1817. this.audioController.pause()));
  1818. }),
  1819. (AnimationItem.prototype.togglePause = function (e) {
  1820. (e && this.name !== e) ||
  1821. (this.isPaused === !0 ? this.play() : this.pause());
  1822. }),
  1823. (AnimationItem.prototype.stop = function (e) {
  1824. (e && this.name !== e) ||
  1825. (this.pause(),
  1826. (this.playCount = 0),
  1827. (this._completedLoop = !1),
  1828. this.setCurrentRawFrameValue(0));
  1829. }),
  1830. (AnimationItem.prototype.getMarkerData = function (e) {
  1831. for (var t, r = 0; r < this.markers.length; r += 1)
  1832. if (((t = this.markers[r]), t.payload && t.payload.name === e))
  1833. return t;
  1834. return null;
  1835. }),
  1836. (AnimationItem.prototype.goToAndStop = function (e, t, r) {
  1837. if (!(r && this.name !== r)) {
  1838. var i = Number(e);
  1839. if (isNaN(i)) {
  1840. var s = this.getMarkerData(e);
  1841. s && this.goToAndStop(s.time, !0);
  1842. } else
  1843. t
  1844. ? this.setCurrentRawFrameValue(e)
  1845. : this.setCurrentRawFrameValue(e * this.frameModifier);
  1846. this.pause();
  1847. }
  1848. }),
  1849. (AnimationItem.prototype.goToAndPlay = function (e, t, r) {
  1850. if (!(r && this.name !== r)) {
  1851. var i = Number(e);
  1852. if (isNaN(i)) {
  1853. var s = this.getMarkerData(e);
  1854. s &&
  1855. (s.duration
  1856. ? this.playSegments([s.time, s.time + s.duration], !0)
  1857. : this.goToAndStop(s.time, !0));
  1858. } else this.goToAndStop(i, t, r);
  1859. this.play();
  1860. }
  1861. }),
  1862. (AnimationItem.prototype.advanceTime = function (e) {
  1863. if (!(this.isPaused === !0 || this.isLoaded === !1)) {
  1864. var t = this.currentRawFrame + e * this.frameModifier,
  1865. r = !1;
  1866. t >= this.totalFrames - 1 && this.frameModifier > 0
  1867. ? !this.loop || this.playCount === this.loop
  1868. ? this.checkSegments(
  1869. t > this.totalFrames ? t % this.totalFrames : 0
  1870. ) || ((r = !0), (t = this.totalFrames - 1))
  1871. : t >= this.totalFrames
  1872. ? ((this.playCount += 1),
  1873. this.checkSegments(t % this.totalFrames) ||
  1874. (this.setCurrentRawFrameValue(t % this.totalFrames),
  1875. (this._completedLoop = !0),
  1876. this.trigger('loopComplete')))
  1877. : this.setCurrentRawFrameValue(t)
  1878. : t < 0
  1879. ? this.checkSegments(t % this.totalFrames) ||
  1880. (this.loop && !(this.playCount-- <= 0 && this.loop !== !0)
  1881. ? (this.setCurrentRawFrameValue(
  1882. this.totalFrames + (t % this.totalFrames)
  1883. ),
  1884. this._completedLoop
  1885. ? this.trigger('loopComplete')
  1886. : (this._completedLoop = !0))
  1887. : ((r = !0), (t = 0)))
  1888. : this.setCurrentRawFrameValue(t),
  1889. r &&
  1890. (this.setCurrentRawFrameValue(t),
  1891. this.pause(),
  1892. this.trigger('complete'));
  1893. }
  1894. }),
  1895. (AnimationItem.prototype.adjustSegment = function (e, t) {
  1896. (this.playCount = 0),
  1897. e[1] < e[0]
  1898. ? (this.frameModifier > 0 &&
  1899. (this.playSpeed < 0
  1900. ? this.setSpeed(-this.playSpeed)
  1901. : this.setDirection(-1)),
  1902. (this.totalFrames = e[0] - e[1]),
  1903. (this.timeCompleted = this.totalFrames),
  1904. (this.firstFrame = e[1]),
  1905. this.setCurrentRawFrameValue(this.totalFrames - 0.001 - t))
  1906. : e[1] > e[0] &&
  1907. (this.frameModifier < 0 &&
  1908. (this.playSpeed < 0
  1909. ? this.setSpeed(-this.playSpeed)
  1910. : this.setDirection(1)),
  1911. (this.totalFrames = e[1] - e[0]),
  1912. (this.timeCompleted = this.totalFrames),
  1913. (this.firstFrame = e[0]),
  1914. this.setCurrentRawFrameValue(0.001 + t)),
  1915. this.trigger('segmentStart');
  1916. }),
  1917. (AnimationItem.prototype.setSegment = function (e, t) {
  1918. var r = -1;
  1919. this.isPaused &&
  1920. (this.currentRawFrame + this.firstFrame < e
  1921. ? (r = e)
  1922. : this.currentRawFrame + this.firstFrame > t && (r = t - e)),
  1923. (this.firstFrame = e),
  1924. (this.totalFrames = t - e),
  1925. (this.timeCompleted = this.totalFrames),
  1926. r !== -1 && this.goToAndStop(r, !0);
  1927. }),
  1928. (AnimationItem.prototype.playSegments = function (e, t) {
  1929. if ((t && (this.segments.length = 0), _typeof$4(e[0]) === 'object')) {
  1930. var r,
  1931. i = e.length;
  1932. for (r = 0; r < i; r += 1) this.segments.push(e[r]);
  1933. } else this.segments.push(e);
  1934. this.segments.length &&
  1935. t &&
  1936. this.adjustSegment(this.segments.shift(), 0),
  1937. this.isPaused && this.play();
  1938. }),
  1939. (AnimationItem.prototype.resetSegments = function (e) {
  1940. (this.segments.length = 0),
  1941. this.segments.push([this.animationData.ip, this.animationData.op]),
  1942. e && this.checkSegments(0);
  1943. }),
  1944. (AnimationItem.prototype.checkSegments = function (e) {
  1945. return this.segments.length
  1946. ? (this.adjustSegment(this.segments.shift(), e), !0)
  1947. : !1;
  1948. }),
  1949. (AnimationItem.prototype.destroy = function (e) {
  1950. (e && this.name !== e) ||
  1951. !this.renderer ||
  1952. (this.renderer.destroy(),
  1953. this.imagePreloader.destroy(),
  1954. this.trigger('destroy'),
  1955. (this._cbs = null),
  1956. (this.onEnterFrame = null),
  1957. (this.onLoopComplete = null),
  1958. (this.onComplete = null),
  1959. (this.onSegmentStart = null),
  1960. (this.onDestroy = null),
  1961. (this.renderer = null),
  1962. (this.renderer = null),
  1963. (this.imagePreloader = null),
  1964. (this.projectInterface = null));
  1965. }),
  1966. (AnimationItem.prototype.setCurrentRawFrameValue = function (e) {
  1967. (this.currentRawFrame = e), this.gotoFrame();
  1968. }),
  1969. (AnimationItem.prototype.setSpeed = function (e) {
  1970. (this.playSpeed = e), this.updaFrameModifier();
  1971. }),
  1972. (AnimationItem.prototype.setDirection = function (e) {
  1973. (this.playDirection = e < 0 ? -1 : 1), this.updaFrameModifier();
  1974. }),
  1975. (AnimationItem.prototype.setLoop = function (e) {
  1976. this.loop = e;
  1977. }),
  1978. (AnimationItem.prototype.setVolume = function (e, t) {
  1979. (t && this.name !== t) || this.audioController.setVolume(e);
  1980. }),
  1981. (AnimationItem.prototype.getVolume = function () {
  1982. return this.audioController.getVolume();
  1983. }),
  1984. (AnimationItem.prototype.mute = function (e) {
  1985. (e && this.name !== e) || this.audioController.mute();
  1986. }),
  1987. (AnimationItem.prototype.unmute = function (e) {
  1988. (e && this.name !== e) || this.audioController.unmute();
  1989. }),
  1990. (AnimationItem.prototype.updaFrameModifier = function () {
  1991. (this.frameModifier =
  1992. this.frameMult * this.playSpeed * this.playDirection),
  1993. this.audioController.setRate(this.playSpeed * this.playDirection);
  1994. }),
  1995. (AnimationItem.prototype.getPath = function () {
  1996. return this.path;
  1997. }),
  1998. (AnimationItem.prototype.getAssetsPath = function (e) {
  1999. var t = '';
  2000. if (e.e) t = e.p;
  2001. else if (this.assetsPath) {
  2002. var r = e.p;
  2003. r.indexOf('images/') !== -1 && (r = r.split('/')[1]),
  2004. (t = this.assetsPath + r);
  2005. } else (t = this.path), (t += e.u ? e.u : ''), (t += e.p);
  2006. return t;
  2007. }),
  2008. (AnimationItem.prototype.getAssetData = function (e) {
  2009. for (var t = 0, r = this.assets.length; t < r; ) {
  2010. if (e === this.assets[t].id) return this.assets[t];
  2011. t += 1;
  2012. }
  2013. return null;
  2014. }),
  2015. (AnimationItem.prototype.hide = function () {
  2016. this.renderer.hide();
  2017. }),
  2018. (AnimationItem.prototype.show = function () {
  2019. this.renderer.show();
  2020. }),
  2021. (AnimationItem.prototype.getDuration = function (e) {
  2022. return e ? this.totalFrames : this.totalFrames / this.frameRate;
  2023. }),
  2024. (AnimationItem.prototype.updateDocumentData = function (e, t, r) {
  2025. try {
  2026. var i = this.renderer.getElementByPath(e);
  2027. i.updateDocumentData(t, r);
  2028. } catch {}
  2029. }),
  2030. (AnimationItem.prototype.trigger = function (e) {
  2031. if (this._cbs && this._cbs[e])
  2032. switch (e) {
  2033. case 'enterFrame':
  2034. this.triggerEvent(
  2035. e,
  2036. new BMEnterFrameEvent(
  2037. e,
  2038. this.currentFrame,
  2039. this.totalFrames,
  2040. this.frameModifier
  2041. )
  2042. );
  2043. break;
  2044. case 'drawnFrame':
  2045. (this.drawnFrameEvent.currentTime = this.currentFrame),
  2046. (this.drawnFrameEvent.totalTime = this.totalFrames),
  2047. (this.drawnFrameEvent.direction = this.frameModifier),
  2048. this.triggerEvent(e, this.drawnFrameEvent);
  2049. break;
  2050. case 'loopComplete':
  2051. this.triggerEvent(
  2052. e,
  2053. new BMCompleteLoopEvent(
  2054. e,
  2055. this.loop,
  2056. this.playCount,
  2057. this.frameMult
  2058. )
  2059. );
  2060. break;
  2061. case 'complete':
  2062. this.triggerEvent(e, new BMCompleteEvent(e, this.frameMult));
  2063. break;
  2064. case 'segmentStart':
  2065. this.triggerEvent(
  2066. e,
  2067. new BMSegmentStartEvent(e, this.firstFrame, this.totalFrames)
  2068. );
  2069. break;
  2070. case 'destroy':
  2071. this.triggerEvent(e, new BMDestroyEvent(e, this));
  2072. break;
  2073. default:
  2074. this.triggerEvent(e);
  2075. }
  2076. e === 'enterFrame' &&
  2077. this.onEnterFrame &&
  2078. this.onEnterFrame.call(
  2079. this,
  2080. new BMEnterFrameEvent(
  2081. e,
  2082. this.currentFrame,
  2083. this.totalFrames,
  2084. this.frameMult
  2085. )
  2086. ),
  2087. e === 'loopComplete' &&
  2088. this.onLoopComplete &&
  2089. this.onLoopComplete.call(
  2090. this,
  2091. new BMCompleteLoopEvent(
  2092. e,
  2093. this.loop,
  2094. this.playCount,
  2095. this.frameMult
  2096. )
  2097. ),
  2098. e === 'complete' &&
  2099. this.onComplete &&
  2100. this.onComplete.call(
  2101. this,
  2102. new BMCompleteEvent(e, this.frameMult)
  2103. ),
  2104. e === 'segmentStart' &&
  2105. this.onSegmentStart &&
  2106. this.onSegmentStart.call(
  2107. this,
  2108. new BMSegmentStartEvent(e, this.firstFrame, this.totalFrames)
  2109. ),
  2110. e === 'destroy' &&
  2111. this.onDestroy &&
  2112. this.onDestroy.call(this, new BMDestroyEvent(e, this));
  2113. }),
  2114. (AnimationItem.prototype.triggerRenderFrameError = function (e) {
  2115. var t = new BMRenderFrameErrorEvent(e, this.currentFrame);
  2116. this.triggerEvent('error', t),
  2117. this.onError && this.onError.call(this, t);
  2118. }),
  2119. (AnimationItem.prototype.triggerConfigError = function (e) {
  2120. var t = new BMConfigErrorEvent(e, this.currentFrame);
  2121. this.triggerEvent('error', t),
  2122. this.onError && this.onError.call(this, t);
  2123. });
  2124. var animationManager = (function () {
  2125. var e = {},
  2126. t = [],
  2127. r = 0,
  2128. i = 0,
  2129. s = 0,
  2130. n = !0,
  2131. a = !1;
  2132. function o(F) {
  2133. for (var k = 0, C = F.target; k < i; )
  2134. t[k].animation === C &&
  2135. (t.splice(k, 1), (k -= 1), (i -= 1), C.isPaused || S()),
  2136. (k += 1);
  2137. }
  2138. function l(F, k) {
  2139. if (!F) return null;
  2140. for (var C = 0; C < i; ) {
  2141. if (t[C].elem === F && t[C].elem !== null) return t[C].animation;
  2142. C += 1;
  2143. }
  2144. var M = new AnimationItem();
  2145. return p(M, F), M.setData(F, k), M;
  2146. }
  2147. function c() {
  2148. var F,
  2149. k = t.length,
  2150. C = [];
  2151. for (F = 0; F < k; F += 1) C.push(t[F].animation);
  2152. return C;
  2153. }
  2154. function g() {
  2155. (s += 1), V();
  2156. }
  2157. function S() {
  2158. s -= 1;
  2159. }
  2160. function p(F, k) {
  2161. F.addEventListener('destroy', o),
  2162. F.addEventListener('_active', g),
  2163. F.addEventListener('_idle', S),
  2164. t.push({ elem: k, animation: F }),
  2165. (i += 1);
  2166. }
  2167. function P(F) {
  2168. var k = new AnimationItem();
  2169. return p(k, null), k.setParams(F), k;
  2170. }
  2171. function b(F, k) {
  2172. var C;
  2173. for (C = 0; C < i; C += 1) t[C].animation.setSpeed(F, k);
  2174. }
  2175. function y(F, k) {
  2176. var C;
  2177. for (C = 0; C < i; C += 1) t[C].animation.setDirection(F, k);
  2178. }
  2179. function A(F) {
  2180. var k;
  2181. for (k = 0; k < i; k += 1) t[k].animation.play(F);
  2182. }
  2183. function u(F) {
  2184. var k = F - r,
  2185. C;
  2186. for (C = 0; C < i; C += 1) t[C].animation.advanceTime(k);
  2187. (r = F), s && !a ? window.requestAnimationFrame(u) : (n = !0);
  2188. }
  2189. function f(F) {
  2190. (r = F), window.requestAnimationFrame(u);
  2191. }
  2192. function m(F) {
  2193. var k;
  2194. for (k = 0; k < i; k += 1) t[k].animation.pause(F);
  2195. }
  2196. function d(F, k, C) {
  2197. var M;
  2198. for (M = 0; M < i; M += 1) t[M].animation.goToAndStop(F, k, C);
  2199. }
  2200. function E(F) {
  2201. var k;
  2202. for (k = 0; k < i; k += 1) t[k].animation.stop(F);
  2203. }
  2204. function T(F) {
  2205. var k;
  2206. for (k = 0; k < i; k += 1) t[k].animation.togglePause(F);
  2207. }
  2208. function x(F) {
  2209. var k;
  2210. for (k = i - 1; k >= 0; k -= 1) t[k].animation.destroy(F);
  2211. }
  2212. function _(F, k, C) {
  2213. var M = [].concat(
  2214. [].slice.call(document.getElementsByClassName('lottie')),
  2215. [].slice.call(document.getElementsByClassName('bodymovin'))
  2216. ),
  2217. R,
  2218. L = M.length;
  2219. for (R = 0; R < L; R += 1)
  2220. C && M[R].setAttribute('data-bm-type', C), l(M[R], F);
  2221. if (k && L === 0) {
  2222. C || (C = 'svg');
  2223. var j = document.getElementsByTagName('body')[0];
  2224. j.innerText = '';
  2225. var z = createTag('div');
  2226. (z.style.width = '100%'),
  2227. (z.style.height = '100%'),
  2228. z.setAttribute('data-bm-type', C),
  2229. j.appendChild(z),
  2230. l(z, F);
  2231. }
  2232. }
  2233. function I() {
  2234. var F;
  2235. for (F = 0; F < i; F += 1) t[F].animation.resize();
  2236. }
  2237. function V() {
  2238. !a && s && n && (window.requestAnimationFrame(f), (n = !1));
  2239. }
  2240. function D() {
  2241. a = !0;
  2242. }
  2243. function N() {
  2244. (a = !1), V();
  2245. }
  2246. function $(F, k) {
  2247. var C;
  2248. for (C = 0; C < i; C += 1) t[C].animation.setVolume(F, k);
  2249. }
  2250. function O(F) {
  2251. var k;
  2252. for (k = 0; k < i; k += 1) t[k].animation.mute(F);
  2253. }
  2254. function B(F) {
  2255. var k;
  2256. for (k = 0; k < i; k += 1) t[k].animation.unmute(F);
  2257. }
  2258. return (
  2259. (e.registerAnimation = l),
  2260. (e.loadAnimation = P),
  2261. (e.setSpeed = b),
  2262. (e.setDirection = y),
  2263. (e.play = A),
  2264. (e.pause = m),
  2265. (e.stop = E),
  2266. (e.togglePause = T),
  2267. (e.searchAnimations = _),
  2268. (e.resize = I),
  2269. (e.goToAndStop = d),
  2270. (e.destroy = x),
  2271. (e.freeze = D),
  2272. (e.unfreeze = N),
  2273. (e.setVolume = $),
  2274. (e.mute = O),
  2275. (e.unmute = B),
  2276. (e.getRegisteredAnimations = c),
  2277. e
  2278. );
  2279. })(),
  2280. BezierFactory = (function () {
  2281. var e = {};
  2282. e.getBezierEasing = r;
  2283. var t = {};
  2284. function r(f, m, d, E, T) {
  2285. var x =
  2286. T ||
  2287. ('bez_' + f + '_' + m + '_' + d + '_' + E).replace(/\./g, 'p');
  2288. if (t[x]) return t[x];
  2289. var _ = new u([f, m, d, E]);
  2290. return (t[x] = _), _;
  2291. }
  2292. var i = 4,
  2293. s = 0.001,
  2294. n = 1e-7,
  2295. a = 10,
  2296. o = 11,
  2297. l = 1 / (o - 1),
  2298. c = typeof Float32Array == 'function';
  2299. function g(f, m) {
  2300. return 1 - 3 * m + 3 * f;
  2301. }
  2302. function S(f, m) {
  2303. return 3 * m - 6 * f;
  2304. }
  2305. function p(f) {
  2306. return 3 * f;
  2307. }
  2308. function P(f, m, d) {
  2309. return ((g(m, d) * f + S(m, d)) * f + p(m)) * f;
  2310. }
  2311. function b(f, m, d) {
  2312. return 3 * g(m, d) * f * f + 2 * S(m, d) * f + p(m);
  2313. }
  2314. function y(f, m, d, E, T) {
  2315. var x,
  2316. _,
  2317. I = 0;
  2318. do
  2319. (_ = m + (d - m) / 2),
  2320. (x = P(_, E, T) - f),
  2321. x > 0 ? (d = _) : (m = _);
  2322. while (Math.abs(x) > n && ++I < a);
  2323. return _;
  2324. }
  2325. function A(f, m, d, E) {
  2326. for (var T = 0; T < i; ++T) {
  2327. var x = b(m, d, E);
  2328. if (x === 0) return m;
  2329. var _ = P(m, d, E) - f;
  2330. m -= _ / x;
  2331. }
  2332. return m;
  2333. }
  2334. function u(f) {
  2335. (this._p = f),
  2336. (this._mSampleValues = c ? new Float32Array(o) : new Array(o)),
  2337. (this._precomputed = !1),
  2338. (this.get = this.get.bind(this));
  2339. }
  2340. return (
  2341. (u.prototype = {
  2342. get: function (m) {
  2343. var d = this._p[0],
  2344. E = this._p[1],
  2345. T = this._p[2],
  2346. x = this._p[3];
  2347. return (
  2348. this._precomputed || this._precompute(),
  2349. d === E && T === x
  2350. ? m
  2351. : m === 0
  2352. ? 0
  2353. : m === 1
  2354. ? 1
  2355. : P(this._getTForX(m), E, x)
  2356. );
  2357. },
  2358. _precompute: function () {
  2359. var m = this._p[0],
  2360. d = this._p[1],
  2361. E = this._p[2],
  2362. T = this._p[3];
  2363. (this._precomputed = !0),
  2364. (m !== d || E !== T) && this._calcSampleValues();
  2365. },
  2366. _calcSampleValues: function () {
  2367. for (var m = this._p[0], d = this._p[2], E = 0; E < o; ++E)
  2368. this._mSampleValues[E] = P(E * l, m, d);
  2369. },
  2370. _getTForX: function (m) {
  2371. for (
  2372. var d = this._p[0],
  2373. E = this._p[2],
  2374. T = this._mSampleValues,
  2375. x = 0,
  2376. _ = 1,
  2377. I = o - 1;
  2378. _ !== I && T[_] <= m;
  2379. ++_
  2380. )
  2381. x += l;
  2382. --_;
  2383. var V = (m - T[_]) / (T[_ + 1] - T[_]),
  2384. D = x + V * l,
  2385. N = b(D, d, E);
  2386. return N >= s
  2387. ? A(m, D, d, E)
  2388. : N === 0
  2389. ? D
  2390. : y(m, x, x + l, d, E);
  2391. }
  2392. }),
  2393. e
  2394. );
  2395. })(),
  2396. pooling = (function () {
  2397. function e(t) {
  2398. return t.concat(createSizedArray(t.length));
  2399. }
  2400. return { double: e };
  2401. })(),
  2402. poolFactory = (function () {
  2403. return function (e, t, r) {
  2404. var i = 0,
  2405. s = e,
  2406. n = createSizedArray(s),
  2407. a = { newElement: o, release: l };
  2408. function o() {
  2409. var c;
  2410. return i ? ((i -= 1), (c = n[i])) : (c = t()), c;
  2411. }
  2412. function l(c) {
  2413. i === s && ((n = pooling.double(n)), (s *= 2)),
  2414. r && r(c),
  2415. (n[i] = c),
  2416. (i += 1);
  2417. }
  2418. return a;
  2419. };
  2420. })(),
  2421. bezierLengthPool = (function () {
  2422. function e() {
  2423. return {
  2424. addedLength: 0,
  2425. percents: createTypedArray('float32', getDefaultCurveSegments()),
  2426. lengths: createTypedArray('float32', getDefaultCurveSegments())
  2427. };
  2428. }
  2429. return poolFactory(8, e);
  2430. })(),
  2431. segmentsLengthPool = (function () {
  2432. function e() {
  2433. return { lengths: [], totalLength: 0 };
  2434. }
  2435. function t(r) {
  2436. var i,
  2437. s = r.lengths.length;
  2438. for (i = 0; i < s; i += 1) bezierLengthPool.release(r.lengths[i]);
  2439. r.lengths.length = 0;
  2440. }
  2441. return poolFactory(8, e, t);
  2442. })();
  2443. function bezFunction() {
  2444. var e = Math;
  2445. function t(p, P, b, y, A, u) {
  2446. var f = p * y + P * A + b * u - A * y - u * p - b * P;
  2447. return f > -0.001 && f < 0.001;
  2448. }
  2449. function r(p, P, b, y, A, u, f, m, d) {
  2450. if (b === 0 && u === 0 && d === 0) return t(p, P, y, A, f, m);
  2451. var E = e.sqrt(e.pow(y - p, 2) + e.pow(A - P, 2) + e.pow(u - b, 2)),
  2452. T = e.sqrt(e.pow(f - p, 2) + e.pow(m - P, 2) + e.pow(d - b, 2)),
  2453. x = e.sqrt(e.pow(f - y, 2) + e.pow(m - A, 2) + e.pow(d - u, 2)),
  2454. _;
  2455. return (
  2456. E > T
  2457. ? E > x
  2458. ? (_ = E - T - x)
  2459. : (_ = x - T - E)
  2460. : x > T
  2461. ? (_ = x - T - E)
  2462. : (_ = T - E - x),
  2463. _ > -1e-4 && _ < 1e-4
  2464. );
  2465. }
  2466. var i = (function () {
  2467. return function (p, P, b, y) {
  2468. var A = getDefaultCurveSegments(),
  2469. u,
  2470. f,
  2471. m,
  2472. d,
  2473. E,
  2474. T = 0,
  2475. x,
  2476. _ = [],
  2477. I = [],
  2478. V = bezierLengthPool.newElement();
  2479. for (m = b.length, u = 0; u < A; u += 1) {
  2480. for (E = u / (A - 1), x = 0, f = 0; f < m; f += 1)
  2481. (d =
  2482. bmPow(1 - E, 3) * p[f] +
  2483. 3 * bmPow(1 - E, 2) * E * b[f] +
  2484. 3 * (1 - E) * bmPow(E, 2) * y[f] +
  2485. bmPow(E, 3) * P[f]),
  2486. (_[f] = d),
  2487. I[f] !== null && (x += bmPow(_[f] - I[f], 2)),
  2488. (I[f] = _[f]);
  2489. x && ((x = bmSqrt(x)), (T += x)),
  2490. (V.percents[u] = E),
  2491. (V.lengths[u] = T);
  2492. }
  2493. return (V.addedLength = T), V;
  2494. };
  2495. })();
  2496. function s(p) {
  2497. var P = segmentsLengthPool.newElement(),
  2498. b = p.c,
  2499. y = p.v,
  2500. A = p.o,
  2501. u = p.i,
  2502. f,
  2503. m = p._length,
  2504. d = P.lengths,
  2505. E = 0;
  2506. for (f = 0; f < m - 1; f += 1)
  2507. (d[f] = i(y[f], y[f + 1], A[f], u[f + 1])), (E += d[f].addedLength);
  2508. return (
  2509. b &&
  2510. m &&
  2511. ((d[f] = i(y[f], y[0], A[f], u[0])), (E += d[f].addedLength)),
  2512. (P.totalLength = E),
  2513. P
  2514. );
  2515. }
  2516. function n(p) {
  2517. (this.segmentLength = 0), (this.points = new Array(p));
  2518. }
  2519. function a(p, P) {
  2520. (this.partialLength = p), (this.point = P);
  2521. }
  2522. var o = (function () {
  2523. var p = {};
  2524. return function (P, b, y, A) {
  2525. var u = (
  2526. P[0] +
  2527. '_' +
  2528. P[1] +
  2529. '_' +
  2530. b[0] +
  2531. '_' +
  2532. b[1] +
  2533. '_' +
  2534. y[0] +
  2535. '_' +
  2536. y[1] +
  2537. '_' +
  2538. A[0] +
  2539. '_' +
  2540. A[1]
  2541. ).replace(/\./g, 'p');
  2542. if (!p[u]) {
  2543. var f = getDefaultCurveSegments(),
  2544. m,
  2545. d,
  2546. E,
  2547. T,
  2548. x,
  2549. _ = 0,
  2550. I,
  2551. V,
  2552. D = null;
  2553. P.length === 2 &&
  2554. (P[0] !== b[0] || P[1] !== b[1]) &&
  2555. t(P[0], P[1], b[0], b[1], P[0] + y[0], P[1] + y[1]) &&
  2556. t(P[0], P[1], b[0], b[1], b[0] + A[0], b[1] + A[1]) &&
  2557. (f = 2);
  2558. var N = new n(f);
  2559. for (E = y.length, m = 0; m < f; m += 1) {
  2560. for (
  2561. V = createSizedArray(E), x = m / (f - 1), I = 0, d = 0;
  2562. d < E;
  2563. d += 1
  2564. )
  2565. (T =
  2566. bmPow(1 - x, 3) * P[d] +
  2567. 3 * bmPow(1 - x, 2) * x * (P[d] + y[d]) +
  2568. 3 * (1 - x) * bmPow(x, 2) * (b[d] + A[d]) +
  2569. bmPow(x, 3) * b[d]),
  2570. (V[d] = T),
  2571. D !== null && (I += bmPow(V[d] - D[d], 2));
  2572. (I = bmSqrt(I)), (_ += I), (N.points[m] = new a(I, V)), (D = V);
  2573. }
  2574. (N.segmentLength = _), (p[u] = N);
  2575. }
  2576. return p[u];
  2577. };
  2578. })();
  2579. function l(p, P) {
  2580. var b = P.percents,
  2581. y = P.lengths,
  2582. A = b.length,
  2583. u = bmFloor((A - 1) * p),
  2584. f = p * P.addedLength,
  2585. m = 0;
  2586. if (u === A - 1 || u === 0 || f === y[u]) return b[u];
  2587. for (var d = y[u] > f ? -1 : 1, E = !0; E; )
  2588. if (
  2589. (y[u] <= f && y[u + 1] > f
  2590. ? ((m = (f - y[u]) / (y[u + 1] - y[u])), (E = !1))
  2591. : (u += d),
  2592. u < 0 || u >= A - 1)
  2593. ) {
  2594. if (u === A - 1) return b[u];
  2595. E = !1;
  2596. }
  2597. return b[u] + (b[u + 1] - b[u]) * m;
  2598. }
  2599. function c(p, P, b, y, A, u) {
  2600. var f = l(A, u),
  2601. m = 1 - f,
  2602. d =
  2603. e.round(
  2604. (m * m * m * p[0] +
  2605. (f * m * m + m * f * m + m * m * f) * b[0] +
  2606. (f * f * m + m * f * f + f * m * f) * y[0] +
  2607. f * f * f * P[0]) *
  2608. 1e3
  2609. ) / 1e3,
  2610. E =
  2611. e.round(
  2612. (m * m * m * p[1] +
  2613. (f * m * m + m * f * m + m * m * f) * b[1] +
  2614. (f * f * m + m * f * f + f * m * f) * y[1] +
  2615. f * f * f * P[1]) *
  2616. 1e3
  2617. ) / 1e3;
  2618. return [d, E];
  2619. }
  2620. var g = createTypedArray('float32', 8);
  2621. function S(p, P, b, y, A, u, f) {
  2622. A < 0 ? (A = 0) : A > 1 && (A = 1);
  2623. var m = l(A, f);
  2624. u = u > 1 ? 1 : u;
  2625. var d = l(u, f),
  2626. E,
  2627. T = p.length,
  2628. x = 1 - m,
  2629. _ = 1 - d,
  2630. I = x * x * x,
  2631. V = m * x * x * 3,
  2632. D = m * m * x * 3,
  2633. N = m * m * m,
  2634. $ = x * x * _,
  2635. O = m * x * _ + x * m * _ + x * x * d,
  2636. B = m * m * _ + x * m * d + m * x * d,
  2637. F = m * m * d,
  2638. k = x * _ * _,
  2639. C = m * _ * _ + x * d * _ + x * _ * d,
  2640. M = m * d * _ + x * d * d + m * _ * d,
  2641. R = m * d * d,
  2642. L = _ * _ * _,
  2643. j = d * _ * _ + _ * d * _ + _ * _ * d,
  2644. z = d * d * _ + _ * d * d + d * _ * d,
  2645. H = d * d * d;
  2646. for (E = 0; E < T; E += 1)
  2647. (g[E * 4] =
  2648. e.round((I * p[E] + V * b[E] + D * y[E] + N * P[E]) * 1e3) / 1e3),
  2649. (g[E * 4 + 1] =
  2650. e.round(($ * p[E] + O * b[E] + B * y[E] + F * P[E]) * 1e3) /
  2651. 1e3),
  2652. (g[E * 4 + 2] =
  2653. e.round((k * p[E] + C * b[E] + M * y[E] + R * P[E]) * 1e3) /
  2654. 1e3),
  2655. (g[E * 4 + 3] =
  2656. e.round((L * p[E] + j * b[E] + z * y[E] + H * P[E]) * 1e3) /
  2657. 1e3);
  2658. return g;
  2659. }
  2660. return {
  2661. getSegmentsLength: s,
  2662. getNewSegment: S,
  2663. getPointInSegment: c,
  2664. buildBezierData: o,
  2665. pointOnLine2D: t,
  2666. pointOnLine3D: r
  2667. };
  2668. }
  2669. var bez = bezFunction(),
  2670. initFrame = initialDefaultFrame,
  2671. mathAbs = Math.abs;
  2672. function interpolateValue(e, t) {
  2673. var r = this.offsetTime,
  2674. i;
  2675. this.propType === 'multidimensional' &&
  2676. (i = createTypedArray('float32', this.pv.length));
  2677. for (
  2678. var s = t.lastIndex,
  2679. n = s,
  2680. a = this.keyframes.length - 1,
  2681. o = !0,
  2682. l,
  2683. c,
  2684. g;
  2685. o;
  2686. ) {
  2687. if (
  2688. ((l = this.keyframes[n]),
  2689. (c = this.keyframes[n + 1]),
  2690. n === a - 1 && e >= c.t - r)
  2691. ) {
  2692. l.h && (l = c), (s = 0);
  2693. break;
  2694. }
  2695. if (c.t - r > e) {
  2696. s = n;
  2697. break;
  2698. }
  2699. n < a - 1 ? (n += 1) : ((s = 0), (o = !1));
  2700. }
  2701. g = this.keyframesMetadata[n] || {};
  2702. var S,
  2703. p,
  2704. P,
  2705. b,
  2706. y,
  2707. A,
  2708. u = c.t - r,
  2709. f = l.t - r,
  2710. m;
  2711. if (l.to) {
  2712. g.bezierData ||
  2713. (g.bezierData = bez.buildBezierData(l.s, c.s || l.e, l.to, l.ti));
  2714. var d = g.bezierData;
  2715. if (e >= u || e < f) {
  2716. var E = e >= u ? d.points.length - 1 : 0;
  2717. for (p = d.points[E].point.length, S = 0; S < p; S += 1)
  2718. i[S] = d.points[E].point[S];
  2719. } else {
  2720. g.__fnct
  2721. ? (A = g.__fnct)
  2722. : ((A = BezierFactory.getBezierEasing(
  2723. l.o.x,
  2724. l.o.y,
  2725. l.i.x,
  2726. l.i.y,
  2727. l.n
  2728. ).get),
  2729. (g.__fnct = A)),
  2730. (P = A((e - f) / (u - f)));
  2731. var T = d.segmentLength * P,
  2732. x,
  2733. _ =
  2734. t.lastFrame < e && t._lastKeyframeIndex === n
  2735. ? t._lastAddedLength
  2736. : 0;
  2737. for (
  2738. y =
  2739. t.lastFrame < e && t._lastKeyframeIndex === n
  2740. ? t._lastPoint
  2741. : 0,
  2742. o = !0,
  2743. b = d.points.length;
  2744. o;
  2745. ) {
  2746. if (
  2747. ((_ += d.points[y].partialLength),
  2748. T === 0 || P === 0 || y === d.points.length - 1)
  2749. ) {
  2750. for (p = d.points[y].point.length, S = 0; S < p; S += 1)
  2751. i[S] = d.points[y].point[S];
  2752. break;
  2753. } else if (T >= _ && T < _ + d.points[y + 1].partialLength) {
  2754. for (
  2755. x = (T - _) / d.points[y + 1].partialLength,
  2756. p = d.points[y].point.length,
  2757. S = 0;
  2758. S < p;
  2759. S += 1
  2760. )
  2761. i[S] =
  2762. d.points[y].point[S] +
  2763. (d.points[y + 1].point[S] - d.points[y].point[S]) * x;
  2764. break;
  2765. }
  2766. y < b - 1 ? (y += 1) : (o = !1);
  2767. }
  2768. (t._lastPoint = y),
  2769. (t._lastAddedLength = _ - d.points[y].partialLength),
  2770. (t._lastKeyframeIndex = n);
  2771. }
  2772. } else {
  2773. var I, V, D, N, $;
  2774. if (((a = l.s.length), (m = c.s || l.e), this.sh && l.h !== 1))
  2775. if (e >= u) (i[0] = m[0]), (i[1] = m[1]), (i[2] = m[2]);
  2776. else if (e <= f) (i[0] = l.s[0]), (i[1] = l.s[1]), (i[2] = l.s[2]);
  2777. else {
  2778. var O = createQuaternion(l.s),
  2779. B = createQuaternion(m),
  2780. F = (e - f) / (u - f);
  2781. quaternionToEuler(i, slerp(O, B, F));
  2782. }
  2783. else
  2784. for (n = 0; n < a; n += 1)
  2785. l.h !== 1 &&
  2786. (e >= u
  2787. ? (P = 1)
  2788. : e < f
  2789. ? (P = 0)
  2790. : (l.o.x.constructor === Array
  2791. ? (g.__fnct || (g.__fnct = []),
  2792. g.__fnct[n]
  2793. ? (A = g.__fnct[n])
  2794. : ((I = l.o.x[n] === void 0 ? l.o.x[0] : l.o.x[n]),
  2795. (V = l.o.y[n] === void 0 ? l.o.y[0] : l.o.y[n]),
  2796. (D = l.i.x[n] === void 0 ? l.i.x[0] : l.i.x[n]),
  2797. (N = l.i.y[n] === void 0 ? l.i.y[0] : l.i.y[n]),
  2798. (A = BezierFactory.getBezierEasing(I, V, D, N).get),
  2799. (g.__fnct[n] = A)))
  2800. : g.__fnct
  2801. ? (A = g.__fnct)
  2802. : ((I = l.o.x),
  2803. (V = l.o.y),
  2804. (D = l.i.x),
  2805. (N = l.i.y),
  2806. (A = BezierFactory.getBezierEasing(I, V, D, N).get),
  2807. (l.keyframeMetadata = A)),
  2808. (P = A((e - f) / (u - f))))),
  2809. (m = c.s || l.e),
  2810. ($ = l.h === 1 ? l.s[n] : l.s[n] + (m[n] - l.s[n]) * P),
  2811. this.propType === 'multidimensional' ? (i[n] = $) : (i = $);
  2812. }
  2813. return (t.lastIndex = s), i;
  2814. }
  2815. function slerp(e, t, r) {
  2816. var i = [],
  2817. s = e[0],
  2818. n = e[1],
  2819. a = e[2],
  2820. o = e[3],
  2821. l = t[0],
  2822. c = t[1],
  2823. g = t[2],
  2824. S = t[3],
  2825. p,
  2826. P,
  2827. b,
  2828. y,
  2829. A;
  2830. return (
  2831. (P = s * l + n * c + a * g + o * S),
  2832. P < 0 && ((P = -P), (l = -l), (c = -c), (g = -g), (S = -S)),
  2833. 1 - P > 1e-6
  2834. ? ((p = Math.acos(P)),
  2835. (b = Math.sin(p)),
  2836. (y = Math.sin((1 - r) * p) / b),
  2837. (A = Math.sin(r * p) / b))
  2838. : ((y = 1 - r), (A = r)),
  2839. (i[0] = y * s + A * l),
  2840. (i[1] = y * n + A * c),
  2841. (i[2] = y * a + A * g),
  2842. (i[3] = y * o + A * S),
  2843. i
  2844. );
  2845. }
  2846. function quaternionToEuler(e, t) {
  2847. var r = t[0],
  2848. i = t[1],
  2849. s = t[2],
  2850. n = t[3],
  2851. a = Math.atan2(2 * i * n - 2 * r * s, 1 - 2 * i * i - 2 * s * s),
  2852. o = Math.asin(2 * r * i + 2 * s * n),
  2853. l = Math.atan2(2 * r * n - 2 * i * s, 1 - 2 * r * r - 2 * s * s);
  2854. (e[0] = a / degToRads), (e[1] = o / degToRads), (e[2] = l / degToRads);
  2855. }
  2856. function createQuaternion(e) {
  2857. var t = e[0] * degToRads,
  2858. r = e[1] * degToRads,
  2859. i = e[2] * degToRads,
  2860. s = Math.cos(t / 2),
  2861. n = Math.cos(r / 2),
  2862. a = Math.cos(i / 2),
  2863. o = Math.sin(t / 2),
  2864. l = Math.sin(r / 2),
  2865. c = Math.sin(i / 2),
  2866. g = s * n * a - o * l * c,
  2867. S = o * l * a + s * n * c,
  2868. p = o * n * a + s * l * c,
  2869. P = s * l * a - o * n * c;
  2870. return [S, p, P, g];
  2871. }
  2872. function getValueAtCurrentTime() {
  2873. var e = this.comp.renderedFrame - this.offsetTime,
  2874. t = this.keyframes[0].t - this.offsetTime,
  2875. r = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
  2876. if (
  2877. !(
  2878. e === this._caching.lastFrame ||
  2879. (this._caching.lastFrame !== initFrame &&
  2880. ((this._caching.lastFrame >= r && e >= r) ||
  2881. (this._caching.lastFrame < t && e < t)))
  2882. )
  2883. ) {
  2884. this._caching.lastFrame >= e &&
  2885. ((this._caching._lastKeyframeIndex = -1),
  2886. (this._caching.lastIndex = 0));
  2887. var i = this.interpolateValue(e, this._caching);
  2888. this.pv = i;
  2889. }
  2890. return (this._caching.lastFrame = e), this.pv;
  2891. }
  2892. function setVValue(e) {
  2893. var t;
  2894. if (this.propType === 'unidimensional')
  2895. (t = e * this.mult),
  2896. mathAbs(this.v - t) > 1e-5 && ((this.v = t), (this._mdf = !0));
  2897. else
  2898. for (var r = 0, i = this.v.length; r < i; )
  2899. (t = e[r] * this.mult),
  2900. mathAbs(this.v[r] - t) > 1e-5 &&
  2901. ((this.v[r] = t), (this._mdf = !0)),
  2902. (r += 1);
  2903. }
  2904. function processEffectsSequence() {
  2905. if (
  2906. !(
  2907. this.elem.globalData.frameId === this.frameId ||
  2908. !this.effectsSequence.length
  2909. )
  2910. ) {
  2911. if (this.lock) {
  2912. this.setVValue(this.pv);
  2913. return;
  2914. }
  2915. (this.lock = !0), (this._mdf = this._isFirstFrame);
  2916. var e,
  2917. t = this.effectsSequence.length,
  2918. r = this.kf ? this.pv : this.data.k;
  2919. for (e = 0; e < t; e += 1) r = this.effectsSequence[e](r);
  2920. this.setVValue(r),
  2921. (this._isFirstFrame = !1),
  2922. (this.lock = !1),
  2923. (this.frameId = this.elem.globalData.frameId);
  2924. }
  2925. }
  2926. function addEffect(e) {
  2927. this.effectsSequence.push(e), this.container.addDynamicProperty(this);
  2928. }
  2929. function ValueProperty(e, t, r, i) {
  2930. (this.propType = 'unidimensional'),
  2931. (this.mult = r || 1),
  2932. (this.data = t),
  2933. (this.v = r ? t.k * r : t.k),
  2934. (this.pv = t.k),
  2935. (this._mdf = !1),
  2936. (this.elem = e),
  2937. (this.container = i),
  2938. (this.comp = e.comp),
  2939. (this.k = !1),
  2940. (this.kf = !1),
  2941. (this.vel = 0),
  2942. (this.effectsSequence = []),
  2943. (this._isFirstFrame = !0),
  2944. (this.getValue = processEffectsSequence),
  2945. (this.setVValue = setVValue),
  2946. (this.addEffect = addEffect);
  2947. }
  2948. function MultiDimensionalProperty(e, t, r, i) {
  2949. (this.propType = 'multidimensional'),
  2950. (this.mult = r || 1),
  2951. (this.data = t),
  2952. (this._mdf = !1),
  2953. (this.elem = e),
  2954. (this.container = i),
  2955. (this.comp = e.comp),
  2956. (this.k = !1),
  2957. (this.kf = !1),
  2958. (this.frameId = -1);
  2959. var s,
  2960. n = t.k.length;
  2961. for (
  2962. this.v = createTypedArray('float32', n),
  2963. this.pv = createTypedArray('float32', n),
  2964. this.vel = createTypedArray('float32', n),
  2965. s = 0;
  2966. s < n;
  2967. s += 1
  2968. )
  2969. (this.v[s] = t.k[s] * this.mult), (this.pv[s] = t.k[s]);
  2970. (this._isFirstFrame = !0),
  2971. (this.effectsSequence = []),
  2972. (this.getValue = processEffectsSequence),
  2973. (this.setVValue = setVValue),
  2974. (this.addEffect = addEffect);
  2975. }
  2976. function KeyframedValueProperty(e, t, r, i) {
  2977. (this.propType = 'unidimensional'),
  2978. (this.keyframes = t.k),
  2979. (this.keyframesMetadata = []),
  2980. (this.offsetTime = e.data.st),
  2981. (this.frameId = -1),
  2982. (this._caching = {
  2983. lastFrame: initFrame,
  2984. lastIndex: 0,
  2985. value: 0,
  2986. _lastKeyframeIndex: -1
  2987. }),
  2988. (this.k = !0),
  2989. (this.kf = !0),
  2990. (this.data = t),
  2991. (this.mult = r || 1),
  2992. (this.elem = e),
  2993. (this.container = i),
  2994. (this.comp = e.comp),
  2995. (this.v = initFrame),
  2996. (this.pv = initFrame),
  2997. (this._isFirstFrame = !0),
  2998. (this.getValue = processEffectsSequence),
  2999. (this.setVValue = setVValue),
  3000. (this.interpolateValue = interpolateValue),
  3001. (this.effectsSequence = [getValueAtCurrentTime.bind(this)]),
  3002. (this.addEffect = addEffect);
  3003. }
  3004. function KeyframedMultidimensionalProperty(e, t, r, i) {
  3005. this.propType = 'multidimensional';
  3006. var s,
  3007. n = t.k.length,
  3008. a,
  3009. o,
  3010. l,
  3011. c;
  3012. for (s = 0; s < n - 1; s += 1)
  3013. t.k[s].to &&
  3014. t.k[s].s &&
  3015. t.k[s + 1] &&
  3016. t.k[s + 1].s &&
  3017. ((a = t.k[s].s),
  3018. (o = t.k[s + 1].s),
  3019. (l = t.k[s].to),
  3020. (c = t.k[s].ti),
  3021. ((a.length === 2 &&
  3022. !(a[0] === o[0] && a[1] === o[1]) &&
  3023. bez.pointOnLine2D(
  3024. a[0],
  3025. a[1],
  3026. o[0],
  3027. o[1],
  3028. a[0] + l[0],
  3029. a[1] + l[1]
  3030. ) &&
  3031. bez.pointOnLine2D(
  3032. a[0],
  3033. a[1],
  3034. o[0],
  3035. o[1],
  3036. o[0] + c[0],
  3037. o[1] + c[1]
  3038. )) ||
  3039. (a.length === 3 &&
  3040. !(a[0] === o[0] && a[1] === o[1] && a[2] === o[2]) &&
  3041. bez.pointOnLine3D(
  3042. a[0],
  3043. a[1],
  3044. a[2],
  3045. o[0],
  3046. o[1],
  3047. o[2],
  3048. a[0] + l[0],
  3049. a[1] + l[1],
  3050. a[2] + l[2]
  3051. ) &&
  3052. bez.pointOnLine3D(
  3053. a[0],
  3054. a[1],
  3055. a[2],
  3056. o[0],
  3057. o[1],
  3058. o[2],
  3059. o[0] + c[0],
  3060. o[1] + c[1],
  3061. o[2] + c[2]
  3062. ))) &&
  3063. ((t.k[s].to = null), (t.k[s].ti = null)),
  3064. a[0] === o[0] &&
  3065. a[1] === o[1] &&
  3066. l[0] === 0 &&
  3067. l[1] === 0 &&
  3068. c[0] === 0 &&
  3069. c[1] === 0 &&
  3070. (a.length === 2 || (a[2] === o[2] && l[2] === 0 && c[2] === 0)) &&
  3071. ((t.k[s].to = null), (t.k[s].ti = null)));
  3072. (this.effectsSequence = [getValueAtCurrentTime.bind(this)]),
  3073. (this.data = t),
  3074. (this.keyframes = t.k),
  3075. (this.keyframesMetadata = []),
  3076. (this.offsetTime = e.data.st),
  3077. (this.k = !0),
  3078. (this.kf = !0),
  3079. (this._isFirstFrame = !0),
  3080. (this.mult = r || 1),
  3081. (this.elem = e),
  3082. (this.container = i),
  3083. (this.comp = e.comp),
  3084. (this.getValue = processEffectsSequence),
  3085. (this.setVValue = setVValue),
  3086. (this.interpolateValue = interpolateValue),
  3087. (this.frameId = -1);
  3088. var g = t.k[0].s.length;
  3089. for (
  3090. this.v = createTypedArray('float32', g),
  3091. this.pv = createTypedArray('float32', g),
  3092. s = 0;
  3093. s < g;
  3094. s += 1
  3095. )
  3096. (this.v[s] = initFrame), (this.pv[s] = initFrame);
  3097. (this._caching = {
  3098. lastFrame: initFrame,
  3099. lastIndex: 0,
  3100. value: createTypedArray('float32', g)
  3101. }),
  3102. (this.addEffect = addEffect);
  3103. }
  3104. var PropertyFactory = (function () {
  3105. function e(r, i, s, n, a) {
  3106. i.sid && (i = r.globalData.slotManager.getProp(i));
  3107. var o;
  3108. if (!i.k.length) o = new ValueProperty(r, i, n, a);
  3109. else if (typeof i.k[0] == 'number')
  3110. o = new MultiDimensionalProperty(r, i, n, a);
  3111. else
  3112. switch (s) {
  3113. case 0:
  3114. o = new KeyframedValueProperty(r, i, n, a);
  3115. break;
  3116. case 1:
  3117. o = new KeyframedMultidimensionalProperty(r, i, n, a);
  3118. break;
  3119. }
  3120. return o.effectsSequence.length && a.addDynamicProperty(o), o;
  3121. }
  3122. var t = { getProp: e };
  3123. return t;
  3124. })();
  3125. function DynamicPropertyContainer() {}
  3126. DynamicPropertyContainer.prototype = {
  3127. addDynamicProperty: function (t) {
  3128. this.dynamicProperties.indexOf(t) === -1 &&
  3129. (this.dynamicProperties.push(t),
  3130. this.container.addDynamicProperty(this),
  3131. (this._isAnimated = !0));
  3132. },
  3133. iterateDynamicProperties: function () {
  3134. this._mdf = !1;
  3135. var t,
  3136. r = this.dynamicProperties.length;
  3137. for (t = 0; t < r; t += 1)
  3138. this.dynamicProperties[t].getValue(),
  3139. this.dynamicProperties[t]._mdf && (this._mdf = !0);
  3140. },
  3141. initDynamicPropertyContainer: function (t) {
  3142. (this.container = t),
  3143. (this.dynamicProperties = []),
  3144. (this._mdf = !1),
  3145. (this._isAnimated = !1);
  3146. }
  3147. };
  3148. var pointPool = (function () {
  3149. function e() {
  3150. return createTypedArray('float32', 2);
  3151. }
  3152. return poolFactory(8, e);
  3153. })();
  3154. function ShapePath() {
  3155. (this.c = !1),
  3156. (this._length = 0),
  3157. (this._maxLength = 8),
  3158. (this.v = createSizedArray(this._maxLength)),
  3159. (this.o = createSizedArray(this._maxLength)),
  3160. (this.i = createSizedArray(this._maxLength));
  3161. }
  3162. (ShapePath.prototype.setPathData = function (e, t) {
  3163. (this.c = e), this.setLength(t);
  3164. for (var r = 0; r < t; )
  3165. (this.v[r] = pointPool.newElement()),
  3166. (this.o[r] = pointPool.newElement()),
  3167. (this.i[r] = pointPool.newElement()),
  3168. (r += 1);
  3169. }),
  3170. (ShapePath.prototype.setLength = function (e) {
  3171. for (; this._maxLength < e; ) this.doubleArrayLength();
  3172. this._length = e;
  3173. }),
  3174. (ShapePath.prototype.doubleArrayLength = function () {
  3175. (this.v = this.v.concat(createSizedArray(this._maxLength))),
  3176. (this.i = this.i.concat(createSizedArray(this._maxLength))),
  3177. (this.o = this.o.concat(createSizedArray(this._maxLength))),
  3178. (this._maxLength *= 2);
  3179. }),
  3180. (ShapePath.prototype.setXYAt = function (e, t, r, i, s) {
  3181. var n;
  3182. switch (
  3183. ((this._length = Math.max(this._length, i + 1)),
  3184. this._length >= this._maxLength && this.doubleArrayLength(),
  3185. r)
  3186. ) {
  3187. case 'v':
  3188. n = this.v;
  3189. break;
  3190. case 'i':
  3191. n = this.i;
  3192. break;
  3193. case 'o':
  3194. n = this.o;
  3195. break;
  3196. default:
  3197. n = [];
  3198. break;
  3199. }
  3200. (!n[i] || (n[i] && !s)) && (n[i] = pointPool.newElement()),
  3201. (n[i][0] = e),
  3202. (n[i][1] = t);
  3203. }),
  3204. (ShapePath.prototype.setTripleAt = function (e, t, r, i, s, n, a, o) {
  3205. this.setXYAt(e, t, 'v', a, o),
  3206. this.setXYAt(r, i, 'o', a, o),
  3207. this.setXYAt(s, n, 'i', a, o);
  3208. }),
  3209. (ShapePath.prototype.reverse = function () {
  3210. var e = new ShapePath();
  3211. e.setPathData(this.c, this._length);
  3212. var t = this.v,
  3213. r = this.o,
  3214. i = this.i,
  3215. s = 0;
  3216. this.c &&
  3217. (e.setTripleAt(
  3218. t[0][0],
  3219. t[0][1],
  3220. i[0][0],
  3221. i[0][1],
  3222. r[0][0],
  3223. r[0][1],
  3224. 0,
  3225. !1
  3226. ),
  3227. (s = 1));
  3228. var n = this._length - 1,
  3229. a = this._length,
  3230. o;
  3231. for (o = s; o < a; o += 1)
  3232. e.setTripleAt(
  3233. t[n][0],
  3234. t[n][1],
  3235. i[n][0],
  3236. i[n][1],
  3237. r[n][0],
  3238. r[n][1],
  3239. o,
  3240. !1
  3241. ),
  3242. (n -= 1);
  3243. return e;
  3244. }),
  3245. (ShapePath.prototype.length = function () {
  3246. return this._length;
  3247. });
  3248. var shapePool = (function () {
  3249. function e() {
  3250. return new ShapePath();
  3251. }
  3252. function t(s) {
  3253. var n = s._length,
  3254. a;
  3255. for (a = 0; a < n; a += 1)
  3256. pointPool.release(s.v[a]),
  3257. pointPool.release(s.i[a]),
  3258. pointPool.release(s.o[a]),
  3259. (s.v[a] = null),
  3260. (s.i[a] = null),
  3261. (s.o[a] = null);
  3262. (s._length = 0), (s.c = !1);
  3263. }
  3264. function r(s) {
  3265. var n = i.newElement(),
  3266. a,
  3267. o = s._length === void 0 ? s.v.length : s._length;
  3268. for (n.setLength(o), n.c = s.c, a = 0; a < o; a += 1)
  3269. n.setTripleAt(
  3270. s.v[a][0],
  3271. s.v[a][1],
  3272. s.o[a][0],
  3273. s.o[a][1],
  3274. s.i[a][0],
  3275. s.i[a][1],
  3276. a
  3277. );
  3278. return n;
  3279. }
  3280. var i = poolFactory(4, e, t);
  3281. return (i.clone = r), i;
  3282. })();
  3283. function ShapeCollection() {
  3284. (this._length = 0),
  3285. (this._maxLength = 4),
  3286. (this.shapes = createSizedArray(this._maxLength));
  3287. }
  3288. (ShapeCollection.prototype.addShape = function (e) {
  3289. this._length === this._maxLength &&
  3290. ((this.shapes = this.shapes.concat(
  3291. createSizedArray(this._maxLength)
  3292. )),
  3293. (this._maxLength *= 2)),
  3294. (this.shapes[this._length] = e),
  3295. (this._length += 1);
  3296. }),
  3297. (ShapeCollection.prototype.releaseShapes = function () {
  3298. var e;
  3299. for (e = 0; e < this._length; e += 1)
  3300. shapePool.release(this.shapes[e]);
  3301. this._length = 0;
  3302. });
  3303. var shapeCollectionPool = (function () {
  3304. var e = { newShapeCollection: s, release: n },
  3305. t = 0,
  3306. r = 4,
  3307. i = createSizedArray(r);
  3308. function s() {
  3309. var a;
  3310. return t ? ((t -= 1), (a = i[t])) : (a = new ShapeCollection()), a;
  3311. }
  3312. function n(a) {
  3313. var o,
  3314. l = a._length;
  3315. for (o = 0; o < l; o += 1) shapePool.release(a.shapes[o]);
  3316. (a._length = 0),
  3317. t === r && ((i = pooling.double(i)), (r *= 2)),
  3318. (i[t] = a),
  3319. (t += 1);
  3320. }
  3321. return e;
  3322. })(),
  3323. ShapePropertyFactory = (function () {
  3324. var e = -999999;
  3325. function t(u, f, m) {
  3326. var d = m.lastIndex,
  3327. E,
  3328. T,
  3329. x,
  3330. _,
  3331. I,
  3332. V,
  3333. D,
  3334. N,
  3335. $,
  3336. O = this.keyframes;
  3337. if (u < O[0].t - this.offsetTime)
  3338. (E = O[0].s[0]), (x = !0), (d = 0);
  3339. else if (u >= O[O.length - 1].t - this.offsetTime)
  3340. (E = O[O.length - 1].s
  3341. ? O[O.length - 1].s[0]
  3342. : O[O.length - 2].e[0]),
  3343. (x = !0);
  3344. else {
  3345. for (
  3346. var B = d, F = O.length - 1, k = !0, C, M, R;
  3347. k && ((C = O[B]), (M = O[B + 1]), !(M.t - this.offsetTime > u));
  3348. )
  3349. B < F - 1 ? (B += 1) : (k = !1);
  3350. if (
  3351. ((R = this.keyframesMetadata[B] || {}),
  3352. (x = C.h === 1),
  3353. (d = B),
  3354. !x)
  3355. ) {
  3356. if (u >= M.t - this.offsetTime) N = 1;
  3357. else if (u < C.t - this.offsetTime) N = 0;
  3358. else {
  3359. var L;
  3360. R.__fnct
  3361. ? (L = R.__fnct)
  3362. : ((L = BezierFactory.getBezierEasing(
  3363. C.o.x,
  3364. C.o.y,
  3365. C.i.x,
  3366. C.i.y
  3367. ).get),
  3368. (R.__fnct = L)),
  3369. (N = L(
  3370. (u - (C.t - this.offsetTime)) /
  3371. (M.t - this.offsetTime - (C.t - this.offsetTime))
  3372. ));
  3373. }
  3374. T = M.s ? M.s[0] : C.e[0];
  3375. }
  3376. E = C.s[0];
  3377. }
  3378. for (
  3379. V = f._length, D = E.i[0].length, m.lastIndex = d, _ = 0;
  3380. _ < V;
  3381. _ += 1
  3382. )
  3383. for (I = 0; I < D; I += 1)
  3384. ($ = x ? E.i[_][I] : E.i[_][I] + (T.i[_][I] - E.i[_][I]) * N),
  3385. (f.i[_][I] = $),
  3386. ($ = x ? E.o[_][I] : E.o[_][I] + (T.o[_][I] - E.o[_][I]) * N),
  3387. (f.o[_][I] = $),
  3388. ($ = x ? E.v[_][I] : E.v[_][I] + (T.v[_][I] - E.v[_][I]) * N),
  3389. (f.v[_][I] = $);
  3390. }
  3391. function r() {
  3392. var u = this.comp.renderedFrame - this.offsetTime,
  3393. f = this.keyframes[0].t - this.offsetTime,
  3394. m = this.keyframes[this.keyframes.length - 1].t - this.offsetTime,
  3395. d = this._caching.lastFrame;
  3396. return (
  3397. (d !== e && ((d < f && u < f) || (d > m && u > m))) ||
  3398. ((this._caching.lastIndex =
  3399. d < u ? this._caching.lastIndex : 0),
  3400. this.interpolateShape(u, this.pv, this._caching)),
  3401. (this._caching.lastFrame = u),
  3402. this.pv
  3403. );
  3404. }
  3405. function i() {
  3406. this.paths = this.localShapeCollection;
  3407. }
  3408. function s(u, f) {
  3409. if (u._length !== f._length || u.c !== f.c) return !1;
  3410. var m,
  3411. d = u._length;
  3412. for (m = 0; m < d; m += 1)
  3413. if (
  3414. u.v[m][0] !== f.v[m][0] ||
  3415. u.v[m][1] !== f.v[m][1] ||
  3416. u.o[m][0] !== f.o[m][0] ||
  3417. u.o[m][1] !== f.o[m][1] ||
  3418. u.i[m][0] !== f.i[m][0] ||
  3419. u.i[m][1] !== f.i[m][1]
  3420. )
  3421. return !1;
  3422. return !0;
  3423. }
  3424. function n(u) {
  3425. s(this.v, u) ||
  3426. ((this.v = shapePool.clone(u)),
  3427. this.localShapeCollection.releaseShapes(),
  3428. this.localShapeCollection.addShape(this.v),
  3429. (this._mdf = !0),
  3430. (this.paths = this.localShapeCollection));
  3431. }
  3432. function a() {
  3433. if (this.elem.globalData.frameId !== this.frameId) {
  3434. if (!this.effectsSequence.length) {
  3435. this._mdf = !1;
  3436. return;
  3437. }
  3438. if (this.lock) {
  3439. this.setVValue(this.pv);
  3440. return;
  3441. }
  3442. (this.lock = !0), (this._mdf = !1);
  3443. var u;
  3444. this.kf
  3445. ? (u = this.pv)
  3446. : this.data.ks
  3447. ? (u = this.data.ks.k)
  3448. : (u = this.data.pt.k);
  3449. var f,
  3450. m = this.effectsSequence.length;
  3451. for (f = 0; f < m; f += 1) u = this.effectsSequence[f](u);
  3452. this.setVValue(u),
  3453. (this.lock = !1),
  3454. (this.frameId = this.elem.globalData.frameId);
  3455. }
  3456. }
  3457. function o(u, f, m) {
  3458. (this.propType = 'shape'),
  3459. (this.comp = u.comp),
  3460. (this.container = u),
  3461. (this.elem = u),
  3462. (this.data = f),
  3463. (this.k = !1),
  3464. (this.kf = !1),
  3465. (this._mdf = !1);
  3466. var d = m === 3 ? f.pt.k : f.ks.k;
  3467. (this.v = shapePool.clone(d)),
  3468. (this.pv = shapePool.clone(this.v)),
  3469. (this.localShapeCollection =
  3470. shapeCollectionPool.newShapeCollection()),
  3471. (this.paths = this.localShapeCollection),
  3472. this.paths.addShape(this.v),
  3473. (this.reset = i),
  3474. (this.effectsSequence = []);
  3475. }
  3476. function l(u) {
  3477. this.effectsSequence.push(u),
  3478. this.container.addDynamicProperty(this);
  3479. }
  3480. (o.prototype.interpolateShape = t),
  3481. (o.prototype.getValue = a),
  3482. (o.prototype.setVValue = n),
  3483. (o.prototype.addEffect = l);
  3484. function c(u, f, m) {
  3485. (this.propType = 'shape'),
  3486. (this.comp = u.comp),
  3487. (this.elem = u),
  3488. (this.container = u),
  3489. (this.offsetTime = u.data.st),
  3490. (this.keyframes = m === 3 ? f.pt.k : f.ks.k),
  3491. (this.keyframesMetadata = []),
  3492. (this.k = !0),
  3493. (this.kf = !0);
  3494. var d = this.keyframes[0].s[0].i.length;
  3495. (this.v = shapePool.newElement()),
  3496. this.v.setPathData(this.keyframes[0].s[0].c, d),
  3497. (this.pv = shapePool.clone(this.v)),
  3498. (this.localShapeCollection =
  3499. shapeCollectionPool.newShapeCollection()),
  3500. (this.paths = this.localShapeCollection),
  3501. this.paths.addShape(this.v),
  3502. (this.lastFrame = e),
  3503. (this.reset = i),
  3504. (this._caching = { lastFrame: e, lastIndex: 0 }),
  3505. (this.effectsSequence = [r.bind(this)]);
  3506. }
  3507. (c.prototype.getValue = a),
  3508. (c.prototype.interpolateShape = t),
  3509. (c.prototype.setVValue = n),
  3510. (c.prototype.addEffect = l);
  3511. var g = (function () {
  3512. var u = roundCorner;
  3513. function f(m, d) {
  3514. (this.v = shapePool.newElement()),
  3515. this.v.setPathData(!0, 4),
  3516. (this.localShapeCollection =
  3517. shapeCollectionPool.newShapeCollection()),
  3518. (this.paths = this.localShapeCollection),
  3519. this.localShapeCollection.addShape(this.v),
  3520. (this.d = d.d),
  3521. (this.elem = m),
  3522. (this.comp = m.comp),
  3523. (this.frameId = -1),
  3524. this.initDynamicPropertyContainer(m),
  3525. (this.p = PropertyFactory.getProp(m, d.p, 1, 0, this)),
  3526. (this.s = PropertyFactory.getProp(m, d.s, 1, 0, this)),
  3527. this.dynamicProperties.length
  3528. ? (this.k = !0)
  3529. : ((this.k = !1), this.convertEllToPath());
  3530. }
  3531. return (
  3532. (f.prototype = {
  3533. reset: i,
  3534. getValue: function () {
  3535. this.elem.globalData.frameId !== this.frameId &&
  3536. ((this.frameId = this.elem.globalData.frameId),
  3537. this.iterateDynamicProperties(),
  3538. this._mdf && this.convertEllToPath());
  3539. },
  3540. convertEllToPath: function () {
  3541. var d = this.p.v[0],
  3542. E = this.p.v[1],
  3543. T = this.s.v[0] / 2,
  3544. x = this.s.v[1] / 2,
  3545. _ = this.d !== 3,
  3546. I = this.v;
  3547. (I.v[0][0] = d),
  3548. (I.v[0][1] = E - x),
  3549. (I.v[1][0] = _ ? d + T : d - T),
  3550. (I.v[1][1] = E),
  3551. (I.v[2][0] = d),
  3552. (I.v[2][1] = E + x),
  3553. (I.v[3][0] = _ ? d - T : d + T),
  3554. (I.v[3][1] = E),
  3555. (I.i[0][0] = _ ? d - T * u : d + T * u),
  3556. (I.i[0][1] = E - x),
  3557. (I.i[1][0] = _ ? d + T : d - T),
  3558. (I.i[1][1] = E - x * u),
  3559. (I.i[2][0] = _ ? d + T * u : d - T * u),
  3560. (I.i[2][1] = E + x),
  3561. (I.i[3][0] = _ ? d - T : d + T),
  3562. (I.i[3][1] = E + x * u),
  3563. (I.o[0][0] = _ ? d + T * u : d - T * u),
  3564. (I.o[0][1] = E - x),
  3565. (I.o[1][0] = _ ? d + T : d - T),
  3566. (I.o[1][1] = E + x * u),
  3567. (I.o[2][0] = _ ? d - T * u : d + T * u),
  3568. (I.o[2][1] = E + x),
  3569. (I.o[3][0] = _ ? d - T : d + T),
  3570. (I.o[3][1] = E - x * u);
  3571. }
  3572. }),
  3573. extendPrototype([DynamicPropertyContainer], f),
  3574. f
  3575. );
  3576. })(),
  3577. S = (function () {
  3578. function u(f, m) {
  3579. (this.v = shapePool.newElement()),
  3580. this.v.setPathData(!0, 0),
  3581. (this.elem = f),
  3582. (this.comp = f.comp),
  3583. (this.data = m),
  3584. (this.frameId = -1),
  3585. (this.d = m.d),
  3586. this.initDynamicPropertyContainer(f),
  3587. m.sy === 1
  3588. ? ((this.ir = PropertyFactory.getProp(f, m.ir, 0, 0, this)),
  3589. (this.is = PropertyFactory.getProp(
  3590. f,
  3591. m.is,
  3592. 0,
  3593. 0.01,
  3594. this
  3595. )),
  3596. (this.convertToPath = this.convertStarToPath))
  3597. : (this.convertToPath = this.convertPolygonToPath),
  3598. (this.pt = PropertyFactory.getProp(f, m.pt, 0, 0, this)),
  3599. (this.p = PropertyFactory.getProp(f, m.p, 1, 0, this)),
  3600. (this.r = PropertyFactory.getProp(
  3601. f,
  3602. m.r,
  3603. 0,
  3604. degToRads,
  3605. this
  3606. )),
  3607. (this.or = PropertyFactory.getProp(f, m.or, 0, 0, this)),
  3608. (this.os = PropertyFactory.getProp(f, m.os, 0, 0.01, this)),
  3609. (this.localShapeCollection =
  3610. shapeCollectionPool.newShapeCollection()),
  3611. this.localShapeCollection.addShape(this.v),
  3612. (this.paths = this.localShapeCollection),
  3613. this.dynamicProperties.length
  3614. ? (this.k = !0)
  3615. : ((this.k = !1), this.convertToPath());
  3616. }
  3617. return (
  3618. (u.prototype = {
  3619. reset: i,
  3620. getValue: function () {
  3621. this.elem.globalData.frameId !== this.frameId &&
  3622. ((this.frameId = this.elem.globalData.frameId),
  3623. this.iterateDynamicProperties(),
  3624. this._mdf && this.convertToPath());
  3625. },
  3626. convertStarToPath: function () {
  3627. var m = Math.floor(this.pt.v) * 2,
  3628. d = (Math.PI * 2) / m,
  3629. E = !0,
  3630. T = this.or.v,
  3631. x = this.ir.v,
  3632. _ = this.os.v,
  3633. I = this.is.v,
  3634. V = (2 * Math.PI * T) / (m * 2),
  3635. D = (2 * Math.PI * x) / (m * 2),
  3636. N,
  3637. $,
  3638. O,
  3639. B,
  3640. F = -Math.PI / 2;
  3641. F += this.r.v;
  3642. var k = this.data.d === 3 ? -1 : 1;
  3643. for (this.v._length = 0, N = 0; N < m; N += 1) {
  3644. ($ = E ? T : x), (O = E ? _ : I), (B = E ? V : D);
  3645. var C = $ * Math.cos(F),
  3646. M = $ * Math.sin(F),
  3647. R =
  3648. C === 0 && M === 0 ? 0 : M / Math.sqrt(C * C + M * M),
  3649. L =
  3650. C === 0 && M === 0
  3651. ? 0
  3652. : -C / Math.sqrt(C * C + M * M);
  3653. (C += +this.p.v[0]),
  3654. (M += +this.p.v[1]),
  3655. this.v.setTripleAt(
  3656. C,
  3657. M,
  3658. C - R * B * O * k,
  3659. M - L * B * O * k,
  3660. C + R * B * O * k,
  3661. M + L * B * O * k,
  3662. N,
  3663. !0
  3664. ),
  3665. (E = !E),
  3666. (F += d * k);
  3667. }
  3668. },
  3669. convertPolygonToPath: function () {
  3670. var m = Math.floor(this.pt.v),
  3671. d = (Math.PI * 2) / m,
  3672. E = this.or.v,
  3673. T = this.os.v,
  3674. x = (2 * Math.PI * E) / (m * 4),
  3675. _,
  3676. I = -Math.PI * 0.5,
  3677. V = this.data.d === 3 ? -1 : 1;
  3678. for (
  3679. I += this.r.v, this.v._length = 0, _ = 0;
  3680. _ < m;
  3681. _ += 1
  3682. ) {
  3683. var D = E * Math.cos(I),
  3684. N = E * Math.sin(I),
  3685. $ =
  3686. D === 0 && N === 0 ? 0 : N / Math.sqrt(D * D + N * N),
  3687. O =
  3688. D === 0 && N === 0
  3689. ? 0
  3690. : -D / Math.sqrt(D * D + N * N);
  3691. (D += +this.p.v[0]),
  3692. (N += +this.p.v[1]),
  3693. this.v.setTripleAt(
  3694. D,
  3695. N,
  3696. D - $ * x * T * V,
  3697. N - O * x * T * V,
  3698. D + $ * x * T * V,
  3699. N + O * x * T * V,
  3700. _,
  3701. !0
  3702. ),
  3703. (I += d * V);
  3704. }
  3705. (this.paths.length = 0), (this.paths[0] = this.v);
  3706. }
  3707. }),
  3708. extendPrototype([DynamicPropertyContainer], u),
  3709. u
  3710. );
  3711. })(),
  3712. p = (function () {
  3713. function u(f, m) {
  3714. (this.v = shapePool.newElement()),
  3715. (this.v.c = !0),
  3716. (this.localShapeCollection =
  3717. shapeCollectionPool.newShapeCollection()),
  3718. this.localShapeCollection.addShape(this.v),
  3719. (this.paths = this.localShapeCollection),
  3720. (this.elem = f),
  3721. (this.comp = f.comp),
  3722. (this.frameId = -1),
  3723. (this.d = m.d),
  3724. this.initDynamicPropertyContainer(f),
  3725. (this.p = PropertyFactory.getProp(f, m.p, 1, 0, this)),
  3726. (this.s = PropertyFactory.getProp(f, m.s, 1, 0, this)),
  3727. (this.r = PropertyFactory.getProp(f, m.r, 0, 0, this)),
  3728. this.dynamicProperties.length
  3729. ? (this.k = !0)
  3730. : ((this.k = !1), this.convertRectToPath());
  3731. }
  3732. return (
  3733. (u.prototype = {
  3734. convertRectToPath: function () {
  3735. var m = this.p.v[0],
  3736. d = this.p.v[1],
  3737. E = this.s.v[0] / 2,
  3738. T = this.s.v[1] / 2,
  3739. x = bmMin(E, T, this.r.v),
  3740. _ = x * (1 - roundCorner);
  3741. (this.v._length = 0),
  3742. this.d === 2 || this.d === 1
  3743. ? (this.v.setTripleAt(
  3744. m + E,
  3745. d - T + x,
  3746. m + E,
  3747. d - T + x,
  3748. m + E,
  3749. d - T + _,
  3750. 0,
  3751. !0
  3752. ),
  3753. this.v.setTripleAt(
  3754. m + E,
  3755. d + T - x,
  3756. m + E,
  3757. d + T - _,
  3758. m + E,
  3759. d + T - x,
  3760. 1,
  3761. !0
  3762. ),
  3763. x !== 0
  3764. ? (this.v.setTripleAt(
  3765. m + E - x,
  3766. d + T,
  3767. m + E - x,
  3768. d + T,
  3769. m + E - _,
  3770. d + T,
  3771. 2,
  3772. !0
  3773. ),
  3774. this.v.setTripleAt(
  3775. m - E + x,
  3776. d + T,
  3777. m - E + _,
  3778. d + T,
  3779. m - E + x,
  3780. d + T,
  3781. 3,
  3782. !0
  3783. ),
  3784. this.v.setTripleAt(
  3785. m - E,
  3786. d + T - x,
  3787. m - E,
  3788. d + T - x,
  3789. m - E,
  3790. d + T - _,
  3791. 4,
  3792. !0
  3793. ),
  3794. this.v.setTripleAt(
  3795. m - E,
  3796. d - T + x,
  3797. m - E,
  3798. d - T + _,
  3799. m - E,
  3800. d - T + x,
  3801. 5,
  3802. !0
  3803. ),
  3804. this.v.setTripleAt(
  3805. m - E + x,
  3806. d - T,
  3807. m - E + x,
  3808. d - T,
  3809. m - E + _,
  3810. d - T,
  3811. 6,
  3812. !0
  3813. ),
  3814. this.v.setTripleAt(
  3815. m + E - x,
  3816. d - T,
  3817. m + E - _,
  3818. d - T,
  3819. m + E - x,
  3820. d - T,
  3821. 7,
  3822. !0
  3823. ))
  3824. : (this.v.setTripleAt(
  3825. m - E,
  3826. d + T,
  3827. m - E + _,
  3828. d + T,
  3829. m - E,
  3830. d + T,
  3831. 2
  3832. ),
  3833. this.v.setTripleAt(
  3834. m - E,
  3835. d - T,
  3836. m - E,
  3837. d - T + _,
  3838. m - E,
  3839. d - T,
  3840. 3
  3841. )))
  3842. : (this.v.setTripleAt(
  3843. m + E,
  3844. d - T + x,
  3845. m + E,
  3846. d - T + _,
  3847. m + E,
  3848. d - T + x,
  3849. 0,
  3850. !0
  3851. ),
  3852. x !== 0
  3853. ? (this.v.setTripleAt(
  3854. m + E - x,
  3855. d - T,
  3856. m + E - x,
  3857. d - T,
  3858. m + E - _,
  3859. d - T,
  3860. 1,
  3861. !0
  3862. ),
  3863. this.v.setTripleAt(
  3864. m - E + x,
  3865. d - T,
  3866. m - E + _,
  3867. d - T,
  3868. m - E + x,
  3869. d - T,
  3870. 2,
  3871. !0
  3872. ),
  3873. this.v.setTripleAt(
  3874. m - E,
  3875. d - T + x,
  3876. m - E,
  3877. d - T + x,
  3878. m - E,
  3879. d - T + _,
  3880. 3,
  3881. !0
  3882. ),
  3883. this.v.setTripleAt(
  3884. m - E,
  3885. d + T - x,
  3886. m - E,
  3887. d + T - _,
  3888. m - E,
  3889. d + T - x,
  3890. 4,
  3891. !0
  3892. ),
  3893. this.v.setTripleAt(
  3894. m - E + x,
  3895. d + T,
  3896. m - E + x,
  3897. d + T,
  3898. m - E + _,
  3899. d + T,
  3900. 5,
  3901. !0
  3902. ),
  3903. this.v.setTripleAt(
  3904. m + E - x,
  3905. d + T,
  3906. m + E - _,
  3907. d + T,
  3908. m + E - x,
  3909. d + T,
  3910. 6,
  3911. !0
  3912. ),
  3913. this.v.setTripleAt(
  3914. m + E,
  3915. d + T - x,
  3916. m + E,
  3917. d + T - x,
  3918. m + E,
  3919. d + T - _,
  3920. 7,
  3921. !0
  3922. ))
  3923. : (this.v.setTripleAt(
  3924. m - E,
  3925. d - T,
  3926. m - E + _,
  3927. d - T,
  3928. m - E,
  3929. d - T,
  3930. 1,
  3931. !0
  3932. ),
  3933. this.v.setTripleAt(
  3934. m - E,
  3935. d + T,
  3936. m - E,
  3937. d + T - _,
  3938. m - E,
  3939. d + T,
  3940. 2,
  3941. !0
  3942. ),
  3943. this.v.setTripleAt(
  3944. m + E,
  3945. d + T,
  3946. m + E - _,
  3947. d + T,
  3948. m + E,
  3949. d + T,
  3950. 3,
  3951. !0
  3952. )));
  3953. },
  3954. getValue: function () {
  3955. this.elem.globalData.frameId !== this.frameId &&
  3956. ((this.frameId = this.elem.globalData.frameId),
  3957. this.iterateDynamicProperties(),
  3958. this._mdf && this.convertRectToPath());
  3959. },
  3960. reset: i
  3961. }),
  3962. extendPrototype([DynamicPropertyContainer], u),
  3963. u
  3964. );
  3965. })();
  3966. function P(u, f, m) {
  3967. var d;
  3968. if (m === 3 || m === 4) {
  3969. var E = m === 3 ? f.pt : f.ks,
  3970. T = E.k;
  3971. T.length ? (d = new c(u, f, m)) : (d = new o(u, f, m));
  3972. } else
  3973. m === 5
  3974. ? (d = new p(u, f))
  3975. : m === 6
  3976. ? (d = new g(u, f))
  3977. : m === 7 && (d = new S(u, f));
  3978. return d.k && u.addDynamicProperty(d), d;
  3979. }
  3980. function b() {
  3981. return o;
  3982. }
  3983. function y() {
  3984. return c;
  3985. }
  3986. var A = {};
  3987. return (
  3988. (A.getShapeProp = P),
  3989. (A.getConstructorFunction = b),
  3990. (A.getKeyframedConstructorFunction = y),
  3991. A
  3992. );
  3993. })();
  3994. /*!
  3995. Transformation Matrix v2.0
  3996. (c) Epistemex 2014-2015
  3997. www.epistemex.com
  3998. By Ken Fyrstenberg
  3999. Contributions by leeoniya.
  4000. License: MIT, header required.
  4001. */ var Matrix = (function () {
  4002. var e = Math.cos,
  4003. t = Math.sin,
  4004. r = Math.tan,
  4005. i = Math.round;
  4006. function s() {
  4007. return (
  4008. (this.props[0] = 1),
  4009. (this.props[1] = 0),
  4010. (this.props[2] = 0),
  4011. (this.props[3] = 0),
  4012. (this.props[4] = 0),
  4013. (this.props[5] = 1),
  4014. (this.props[6] = 0),
  4015. (this.props[7] = 0),
  4016. (this.props[8] = 0),
  4017. (this.props[9] = 0),
  4018. (this.props[10] = 1),
  4019. (this.props[11] = 0),
  4020. (this.props[12] = 0),
  4021. (this.props[13] = 0),
  4022. (this.props[14] = 0),
  4023. (this.props[15] = 1),
  4024. this
  4025. );
  4026. }
  4027. function n(k) {
  4028. if (k === 0) return this;
  4029. var C = e(k),
  4030. M = t(k);
  4031. return this._t(C, -M, 0, 0, M, C, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  4032. }
  4033. function a(k) {
  4034. if (k === 0) return this;
  4035. var C = e(k),
  4036. M = t(k);
  4037. return this._t(1, 0, 0, 0, 0, C, -M, 0, 0, M, C, 0, 0, 0, 0, 1);
  4038. }
  4039. function o(k) {
  4040. if (k === 0) return this;
  4041. var C = e(k),
  4042. M = t(k);
  4043. return this._t(C, 0, M, 0, 0, 1, 0, 0, -M, 0, C, 0, 0, 0, 0, 1);
  4044. }
  4045. function l(k) {
  4046. if (k === 0) return this;
  4047. var C = e(k),
  4048. M = t(k);
  4049. return this._t(C, -M, 0, 0, M, C, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  4050. }
  4051. function c(k, C) {
  4052. return this._t(1, C, k, 1, 0, 0);
  4053. }
  4054. function g(k, C) {
  4055. return this.shear(r(k), r(C));
  4056. }
  4057. function S(k, C) {
  4058. var M = e(C),
  4059. R = t(C);
  4060. return this._t(M, R, 0, 0, -R, M, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
  4061. ._t(1, 0, 0, 0, r(k), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
  4062. ._t(M, -R, 0, 0, R, M, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  4063. }
  4064. function p(k, C, M) {
  4065. return (
  4066. !M && M !== 0 && (M = 1),
  4067. k === 1 && C === 1 && M === 1
  4068. ? this
  4069. : this._t(k, 0, 0, 0, 0, C, 0, 0, 0, 0, M, 0, 0, 0, 0, 1)
  4070. );
  4071. }
  4072. function P(k, C, M, R, L, j, z, H, U, q, ee, ie, te, Y, X, J) {
  4073. return (
  4074. (this.props[0] = k),
  4075. (this.props[1] = C),
  4076. (this.props[2] = M),
  4077. (this.props[3] = R),
  4078. (this.props[4] = L),
  4079. (this.props[5] = j),
  4080. (this.props[6] = z),
  4081. (this.props[7] = H),
  4082. (this.props[8] = U),
  4083. (this.props[9] = q),
  4084. (this.props[10] = ee),
  4085. (this.props[11] = ie),
  4086. (this.props[12] = te),
  4087. (this.props[13] = Y),
  4088. (this.props[14] = X),
  4089. (this.props[15] = J),
  4090. this
  4091. );
  4092. }
  4093. function b(k, C, M) {
  4094. return (
  4095. (M = M || 0),
  4096. k !== 0 || C !== 0 || M !== 0
  4097. ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, k, C, M, 1)
  4098. : this
  4099. );
  4100. }
  4101. function y(k, C, M, R, L, j, z, H, U, q, ee, ie, te, Y, X, J) {
  4102. var G = this.props;
  4103. if (
  4104. k === 1 &&
  4105. C === 0 &&
  4106. M === 0 &&
  4107. R === 0 &&
  4108. L === 0 &&
  4109. j === 1 &&
  4110. z === 0 &&
  4111. H === 0 &&
  4112. U === 0 &&
  4113. q === 0 &&
  4114. ee === 1 &&
  4115. ie === 0
  4116. )
  4117. return (
  4118. (G[12] = G[12] * k + G[15] * te),
  4119. (G[13] = G[13] * j + G[15] * Y),
  4120. (G[14] = G[14] * ee + G[15] * X),
  4121. (G[15] *= J),
  4122. (this._identityCalculated = !1),
  4123. this
  4124. );
  4125. var W = G[0],
  4126. se = G[1],
  4127. le = G[2],
  4128. ne = G[3],
  4129. re = G[4],
  4130. ae = G[5],
  4131. oe = G[6],
  4132. K = G[7],
  4133. he = G[8],
  4134. ce = G[9],
  4135. Z = G[10],
  4136. pe = G[11],
  4137. Q = G[12],
  4138. ue = G[13],
  4139. fe = G[14],
  4140. de = G[15];
  4141. return (
  4142. (G[0] = W * k + se * L + le * U + ne * te),
  4143. (G[1] = W * C + se * j + le * q + ne * Y),
  4144. (G[2] = W * M + se * z + le * ee + ne * X),
  4145. (G[3] = W * R + se * H + le * ie + ne * J),
  4146. (G[4] = re * k + ae * L + oe * U + K * te),
  4147. (G[5] = re * C + ae * j + oe * q + K * Y),
  4148. (G[6] = re * M + ae * z + oe * ee + K * X),
  4149. (G[7] = re * R + ae * H + oe * ie + K * J),
  4150. (G[8] = he * k + ce * L + Z * U + pe * te),
  4151. (G[9] = he * C + ce * j + Z * q + pe * Y),
  4152. (G[10] = he * M + ce * z + Z * ee + pe * X),
  4153. (G[11] = he * R + ce * H + Z * ie + pe * J),
  4154. (G[12] = Q * k + ue * L + fe * U + de * te),
  4155. (G[13] = Q * C + ue * j + fe * q + de * Y),
  4156. (G[14] = Q * M + ue * z + fe * ee + de * X),
  4157. (G[15] = Q * R + ue * H + fe * ie + de * J),
  4158. (this._identityCalculated = !1),
  4159. this
  4160. );
  4161. }
  4162. function A() {
  4163. return (
  4164. this._identityCalculated ||
  4165. ((this._identity = !(
  4166. this.props[0] !== 1 ||
  4167. this.props[1] !== 0 ||
  4168. this.props[2] !== 0 ||
  4169. this.props[3] !== 0 ||
  4170. this.props[4] !== 0 ||
  4171. this.props[5] !== 1 ||
  4172. this.props[6] !== 0 ||
  4173. this.props[7] !== 0 ||
  4174. this.props[8] !== 0 ||
  4175. this.props[9] !== 0 ||
  4176. this.props[10] !== 1 ||
  4177. this.props[11] !== 0 ||
  4178. this.props[12] !== 0 ||
  4179. this.props[13] !== 0 ||
  4180. this.props[14] !== 0 ||
  4181. this.props[15] !== 1
  4182. )),
  4183. (this._identityCalculated = !0)),
  4184. this._identity
  4185. );
  4186. }
  4187. function u(k) {
  4188. for (var C = 0; C < 16; ) {
  4189. if (k.props[C] !== this.props[C]) return !1;
  4190. C += 1;
  4191. }
  4192. return !0;
  4193. }
  4194. function f(k) {
  4195. var C;
  4196. for (C = 0; C < 16; C += 1) k.props[C] = this.props[C];
  4197. return k;
  4198. }
  4199. function m(k) {
  4200. var C;
  4201. for (C = 0; C < 16; C += 1) this.props[C] = k[C];
  4202. }
  4203. function d(k, C, M) {
  4204. return {
  4205. x:
  4206. k * this.props[0] +
  4207. C * this.props[4] +
  4208. M * this.props[8] +
  4209. this.props[12],
  4210. y:
  4211. k * this.props[1] +
  4212. C * this.props[5] +
  4213. M * this.props[9] +
  4214. this.props[13],
  4215. z:
  4216. k * this.props[2] +
  4217. C * this.props[6] +
  4218. M * this.props[10] +
  4219. this.props[14]
  4220. };
  4221. }
  4222. function E(k, C, M) {
  4223. return (
  4224. k * this.props[0] +
  4225. C * this.props[4] +
  4226. M * this.props[8] +
  4227. this.props[12]
  4228. );
  4229. }
  4230. function T(k, C, M) {
  4231. return (
  4232. k * this.props[1] +
  4233. C * this.props[5] +
  4234. M * this.props[9] +
  4235. this.props[13]
  4236. );
  4237. }
  4238. function x(k, C, M) {
  4239. return (
  4240. k * this.props[2] +
  4241. C * this.props[6] +
  4242. M * this.props[10] +
  4243. this.props[14]
  4244. );
  4245. }
  4246. function _() {
  4247. var k = this.props[0] * this.props[5] - this.props[1] * this.props[4],
  4248. C = this.props[5] / k,
  4249. M = -this.props[1] / k,
  4250. R = -this.props[4] / k,
  4251. L = this.props[0] / k,
  4252. j =
  4253. (this.props[4] * this.props[13] -
  4254. this.props[5] * this.props[12]) /
  4255. k,
  4256. z =
  4257. -(
  4258. this.props[0] * this.props[13] -
  4259. this.props[1] * this.props[12]
  4260. ) / k,
  4261. H = new Matrix();
  4262. return (
  4263. (H.props[0] = C),
  4264. (H.props[1] = M),
  4265. (H.props[4] = R),
  4266. (H.props[5] = L),
  4267. (H.props[12] = j),
  4268. (H.props[13] = z),
  4269. H
  4270. );
  4271. }
  4272. function I(k) {
  4273. var C = this.getInverseMatrix();
  4274. return C.applyToPointArray(k[0], k[1], k[2] || 0);
  4275. }
  4276. function V(k) {
  4277. var C,
  4278. M = k.length,
  4279. R = [];
  4280. for (C = 0; C < M; C += 1) R[C] = I(k[C]);
  4281. return R;
  4282. }
  4283. function D(k, C, M) {
  4284. var R = createTypedArray('float32', 6);
  4285. if (this.isIdentity())
  4286. (R[0] = k[0]),
  4287. (R[1] = k[1]),
  4288. (R[2] = C[0]),
  4289. (R[3] = C[1]),
  4290. (R[4] = M[0]),
  4291. (R[5] = M[1]);
  4292. else {
  4293. var L = this.props[0],
  4294. j = this.props[1],
  4295. z = this.props[4],
  4296. H = this.props[5],
  4297. U = this.props[12],
  4298. q = this.props[13];
  4299. (R[0] = k[0] * L + k[1] * z + U),
  4300. (R[1] = k[0] * j + k[1] * H + q),
  4301. (R[2] = C[0] * L + C[1] * z + U),
  4302. (R[3] = C[0] * j + C[1] * H + q),
  4303. (R[4] = M[0] * L + M[1] * z + U),
  4304. (R[5] = M[0] * j + M[1] * H + q);
  4305. }
  4306. return R;
  4307. }
  4308. function N(k, C, M) {
  4309. var R;
  4310. return (
  4311. this.isIdentity()
  4312. ? (R = [k, C, M])
  4313. : (R = [
  4314. k * this.props[0] +
  4315. C * this.props[4] +
  4316. M * this.props[8] +
  4317. this.props[12],
  4318. k * this.props[1] +
  4319. C * this.props[5] +
  4320. M * this.props[9] +
  4321. this.props[13],
  4322. k * this.props[2] +
  4323. C * this.props[6] +
  4324. M * this.props[10] +
  4325. this.props[14]
  4326. ]),
  4327. R
  4328. );
  4329. }
  4330. function $(k, C) {
  4331. if (this.isIdentity()) return k + ',' + C;
  4332. var M = this.props;
  4333. return (
  4334. Math.round((k * M[0] + C * M[4] + M[12]) * 100) / 100 +
  4335. ',' +
  4336. Math.round((k * M[1] + C * M[5] + M[13]) * 100) / 100
  4337. );
  4338. }
  4339. function O() {
  4340. for (var k = 0, C = this.props, M = 'matrix3d(', R = 1e4; k < 16; )
  4341. (M += i(C[k] * R) / R), (M += k === 15 ? ')' : ','), (k += 1);
  4342. return M;
  4343. }
  4344. function B(k) {
  4345. var C = 1e4;
  4346. return (k < 1e-6 && k > 0) || (k > -1e-6 && k < 0) ? i(k * C) / C : k;
  4347. }
  4348. function F() {
  4349. var k = this.props,
  4350. C = B(k[0]),
  4351. M = B(k[1]),
  4352. R = B(k[4]),
  4353. L = B(k[5]),
  4354. j = B(k[12]),
  4355. z = B(k[13]);
  4356. return (
  4357. 'matrix(' +
  4358. C +
  4359. ',' +
  4360. M +
  4361. ',' +
  4362. R +
  4363. ',' +
  4364. L +
  4365. ',' +
  4366. j +
  4367. ',' +
  4368. z +
  4369. ')'
  4370. );
  4371. }
  4372. return function () {
  4373. (this.reset = s),
  4374. (this.rotate = n),
  4375. (this.rotateX = a),
  4376. (this.rotateY = o),
  4377. (this.rotateZ = l),
  4378. (this.skew = g),
  4379. (this.skewFromAxis = S),
  4380. (this.shear = c),
  4381. (this.scale = p),
  4382. (this.setTransform = P),
  4383. (this.translate = b),
  4384. (this.transform = y),
  4385. (this.applyToPoint = d),
  4386. (this.applyToX = E),
  4387. (this.applyToY = T),
  4388. (this.applyToZ = x),
  4389. (this.applyToPointArray = N),
  4390. (this.applyToTriplePoints = D),
  4391. (this.applyToPointStringified = $),
  4392. (this.toCSS = O),
  4393. (this.to2dCSS = F),
  4394. (this.clone = f),
  4395. (this.cloneFromProps = m),
  4396. (this.equals = u),
  4397. (this.inversePoints = V),
  4398. (this.inversePoint = I),
  4399. (this.getInverseMatrix = _),
  4400. (this._t = this.transform),
  4401. (this.isIdentity = A),
  4402. (this._identity = !0),
  4403. (this._identityCalculated = !1),
  4404. (this.props = createTypedArray('float32', 16)),
  4405. this.reset();
  4406. };
  4407. })();
  4408. function _typeof$3(e) {
  4409. return (
  4410. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  4411. ? (_typeof$3 = function (r) {
  4412. return typeof r;
  4413. })
  4414. : (_typeof$3 = function (r) {
  4415. return r &&
  4416. typeof Symbol == 'function' &&
  4417. r.constructor === Symbol &&
  4418. r !== Symbol.prototype
  4419. ? 'symbol'
  4420. : typeof r;
  4421. }),
  4422. _typeof$3(e)
  4423. );
  4424. }
  4425. var lottie = {};
  4426. function setLocation(e) {
  4427. setLocationHref(e);
  4428. }
  4429. function searchAnimations() {
  4430. animationManager.searchAnimations();
  4431. }
  4432. function setSubframeRendering(e) {
  4433. setSubframeEnabled(e);
  4434. }
  4435. function setPrefix(e) {
  4436. setIdPrefix(e);
  4437. }
  4438. function loadAnimation(e) {
  4439. return animationManager.loadAnimation(e);
  4440. }
  4441. function setQuality(e) {
  4442. if (typeof e == 'string')
  4443. switch (e) {
  4444. case 'high':
  4445. setDefaultCurveSegments(200);
  4446. break;
  4447. default:
  4448. case 'medium':
  4449. setDefaultCurveSegments(50);
  4450. break;
  4451. case 'low':
  4452. setDefaultCurveSegments(10);
  4453. break;
  4454. }
  4455. else !isNaN(e) && e > 1 && setDefaultCurveSegments(e);
  4456. }
  4457. function inBrowser() {
  4458. return typeof navigator < 'u';
  4459. }
  4460. function installPlugin(e, t) {
  4461. e === 'expressions' && setExpressionsPlugin(t);
  4462. }
  4463. function getFactory(e) {
  4464. switch (e) {
  4465. case 'propertyFactory':
  4466. return PropertyFactory;
  4467. case 'shapePropertyFactory':
  4468. return ShapePropertyFactory;
  4469. case 'matrix':
  4470. return Matrix;
  4471. default:
  4472. return null;
  4473. }
  4474. }
  4475. (lottie.play = animationManager.play),
  4476. (lottie.pause = animationManager.pause),
  4477. (lottie.setLocationHref = setLocation),
  4478. (lottie.togglePause = animationManager.togglePause),
  4479. (lottie.setSpeed = animationManager.setSpeed),
  4480. (lottie.setDirection = animationManager.setDirection),
  4481. (lottie.stop = animationManager.stop),
  4482. (lottie.searchAnimations = searchAnimations),
  4483. (lottie.registerAnimation = animationManager.registerAnimation),
  4484. (lottie.loadAnimation = loadAnimation),
  4485. (lottie.setSubframeRendering = setSubframeRendering),
  4486. (lottie.resize = animationManager.resize),
  4487. (lottie.goToAndStop = animationManager.goToAndStop),
  4488. (lottie.destroy = animationManager.destroy),
  4489. (lottie.setQuality = setQuality),
  4490. (lottie.inBrowser = inBrowser),
  4491. (lottie.installPlugin = installPlugin),
  4492. (lottie.freeze = animationManager.freeze),
  4493. (lottie.unfreeze = animationManager.unfreeze),
  4494. (lottie.setVolume = animationManager.setVolume),
  4495. (lottie.mute = animationManager.mute),
  4496. (lottie.unmute = animationManager.unmute),
  4497. (lottie.getRegisteredAnimations =
  4498. animationManager.getRegisteredAnimations),
  4499. (lottie.useWebWorker = setWebWorker),
  4500. (lottie.setIDPrefix = setPrefix),
  4501. (lottie.__getFactory = getFactory),
  4502. (lottie.version = '5.11.0');
  4503. function checkReady() {
  4504. document.readyState === 'complete' &&
  4505. (clearInterval(readyStateCheckInterval), searchAnimations());
  4506. }
  4507. function getQueryVariable(e) {
  4508. for (var t = queryString.split('&'), r = 0; r < t.length; r += 1) {
  4509. var i = t[r].split('=');
  4510. if (decodeURIComponent(i[0]) == e) return decodeURIComponent(i[1]);
  4511. }
  4512. return null;
  4513. }
  4514. var queryString = '';
  4515. {
  4516. var scripts = document.getElementsByTagName('script'),
  4517. index = scripts.length - 1,
  4518. myScript = scripts[index] || { src: '' };
  4519. (queryString = myScript.src
  4520. ? myScript.src.replace(/^[^\?]+\??/, '')
  4521. : ''),
  4522. getQueryVariable('renderer');
  4523. }
  4524. var readyStateCheckInterval = setInterval(checkReady, 100);
  4525. try {
  4526. _typeof$3(exports) !== 'object' && (window.bodymovin = lottie);
  4527. } catch (e) {}
  4528. var ShapeModifiers = (function () {
  4529. var e = {},
  4530. t = {};
  4531. (e.registerModifier = r), (e.getModifier = i);
  4532. function r(s, n) {
  4533. t[s] || (t[s] = n);
  4534. }
  4535. function i(s, n, a) {
  4536. return new t[s](n, a);
  4537. }
  4538. return e;
  4539. })();
  4540. function ShapeModifier() {}
  4541. (ShapeModifier.prototype.initModifierProperties = function () {}),
  4542. (ShapeModifier.prototype.addShapeToModifier = function () {}),
  4543. (ShapeModifier.prototype.addShape = function (e) {
  4544. if (!this.closed) {
  4545. e.sh.container.addDynamicProperty(e.sh);
  4546. var t = {
  4547. shape: e.sh,
  4548. data: e,
  4549. localShapeCollection: shapeCollectionPool.newShapeCollection()
  4550. };
  4551. this.shapes.push(t),
  4552. this.addShapeToModifier(t),
  4553. this._isAnimated && e.setAsAnimated();
  4554. }
  4555. }),
  4556. (ShapeModifier.prototype.init = function (e, t) {
  4557. (this.shapes = []),
  4558. (this.elem = e),
  4559. this.initDynamicPropertyContainer(e),
  4560. this.initModifierProperties(e, t),
  4561. (this.frameId = initialDefaultFrame),
  4562. (this.closed = !1),
  4563. (this.k = !1),
  4564. this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0);
  4565. }),
  4566. (ShapeModifier.prototype.processKeys = function () {
  4567. this.elem.globalData.frameId !== this.frameId &&
  4568. ((this.frameId = this.elem.globalData.frameId),
  4569. this.iterateDynamicProperties());
  4570. }),
  4571. extendPrototype([DynamicPropertyContainer], ShapeModifier);
  4572. function TrimModifier() {}
  4573. extendPrototype([ShapeModifier], TrimModifier),
  4574. (TrimModifier.prototype.initModifierProperties = function (e, t) {
  4575. (this.s = PropertyFactory.getProp(e, t.s, 0, 0.01, this)),
  4576. (this.e = PropertyFactory.getProp(e, t.e, 0, 0.01, this)),
  4577. (this.o = PropertyFactory.getProp(e, t.o, 0, 0, this)),
  4578. (this.sValue = 0),
  4579. (this.eValue = 0),
  4580. (this.getValue = this.processKeys),
  4581. (this.m = t.m),
  4582. (this._isAnimated =
  4583. !!this.s.effectsSequence.length ||
  4584. !!this.e.effectsSequence.length ||
  4585. !!this.o.effectsSequence.length);
  4586. }),
  4587. (TrimModifier.prototype.addShapeToModifier = function (e) {
  4588. e.pathsData = [];
  4589. }),
  4590. (TrimModifier.prototype.calculateShapeEdges = function (e, t, r, i, s) {
  4591. var n = [];
  4592. t <= 1
  4593. ? n.push({ s: e, e: t })
  4594. : e >= 1
  4595. ? n.push({ s: e - 1, e: t - 1 })
  4596. : (n.push({ s: e, e: 1 }), n.push({ s: 0, e: t - 1 }));
  4597. var a = [],
  4598. o,
  4599. l = n.length,
  4600. c;
  4601. for (o = 0; o < l; o += 1)
  4602. if (((c = n[o]), !(c.e * s < i || c.s * s > i + r))) {
  4603. var g, S;
  4604. c.s * s <= i ? (g = 0) : (g = (c.s * s - i) / r),
  4605. c.e * s >= i + r ? (S = 1) : (S = (c.e * s - i) / r),
  4606. a.push([g, S]);
  4607. }
  4608. return a.length || a.push([0, 0]), a;
  4609. }),
  4610. (TrimModifier.prototype.releasePathsData = function (e) {
  4611. var t,
  4612. r = e.length;
  4613. for (t = 0; t < r; t += 1) segmentsLengthPool.release(e[t]);
  4614. return (e.length = 0), e;
  4615. }),
  4616. (TrimModifier.prototype.processShapes = function (e) {
  4617. var t, r;
  4618. if (this._mdf || e) {
  4619. var i = (this.o.v % 360) / 360;
  4620. if (
  4621. (i < 0 && (i += 1),
  4622. this.s.v > 1
  4623. ? (t = 1 + i)
  4624. : this.s.v < 0
  4625. ? (t = 0 + i)
  4626. : (t = this.s.v + i),
  4627. this.e.v > 1
  4628. ? (r = 1 + i)
  4629. : this.e.v < 0
  4630. ? (r = 0 + i)
  4631. : (r = this.e.v + i),
  4632. t > r)
  4633. ) {
  4634. var s = t;
  4635. (t = r), (r = s);
  4636. }
  4637. (t = Math.round(t * 1e4) * 1e-4),
  4638. (r = Math.round(r * 1e4) * 1e-4),
  4639. (this.sValue = t),
  4640. (this.eValue = r);
  4641. } else (t = this.sValue), (r = this.eValue);
  4642. var n,
  4643. a,
  4644. o = this.shapes.length,
  4645. l,
  4646. c,
  4647. g,
  4648. S,
  4649. p,
  4650. P = 0;
  4651. if (r === t)
  4652. for (a = 0; a < o; a += 1)
  4653. this.shapes[a].localShapeCollection.releaseShapes(),
  4654. (this.shapes[a].shape._mdf = !0),
  4655. (this.shapes[a].shape.paths =
  4656. this.shapes[a].localShapeCollection),
  4657. this._mdf && (this.shapes[a].pathsData.length = 0);
  4658. else if ((r === 1 && t === 0) || (r === 0 && t === 1)) {
  4659. if (this._mdf)
  4660. for (a = 0; a < o; a += 1)
  4661. (this.shapes[a].pathsData.length = 0),
  4662. (this.shapes[a].shape._mdf = !0);
  4663. } else {
  4664. var b = [],
  4665. y,
  4666. A;
  4667. for (a = 0; a < o; a += 1)
  4668. if (
  4669. ((y = this.shapes[a]),
  4670. !y.shape._mdf && !this._mdf && !e && this.m !== 2)
  4671. )
  4672. y.shape.paths = y.localShapeCollection;
  4673. else {
  4674. if (
  4675. ((n = y.shape.paths),
  4676. (c = n._length),
  4677. (p = 0),
  4678. !y.shape._mdf && y.pathsData.length)
  4679. )
  4680. p = y.totalShapeLength;
  4681. else {
  4682. for (
  4683. g = this.releasePathsData(y.pathsData), l = 0;
  4684. l < c;
  4685. l += 1
  4686. )
  4687. (S = bez.getSegmentsLength(n.shapes[l])),
  4688. g.push(S),
  4689. (p += S.totalLength);
  4690. (y.totalShapeLength = p), (y.pathsData = g);
  4691. }
  4692. (P += p), (y.shape._mdf = !0);
  4693. }
  4694. var u = t,
  4695. f = r,
  4696. m = 0,
  4697. d;
  4698. for (a = o - 1; a >= 0; a -= 1)
  4699. if (((y = this.shapes[a]), y.shape._mdf)) {
  4700. for (
  4701. A = y.localShapeCollection,
  4702. A.releaseShapes(),
  4703. this.m === 2 && o > 1
  4704. ? ((d = this.calculateShapeEdges(
  4705. t,
  4706. r,
  4707. y.totalShapeLength,
  4708. m,
  4709. P
  4710. )),
  4711. (m += y.totalShapeLength))
  4712. : (d = [[u, f]]),
  4713. c = d.length,
  4714. l = 0;
  4715. l < c;
  4716. l += 1
  4717. ) {
  4718. (u = d[l][0]),
  4719. (f = d[l][1]),
  4720. (b.length = 0),
  4721. f <= 1
  4722. ? b.push({
  4723. s: y.totalShapeLength * u,
  4724. e: y.totalShapeLength * f
  4725. })
  4726. : u >= 1
  4727. ? b.push({
  4728. s: y.totalShapeLength * (u - 1),
  4729. e: y.totalShapeLength * (f - 1)
  4730. })
  4731. : (b.push({
  4732. s: y.totalShapeLength * u,
  4733. e: y.totalShapeLength
  4734. }),
  4735. b.push({ s: 0, e: y.totalShapeLength * (f - 1) }));
  4736. var E = this.addShapes(y, b[0]);
  4737. if (b[0].s !== b[0].e) {
  4738. if (b.length > 1) {
  4739. var T = y.shape.paths.shapes[y.shape.paths._length - 1];
  4740. if (T.c) {
  4741. var x = E.pop();
  4742. this.addPaths(E, A), (E = this.addShapes(y, b[1], x));
  4743. } else this.addPaths(E, A), (E = this.addShapes(y, b[1]));
  4744. }
  4745. this.addPaths(E, A);
  4746. }
  4747. }
  4748. y.shape.paths = A;
  4749. }
  4750. }
  4751. }),
  4752. (TrimModifier.prototype.addPaths = function (e, t) {
  4753. var r,
  4754. i = e.length;
  4755. for (r = 0; r < i; r += 1) t.addShape(e[r]);
  4756. }),
  4757. (TrimModifier.prototype.addSegment = function (e, t, r, i, s, n, a) {
  4758. s.setXYAt(t[0], t[1], 'o', n),
  4759. s.setXYAt(r[0], r[1], 'i', n + 1),
  4760. a && s.setXYAt(e[0], e[1], 'v', n),
  4761. s.setXYAt(i[0], i[1], 'v', n + 1);
  4762. }),
  4763. (TrimModifier.prototype.addSegmentFromArray = function (e, t, r, i) {
  4764. t.setXYAt(e[1], e[5], 'o', r),
  4765. t.setXYAt(e[2], e[6], 'i', r + 1),
  4766. i && t.setXYAt(e[0], e[4], 'v', r),
  4767. t.setXYAt(e[3], e[7], 'v', r + 1);
  4768. }),
  4769. (TrimModifier.prototype.addShapes = function (e, t, r) {
  4770. var i = e.pathsData,
  4771. s = e.shape.paths.shapes,
  4772. n,
  4773. a = e.shape.paths._length,
  4774. o,
  4775. l,
  4776. c = 0,
  4777. g,
  4778. S,
  4779. p,
  4780. P,
  4781. b = [],
  4782. y,
  4783. A = !0;
  4784. for (
  4785. r
  4786. ? ((S = r._length), (y = r._length))
  4787. : ((r = shapePool.newElement()), (S = 0), (y = 0)),
  4788. b.push(r),
  4789. n = 0;
  4790. n < a;
  4791. n += 1
  4792. ) {
  4793. for (
  4794. p = i[n].lengths,
  4795. r.c = s[n].c,
  4796. l = s[n].c ? p.length : p.length + 1,
  4797. o = 1;
  4798. o < l;
  4799. o += 1
  4800. )
  4801. if (((g = p[o - 1]), c + g.addedLength < t.s))
  4802. (c += g.addedLength), (r.c = !1);
  4803. else if (c > t.e) {
  4804. r.c = !1;
  4805. break;
  4806. } else
  4807. t.s <= c && t.e >= c + g.addedLength
  4808. ? (this.addSegment(
  4809. s[n].v[o - 1],
  4810. s[n].o[o - 1],
  4811. s[n].i[o],
  4812. s[n].v[o],
  4813. r,
  4814. S,
  4815. A
  4816. ),
  4817. (A = !1))
  4818. : ((P = bez.getNewSegment(
  4819. s[n].v[o - 1],
  4820. s[n].v[o],
  4821. s[n].o[o - 1],
  4822. s[n].i[o],
  4823. (t.s - c) / g.addedLength,
  4824. (t.e - c) / g.addedLength,
  4825. p[o - 1]
  4826. )),
  4827. this.addSegmentFromArray(P, r, S, A),
  4828. (A = !1),
  4829. (r.c = !1)),
  4830. (c += g.addedLength),
  4831. (S += 1);
  4832. if (s[n].c && p.length) {
  4833. if (((g = p[o - 1]), c <= t.e)) {
  4834. var u = p[o - 1].addedLength;
  4835. t.s <= c && t.e >= c + u
  4836. ? (this.addSegment(
  4837. s[n].v[o - 1],
  4838. s[n].o[o - 1],
  4839. s[n].i[0],
  4840. s[n].v[0],
  4841. r,
  4842. S,
  4843. A
  4844. ),
  4845. (A = !1))
  4846. : ((P = bez.getNewSegment(
  4847. s[n].v[o - 1],
  4848. s[n].v[0],
  4849. s[n].o[o - 1],
  4850. s[n].i[0],
  4851. (t.s - c) / u,
  4852. (t.e - c) / u,
  4853. p[o - 1]
  4854. )),
  4855. this.addSegmentFromArray(P, r, S, A),
  4856. (A = !1),
  4857. (r.c = !1));
  4858. } else r.c = !1;
  4859. (c += g.addedLength), (S += 1);
  4860. }
  4861. if (
  4862. (r._length &&
  4863. (r.setXYAt(r.v[y][0], r.v[y][1], 'i', y),
  4864. r.setXYAt(
  4865. r.v[r._length - 1][0],
  4866. r.v[r._length - 1][1],
  4867. 'o',
  4868. r._length - 1
  4869. )),
  4870. c > t.e)
  4871. )
  4872. break;
  4873. n < a - 1 &&
  4874. ((r = shapePool.newElement()), (A = !0), b.push(r), (S = 0));
  4875. }
  4876. return b;
  4877. });
  4878. function PuckerAndBloatModifier() {}
  4879. extendPrototype([ShapeModifier], PuckerAndBloatModifier),
  4880. (PuckerAndBloatModifier.prototype.initModifierProperties = function (
  4881. e,
  4882. t
  4883. ) {
  4884. (this.getValue = this.processKeys),
  4885. (this.amount = PropertyFactory.getProp(e, t.a, 0, null, this)),
  4886. (this._isAnimated = !!this.amount.effectsSequence.length);
  4887. }),
  4888. (PuckerAndBloatModifier.prototype.processPath = function (e, t) {
  4889. var r = t / 100,
  4890. i = [0, 0],
  4891. s = e._length,
  4892. n = 0;
  4893. for (n = 0; n < s; n += 1) (i[0] += e.v[n][0]), (i[1] += e.v[n][1]);
  4894. (i[0] /= s), (i[1] /= s);
  4895. var a = shapePool.newElement();
  4896. a.c = e.c;
  4897. var o, l, c, g, S, p;
  4898. for (n = 0; n < s; n += 1)
  4899. (o = e.v[n][0] + (i[0] - e.v[n][0]) * r),
  4900. (l = e.v[n][1] + (i[1] - e.v[n][1]) * r),
  4901. (c = e.o[n][0] + (i[0] - e.o[n][0]) * -r),
  4902. (g = e.o[n][1] + (i[1] - e.o[n][1]) * -r),
  4903. (S = e.i[n][0] + (i[0] - e.i[n][0]) * -r),
  4904. (p = e.i[n][1] + (i[1] - e.i[n][1]) * -r),
  4905. a.setTripleAt(o, l, c, g, S, p, n);
  4906. return a;
  4907. }),
  4908. (PuckerAndBloatModifier.prototype.processShapes = function (e) {
  4909. var t,
  4910. r,
  4911. i = this.shapes.length,
  4912. s,
  4913. n,
  4914. a = this.amount.v;
  4915. if (a !== 0) {
  4916. var o, l;
  4917. for (r = 0; r < i; r += 1) {
  4918. if (
  4919. ((o = this.shapes[r]),
  4920. (l = o.localShapeCollection),
  4921. !(!o.shape._mdf && !this._mdf && !e))
  4922. )
  4923. for (
  4924. l.releaseShapes(),
  4925. o.shape._mdf = !0,
  4926. t = o.shape.paths.shapes,
  4927. n = o.shape.paths._length,
  4928. s = 0;
  4929. s < n;
  4930. s += 1
  4931. )
  4932. l.addShape(this.processPath(t[s], a));
  4933. o.shape.paths = o.localShapeCollection;
  4934. }
  4935. }
  4936. this.dynamicProperties.length || (this._mdf = !1);
  4937. });
  4938. var TransformPropertyFactory = (function () {
  4939. var e = [0, 0];
  4940. function t(l) {
  4941. var c = this._mdf;
  4942. this.iterateDynamicProperties(),
  4943. (this._mdf = this._mdf || c),
  4944. this.a && l.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
  4945. this.s && l.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
  4946. this.sk && l.skewFromAxis(-this.sk.v, this.sa.v),
  4947. this.r
  4948. ? l.rotate(-this.r.v)
  4949. : l
  4950. .rotateZ(-this.rz.v)
  4951. .rotateY(this.ry.v)
  4952. .rotateX(this.rx.v)
  4953. .rotateZ(-this.or.v[2])
  4954. .rotateY(this.or.v[1])
  4955. .rotateX(this.or.v[0]),
  4956. this.data.p.s
  4957. ? this.data.p.z
  4958. ? l.translate(this.px.v, this.py.v, -this.pz.v)
  4959. : l.translate(this.px.v, this.py.v, 0)
  4960. : l.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
  4961. }
  4962. function r(l) {
  4963. if (this.elem.globalData.frameId !== this.frameId) {
  4964. if (
  4965. (this._isDirty &&
  4966. (this.precalculateMatrix(), (this._isDirty = !1)),
  4967. this.iterateDynamicProperties(),
  4968. this._mdf || l)
  4969. ) {
  4970. var c;
  4971. if (
  4972. (this.v.cloneFromProps(this.pre.props),
  4973. this.appliedTransformations < 1 &&
  4974. this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
  4975. this.appliedTransformations < 2 &&
  4976. this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
  4977. this.sk &&
  4978. this.appliedTransformations < 3 &&
  4979. this.v.skewFromAxis(-this.sk.v, this.sa.v),
  4980. this.r && this.appliedTransformations < 4
  4981. ? this.v.rotate(-this.r.v)
  4982. : !this.r &&
  4983. this.appliedTransformations < 4 &&
  4984. this.v
  4985. .rotateZ(-this.rz.v)
  4986. .rotateY(this.ry.v)
  4987. .rotateX(this.rx.v)
  4988. .rotateZ(-this.or.v[2])
  4989. .rotateY(this.or.v[1])
  4990. .rotateX(this.or.v[0]),
  4991. this.autoOriented)
  4992. ) {
  4993. var g, S;
  4994. if (
  4995. ((c = this.elem.globalData.frameRate),
  4996. this.p && this.p.keyframes && this.p.getValueAtTime)
  4997. )
  4998. this.p._caching.lastFrame + this.p.offsetTime <=
  4999. this.p.keyframes[0].t
  5000. ? ((g = this.p.getValueAtTime(
  5001. (this.p.keyframes[0].t + 0.01) / c,
  5002. 0
  5003. )),
  5004. (S = this.p.getValueAtTime(this.p.keyframes[0].t / c, 0)))
  5005. : this.p._caching.lastFrame + this.p.offsetTime >=
  5006. this.p.keyframes[this.p.keyframes.length - 1].t
  5007. ? ((g = this.p.getValueAtTime(
  5008. this.p.keyframes[this.p.keyframes.length - 1].t / c,
  5009. 0
  5010. )),
  5011. (S = this.p.getValueAtTime(
  5012. (this.p.keyframes[this.p.keyframes.length - 1].t -
  5013. 0.05) /
  5014. c,
  5015. 0
  5016. )))
  5017. : ((g = this.p.pv),
  5018. (S = this.p.getValueAtTime(
  5019. (this.p._caching.lastFrame + this.p.offsetTime - 0.01) /
  5020. c,
  5021. this.p.offsetTime
  5022. )));
  5023. else if (
  5024. this.px &&
  5025. this.px.keyframes &&
  5026. this.py.keyframes &&
  5027. this.px.getValueAtTime &&
  5028. this.py.getValueAtTime
  5029. ) {
  5030. (g = []), (S = []);
  5031. var p = this.px,
  5032. P = this.py;
  5033. p._caching.lastFrame + p.offsetTime <= p.keyframes[0].t
  5034. ? ((g[0] = p.getValueAtTime(
  5035. (p.keyframes[0].t + 0.01) / c,
  5036. 0
  5037. )),
  5038. (g[1] = P.getValueAtTime(
  5039. (P.keyframes[0].t + 0.01) / c,
  5040. 0
  5041. )),
  5042. (S[0] = p.getValueAtTime(p.keyframes[0].t / c, 0)),
  5043. (S[1] = P.getValueAtTime(P.keyframes[0].t / c, 0)))
  5044. : p._caching.lastFrame + p.offsetTime >=
  5045. p.keyframes[p.keyframes.length - 1].t
  5046. ? ((g[0] = p.getValueAtTime(
  5047. p.keyframes[p.keyframes.length - 1].t / c,
  5048. 0
  5049. )),
  5050. (g[1] = P.getValueAtTime(
  5051. P.keyframes[P.keyframes.length - 1].t / c,
  5052. 0
  5053. )),
  5054. (S[0] = p.getValueAtTime(
  5055. (p.keyframes[p.keyframes.length - 1].t - 0.01) / c,
  5056. 0
  5057. )),
  5058. (S[1] = P.getValueAtTime(
  5059. (P.keyframes[P.keyframes.length - 1].t - 0.01) / c,
  5060. 0
  5061. )))
  5062. : ((g = [p.pv, P.pv]),
  5063. (S[0] = p.getValueAtTime(
  5064. (p._caching.lastFrame + p.offsetTime - 0.01) / c,
  5065. p.offsetTime
  5066. )),
  5067. (S[1] = P.getValueAtTime(
  5068. (P._caching.lastFrame + P.offsetTime - 0.01) / c,
  5069. P.offsetTime
  5070. )));
  5071. } else (S = e), (g = S);
  5072. this.v.rotate(-Math.atan2(g[1] - S[1], g[0] - S[0]));
  5073. }
  5074. this.data.p && this.data.p.s
  5075. ? this.data.p.z
  5076. ? this.v.translate(this.px.v, this.py.v, -this.pz.v)
  5077. : this.v.translate(this.px.v, this.py.v, 0)
  5078. : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
  5079. }
  5080. this.frameId = this.elem.globalData.frameId;
  5081. }
  5082. }
  5083. function i() {
  5084. if (!this.a.k)
  5085. this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
  5086. (this.appliedTransformations = 1);
  5087. else return;
  5088. if (!this.s.effectsSequence.length)
  5089. this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
  5090. (this.appliedTransformations = 2);
  5091. else return;
  5092. if (this.sk)
  5093. if (
  5094. !this.sk.effectsSequence.length &&
  5095. !this.sa.effectsSequence.length
  5096. )
  5097. this.pre.skewFromAxis(-this.sk.v, this.sa.v),
  5098. (this.appliedTransformations = 3);
  5099. else return;
  5100. this.r
  5101. ? this.r.effectsSequence.length ||
  5102. (this.pre.rotate(-this.r.v), (this.appliedTransformations = 4))
  5103. : !this.rz.effectsSequence.length &&
  5104. !this.ry.effectsSequence.length &&
  5105. !this.rx.effectsSequence.length &&
  5106. !this.or.effectsSequence.length &&
  5107. (this.pre
  5108. .rotateZ(-this.rz.v)
  5109. .rotateY(this.ry.v)
  5110. .rotateX(this.rx.v)
  5111. .rotateZ(-this.or.v[2])
  5112. .rotateY(this.or.v[1])
  5113. .rotateX(this.or.v[0]),
  5114. (this.appliedTransformations = 4));
  5115. }
  5116. function s() {}
  5117. function n(l) {
  5118. this._addDynamicProperty(l),
  5119. this.elem.addDynamicProperty(l),
  5120. (this._isDirty = !0);
  5121. }
  5122. function a(l, c, g) {
  5123. if (
  5124. ((this.elem = l),
  5125. (this.frameId = -1),
  5126. (this.propType = 'transform'),
  5127. (this.data = c),
  5128. (this.v = new Matrix()),
  5129. (this.pre = new Matrix()),
  5130. (this.appliedTransformations = 0),
  5131. this.initDynamicPropertyContainer(g || l),
  5132. c.p && c.p.s
  5133. ? ((this.px = PropertyFactory.getProp(l, c.p.x, 0, 0, this)),
  5134. (this.py = PropertyFactory.getProp(l, c.p.y, 0, 0, this)),
  5135. c.p.z &&
  5136. (this.pz = PropertyFactory.getProp(l, c.p.z, 0, 0, this)))
  5137. : (this.p = PropertyFactory.getProp(
  5138. l,
  5139. c.p || { k: [0, 0, 0] },
  5140. 1,
  5141. 0,
  5142. this
  5143. )),
  5144. c.rx)
  5145. ) {
  5146. if (
  5147. ((this.rx = PropertyFactory.getProp(l, c.rx, 0, degToRads, this)),
  5148. (this.ry = PropertyFactory.getProp(l, c.ry, 0, degToRads, this)),
  5149. (this.rz = PropertyFactory.getProp(l, c.rz, 0, degToRads, this)),
  5150. c.or.k[0].ti)
  5151. ) {
  5152. var S,
  5153. p = c.or.k.length;
  5154. for (S = 0; S < p; S += 1)
  5155. (c.or.k[S].to = null), (c.or.k[S].ti = null);
  5156. }
  5157. (this.or = PropertyFactory.getProp(l, c.or, 1, degToRads, this)),
  5158. (this.or.sh = !0);
  5159. } else
  5160. this.r = PropertyFactory.getProp(
  5161. l,
  5162. c.r || { k: 0 },
  5163. 0,
  5164. degToRads,
  5165. this
  5166. );
  5167. c.sk &&
  5168. ((this.sk = PropertyFactory.getProp(l, c.sk, 0, degToRads, this)),
  5169. (this.sa = PropertyFactory.getProp(l, c.sa, 0, degToRads, this))),
  5170. (this.a = PropertyFactory.getProp(
  5171. l,
  5172. c.a || { k: [0, 0, 0] },
  5173. 1,
  5174. 0,
  5175. this
  5176. )),
  5177. (this.s = PropertyFactory.getProp(
  5178. l,
  5179. c.s || { k: [100, 100, 100] },
  5180. 1,
  5181. 0.01,
  5182. this
  5183. )),
  5184. c.o
  5185. ? (this.o = PropertyFactory.getProp(l, c.o, 0, 0.01, l))
  5186. : (this.o = { _mdf: !1, v: 1 }),
  5187. (this._isDirty = !0),
  5188. this.dynamicProperties.length || this.getValue(!0);
  5189. }
  5190. (a.prototype = {
  5191. applyToMatrix: t,
  5192. getValue: r,
  5193. precalculateMatrix: i,
  5194. autoOrient: s
  5195. }),
  5196. extendPrototype([DynamicPropertyContainer], a),
  5197. (a.prototype.addDynamicProperty = n),
  5198. (a.prototype._addDynamicProperty =
  5199. DynamicPropertyContainer.prototype.addDynamicProperty);
  5200. function o(l, c, g) {
  5201. return new a(l, c, g);
  5202. }
  5203. return { getTransformProperty: o };
  5204. })();
  5205. function RepeaterModifier() {}
  5206. extendPrototype([ShapeModifier], RepeaterModifier),
  5207. (RepeaterModifier.prototype.initModifierProperties = function (e, t) {
  5208. (this.getValue = this.processKeys),
  5209. (this.c = PropertyFactory.getProp(e, t.c, 0, null, this)),
  5210. (this.o = PropertyFactory.getProp(e, t.o, 0, null, this)),
  5211. (this.tr = TransformPropertyFactory.getTransformProperty(
  5212. e,
  5213. t.tr,
  5214. this
  5215. )),
  5216. (this.so = PropertyFactory.getProp(e, t.tr.so, 0, 0.01, this)),
  5217. (this.eo = PropertyFactory.getProp(e, t.tr.eo, 0, 0.01, this)),
  5218. (this.data = t),
  5219. this.dynamicProperties.length || this.getValue(!0),
  5220. (this._isAnimated = !!this.dynamicProperties.length),
  5221. (this.pMatrix = new Matrix()),
  5222. (this.rMatrix = new Matrix()),
  5223. (this.sMatrix = new Matrix()),
  5224. (this.tMatrix = new Matrix()),
  5225. (this.matrix = new Matrix());
  5226. }),
  5227. (RepeaterModifier.prototype.applyTransforms = function (
  5228. e,
  5229. t,
  5230. r,
  5231. i,
  5232. s,
  5233. n
  5234. ) {
  5235. var a = n ? -1 : 1,
  5236. o = i.s.v[0] + (1 - i.s.v[0]) * (1 - s),
  5237. l = i.s.v[1] + (1 - i.s.v[1]) * (1 - s);
  5238. e.translate(i.p.v[0] * a * s, i.p.v[1] * a * s, i.p.v[2]),
  5239. t.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]),
  5240. t.rotate(-i.r.v * a * s),
  5241. t.translate(i.a.v[0], i.a.v[1], i.a.v[2]),
  5242. r.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]),
  5243. r.scale(n ? 1 / o : o, n ? 1 / l : l),
  5244. r.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
  5245. }),
  5246. (RepeaterModifier.prototype.init = function (e, t, r, i) {
  5247. for (
  5248. this.elem = e,
  5249. this.arr = t,
  5250. this.pos = r,
  5251. this.elemsData = i,
  5252. this._currentCopies = 0,
  5253. this._elements = [],
  5254. this._groups = [],
  5255. this.frameId = -1,
  5256. this.initDynamicPropertyContainer(e),
  5257. this.initModifierProperties(e, t[r]);
  5258. r > 0;
  5259. )
  5260. (r -= 1), this._elements.unshift(t[r]);
  5261. this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0);
  5262. }),
  5263. (RepeaterModifier.prototype.resetElements = function (e) {
  5264. var t,
  5265. r = e.length;
  5266. for (t = 0; t < r; t += 1)
  5267. (e[t]._processed = !1),
  5268. e[t].ty === 'gr' && this.resetElements(e[t].it);
  5269. }),
  5270. (RepeaterModifier.prototype.cloneElements = function (e) {
  5271. var t = JSON.parse(JSON.stringify(e));
  5272. return this.resetElements(t), t;
  5273. }),
  5274. (RepeaterModifier.prototype.changeGroupRender = function (e, t) {
  5275. var r,
  5276. i = e.length;
  5277. for (r = 0; r < i; r += 1)
  5278. (e[r]._render = t),
  5279. e[r].ty === 'gr' && this.changeGroupRender(e[r].it, t);
  5280. }),
  5281. (RepeaterModifier.prototype.processShapes = function (e) {
  5282. var t,
  5283. r,
  5284. i,
  5285. s,
  5286. n,
  5287. a = !1;
  5288. if (this._mdf || e) {
  5289. var o = Math.ceil(this.c.v);
  5290. if (this._groups.length < o) {
  5291. for (; this._groups.length < o; ) {
  5292. var l = { it: this.cloneElements(this._elements), ty: 'gr' };
  5293. l.it.push({
  5294. a: { a: 0, ix: 1, k: [0, 0] },
  5295. nm: 'Transform',
  5296. o: { a: 0, ix: 7, k: 100 },
  5297. p: { a: 0, ix: 2, k: [0, 0] },
  5298. r: {
  5299. a: 1,
  5300. ix: 6,
  5301. k: [
  5302. { s: 0, e: 0, t: 0 },
  5303. { s: 0, e: 0, t: 1 }
  5304. ]
  5305. },
  5306. s: { a: 0, ix: 3, k: [100, 100] },
  5307. sa: { a: 0, ix: 5, k: 0 },
  5308. sk: { a: 0, ix: 4, k: 0 },
  5309. ty: 'tr'
  5310. }),
  5311. this.arr.splice(0, 0, l),
  5312. this._groups.splice(0, 0, l),
  5313. (this._currentCopies += 1);
  5314. }
  5315. this.elem.reloadShapes(), (a = !0);
  5316. }
  5317. n = 0;
  5318. var c;
  5319. for (i = 0; i <= this._groups.length - 1; i += 1) {
  5320. if (
  5321. ((c = n < o),
  5322. (this._groups[i]._render = c),
  5323. this.changeGroupRender(this._groups[i].it, c),
  5324. !c)
  5325. ) {
  5326. var g = this.elemsData[i].it,
  5327. S = g[g.length - 1];
  5328. S.transform.op.v !== 0
  5329. ? ((S.transform.op._mdf = !0), (S.transform.op.v = 0))
  5330. : (S.transform.op._mdf = !1);
  5331. }
  5332. n += 1;
  5333. }
  5334. this._currentCopies = o;
  5335. var p = this.o.v,
  5336. P = p % 1,
  5337. b = p > 0 ? Math.floor(p) : Math.ceil(p),
  5338. y = this.pMatrix.props,
  5339. A = this.rMatrix.props,
  5340. u = this.sMatrix.props;
  5341. this.pMatrix.reset(),
  5342. this.rMatrix.reset(),
  5343. this.sMatrix.reset(),
  5344. this.tMatrix.reset(),
  5345. this.matrix.reset();
  5346. var f = 0;
  5347. if (p > 0) {
  5348. for (; f < b; )
  5349. this.applyTransforms(
  5350. this.pMatrix,
  5351. this.rMatrix,
  5352. this.sMatrix,
  5353. this.tr,
  5354. 1,
  5355. !1
  5356. ),
  5357. (f += 1);
  5358. P &&
  5359. (this.applyTransforms(
  5360. this.pMatrix,
  5361. this.rMatrix,
  5362. this.sMatrix,
  5363. this.tr,
  5364. P,
  5365. !1
  5366. ),
  5367. (f += P));
  5368. } else if (p < 0) {
  5369. for (; f > b; )
  5370. this.applyTransforms(
  5371. this.pMatrix,
  5372. this.rMatrix,
  5373. this.sMatrix,
  5374. this.tr,
  5375. 1,
  5376. !0
  5377. ),
  5378. (f -= 1);
  5379. P &&
  5380. (this.applyTransforms(
  5381. this.pMatrix,
  5382. this.rMatrix,
  5383. this.sMatrix,
  5384. this.tr,
  5385. -P,
  5386. !0
  5387. ),
  5388. (f -= P));
  5389. }
  5390. (i = this.data.m === 1 ? 0 : this._currentCopies - 1),
  5391. (s = this.data.m === 1 ? 1 : -1),
  5392. (n = this._currentCopies);
  5393. for (var m, d; n; ) {
  5394. if (
  5395. ((t = this.elemsData[i].it),
  5396. (r = t[t.length - 1].transform.mProps.v.props),
  5397. (d = r.length),
  5398. (t[t.length - 1].transform.mProps._mdf = !0),
  5399. (t[t.length - 1].transform.op._mdf = !0),
  5400. (t[t.length - 1].transform.op.v =
  5401. this._currentCopies === 1
  5402. ? this.so.v
  5403. : this.so.v +
  5404. (this.eo.v - this.so.v) *
  5405. (i / (this._currentCopies - 1))),
  5406. f !== 0)
  5407. ) {
  5408. for (
  5409. ((i !== 0 && s === 1) ||
  5410. (i !== this._currentCopies - 1 && s === -1)) &&
  5411. this.applyTransforms(
  5412. this.pMatrix,
  5413. this.rMatrix,
  5414. this.sMatrix,
  5415. this.tr,
  5416. 1,
  5417. !1
  5418. ),
  5419. this.matrix.transform(
  5420. A[0],
  5421. A[1],
  5422. A[2],
  5423. A[3],
  5424. A[4],
  5425. A[5],
  5426. A[6],
  5427. A[7],
  5428. A[8],
  5429. A[9],
  5430. A[10],
  5431. A[11],
  5432. A[12],
  5433. A[13],
  5434. A[14],
  5435. A[15]
  5436. ),
  5437. this.matrix.transform(
  5438. u[0],
  5439. u[1],
  5440. u[2],
  5441. u[3],
  5442. u[4],
  5443. u[5],
  5444. u[6],
  5445. u[7],
  5446. u[8],
  5447. u[9],
  5448. u[10],
  5449. u[11],
  5450. u[12],
  5451. u[13],
  5452. u[14],
  5453. u[15]
  5454. ),
  5455. this.matrix.transform(
  5456. y[0],
  5457. y[1],
  5458. y[2],
  5459. y[3],
  5460. y[4],
  5461. y[5],
  5462. y[6],
  5463. y[7],
  5464. y[8],
  5465. y[9],
  5466. y[10],
  5467. y[11],
  5468. y[12],
  5469. y[13],
  5470. y[14],
  5471. y[15]
  5472. ),
  5473. m = 0;
  5474. m < d;
  5475. m += 1
  5476. )
  5477. r[m] = this.matrix.props[m];
  5478. this.matrix.reset();
  5479. } else
  5480. for (this.matrix.reset(), m = 0; m < d; m += 1)
  5481. r[m] = this.matrix.props[m];
  5482. (f += 1), (n -= 1), (i += s);
  5483. }
  5484. } else
  5485. for (n = this._currentCopies, i = 0, s = 1; n; )
  5486. (t = this.elemsData[i].it),
  5487. (r = t[t.length - 1].transform.mProps.v.props),
  5488. (t[t.length - 1].transform.mProps._mdf = !1),
  5489. (t[t.length - 1].transform.op._mdf = !1),
  5490. (n -= 1),
  5491. (i += s);
  5492. return a;
  5493. }),
  5494. (RepeaterModifier.prototype.addShape = function () {});
  5495. function RoundCornersModifier() {}
  5496. extendPrototype([ShapeModifier], RoundCornersModifier),
  5497. (RoundCornersModifier.prototype.initModifierProperties = function (
  5498. e,
  5499. t
  5500. ) {
  5501. (this.getValue = this.processKeys),
  5502. (this.rd = PropertyFactory.getProp(e, t.r, 0, null, this)),
  5503. (this._isAnimated = !!this.rd.effectsSequence.length);
  5504. }),
  5505. (RoundCornersModifier.prototype.processPath = function (e, t) {
  5506. var r = shapePool.newElement();
  5507. r.c = e.c;
  5508. var i,
  5509. s = e._length,
  5510. n,
  5511. a,
  5512. o,
  5513. l,
  5514. c,
  5515. g,
  5516. S = 0,
  5517. p,
  5518. P,
  5519. b,
  5520. y,
  5521. A,
  5522. u;
  5523. for (i = 0; i < s; i += 1)
  5524. (n = e.v[i]),
  5525. (o = e.o[i]),
  5526. (a = e.i[i]),
  5527. n[0] === o[0] && n[1] === o[1] && n[0] === a[0] && n[1] === a[1]
  5528. ? (i === 0 || i === s - 1) && !e.c
  5529. ? (r.setTripleAt(n[0], n[1], o[0], o[1], a[0], a[1], S),
  5530. (S += 1))
  5531. : (i === 0 ? (l = e.v[s - 1]) : (l = e.v[i - 1]),
  5532. (c = Math.sqrt(
  5533. Math.pow(n[0] - l[0], 2) + Math.pow(n[1] - l[1], 2)
  5534. )),
  5535. (g = c ? Math.min(c / 2, t) / c : 0),
  5536. (A = n[0] + (l[0] - n[0]) * g),
  5537. (p = A),
  5538. (u = n[1] - (n[1] - l[1]) * g),
  5539. (P = u),
  5540. (b = p - (p - n[0]) * roundCorner),
  5541. (y = P - (P - n[1]) * roundCorner),
  5542. r.setTripleAt(p, P, b, y, A, u, S),
  5543. (S += 1),
  5544. i === s - 1 ? (l = e.v[0]) : (l = e.v[i + 1]),
  5545. (c = Math.sqrt(
  5546. Math.pow(n[0] - l[0], 2) + Math.pow(n[1] - l[1], 2)
  5547. )),
  5548. (g = c ? Math.min(c / 2, t) / c : 0),
  5549. (b = n[0] + (l[0] - n[0]) * g),
  5550. (p = b),
  5551. (y = n[1] + (l[1] - n[1]) * g),
  5552. (P = y),
  5553. (A = p - (p - n[0]) * roundCorner),
  5554. (u = P - (P - n[1]) * roundCorner),
  5555. r.setTripleAt(p, P, b, y, A, u, S),
  5556. (S += 1))
  5557. : (r.setTripleAt(
  5558. e.v[i][0],
  5559. e.v[i][1],
  5560. e.o[i][0],
  5561. e.o[i][1],
  5562. e.i[i][0],
  5563. e.i[i][1],
  5564. S
  5565. ),
  5566. (S += 1));
  5567. return r;
  5568. }),
  5569. (RoundCornersModifier.prototype.processShapes = function (e) {
  5570. var t,
  5571. r,
  5572. i = this.shapes.length,
  5573. s,
  5574. n,
  5575. a = this.rd.v;
  5576. if (a !== 0) {
  5577. var o, l;
  5578. for (r = 0; r < i; r += 1) {
  5579. if (
  5580. ((o = this.shapes[r]),
  5581. (l = o.localShapeCollection),
  5582. !(!o.shape._mdf && !this._mdf && !e))
  5583. )
  5584. for (
  5585. l.releaseShapes(),
  5586. o.shape._mdf = !0,
  5587. t = o.shape.paths.shapes,
  5588. n = o.shape.paths._length,
  5589. s = 0;
  5590. s < n;
  5591. s += 1
  5592. )
  5593. l.addShape(this.processPath(t[s], a));
  5594. o.shape.paths = o.localShapeCollection;
  5595. }
  5596. }
  5597. this.dynamicProperties.length || (this._mdf = !1);
  5598. });
  5599. function floatEqual(e, t) {
  5600. return Math.abs(e - t) * 1e5 <= Math.min(Math.abs(e), Math.abs(t));
  5601. }
  5602. function floatZero(e) {
  5603. return Math.abs(e) <= 1e-5;
  5604. }
  5605. function lerp(e, t, r) {
  5606. return e * (1 - r) + t * r;
  5607. }
  5608. function lerpPoint(e, t, r) {
  5609. return [lerp(e[0], t[0], r), lerp(e[1], t[1], r)];
  5610. }
  5611. function quadRoots(e, t, r) {
  5612. if (e === 0) return [];
  5613. var i = t * t - 4 * e * r;
  5614. if (i < 0) return [];
  5615. var s = -t / (2 * e);
  5616. if (i === 0) return [s];
  5617. var n = Math.sqrt(i) / (2 * e);
  5618. return [s - n, s + n];
  5619. }
  5620. function polynomialCoefficients(e, t, r, i) {
  5621. return [
  5622. -e + 3 * t - 3 * r + i,
  5623. 3 * e - 6 * t + 3 * r,
  5624. -3 * e + 3 * t,
  5625. e
  5626. ];
  5627. }
  5628. function singlePoint(e) {
  5629. return new PolynomialBezier(e, e, e, e, !1);
  5630. }
  5631. function PolynomialBezier(e, t, r, i, s) {
  5632. s && pointEqual(e, t) && (t = lerpPoint(e, i, 1 / 3)),
  5633. s && pointEqual(r, i) && (r = lerpPoint(e, i, 2 / 3));
  5634. var n = polynomialCoefficients(e[0], t[0], r[0], i[0]),
  5635. a = polynomialCoefficients(e[1], t[1], r[1], i[1]);
  5636. (this.a = [n[0], a[0]]),
  5637. (this.b = [n[1], a[1]]),
  5638. (this.c = [n[2], a[2]]),
  5639. (this.d = [n[3], a[3]]),
  5640. (this.points = [e, t, r, i]);
  5641. }
  5642. (PolynomialBezier.prototype.point = function (e) {
  5643. return [
  5644. ((this.a[0] * e + this.b[0]) * e + this.c[0]) * e + this.d[0],
  5645. ((this.a[1] * e + this.b[1]) * e + this.c[1]) * e + this.d[1]
  5646. ];
  5647. }),
  5648. (PolynomialBezier.prototype.derivative = function (e) {
  5649. return [
  5650. (3 * e * this.a[0] + 2 * this.b[0]) * e + this.c[0],
  5651. (3 * e * this.a[1] + 2 * this.b[1]) * e + this.c[1]
  5652. ];
  5653. }),
  5654. (PolynomialBezier.prototype.tangentAngle = function (e) {
  5655. var t = this.derivative(e);
  5656. return Math.atan2(t[1], t[0]);
  5657. }),
  5658. (PolynomialBezier.prototype.normalAngle = function (e) {
  5659. var t = this.derivative(e);
  5660. return Math.atan2(t[0], t[1]);
  5661. }),
  5662. (PolynomialBezier.prototype.inflectionPoints = function () {
  5663. var e = this.a[1] * this.b[0] - this.a[0] * this.b[1];
  5664. if (floatZero(e)) return [];
  5665. var t = (-0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1])) / e,
  5666. r =
  5667. t * t -
  5668. ((1 / 3) * (this.b[1] * this.c[0] - this.b[0] * this.c[1])) / e;
  5669. if (r < 0) return [];
  5670. var i = Math.sqrt(r);
  5671. return floatZero(i)
  5672. ? i > 0 && i < 1
  5673. ? [t]
  5674. : []
  5675. : [t - i, t + i].filter(function (s) {
  5676. return s > 0 && s < 1;
  5677. });
  5678. }),
  5679. (PolynomialBezier.prototype.split = function (e) {
  5680. if (e <= 0) return [singlePoint(this.points[0]), this];
  5681. if (e >= 1)
  5682. return [this, singlePoint(this.points[this.points.length - 1])];
  5683. var t = lerpPoint(this.points[0], this.points[1], e),
  5684. r = lerpPoint(this.points[1], this.points[2], e),
  5685. i = lerpPoint(this.points[2], this.points[3], e),
  5686. s = lerpPoint(t, r, e),
  5687. n = lerpPoint(r, i, e),
  5688. a = lerpPoint(s, n, e);
  5689. return [
  5690. new PolynomialBezier(this.points[0], t, s, a, !0),
  5691. new PolynomialBezier(a, n, i, this.points[3], !0)
  5692. ];
  5693. });
  5694. function extrema(e, t) {
  5695. var r = e.points[0][t],
  5696. i = e.points[e.points.length - 1][t];
  5697. if (r > i) {
  5698. var s = i;
  5699. (i = r), (r = s);
  5700. }
  5701. for (
  5702. var n = quadRoots(3 * e.a[t], 2 * e.b[t], e.c[t]), a = 0;
  5703. a < n.length;
  5704. a += 1
  5705. )
  5706. if (n[a] > 0 && n[a] < 1) {
  5707. var o = e.point(n[a])[t];
  5708. o < r ? (r = o) : o > i && (i = o);
  5709. }
  5710. return { min: r, max: i };
  5711. }
  5712. (PolynomialBezier.prototype.bounds = function () {
  5713. return { x: extrema(this, 0), y: extrema(this, 1) };
  5714. }),
  5715. (PolynomialBezier.prototype.boundingBox = function () {
  5716. var e = this.bounds();
  5717. return {
  5718. left: e.x.min,
  5719. right: e.x.max,
  5720. top: e.y.min,
  5721. bottom: e.y.max,
  5722. width: e.x.max - e.x.min,
  5723. height: e.y.max - e.y.min,
  5724. cx: (e.x.max + e.x.min) / 2,
  5725. cy: (e.y.max + e.y.min) / 2
  5726. };
  5727. });
  5728. function intersectData(e, t, r) {
  5729. var i = e.boundingBox();
  5730. return {
  5731. cx: i.cx,
  5732. cy: i.cy,
  5733. width: i.width,
  5734. height: i.height,
  5735. bez: e,
  5736. t: (t + r) / 2,
  5737. t1: t,
  5738. t2: r
  5739. };
  5740. }
  5741. function splitData(e) {
  5742. var t = e.bez.split(0.5);
  5743. return [intersectData(t[0], e.t1, e.t), intersectData(t[1], e.t, e.t2)];
  5744. }
  5745. function boxIntersect(e, t) {
  5746. return (
  5747. Math.abs(e.cx - t.cx) * 2 < e.width + t.width &&
  5748. Math.abs(e.cy - t.cy) * 2 < e.height + t.height
  5749. );
  5750. }
  5751. function intersectsImpl(e, t, r, i, s, n) {
  5752. if (boxIntersect(e, t)) {
  5753. if (
  5754. r >= n ||
  5755. (e.width <= i && e.height <= i && t.width <= i && t.height <= i)
  5756. ) {
  5757. s.push([e.t, t.t]);
  5758. return;
  5759. }
  5760. var a = splitData(e),
  5761. o = splitData(t);
  5762. intersectsImpl(a[0], o[0], r + 1, i, s, n),
  5763. intersectsImpl(a[0], o[1], r + 1, i, s, n),
  5764. intersectsImpl(a[1], o[0], r + 1, i, s, n),
  5765. intersectsImpl(a[1], o[1], r + 1, i, s, n);
  5766. }
  5767. }
  5768. (PolynomialBezier.prototype.intersections = function (e, t, r) {
  5769. t === void 0 && (t = 2), r === void 0 && (r = 7);
  5770. var i = [];
  5771. return (
  5772. intersectsImpl(
  5773. intersectData(this, 0, 1),
  5774. intersectData(e, 0, 1),
  5775. 0,
  5776. t,
  5777. i,
  5778. r
  5779. ),
  5780. i
  5781. );
  5782. }),
  5783. (PolynomialBezier.shapeSegment = function (e, t) {
  5784. var r = (t + 1) % e.length();
  5785. return new PolynomialBezier(e.v[t], e.o[t], e.i[r], e.v[r], !0);
  5786. }),
  5787. (PolynomialBezier.shapeSegmentInverted = function (e, t) {
  5788. var r = (t + 1) % e.length();
  5789. return new PolynomialBezier(e.v[r], e.i[r], e.o[t], e.v[t], !0);
  5790. });
  5791. function crossProduct(e, t) {
  5792. return [
  5793. e[1] * t[2] - e[2] * t[1],
  5794. e[2] * t[0] - e[0] * t[2],
  5795. e[0] * t[1] - e[1] * t[0]
  5796. ];
  5797. }
  5798. function lineIntersection(e, t, r, i) {
  5799. var s = [e[0], e[1], 1],
  5800. n = [t[0], t[1], 1],
  5801. a = [r[0], r[1], 1],
  5802. o = [i[0], i[1], 1],
  5803. l = crossProduct(crossProduct(s, n), crossProduct(a, o));
  5804. return floatZero(l[2]) ? null : [l[0] / l[2], l[1] / l[2]];
  5805. }
  5806. function polarOffset(e, t, r) {
  5807. return [e[0] + Math.cos(t) * r, e[1] - Math.sin(t) * r];
  5808. }
  5809. function pointDistance(e, t) {
  5810. return Math.hypot(e[0] - t[0], e[1] - t[1]);
  5811. }
  5812. function pointEqual(e, t) {
  5813. return floatEqual(e[0], t[0]) && floatEqual(e[1], t[1]);
  5814. }
  5815. function ZigZagModifier() {}
  5816. extendPrototype([ShapeModifier], ZigZagModifier),
  5817. (ZigZagModifier.prototype.initModifierProperties = function (e, t) {
  5818. (this.getValue = this.processKeys),
  5819. (this.amplitude = PropertyFactory.getProp(e, t.s, 0, null, this)),
  5820. (this.frequency = PropertyFactory.getProp(e, t.r, 0, null, this)),
  5821. (this.pointsType = PropertyFactory.getProp(e, t.pt, 0, null, this)),
  5822. (this._isAnimated =
  5823. this.amplitude.effectsSequence.length !== 0 ||
  5824. this.frequency.effectsSequence.length !== 0 ||
  5825. this.pointsType.effectsSequence.length !== 0);
  5826. });
  5827. function setPoint(e, t, r, i, s, n, a) {
  5828. var o = r - Math.PI / 2,
  5829. l = r + Math.PI / 2,
  5830. c = t[0] + Math.cos(r) * i * s,
  5831. g = t[1] - Math.sin(r) * i * s;
  5832. e.setTripleAt(
  5833. c,
  5834. g,
  5835. c + Math.cos(o) * n,
  5836. g - Math.sin(o) * n,
  5837. c + Math.cos(l) * a,
  5838. g - Math.sin(l) * a,
  5839. e.length()
  5840. );
  5841. }
  5842. function getPerpendicularVector(e, t) {
  5843. var r = [t[0] - e[0], t[1] - e[1]],
  5844. i = -Math.PI * 0.5,
  5845. s = [
  5846. Math.cos(i) * r[0] - Math.sin(i) * r[1],
  5847. Math.sin(i) * r[0] + Math.cos(i) * r[1]
  5848. ];
  5849. return s;
  5850. }
  5851. function getProjectingAngle(e, t) {
  5852. var r = t === 0 ? e.length() - 1 : t - 1,
  5853. i = (t + 1) % e.length(),
  5854. s = e.v[r],
  5855. n = e.v[i],
  5856. a = getPerpendicularVector(s, n);
  5857. return Math.atan2(0, 1) - Math.atan2(a[1], a[0]);
  5858. }
  5859. function zigZagCorner(e, t, r, i, s, n, a) {
  5860. var o = getProjectingAngle(t, r),
  5861. l = t.v[r % t._length],
  5862. c = t.v[r === 0 ? t._length - 1 : r - 1],
  5863. g = t.v[(r + 1) % t._length],
  5864. S =
  5865. n === 2
  5866. ? Math.sqrt(Math.pow(l[0] - c[0], 2) + Math.pow(l[1] - c[1], 2))
  5867. : 0,
  5868. p =
  5869. n === 2
  5870. ? Math.sqrt(Math.pow(l[0] - g[0], 2) + Math.pow(l[1] - g[1], 2))
  5871. : 0;
  5872. setPoint(
  5873. e,
  5874. t.v[r % t._length],
  5875. o,
  5876. a,
  5877. i,
  5878. p / ((s + 1) * 2),
  5879. S / ((s + 1) * 2)
  5880. );
  5881. }
  5882. function zigZagSegment(e, t, r, i, s, n) {
  5883. for (var a = 0; a < i; a += 1) {
  5884. var o = (a + 1) / (i + 1),
  5885. l =
  5886. s === 2
  5887. ? Math.sqrt(
  5888. Math.pow(t.points[3][0] - t.points[0][0], 2) +
  5889. Math.pow(t.points[3][1] - t.points[0][1], 2)
  5890. )
  5891. : 0,
  5892. c = t.normalAngle(o),
  5893. g = t.point(o);
  5894. setPoint(e, g, c, n, r, l / ((i + 1) * 2), l / ((i + 1) * 2)),
  5895. (n = -n);
  5896. }
  5897. return n;
  5898. }
  5899. (ZigZagModifier.prototype.processPath = function (e, t, r, i) {
  5900. var s = e._length,
  5901. n = shapePool.newElement();
  5902. if (((n.c = e.c), e.c || (s -= 1), s === 0)) return n;
  5903. var a = -1,
  5904. o = PolynomialBezier.shapeSegment(e, 0);
  5905. zigZagCorner(n, e, 0, t, r, i, a);
  5906. for (var l = 0; l < s; l += 1)
  5907. (a = zigZagSegment(n, o, t, r, i, -a)),
  5908. l === s - 1 && !e.c
  5909. ? (o = null)
  5910. : (o = PolynomialBezier.shapeSegment(e, (l + 1) % s)),
  5911. zigZagCorner(n, e, l + 1, t, r, i, a);
  5912. return n;
  5913. }),
  5914. (ZigZagModifier.prototype.processShapes = function (e) {
  5915. var t,
  5916. r,
  5917. i = this.shapes.length,
  5918. s,
  5919. n,
  5920. a = this.amplitude.v,
  5921. o = Math.max(0, Math.round(this.frequency.v)),
  5922. l = this.pointsType.v;
  5923. if (a !== 0) {
  5924. var c, g;
  5925. for (r = 0; r < i; r += 1) {
  5926. if (
  5927. ((c = this.shapes[r]),
  5928. (g = c.localShapeCollection),
  5929. !(!c.shape._mdf && !this._mdf && !e))
  5930. )
  5931. for (
  5932. g.releaseShapes(),
  5933. c.shape._mdf = !0,
  5934. t = c.shape.paths.shapes,
  5935. n = c.shape.paths._length,
  5936. s = 0;
  5937. s < n;
  5938. s += 1
  5939. )
  5940. g.addShape(this.processPath(t[s], a, o, l));
  5941. c.shape.paths = c.localShapeCollection;
  5942. }
  5943. }
  5944. this.dynamicProperties.length || (this._mdf = !1);
  5945. });
  5946. function linearOffset(e, t, r) {
  5947. var i = Math.atan2(t[0] - e[0], t[1] - e[1]);
  5948. return [polarOffset(e, i, r), polarOffset(t, i, r)];
  5949. }
  5950. function offsetSegment(e, t) {
  5951. var r, i, s, n, a, o, l;
  5952. (l = linearOffset(e.points[0], e.points[1], t)),
  5953. (r = l[0]),
  5954. (i = l[1]),
  5955. (l = linearOffset(e.points[1], e.points[2], t)),
  5956. (s = l[0]),
  5957. (n = l[1]),
  5958. (l = linearOffset(e.points[2], e.points[3], t)),
  5959. (a = l[0]),
  5960. (o = l[1]);
  5961. var c = lineIntersection(r, i, s, n);
  5962. c === null && (c = i);
  5963. var g = lineIntersection(a, o, s, n);
  5964. return g === null && (g = a), new PolynomialBezier(r, c, g, o);
  5965. }
  5966. function joinLines(e, t, r, i, s) {
  5967. var n = t.points[3],
  5968. a = r.points[0];
  5969. if (i === 3 || pointEqual(n, a)) return n;
  5970. if (i === 2) {
  5971. var o = -t.tangentAngle(1),
  5972. l = -r.tangentAngle(0) + Math.PI,
  5973. c = lineIntersection(
  5974. n,
  5975. polarOffset(n, o + Math.PI / 2, 100),
  5976. a,
  5977. polarOffset(a, o + Math.PI / 2, 100)
  5978. ),
  5979. g = c ? pointDistance(c, n) : pointDistance(n, a) / 2,
  5980. S = polarOffset(n, o, 2 * g * roundCorner);
  5981. return (
  5982. e.setXYAt(S[0], S[1], 'o', e.length() - 1),
  5983. (S = polarOffset(a, l, 2 * g * roundCorner)),
  5984. e.setTripleAt(a[0], a[1], a[0], a[1], S[0], S[1], e.length()),
  5985. a
  5986. );
  5987. }
  5988. var p = pointEqual(n, t.points[2]) ? t.points[0] : t.points[2],
  5989. P = pointEqual(a, r.points[1]) ? r.points[3] : r.points[1],
  5990. b = lineIntersection(p, n, a, P);
  5991. return b && pointDistance(b, n) < s
  5992. ? (e.setTripleAt(b[0], b[1], b[0], b[1], b[0], b[1], e.length()), b)
  5993. : n;
  5994. }
  5995. function getIntersection(e, t) {
  5996. var r = e.intersections(t);
  5997. return (
  5998. r.length && floatEqual(r[0][0], 1) && r.shift(),
  5999. r.length ? r[0] : null
  6000. );
  6001. }
  6002. function pruneSegmentIntersection(e, t) {
  6003. var r = e.slice(),
  6004. i = t.slice(),
  6005. s = getIntersection(e[e.length - 1], t[0]);
  6006. return (
  6007. s &&
  6008. ((r[e.length - 1] = e[e.length - 1].split(s[0])[0]),
  6009. (i[0] = t[0].split(s[1])[1])),
  6010. e.length > 1 &&
  6011. t.length > 1 &&
  6012. ((s = getIntersection(e[0], t[t.length - 1])), s)
  6013. ? [[e[0].split(s[0])[0]], [t[t.length - 1].split(s[1])[1]]]
  6014. : [r, i]
  6015. );
  6016. }
  6017. function pruneIntersections(e) {
  6018. for (var t, r = 1; r < e.length; r += 1)
  6019. (t = pruneSegmentIntersection(e[r - 1], e[r])),
  6020. (e[r - 1] = t[0]),
  6021. (e[r] = t[1]);
  6022. return (
  6023. e.length > 1 &&
  6024. ((t = pruneSegmentIntersection(e[e.length - 1], e[0])),
  6025. (e[e.length - 1] = t[0]),
  6026. (e[0] = t[1])),
  6027. e
  6028. );
  6029. }
  6030. function offsetSegmentSplit(e, t) {
  6031. var r = e.inflectionPoints(),
  6032. i,
  6033. s,
  6034. n,
  6035. a;
  6036. if (r.length === 0) return [offsetSegment(e, t)];
  6037. if (r.length === 1 || floatEqual(r[1], 1))
  6038. return (
  6039. (n = e.split(r[0])),
  6040. (i = n[0]),
  6041. (s = n[1]),
  6042. [offsetSegment(i, t), offsetSegment(s, t)]
  6043. );
  6044. (n = e.split(r[0])), (i = n[0]);
  6045. var o = (r[1] - r[0]) / (1 - r[0]);
  6046. return (
  6047. (n = n[1].split(o)),
  6048. (a = n[0]),
  6049. (s = n[1]),
  6050. [offsetSegment(i, t), offsetSegment(a, t), offsetSegment(s, t)]
  6051. );
  6052. }
  6053. function OffsetPathModifier() {}
  6054. extendPrototype([ShapeModifier], OffsetPathModifier),
  6055. (OffsetPathModifier.prototype.initModifierProperties = function (e, t) {
  6056. (this.getValue = this.processKeys),
  6057. (this.amount = PropertyFactory.getProp(e, t.a, 0, null, this)),
  6058. (this.miterLimit = PropertyFactory.getProp(e, t.ml, 0, null, this)),
  6059. (this.lineJoin = t.lj),
  6060. (this._isAnimated = this.amount.effectsSequence.length !== 0);
  6061. }),
  6062. (OffsetPathModifier.prototype.processPath = function (e, t, r, i) {
  6063. var s = shapePool.newElement();
  6064. s.c = e.c;
  6065. var n = e.length();
  6066. e.c || (n -= 1);
  6067. var a,
  6068. o,
  6069. l,
  6070. c = [];
  6071. for (a = 0; a < n; a += 1)
  6072. (l = PolynomialBezier.shapeSegment(e, a)),
  6073. c.push(offsetSegmentSplit(l, t));
  6074. if (!e.c)
  6075. for (a = n - 1; a >= 0; a -= 1)
  6076. (l = PolynomialBezier.shapeSegmentInverted(e, a)),
  6077. c.push(offsetSegmentSplit(l, t));
  6078. c = pruneIntersections(c);
  6079. var g = null,
  6080. S = null;
  6081. for (a = 0; a < c.length; a += 1) {
  6082. var p = c[a];
  6083. for (
  6084. S && (g = joinLines(s, S, p[0], r, i)),
  6085. S = p[p.length - 1],
  6086. o = 0;
  6087. o < p.length;
  6088. o += 1
  6089. )
  6090. (l = p[o]),
  6091. g && pointEqual(l.points[0], g)
  6092. ? s.setXYAt(
  6093. l.points[1][0],
  6094. l.points[1][1],
  6095. 'o',
  6096. s.length() - 1
  6097. )
  6098. : s.setTripleAt(
  6099. l.points[0][0],
  6100. l.points[0][1],
  6101. l.points[1][0],
  6102. l.points[1][1],
  6103. l.points[0][0],
  6104. l.points[0][1],
  6105. s.length()
  6106. ),
  6107. s.setTripleAt(
  6108. l.points[3][0],
  6109. l.points[3][1],
  6110. l.points[3][0],
  6111. l.points[3][1],
  6112. l.points[2][0],
  6113. l.points[2][1],
  6114. s.length()
  6115. ),
  6116. (g = l.points[3]);
  6117. }
  6118. return c.length && joinLines(s, S, c[0][0], r, i), s;
  6119. }),
  6120. (OffsetPathModifier.prototype.processShapes = function (e) {
  6121. var t,
  6122. r,
  6123. i = this.shapes.length,
  6124. s,
  6125. n,
  6126. a = this.amount.v,
  6127. o = this.miterLimit.v,
  6128. l = this.lineJoin;
  6129. if (a !== 0) {
  6130. var c, g;
  6131. for (r = 0; r < i; r += 1) {
  6132. if (
  6133. ((c = this.shapes[r]),
  6134. (g = c.localShapeCollection),
  6135. !(!c.shape._mdf && !this._mdf && !e))
  6136. )
  6137. for (
  6138. g.releaseShapes(),
  6139. c.shape._mdf = !0,
  6140. t = c.shape.paths.shapes,
  6141. n = c.shape.paths._length,
  6142. s = 0;
  6143. s < n;
  6144. s += 1
  6145. )
  6146. g.addShape(this.processPath(t[s], a, l, o));
  6147. c.shape.paths = c.localShapeCollection;
  6148. }
  6149. }
  6150. this.dynamicProperties.length || (this._mdf = !1);
  6151. });
  6152. function getFontProperties(e) {
  6153. for (
  6154. var t = e.fStyle ? e.fStyle.split(' ') : [],
  6155. r = 'normal',
  6156. i = 'normal',
  6157. s = t.length,
  6158. n,
  6159. a = 0;
  6160. a < s;
  6161. a += 1
  6162. )
  6163. switch (((n = t[a].toLowerCase()), n)) {
  6164. case 'italic':
  6165. i = 'italic';
  6166. break;
  6167. case 'bold':
  6168. r = '700';
  6169. break;
  6170. case 'black':
  6171. r = '900';
  6172. break;
  6173. case 'medium':
  6174. r = '500';
  6175. break;
  6176. case 'regular':
  6177. case 'normal':
  6178. r = '400';
  6179. break;
  6180. case 'light':
  6181. case 'thin':
  6182. r = '200';
  6183. break;
  6184. }
  6185. return { style: i, weight: e.fWeight || r };
  6186. }
  6187. var FontManager = (function () {
  6188. var e = 5e3,
  6189. t = { w: 0, size: 0, shapes: [], data: { shapes: [] } },
  6190. r = [];
  6191. r = r.concat([
  6192. 2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368,
  6193. 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
  6194. 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403
  6195. ]);
  6196. var i = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'],
  6197. s = [65039, 8205];
  6198. function n(d) {
  6199. var E = d.split(','),
  6200. T,
  6201. x = E.length,
  6202. _ = [];
  6203. for (T = 0; T < x; T += 1)
  6204. E[T] !== 'sans-serif' && E[T] !== 'monospace' && _.push(E[T]);
  6205. return _.join(',');
  6206. }
  6207. function a(d, E) {
  6208. var T = createTag('span');
  6209. T.setAttribute('aria-hidden', !0), (T.style.fontFamily = E);
  6210. var x = createTag('span');
  6211. (x.innerText = 'giItT1WQy@!-/#'),
  6212. (T.style.position = 'absolute'),
  6213. (T.style.left = '-10000px'),
  6214. (T.style.top = '-10000px'),
  6215. (T.style.fontSize = '300px'),
  6216. (T.style.fontVariant = 'normal'),
  6217. (T.style.fontStyle = 'normal'),
  6218. (T.style.fontWeight = 'normal'),
  6219. (T.style.letterSpacing = '0'),
  6220. T.appendChild(x),
  6221. document.body.appendChild(T);
  6222. var _ = x.offsetWidth;
  6223. return (
  6224. (x.style.fontFamily = n(d) + ', ' + E), { node: x, w: _, parent: T }
  6225. );
  6226. }
  6227. function o() {
  6228. var d,
  6229. E = this.fonts.length,
  6230. T,
  6231. x,
  6232. _ = E;
  6233. for (d = 0; d < E; d += 1)
  6234. this.fonts[d].loaded
  6235. ? (_ -= 1)
  6236. : this.fonts[d].fOrigin === 'n' || this.fonts[d].origin === 0
  6237. ? (this.fonts[d].loaded = !0)
  6238. : ((T = this.fonts[d].monoCase.node),
  6239. (x = this.fonts[d].monoCase.w),
  6240. T.offsetWidth !== x
  6241. ? ((_ -= 1), (this.fonts[d].loaded = !0))
  6242. : ((T = this.fonts[d].sansCase.node),
  6243. (x = this.fonts[d].sansCase.w),
  6244. T.offsetWidth !== x &&
  6245. ((_ -= 1), (this.fonts[d].loaded = !0))),
  6246. this.fonts[d].loaded &&
  6247. (this.fonts[d].sansCase.parent.parentNode.removeChild(
  6248. this.fonts[d].sansCase.parent
  6249. ),
  6250. this.fonts[d].monoCase.parent.parentNode.removeChild(
  6251. this.fonts[d].monoCase.parent
  6252. )));
  6253. _ !== 0 && Date.now() - this.initTime < e
  6254. ? setTimeout(this.checkLoadedFontsBinded, 20)
  6255. : setTimeout(this.setIsLoadedBinded, 10);
  6256. }
  6257. function l(d, E) {
  6258. var T = document.body && E ? 'svg' : 'canvas',
  6259. x,
  6260. _ = getFontProperties(d);
  6261. if (T === 'svg') {
  6262. var I = createNS('text');
  6263. (I.style.fontSize = '100px'),
  6264. I.setAttribute('font-family', d.fFamily),
  6265. I.setAttribute('font-style', _.style),
  6266. I.setAttribute('font-weight', _.weight),
  6267. (I.textContent = '1'),
  6268. d.fClass
  6269. ? ((I.style.fontFamily = 'inherit'),
  6270. I.setAttribute('class', d.fClass))
  6271. : (I.style.fontFamily = d.fFamily),
  6272. E.appendChild(I),
  6273. (x = I);
  6274. } else {
  6275. var V = new OffscreenCanvas(500, 500).getContext('2d');
  6276. (V.font = _.style + ' ' + _.weight + ' 100px ' + d.fFamily),
  6277. (x = V);
  6278. }
  6279. function D(N) {
  6280. return T === 'svg'
  6281. ? ((x.textContent = N), x.getComputedTextLength())
  6282. : x.measureText(N).width;
  6283. }
  6284. return { measureText: D };
  6285. }
  6286. function c(d, E) {
  6287. if (!d) {
  6288. this.isLoaded = !0;
  6289. return;
  6290. }
  6291. if (this.chars) {
  6292. (this.isLoaded = !0), (this.fonts = d.list);
  6293. return;
  6294. }
  6295. if (!document.body) {
  6296. (this.isLoaded = !0),
  6297. d.list.forEach(function (F) {
  6298. (F.helper = l(F)), (F.cache = {});
  6299. }),
  6300. (this.fonts = d.list);
  6301. return;
  6302. }
  6303. var T = d.list,
  6304. x,
  6305. _ = T.length,
  6306. I = _;
  6307. for (x = 0; x < _; x += 1) {
  6308. var V = !0,
  6309. D,
  6310. N;
  6311. if (
  6312. ((T[x].loaded = !1),
  6313. (T[x].monoCase = a(T[x].fFamily, 'monospace')),
  6314. (T[x].sansCase = a(T[x].fFamily, 'sans-serif')),
  6315. !T[x].fPath)
  6316. )
  6317. (T[x].loaded = !0), (I -= 1);
  6318. else if (T[x].fOrigin === 'p' || T[x].origin === 3) {
  6319. if (
  6320. ((D = document.querySelectorAll(
  6321. 'style[f-forigin="p"][f-family="' +
  6322. T[x].fFamily +
  6323. '"], style[f-origin="3"][f-family="' +
  6324. T[x].fFamily +
  6325. '"]'
  6326. )),
  6327. D.length > 0 && (V = !1),
  6328. V)
  6329. ) {
  6330. var $ = createTag('style');
  6331. $.setAttribute('f-forigin', T[x].fOrigin),
  6332. $.setAttribute('f-origin', T[x].origin),
  6333. $.setAttribute('f-family', T[x].fFamily),
  6334. ($.type = 'text/css'),
  6335. ($.innerText =
  6336. '@font-face {font-family: ' +
  6337. T[x].fFamily +
  6338. "; font-style: normal; src: url('" +
  6339. T[x].fPath +
  6340. "');}"),
  6341. E.appendChild($);
  6342. }
  6343. } else if (T[x].fOrigin === 'g' || T[x].origin === 1) {
  6344. for (
  6345. D = document.querySelectorAll(
  6346. 'link[f-forigin="g"], link[f-origin="1"]'
  6347. ),
  6348. N = 0;
  6349. N < D.length;
  6350. N += 1
  6351. )
  6352. D[N].href.indexOf(T[x].fPath) !== -1 && (V = !1);
  6353. if (V) {
  6354. var O = createTag('link');
  6355. O.setAttribute('f-forigin', T[x].fOrigin),
  6356. O.setAttribute('f-origin', T[x].origin),
  6357. (O.type = 'text/css'),
  6358. (O.rel = 'stylesheet'),
  6359. (O.href = T[x].fPath),
  6360. document.body.appendChild(O);
  6361. }
  6362. } else if (T[x].fOrigin === 't' || T[x].origin === 2) {
  6363. for (
  6364. D = document.querySelectorAll(
  6365. 'script[f-forigin="t"], script[f-origin="2"]'
  6366. ),
  6367. N = 0;
  6368. N < D.length;
  6369. N += 1
  6370. )
  6371. T[x].fPath === D[N].src && (V = !1);
  6372. if (V) {
  6373. var B = createTag('link');
  6374. B.setAttribute('f-forigin', T[x].fOrigin),
  6375. B.setAttribute('f-origin', T[x].origin),
  6376. B.setAttribute('rel', 'stylesheet'),
  6377. B.setAttribute('href', T[x].fPath),
  6378. E.appendChild(B);
  6379. }
  6380. }
  6381. (T[x].helper = l(T[x], E)),
  6382. (T[x].cache = {}),
  6383. this.fonts.push(T[x]);
  6384. }
  6385. I === 0
  6386. ? (this.isLoaded = !0)
  6387. : setTimeout(this.checkLoadedFonts.bind(this), 100);
  6388. }
  6389. function g(d) {
  6390. if (d) {
  6391. this.chars || (this.chars = []);
  6392. var E,
  6393. T = d.length,
  6394. x,
  6395. _ = this.chars.length,
  6396. I;
  6397. for (E = 0; E < T; E += 1) {
  6398. for (x = 0, I = !1; x < _; )
  6399. this.chars[x].style === d[E].style &&
  6400. this.chars[x].fFamily === d[E].fFamily &&
  6401. this.chars[x].ch === d[E].ch &&
  6402. (I = !0),
  6403. (x += 1);
  6404. I || (this.chars.push(d[E]), (_ += 1));
  6405. }
  6406. }
  6407. }
  6408. function S(d, E, T) {
  6409. for (var x = 0, _ = this.chars.length; x < _; ) {
  6410. if (
  6411. this.chars[x].ch === d &&
  6412. this.chars[x].style === E &&
  6413. this.chars[x].fFamily === T
  6414. )
  6415. return this.chars[x];
  6416. x += 1;
  6417. }
  6418. return (
  6419. ((typeof d == 'string' && d.charCodeAt(0) !== 13) || !d) &&
  6420. console &&
  6421. console.warn &&
  6422. !this._warned &&
  6423. ((this._warned = !0),
  6424. console.warn(
  6425. 'Missing character from exported characters list: ',
  6426. d,
  6427. E,
  6428. T
  6429. )),
  6430. t
  6431. );
  6432. }
  6433. function p(d, E, T) {
  6434. var x = this.getFontByName(E),
  6435. _ = d.charCodeAt(0);
  6436. if (!x.cache[_ + 1]) {
  6437. var I = x.helper;
  6438. if (d === ' ') {
  6439. var V = I.measureText('|' + d + '|'),
  6440. D = I.measureText('||');
  6441. x.cache[_ + 1] = (V - D) / 100;
  6442. } else x.cache[_ + 1] = I.measureText(d) / 100;
  6443. }
  6444. return x.cache[_ + 1] * T;
  6445. }
  6446. function P(d) {
  6447. for (var E = 0, T = this.fonts.length; E < T; ) {
  6448. if (this.fonts[E].fName === d) return this.fonts[E];
  6449. E += 1;
  6450. }
  6451. return this.fonts[0];
  6452. }
  6453. function b(d, E) {
  6454. var T = d.toString(16) + E.toString(16);
  6455. return i.indexOf(T) !== -1;
  6456. }
  6457. function y(d, E) {
  6458. return E ? d === s[0] && E === s[1] : d === s[1];
  6459. }
  6460. function A(d) {
  6461. return r.indexOf(d) !== -1;
  6462. }
  6463. function u() {
  6464. this.isLoaded = !0;
  6465. }
  6466. var f = function () {
  6467. (this.fonts = []),
  6468. (this.chars = null),
  6469. (this.typekitLoaded = 0),
  6470. (this.isLoaded = !1),
  6471. (this._warned = !1),
  6472. (this.initTime = Date.now()),
  6473. (this.setIsLoadedBinded = this.setIsLoaded.bind(this)),
  6474. (this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this));
  6475. };
  6476. (f.isModifier = b),
  6477. (f.isZeroWidthJoiner = y),
  6478. (f.isCombinedCharacter = A);
  6479. var m = {
  6480. addChars: g,
  6481. addFonts: c,
  6482. getCharData: S,
  6483. getFontByName: P,
  6484. measureText: p,
  6485. checkLoadedFonts: o,
  6486. setIsLoaded: u
  6487. };
  6488. return (f.prototype = m), f;
  6489. })();
  6490. function SlotManager(e) {
  6491. this.animationData = e;
  6492. }
  6493. SlotManager.prototype.getProp = function (e) {
  6494. return this.animationData.slots && this.animationData.slots[e.sid]
  6495. ? Object.assign(e, this.animationData.slots[e.sid].p)
  6496. : e;
  6497. };
  6498. function slotFactory(e) {
  6499. return new SlotManager(e);
  6500. }
  6501. function RenderableElement() {}
  6502. RenderableElement.prototype = {
  6503. initRenderable: function () {
  6504. (this.isInRange = !1),
  6505. (this.hidden = !1),
  6506. (this.isTransparent = !1),
  6507. (this.renderableComponents = []);
  6508. },
  6509. addRenderableComponent: function (t) {
  6510. this.renderableComponents.indexOf(t) === -1 &&
  6511. this.renderableComponents.push(t);
  6512. },
  6513. removeRenderableComponent: function (t) {
  6514. this.renderableComponents.indexOf(t) !== -1 &&
  6515. this.renderableComponents.splice(
  6516. this.renderableComponents.indexOf(t),
  6517. 1
  6518. );
  6519. },
  6520. prepareRenderableFrame: function (t) {
  6521. this.checkLayerLimits(t);
  6522. },
  6523. checkTransparency: function () {
  6524. this.finalTransform.mProp.o.v <= 0
  6525. ? !this.isTransparent &&
  6526. this.globalData.renderConfig.hideOnTransparent &&
  6527. ((this.isTransparent = !0), this.hide())
  6528. : this.isTransparent && ((this.isTransparent = !1), this.show());
  6529. },
  6530. checkLayerLimits: function (t) {
  6531. this.data.ip - this.data.st <= t && this.data.op - this.data.st > t
  6532. ? this.isInRange !== !0 &&
  6533. ((this.globalData._mdf = !0),
  6534. (this._mdf = !0),
  6535. (this.isInRange = !0),
  6536. this.show())
  6537. : this.isInRange !== !1 &&
  6538. ((this.globalData._mdf = !0), (this.isInRange = !1), this.hide());
  6539. },
  6540. renderRenderable: function () {
  6541. var t,
  6542. r = this.renderableComponents.length;
  6543. for (t = 0; t < r; t += 1)
  6544. this.renderableComponents[t].renderFrame(this._isFirstFrame);
  6545. },
  6546. sourceRectAtTime: function () {
  6547. return { top: 0, left: 0, width: 100, height: 100 };
  6548. },
  6549. getLayerSize: function () {
  6550. return this.data.ty === 5
  6551. ? { w: this.data.textData.width, h: this.data.textData.height }
  6552. : { w: this.data.width, h: this.data.height };
  6553. }
  6554. };
  6555. var getBlendMode = (function () {
  6556. var e = {
  6557. 0: 'source-over',
  6558. 1: 'multiply',
  6559. 2: 'screen',
  6560. 3: 'overlay',
  6561. 4: 'darken',
  6562. 5: 'lighten',
  6563. 6: 'color-dodge',
  6564. 7: 'color-burn',
  6565. 8: 'hard-light',
  6566. 9: 'soft-light',
  6567. 10: 'difference',
  6568. 11: 'exclusion',
  6569. 12: 'hue',
  6570. 13: 'saturation',
  6571. 14: 'color',
  6572. 15: 'luminosity'
  6573. };
  6574. return function (t) {
  6575. return e[t] || '';
  6576. };
  6577. })();
  6578. function SliderEffect(e, t, r) {
  6579. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  6580. }
  6581. function AngleEffect(e, t, r) {
  6582. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  6583. }
  6584. function ColorEffect(e, t, r) {
  6585. this.p = PropertyFactory.getProp(t, e.v, 1, 0, r);
  6586. }
  6587. function PointEffect(e, t, r) {
  6588. this.p = PropertyFactory.getProp(t, e.v, 1, 0, r);
  6589. }
  6590. function LayerIndexEffect(e, t, r) {
  6591. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  6592. }
  6593. function MaskIndexEffect(e, t, r) {
  6594. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  6595. }
  6596. function CheckboxEffect(e, t, r) {
  6597. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  6598. }
  6599. function NoValueEffect() {
  6600. this.p = {};
  6601. }
  6602. function EffectsManager(e, t) {
  6603. var r = e.ef || [];
  6604. this.effectElements = [];
  6605. var i,
  6606. s = r.length,
  6607. n;
  6608. for (i = 0; i < s; i += 1)
  6609. (n = new GroupEffect(r[i], t)), this.effectElements.push(n);
  6610. }
  6611. function GroupEffect(e, t) {
  6612. this.init(e, t);
  6613. }
  6614. extendPrototype([DynamicPropertyContainer], GroupEffect),
  6615. (GroupEffect.prototype.getValue =
  6616. GroupEffect.prototype.iterateDynamicProperties),
  6617. (GroupEffect.prototype.init = function (e, t) {
  6618. (this.data = e),
  6619. (this.effectElements = []),
  6620. this.initDynamicPropertyContainer(t);
  6621. var r,
  6622. i = this.data.ef.length,
  6623. s,
  6624. n = this.data.ef;
  6625. for (r = 0; r < i; r += 1) {
  6626. switch (((s = null), n[r].ty)) {
  6627. case 0:
  6628. s = new SliderEffect(n[r], t, this);
  6629. break;
  6630. case 1:
  6631. s = new AngleEffect(n[r], t, this);
  6632. break;
  6633. case 2:
  6634. s = new ColorEffect(n[r], t, this);
  6635. break;
  6636. case 3:
  6637. s = new PointEffect(n[r], t, this);
  6638. break;
  6639. case 4:
  6640. case 7:
  6641. s = new CheckboxEffect(n[r], t, this);
  6642. break;
  6643. case 10:
  6644. s = new LayerIndexEffect(n[r], t, this);
  6645. break;
  6646. case 11:
  6647. s = new MaskIndexEffect(n[r], t, this);
  6648. break;
  6649. case 5:
  6650. s = new EffectsManager(n[r], t);
  6651. break;
  6652. default:
  6653. s = new NoValueEffect(n[r]);
  6654. break;
  6655. }
  6656. s && this.effectElements.push(s);
  6657. }
  6658. });
  6659. function BaseElement() {}
  6660. BaseElement.prototype = {
  6661. checkMasks: function () {
  6662. if (!this.data.hasMask) return !1;
  6663. for (var t = 0, r = this.data.masksProperties.length; t < r; ) {
  6664. if (
  6665. this.data.masksProperties[t].mode !== 'n' &&
  6666. this.data.masksProperties[t].cl !== !1
  6667. )
  6668. return !0;
  6669. t += 1;
  6670. }
  6671. return !1;
  6672. },
  6673. initExpressions: function () {
  6674. var t = getExpressionInterfaces();
  6675. if (t) {
  6676. var r = t('layer'),
  6677. i = t('effects'),
  6678. s = t('shape'),
  6679. n = t('text'),
  6680. a = t('comp');
  6681. (this.layerInterface = r(this)),
  6682. this.data.hasMask &&
  6683. this.maskManager &&
  6684. this.layerInterface.registerMaskInterface(this.maskManager);
  6685. var o = i.createEffectsInterface(this, this.layerInterface);
  6686. this.layerInterface.registerEffectsInterface(o),
  6687. this.data.ty === 0 || this.data.xt
  6688. ? (this.compInterface = a(this))
  6689. : this.data.ty === 4
  6690. ? ((this.layerInterface.shapeInterface = s(
  6691. this.shapesData,
  6692. this.itemsData,
  6693. this.layerInterface
  6694. )),
  6695. (this.layerInterface.content =
  6696. this.layerInterface.shapeInterface))
  6697. : this.data.ty === 5 &&
  6698. ((this.layerInterface.textInterface = n(this)),
  6699. (this.layerInterface.text =
  6700. this.layerInterface.textInterface));
  6701. }
  6702. },
  6703. setBlendMode: function () {
  6704. var t = getBlendMode(this.data.bm),
  6705. r = this.baseElement || this.layerElement;
  6706. r.style['mix-blend-mode'] = t;
  6707. },
  6708. initBaseData: function (t, r, i) {
  6709. (this.globalData = r),
  6710. (this.comp = i),
  6711. (this.data = t),
  6712. (this.layerId = createElementID()),
  6713. this.data.sr || (this.data.sr = 1),
  6714. (this.effectsManager = new EffectsManager(
  6715. this.data,
  6716. this,
  6717. this.dynamicProperties
  6718. ));
  6719. },
  6720. getType: function () {
  6721. return this.type;
  6722. },
  6723. sourceRectAtTime: function () {}
  6724. };
  6725. function FrameElement() {}
  6726. FrameElement.prototype = {
  6727. initFrame: function () {
  6728. (this._isFirstFrame = !1),
  6729. (this.dynamicProperties = []),
  6730. (this._mdf = !1);
  6731. },
  6732. prepareProperties: function (t, r) {
  6733. var i,
  6734. s = this.dynamicProperties.length;
  6735. for (i = 0; i < s; i += 1)
  6736. (r ||
  6737. (this._isParent &&
  6738. this.dynamicProperties[i].propType === 'transform')) &&
  6739. (this.dynamicProperties[i].getValue(),
  6740. this.dynamicProperties[i]._mdf &&
  6741. ((this.globalData._mdf = !0), (this._mdf = !0)));
  6742. },
  6743. addDynamicProperty: function (t) {
  6744. this.dynamicProperties.indexOf(t) === -1 &&
  6745. this.dynamicProperties.push(t);
  6746. }
  6747. };
  6748. function FootageElement(e, t, r) {
  6749. this.initFrame(),
  6750. this.initRenderable(),
  6751. (this.assetData = t.getAssetData(e.refId)),
  6752. (this.footageData = t.imageLoader.getAsset(this.assetData)),
  6753. this.initBaseData(e, t, r);
  6754. }
  6755. (FootageElement.prototype.prepareFrame = function () {}),
  6756. extendPrototype(
  6757. [RenderableElement, BaseElement, FrameElement],
  6758. FootageElement
  6759. ),
  6760. (FootageElement.prototype.getBaseElement = function () {
  6761. return null;
  6762. }),
  6763. (FootageElement.prototype.renderFrame = function () {}),
  6764. (FootageElement.prototype.destroy = function () {}),
  6765. (FootageElement.prototype.initExpressions = function () {
  6766. var e = getExpressionInterfaces();
  6767. if (e) {
  6768. var t = e('footage');
  6769. this.layerInterface = t(this);
  6770. }
  6771. }),
  6772. (FootageElement.prototype.getFootageData = function () {
  6773. return this.footageData;
  6774. });
  6775. function AudioElement(e, t, r) {
  6776. this.initFrame(),
  6777. this.initRenderable(),
  6778. (this.assetData = t.getAssetData(e.refId)),
  6779. this.initBaseData(e, t, r),
  6780. (this._isPlaying = !1),
  6781. (this._canPlay = !1);
  6782. var i = this.globalData.getAssetsPath(this.assetData);
  6783. (this.audio = this.globalData.audioController.createAudio(i)),
  6784. (this._currentTime = 0),
  6785. this.globalData.audioController.addAudio(this),
  6786. (this._volumeMultiplier = 1),
  6787. (this._volume = 1),
  6788. (this._previousVolume = null),
  6789. (this.tm = e.tm
  6790. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  6791. : { _placeholder: !0 }),
  6792. (this.lv = PropertyFactory.getProp(
  6793. this,
  6794. e.au && e.au.lv ? e.au.lv : { k: [100] },
  6795. 1,
  6796. 0.01,
  6797. this
  6798. ));
  6799. }
  6800. (AudioElement.prototype.prepareFrame = function (e) {
  6801. if (
  6802. (this.prepareRenderableFrame(e, !0),
  6803. this.prepareProperties(e, !0),
  6804. this.tm._placeholder)
  6805. )
  6806. this._currentTime = e / this.data.sr;
  6807. else {
  6808. var t = this.tm.v;
  6809. this._currentTime = t;
  6810. }
  6811. this._volume = this.lv.v[0];
  6812. var r = this._volume * this._volumeMultiplier;
  6813. this._previousVolume !== r &&
  6814. ((this._previousVolume = r), this.audio.volume(r));
  6815. }),
  6816. extendPrototype(
  6817. [RenderableElement, BaseElement, FrameElement],
  6818. AudioElement
  6819. ),
  6820. (AudioElement.prototype.renderFrame = function () {
  6821. this.isInRange &&
  6822. this._canPlay &&
  6823. (this._isPlaying
  6824. ? (!this.audio.playing() ||
  6825. Math.abs(
  6826. this._currentTime / this.globalData.frameRate -
  6827. this.audio.seek()
  6828. ) > 0.1) &&
  6829. this.audio.seek(this._currentTime / this.globalData.frameRate)
  6830. : (this.audio.play(),
  6831. this.audio.seek(this._currentTime / this.globalData.frameRate),
  6832. (this._isPlaying = !0)));
  6833. }),
  6834. (AudioElement.prototype.show = function () {}),
  6835. (AudioElement.prototype.hide = function () {
  6836. this.audio.pause(), (this._isPlaying = !1);
  6837. }),
  6838. (AudioElement.prototype.pause = function () {
  6839. this.audio.pause(), (this._isPlaying = !1), (this._canPlay = !1);
  6840. }),
  6841. (AudioElement.prototype.resume = function () {
  6842. this._canPlay = !0;
  6843. }),
  6844. (AudioElement.prototype.setRate = function (e) {
  6845. this.audio.rate(e);
  6846. }),
  6847. (AudioElement.prototype.volume = function (e) {
  6848. (this._volumeMultiplier = e),
  6849. (this._previousVolume = e * this._volume),
  6850. this.audio.volume(this._previousVolume);
  6851. }),
  6852. (AudioElement.prototype.getBaseElement = function () {
  6853. return null;
  6854. }),
  6855. (AudioElement.prototype.destroy = function () {}),
  6856. (AudioElement.prototype.sourceRectAtTime = function () {}),
  6857. (AudioElement.prototype.initExpressions = function () {});
  6858. function BaseRenderer() {}
  6859. (BaseRenderer.prototype.checkLayers = function (e) {
  6860. var t,
  6861. r = this.layers.length,
  6862. i;
  6863. for (this.completeLayers = !0, t = r - 1; t >= 0; t -= 1)
  6864. this.elements[t] ||
  6865. ((i = this.layers[t]),
  6866. i.ip - i.st <= e - this.layers[t].st &&
  6867. i.op - i.st > e - this.layers[t].st &&
  6868. this.buildItem(t)),
  6869. (this.completeLayers = this.elements[t] ? this.completeLayers : !1);
  6870. this.checkPendingElements();
  6871. }),
  6872. (BaseRenderer.prototype.createItem = function (e) {
  6873. switch (e.ty) {
  6874. case 2:
  6875. return this.createImage(e);
  6876. case 0:
  6877. return this.createComp(e);
  6878. case 1:
  6879. return this.createSolid(e);
  6880. case 3:
  6881. return this.createNull(e);
  6882. case 4:
  6883. return this.createShape(e);
  6884. case 5:
  6885. return this.createText(e);
  6886. case 6:
  6887. return this.createAudio(e);
  6888. case 13:
  6889. return this.createCamera(e);
  6890. case 15:
  6891. return this.createFootage(e);
  6892. default:
  6893. return this.createNull(e);
  6894. }
  6895. }),
  6896. (BaseRenderer.prototype.createCamera = function () {
  6897. throw new Error("You're using a 3d camera. Try the html renderer.");
  6898. }),
  6899. (BaseRenderer.prototype.createAudio = function (e) {
  6900. return new AudioElement(e, this.globalData, this);
  6901. }),
  6902. (BaseRenderer.prototype.createFootage = function (e) {
  6903. return new FootageElement(e, this.globalData, this);
  6904. }),
  6905. (BaseRenderer.prototype.buildAllItems = function () {
  6906. var e,
  6907. t = this.layers.length;
  6908. for (e = 0; e < t; e += 1) this.buildItem(e);
  6909. this.checkPendingElements();
  6910. }),
  6911. (BaseRenderer.prototype.includeLayers = function (e) {
  6912. this.completeLayers = !1;
  6913. var t,
  6914. r = e.length,
  6915. i,
  6916. s = this.layers.length;
  6917. for (t = 0; t < r; t += 1)
  6918. for (i = 0; i < s; ) {
  6919. if (this.layers[i].id === e[t].id) {
  6920. this.layers[i] = e[t];
  6921. break;
  6922. }
  6923. i += 1;
  6924. }
  6925. }),
  6926. (BaseRenderer.prototype.setProjectInterface = function (e) {
  6927. this.globalData.projectInterface = e;
  6928. }),
  6929. (BaseRenderer.prototype.initItems = function () {
  6930. this.globalData.progressiveLoad || this.buildAllItems();
  6931. }),
  6932. (BaseRenderer.prototype.buildElementParenting = function (e, t, r) {
  6933. for (
  6934. var i = this.elements, s = this.layers, n = 0, a = s.length;
  6935. n < a;
  6936. )
  6937. s[n].ind == t &&
  6938. (!i[n] || i[n] === !0
  6939. ? (this.buildItem(n), this.addPendingElement(e))
  6940. : (r.push(i[n]),
  6941. i[n].setAsParent(),
  6942. s[n].parent !== void 0
  6943. ? this.buildElementParenting(e, s[n].parent, r)
  6944. : e.setHierarchy(r))),
  6945. (n += 1);
  6946. }),
  6947. (BaseRenderer.prototype.addPendingElement = function (e) {
  6948. this.pendingElements.push(e);
  6949. }),
  6950. (BaseRenderer.prototype.searchExtraCompositions = function (e) {
  6951. var t,
  6952. r = e.length;
  6953. for (t = 0; t < r; t += 1)
  6954. if (e[t].xt) {
  6955. var i = this.createComp(e[t]);
  6956. i.initExpressions(),
  6957. this.globalData.projectInterface.registerComposition(i);
  6958. }
  6959. }),
  6960. (BaseRenderer.prototype.getElementById = function (e) {
  6961. var t,
  6962. r = this.elements.length;
  6963. for (t = 0; t < r; t += 1)
  6964. if (this.elements[t].data.ind === e) return this.elements[t];
  6965. return null;
  6966. }),
  6967. (BaseRenderer.prototype.getElementByPath = function (e) {
  6968. var t = e.shift(),
  6969. r;
  6970. if (typeof t == 'number') r = this.elements[t];
  6971. else {
  6972. var i,
  6973. s = this.elements.length;
  6974. for (i = 0; i < s; i += 1)
  6975. if (this.elements[i].data.nm === t) {
  6976. r = this.elements[i];
  6977. break;
  6978. }
  6979. }
  6980. return e.length === 0 ? r : r.getElementByPath(e);
  6981. }),
  6982. (BaseRenderer.prototype.setupGlobalData = function (e, t) {
  6983. (this.globalData.fontManager = new FontManager()),
  6984. (this.globalData.slotManager = slotFactory(e)),
  6985. this.globalData.fontManager.addChars(e.chars),
  6986. this.globalData.fontManager.addFonts(e.fonts, t),
  6987. (this.globalData.getAssetData =
  6988. this.animationItem.getAssetData.bind(this.animationItem)),
  6989. (this.globalData.getAssetsPath =
  6990. this.animationItem.getAssetsPath.bind(this.animationItem)),
  6991. (this.globalData.imageLoader = this.animationItem.imagePreloader),
  6992. (this.globalData.audioController =
  6993. this.animationItem.audioController),
  6994. (this.globalData.frameId = 0),
  6995. (this.globalData.frameRate = e.fr),
  6996. (this.globalData.nm = e.nm),
  6997. (this.globalData.compSize = { w: e.w, h: e.h });
  6998. });
  6999. function TransformElement() {}
  7000. TransformElement.prototype = {
  7001. initTransform: function () {
  7002. (this.finalTransform = {
  7003. mProp: this.data.ks
  7004. ? TransformPropertyFactory.getTransformProperty(
  7005. this,
  7006. this.data.ks,
  7007. this
  7008. )
  7009. : { o: 0 },
  7010. _matMdf: !1,
  7011. _opMdf: !1,
  7012. mat: new Matrix()
  7013. }),
  7014. this.data.ao && (this.finalTransform.mProp.autoOriented = !0),
  7015. this.data.ty;
  7016. },
  7017. renderTransform: function () {
  7018. if (
  7019. ((this.finalTransform._opMdf =
  7020. this.finalTransform.mProp.o._mdf || this._isFirstFrame),
  7021. (this.finalTransform._matMdf =
  7022. this.finalTransform.mProp._mdf || this._isFirstFrame),
  7023. this.hierarchy)
  7024. ) {
  7025. var t,
  7026. r = this.finalTransform.mat,
  7027. i = 0,
  7028. s = this.hierarchy.length;
  7029. if (!this.finalTransform._matMdf)
  7030. for (; i < s; ) {
  7031. if (this.hierarchy[i].finalTransform.mProp._mdf) {
  7032. this.finalTransform._matMdf = !0;
  7033. break;
  7034. }
  7035. i += 1;
  7036. }
  7037. if (this.finalTransform._matMdf)
  7038. for (
  7039. t = this.finalTransform.mProp.v.props,
  7040. r.cloneFromProps(t),
  7041. i = 0;
  7042. i < s;
  7043. i += 1
  7044. )
  7045. (t = this.hierarchy[i].finalTransform.mProp.v.props),
  7046. r.transform(
  7047. t[0],
  7048. t[1],
  7049. t[2],
  7050. t[3],
  7051. t[4],
  7052. t[5],
  7053. t[6],
  7054. t[7],
  7055. t[8],
  7056. t[9],
  7057. t[10],
  7058. t[11],
  7059. t[12],
  7060. t[13],
  7061. t[14],
  7062. t[15]
  7063. );
  7064. }
  7065. },
  7066. globalToLocal: function (t) {
  7067. var r = [];
  7068. r.push(this.finalTransform);
  7069. for (var i = !0, s = this.comp; i; )
  7070. s.finalTransform
  7071. ? (s.data.hasMask && r.splice(0, 0, s.finalTransform),
  7072. (s = s.comp))
  7073. : (i = !1);
  7074. var n,
  7075. a = r.length,
  7076. o;
  7077. for (n = 0; n < a; n += 1)
  7078. (o = r[n].mat.applyToPointArray(0, 0, 0)),
  7079. (t = [t[0] - o[0], t[1] - o[1], 0]);
  7080. return t;
  7081. },
  7082. mHelper: new Matrix()
  7083. };
  7084. function MaskElement(e, t, r) {
  7085. (this.data = e),
  7086. (this.element = t),
  7087. (this.globalData = r),
  7088. (this.storedData = []),
  7089. (this.masksProperties = this.data.masksProperties || []),
  7090. (this.maskElement = null);
  7091. var i = this.globalData.defs,
  7092. s,
  7093. n = this.masksProperties ? this.masksProperties.length : 0;
  7094. (this.viewData = createSizedArray(n)), (this.solidPath = '');
  7095. var a,
  7096. o = this.masksProperties,
  7097. l = 0,
  7098. c = [],
  7099. g,
  7100. S,
  7101. p = createElementID(),
  7102. P,
  7103. b,
  7104. y,
  7105. A,
  7106. u = 'clipPath',
  7107. f = 'clip-path';
  7108. for (s = 0; s < n; s += 1)
  7109. if (
  7110. (((o[s].mode !== 'a' && o[s].mode !== 'n') ||
  7111. o[s].inv ||
  7112. o[s].o.k !== 100 ||
  7113. o[s].o.x) &&
  7114. ((u = 'mask'), (f = 'mask')),
  7115. (o[s].mode === 's' || o[s].mode === 'i') && l === 0
  7116. ? ((P = createNS('rect')),
  7117. P.setAttribute('fill', '#ffffff'),
  7118. P.setAttribute('width', this.element.comp.data.w || 0),
  7119. P.setAttribute('height', this.element.comp.data.h || 0),
  7120. c.push(P))
  7121. : (P = null),
  7122. (a = createNS('path')),
  7123. o[s].mode === 'n')
  7124. )
  7125. (this.viewData[s] = {
  7126. op: PropertyFactory.getProp(
  7127. this.element,
  7128. o[s].o,
  7129. 0,
  7130. 0.01,
  7131. this.element
  7132. ),
  7133. prop: ShapePropertyFactory.getShapeProp(this.element, o[s], 3),
  7134. elem: a,
  7135. lastPath: ''
  7136. }),
  7137. i.appendChild(a);
  7138. else {
  7139. (l += 1),
  7140. a.setAttribute('fill', o[s].mode === 's' ? '#000000' : '#ffffff'),
  7141. a.setAttribute('clip-rule', 'nonzero');
  7142. var m;
  7143. if (
  7144. (o[s].x.k !== 0
  7145. ? ((u = 'mask'),
  7146. (f = 'mask'),
  7147. (A = PropertyFactory.getProp(
  7148. this.element,
  7149. o[s].x,
  7150. 0,
  7151. null,
  7152. this.element
  7153. )),
  7154. (m = createElementID()),
  7155. (b = createNS('filter')),
  7156. b.setAttribute('id', m),
  7157. (y = createNS('feMorphology')),
  7158. y.setAttribute('operator', 'erode'),
  7159. y.setAttribute('in', 'SourceGraphic'),
  7160. y.setAttribute('radius', '0'),
  7161. b.appendChild(y),
  7162. i.appendChild(b),
  7163. a.setAttribute(
  7164. 'stroke',
  7165. o[s].mode === 's' ? '#000000' : '#ffffff'
  7166. ))
  7167. : ((y = null), (A = null)),
  7168. (this.storedData[s] = {
  7169. elem: a,
  7170. x: A,
  7171. expan: y,
  7172. lastPath: '',
  7173. lastOperator: '',
  7174. filterId: m,
  7175. lastRadius: 0
  7176. }),
  7177. o[s].mode === 'i')
  7178. ) {
  7179. S = c.length;
  7180. var d = createNS('g');
  7181. for (g = 0; g < S; g += 1) d.appendChild(c[g]);
  7182. var E = createNS('mask');
  7183. E.setAttribute('mask-type', 'alpha'),
  7184. E.setAttribute('id', p + '_' + l),
  7185. E.appendChild(a),
  7186. i.appendChild(E),
  7187. d.setAttribute(
  7188. 'mask',
  7189. 'url(' + getLocationHref() + '#' + p + '_' + l + ')'
  7190. ),
  7191. (c.length = 0),
  7192. c.push(d);
  7193. } else c.push(a);
  7194. o[s].inv &&
  7195. !this.solidPath &&
  7196. (this.solidPath = this.createLayerSolidPath()),
  7197. (this.viewData[s] = {
  7198. elem: a,
  7199. lastPath: '',
  7200. op: PropertyFactory.getProp(
  7201. this.element,
  7202. o[s].o,
  7203. 0,
  7204. 0.01,
  7205. this.element
  7206. ),
  7207. prop: ShapePropertyFactory.getShapeProp(this.element, o[s], 3),
  7208. invRect: P
  7209. }),
  7210. this.viewData[s].prop.k ||
  7211. this.drawPath(o[s], this.viewData[s].prop.v, this.viewData[s]);
  7212. }
  7213. for (this.maskElement = createNS(u), n = c.length, s = 0; s < n; s += 1)
  7214. this.maskElement.appendChild(c[s]);
  7215. l > 0 &&
  7216. (this.maskElement.setAttribute('id', p),
  7217. this.element.maskedElement.setAttribute(
  7218. f,
  7219. 'url(' + getLocationHref() + '#' + p + ')'
  7220. ),
  7221. i.appendChild(this.maskElement)),
  7222. this.viewData.length && this.element.addRenderableComponent(this);
  7223. }
  7224. (MaskElement.prototype.getMaskProperty = function (e) {
  7225. return this.viewData[e].prop;
  7226. }),
  7227. (MaskElement.prototype.renderFrame = function (e) {
  7228. var t = this.element.finalTransform.mat,
  7229. r,
  7230. i = this.masksProperties.length;
  7231. for (r = 0; r < i; r += 1)
  7232. if (
  7233. ((this.viewData[r].prop._mdf || e) &&
  7234. this.drawPath(
  7235. this.masksProperties[r],
  7236. this.viewData[r].prop.v,
  7237. this.viewData[r]
  7238. ),
  7239. (this.viewData[r].op._mdf || e) &&
  7240. this.viewData[r].elem.setAttribute(
  7241. 'fill-opacity',
  7242. this.viewData[r].op.v
  7243. ),
  7244. this.masksProperties[r].mode !== 'n' &&
  7245. (this.viewData[r].invRect &&
  7246. (this.element.finalTransform.mProp._mdf || e) &&
  7247. this.viewData[r].invRect.setAttribute(
  7248. 'transform',
  7249. t.getInverseMatrix().to2dCSS()
  7250. ),
  7251. this.storedData[r].x && (this.storedData[r].x._mdf || e)))
  7252. ) {
  7253. var s = this.storedData[r].expan;
  7254. this.storedData[r].x.v < 0
  7255. ? (this.storedData[r].lastOperator !== 'erode' &&
  7256. ((this.storedData[r].lastOperator = 'erode'),
  7257. this.storedData[r].elem.setAttribute(
  7258. 'filter',
  7259. 'url(' +
  7260. getLocationHref() +
  7261. '#' +
  7262. this.storedData[r].filterId +
  7263. ')'
  7264. )),
  7265. s.setAttribute('radius', -this.storedData[r].x.v))
  7266. : (this.storedData[r].lastOperator !== 'dilate' &&
  7267. ((this.storedData[r].lastOperator = 'dilate'),
  7268. this.storedData[r].elem.setAttribute('filter', null)),
  7269. this.storedData[r].elem.setAttribute(
  7270. 'stroke-width',
  7271. this.storedData[r].x.v * 2
  7272. ));
  7273. }
  7274. }),
  7275. (MaskElement.prototype.getMaskelement = function () {
  7276. return this.maskElement;
  7277. }),
  7278. (MaskElement.prototype.createLayerSolidPath = function () {
  7279. var e = 'M0,0 ';
  7280. return (
  7281. (e += ' h' + this.globalData.compSize.w),
  7282. (e += ' v' + this.globalData.compSize.h),
  7283. (e += ' h-' + this.globalData.compSize.w),
  7284. (e += ' v-' + this.globalData.compSize.h + ' '),
  7285. e
  7286. );
  7287. }),
  7288. (MaskElement.prototype.drawPath = function (e, t, r) {
  7289. var i = ' M' + t.v[0][0] + ',' + t.v[0][1],
  7290. s,
  7291. n;
  7292. for (n = t._length, s = 1; s < n; s += 1)
  7293. i +=
  7294. ' C' +
  7295. t.o[s - 1][0] +
  7296. ',' +
  7297. t.o[s - 1][1] +
  7298. ' ' +
  7299. t.i[s][0] +
  7300. ',' +
  7301. t.i[s][1] +
  7302. ' ' +
  7303. t.v[s][0] +
  7304. ',' +
  7305. t.v[s][1];
  7306. if (
  7307. (t.c &&
  7308. n > 1 &&
  7309. (i +=
  7310. ' C' +
  7311. t.o[s - 1][0] +
  7312. ',' +
  7313. t.o[s - 1][1] +
  7314. ' ' +
  7315. t.i[0][0] +
  7316. ',' +
  7317. t.i[0][1] +
  7318. ' ' +
  7319. t.v[0][0] +
  7320. ',' +
  7321. t.v[0][1]),
  7322. r.lastPath !== i)
  7323. ) {
  7324. var a = '';
  7325. r.elem &&
  7326. (t.c && (a = e.inv ? this.solidPath + i : i),
  7327. r.elem.setAttribute('d', a)),
  7328. (r.lastPath = i);
  7329. }
  7330. }),
  7331. (MaskElement.prototype.destroy = function () {
  7332. (this.element = null),
  7333. (this.globalData = null),
  7334. (this.maskElement = null),
  7335. (this.data = null),
  7336. (this.masksProperties = null);
  7337. });
  7338. var filtersFactory = (function () {
  7339. var e = {};
  7340. (e.createFilter = t), (e.createAlphaToLuminanceFilter = r);
  7341. function t(i, s) {
  7342. var n = createNS('filter');
  7343. return (
  7344. n.setAttribute('id', i),
  7345. s !== !0 &&
  7346. (n.setAttribute('filterUnits', 'objectBoundingBox'),
  7347. n.setAttribute('x', '0%'),
  7348. n.setAttribute('y', '0%'),
  7349. n.setAttribute('width', '100%'),
  7350. n.setAttribute('height', '100%')),
  7351. n
  7352. );
  7353. }
  7354. function r() {
  7355. var i = createNS('feColorMatrix');
  7356. return (
  7357. i.setAttribute('type', 'matrix'),
  7358. i.setAttribute('color-interpolation-filters', 'sRGB'),
  7359. i.setAttribute(
  7360. 'values',
  7361. '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1'
  7362. ),
  7363. i
  7364. );
  7365. }
  7366. return e;
  7367. })(),
  7368. featureSupport = (function () {
  7369. var e = {
  7370. maskType: !0,
  7371. svgLumaHidden: !0,
  7372. offscreenCanvas: typeof OffscreenCanvas < 'u'
  7373. };
  7374. return (
  7375. (/MSIE 10/i.test(navigator.userAgent) ||
  7376. /MSIE 9/i.test(navigator.userAgent) ||
  7377. /rv:11.0/i.test(navigator.userAgent) ||
  7378. /Edge\/\d./i.test(navigator.userAgent)) &&
  7379. (e.maskType = !1),
  7380. /firefox/i.test(navigator.userAgent) && (e.svgLumaHidden = !1),
  7381. e
  7382. );
  7383. })(),
  7384. registeredEffects = {},
  7385. idPrefix = 'filter_result_';
  7386. function SVGEffects(e) {
  7387. var t,
  7388. r = 'SourceGraphic',
  7389. i = e.data.ef ? e.data.ef.length : 0,
  7390. s = createElementID(),
  7391. n = filtersFactory.createFilter(s, !0),
  7392. a = 0;
  7393. this.filters = [];
  7394. var o;
  7395. for (t = 0; t < i; t += 1) {
  7396. o = null;
  7397. var l = e.data.ef[t].ty;
  7398. if (registeredEffects[l]) {
  7399. var c = registeredEffects[l].effect;
  7400. (o = new c(
  7401. n,
  7402. e.effectsManager.effectElements[t],
  7403. e,
  7404. idPrefix + a,
  7405. r
  7406. )),
  7407. (r = idPrefix + a),
  7408. registeredEffects[l].countsAsEffect && (a += 1);
  7409. }
  7410. o && this.filters.push(o);
  7411. }
  7412. a &&
  7413. (e.globalData.defs.appendChild(n),
  7414. e.layerElement.setAttribute(
  7415. 'filter',
  7416. 'url(' + getLocationHref() + '#' + s + ')'
  7417. )),
  7418. this.filters.length && e.addRenderableComponent(this);
  7419. }
  7420. SVGEffects.prototype.renderFrame = function (e) {
  7421. var t,
  7422. r = this.filters.length;
  7423. for (t = 0; t < r; t += 1) this.filters[t].renderFrame(e);
  7424. };
  7425. function registerEffect(e, t, r) {
  7426. registeredEffects[e] = { effect: t, countsAsEffect: r };
  7427. }
  7428. function SVGBaseElement() {}
  7429. SVGBaseElement.prototype = {
  7430. initRendererElement: function () {
  7431. this.layerElement = createNS('g');
  7432. },
  7433. createContainerElements: function () {
  7434. (this.matteElement = createNS('g')),
  7435. (this.transformedElement = this.layerElement),
  7436. (this.maskedElement = this.layerElement),
  7437. (this._sizeChanged = !1);
  7438. var t = null;
  7439. if (this.data.td) {
  7440. this.matteMasks = {};
  7441. var r = createNS('g');
  7442. r.setAttribute('id', this.layerId),
  7443. r.appendChild(this.layerElement),
  7444. (t = r),
  7445. this.globalData.defs.appendChild(r);
  7446. } else
  7447. this.data.tt
  7448. ? (this.matteElement.appendChild(this.layerElement),
  7449. (t = this.matteElement),
  7450. (this.baseElement = this.matteElement))
  7451. : (this.baseElement = this.layerElement);
  7452. if (
  7453. (this.data.ln && this.layerElement.setAttribute('id', this.data.ln),
  7454. this.data.cl &&
  7455. this.layerElement.setAttribute('class', this.data.cl),
  7456. this.data.ty === 0 && !this.data.hd)
  7457. ) {
  7458. var i = createNS('clipPath'),
  7459. s = createNS('path');
  7460. s.setAttribute(
  7461. 'd',
  7462. 'M0,0 L' +
  7463. this.data.w +
  7464. ',0 L' +
  7465. this.data.w +
  7466. ',' +
  7467. this.data.h +
  7468. ' L0,' +
  7469. this.data.h +
  7470. 'z'
  7471. );
  7472. var n = createElementID();
  7473. if (
  7474. (i.setAttribute('id', n),
  7475. i.appendChild(s),
  7476. this.globalData.defs.appendChild(i),
  7477. this.checkMasks())
  7478. ) {
  7479. var a = createNS('g');
  7480. a.setAttribute(
  7481. 'clip-path',
  7482. 'url(' + getLocationHref() + '#' + n + ')'
  7483. ),
  7484. a.appendChild(this.layerElement),
  7485. (this.transformedElement = a),
  7486. t
  7487. ? t.appendChild(this.transformedElement)
  7488. : (this.baseElement = this.transformedElement);
  7489. } else
  7490. this.layerElement.setAttribute(
  7491. 'clip-path',
  7492. 'url(' + getLocationHref() + '#' + n + ')'
  7493. );
  7494. }
  7495. this.data.bm !== 0 && this.setBlendMode();
  7496. },
  7497. renderElement: function () {
  7498. this.finalTransform._matMdf &&
  7499. this.transformedElement.setAttribute(
  7500. 'transform',
  7501. this.finalTransform.mat.to2dCSS()
  7502. ),
  7503. this.finalTransform._opMdf &&
  7504. this.transformedElement.setAttribute(
  7505. 'opacity',
  7506. this.finalTransform.mProp.o.v
  7507. );
  7508. },
  7509. destroyBaseElement: function () {
  7510. (this.layerElement = null),
  7511. (this.matteElement = null),
  7512. this.maskManager.destroy();
  7513. },
  7514. getBaseElement: function () {
  7515. return this.data.hd ? null : this.baseElement;
  7516. },
  7517. createRenderableComponents: function () {
  7518. (this.maskManager = new MaskElement(
  7519. this.data,
  7520. this,
  7521. this.globalData
  7522. )),
  7523. (this.renderableEffectsManager = new SVGEffects(this));
  7524. },
  7525. getMatte: function (t) {
  7526. if (
  7527. (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t])
  7528. ) {
  7529. var r = this.layerId + '_' + t,
  7530. i,
  7531. s,
  7532. n,
  7533. a;
  7534. if (t === 1 || t === 3) {
  7535. var o = createNS('mask');
  7536. o.setAttribute('id', r),
  7537. o.setAttribute('mask-type', t === 3 ? 'luminance' : 'alpha'),
  7538. (n = createNS('use')),
  7539. n.setAttributeNS(
  7540. 'http://www.w3.org/1999/xlink',
  7541. 'href',
  7542. '#' + this.layerId
  7543. ),
  7544. o.appendChild(n),
  7545. this.globalData.defs.appendChild(o),
  7546. !featureSupport.maskType &&
  7547. t === 1 &&
  7548. (o.setAttribute('mask-type', 'luminance'),
  7549. (i = createElementID()),
  7550. (s = filtersFactory.createFilter(i)),
  7551. this.globalData.defs.appendChild(s),
  7552. s.appendChild(filtersFactory.createAlphaToLuminanceFilter()),
  7553. (a = createNS('g')),
  7554. a.appendChild(n),
  7555. o.appendChild(a),
  7556. a.setAttribute(
  7557. 'filter',
  7558. 'url(' + getLocationHref() + '#' + i + ')'
  7559. ));
  7560. } else if (t === 2) {
  7561. var l = createNS('mask');
  7562. l.setAttribute('id', r), l.setAttribute('mask-type', 'alpha');
  7563. var c = createNS('g');
  7564. l.appendChild(c),
  7565. (i = createElementID()),
  7566. (s = filtersFactory.createFilter(i));
  7567. var g = createNS('feComponentTransfer');
  7568. g.setAttribute('in', 'SourceGraphic'), s.appendChild(g);
  7569. var S = createNS('feFuncA');
  7570. S.setAttribute('type', 'table'),
  7571. S.setAttribute('tableValues', '1.0 0.0'),
  7572. g.appendChild(S),
  7573. this.globalData.defs.appendChild(s);
  7574. var p = createNS('rect');
  7575. p.setAttribute('width', this.comp.data.w),
  7576. p.setAttribute('height', this.comp.data.h),
  7577. p.setAttribute('x', '0'),
  7578. p.setAttribute('y', '0'),
  7579. p.setAttribute('fill', '#ffffff'),
  7580. p.setAttribute('opacity', '0'),
  7581. c.setAttribute(
  7582. 'filter',
  7583. 'url(' + getLocationHref() + '#' + i + ')'
  7584. ),
  7585. c.appendChild(p),
  7586. (n = createNS('use')),
  7587. n.setAttributeNS(
  7588. 'http://www.w3.org/1999/xlink',
  7589. 'href',
  7590. '#' + this.layerId
  7591. ),
  7592. c.appendChild(n),
  7593. featureSupport.maskType ||
  7594. (l.setAttribute('mask-type', 'luminance'),
  7595. s.appendChild(filtersFactory.createAlphaToLuminanceFilter()),
  7596. (a = createNS('g')),
  7597. c.appendChild(p),
  7598. a.appendChild(this.layerElement),
  7599. c.appendChild(a)),
  7600. this.globalData.defs.appendChild(l);
  7601. }
  7602. this.matteMasks[t] = r;
  7603. }
  7604. return this.matteMasks[t];
  7605. },
  7606. setMatte: function (t) {
  7607. this.matteElement &&
  7608. this.matteElement.setAttribute(
  7609. 'mask',
  7610. 'url(' + getLocationHref() + '#' + t + ')'
  7611. );
  7612. }
  7613. };
  7614. function HierarchyElement() {}
  7615. HierarchyElement.prototype = {
  7616. initHierarchy: function () {
  7617. (this.hierarchy = []), (this._isParent = !1), this.checkParenting();
  7618. },
  7619. setHierarchy: function (t) {
  7620. this.hierarchy = t;
  7621. },
  7622. setAsParent: function () {
  7623. this._isParent = !0;
  7624. },
  7625. checkParenting: function () {
  7626. this.data.parent !== void 0 &&
  7627. this.comp.buildElementParenting(this, this.data.parent, []);
  7628. }
  7629. };
  7630. function RenderableDOMElement() {}
  7631. (function () {
  7632. var e = {
  7633. initElement: function (r, i, s) {
  7634. this.initFrame(),
  7635. this.initBaseData(r, i, s),
  7636. this.initTransform(r, i, s),
  7637. this.initHierarchy(),
  7638. this.initRenderable(),
  7639. this.initRendererElement(),
  7640. this.createContainerElements(),
  7641. this.createRenderableComponents(),
  7642. this.createContent(),
  7643. this.hide();
  7644. },
  7645. hide: function () {
  7646. if (!this.hidden && (!this.isInRange || this.isTransparent)) {
  7647. var r = this.baseElement || this.layerElement;
  7648. (r.style.display = 'none'), (this.hidden = !0);
  7649. }
  7650. },
  7651. show: function () {
  7652. if (this.isInRange && !this.isTransparent) {
  7653. if (!this.data.hd) {
  7654. var r = this.baseElement || this.layerElement;
  7655. r.style.display = 'block';
  7656. }
  7657. (this.hidden = !1), (this._isFirstFrame = !0);
  7658. }
  7659. },
  7660. renderFrame: function () {
  7661. this.data.hd ||
  7662. this.hidden ||
  7663. (this.renderTransform(),
  7664. this.renderRenderable(),
  7665. this.renderElement(),
  7666. this.renderInnerContent(),
  7667. this._isFirstFrame && (this._isFirstFrame = !1));
  7668. },
  7669. renderInnerContent: function () {},
  7670. prepareFrame: function (r) {
  7671. (this._mdf = !1),
  7672. this.prepareRenderableFrame(r),
  7673. this.prepareProperties(r, this.isInRange),
  7674. this.checkTransparency();
  7675. },
  7676. destroy: function () {
  7677. (this.innerElem = null), this.destroyBaseElement();
  7678. }
  7679. };
  7680. extendPrototype(
  7681. [RenderableElement, createProxyFunction(e)],
  7682. RenderableDOMElement
  7683. );
  7684. })();
  7685. function IImageElement(e, t, r) {
  7686. (this.assetData = t.getAssetData(e.refId)),
  7687. this.assetData &&
  7688. this.assetData.sid &&
  7689. (this.assetData = t.slotManager.getProp(this.assetData)),
  7690. this.initElement(e, t, r),
  7691. (this.sourceRect = {
  7692. top: 0,
  7693. left: 0,
  7694. width: this.assetData.w,
  7695. height: this.assetData.h
  7696. });
  7697. }
  7698. extendPrototype(
  7699. [
  7700. BaseElement,
  7701. TransformElement,
  7702. SVGBaseElement,
  7703. HierarchyElement,
  7704. FrameElement,
  7705. RenderableDOMElement
  7706. ],
  7707. IImageElement
  7708. ),
  7709. (IImageElement.prototype.createContent = function () {
  7710. var e = this.globalData.getAssetsPath(this.assetData);
  7711. (this.innerElem = createNS('image')),
  7712. this.innerElem.setAttribute('width', this.assetData.w + 'px'),
  7713. this.innerElem.setAttribute('height', this.assetData.h + 'px'),
  7714. this.innerElem.setAttribute(
  7715. 'preserveAspectRatio',
  7716. this.assetData.pr ||
  7717. this.globalData.renderConfig.imagePreserveAspectRatio
  7718. ),
  7719. this.innerElem.setAttributeNS(
  7720. 'http://www.w3.org/1999/xlink',
  7721. 'href',
  7722. e
  7723. ),
  7724. this.layerElement.appendChild(this.innerElem);
  7725. }),
  7726. (IImageElement.prototype.sourceRectAtTime = function () {
  7727. return this.sourceRect;
  7728. });
  7729. function ProcessedElement(e, t) {
  7730. (this.elem = e), (this.pos = t);
  7731. }
  7732. function IShapeElement() {}
  7733. IShapeElement.prototype = {
  7734. addShapeToModifiers: function (t) {
  7735. var r,
  7736. i = this.shapeModifiers.length;
  7737. for (r = 0; r < i; r += 1) this.shapeModifiers[r].addShape(t);
  7738. },
  7739. isShapeInAnimatedModifiers: function (t) {
  7740. for (var r = 0, i = this.shapeModifiers.length; r < i; )
  7741. if (this.shapeModifiers[r].isAnimatedWithShape(t)) return !0;
  7742. return !1;
  7743. },
  7744. renderModifiers: function () {
  7745. if (this.shapeModifiers.length) {
  7746. var t,
  7747. r = this.shapes.length;
  7748. for (t = 0; t < r; t += 1) this.shapes[t].sh.reset();
  7749. r = this.shapeModifiers.length;
  7750. var i;
  7751. for (
  7752. t = r - 1;
  7753. t >= 0 &&
  7754. ((i = this.shapeModifiers[t].processShapes(this._isFirstFrame)),
  7755. !i);
  7756. t -= 1
  7757. );
  7758. }
  7759. },
  7760. searchProcessedElement: function (t) {
  7761. for (var r = this.processedElements, i = 0, s = r.length; i < s; ) {
  7762. if (r[i].elem === t) return r[i].pos;
  7763. i += 1;
  7764. }
  7765. return 0;
  7766. },
  7767. addProcessedElement: function (t, r) {
  7768. for (var i = this.processedElements, s = i.length; s; )
  7769. if (((s -= 1), i[s].elem === t)) {
  7770. i[s].pos = r;
  7771. return;
  7772. }
  7773. i.push(new ProcessedElement(t, r));
  7774. },
  7775. prepareFrame: function (t) {
  7776. this.prepareRenderableFrame(t),
  7777. this.prepareProperties(t, this.isInRange);
  7778. }
  7779. };
  7780. var lineCapEnum = { 1: 'butt', 2: 'round', 3: 'square' },
  7781. lineJoinEnum = { 1: 'miter', 2: 'round', 3: 'bevel' };
  7782. function SVGShapeData(e, t, r) {
  7783. (this.caches = []),
  7784. (this.styles = []),
  7785. (this.transformers = e),
  7786. (this.lStr = ''),
  7787. (this.sh = r),
  7788. (this.lvl = t),
  7789. (this._isAnimated = !!r.k);
  7790. for (var i = 0, s = e.length; i < s; ) {
  7791. if (e[i].mProps.dynamicProperties.length) {
  7792. this._isAnimated = !0;
  7793. break;
  7794. }
  7795. i += 1;
  7796. }
  7797. }
  7798. SVGShapeData.prototype.setAsAnimated = function () {
  7799. this._isAnimated = !0;
  7800. };
  7801. function SVGStyleData(e, t) {
  7802. (this.data = e),
  7803. (this.type = e.ty),
  7804. (this.d = ''),
  7805. (this.lvl = t),
  7806. (this._mdf = !1),
  7807. (this.closed = e.hd === !0),
  7808. (this.pElem = createNS('path')),
  7809. (this.msElem = null);
  7810. }
  7811. SVGStyleData.prototype.reset = function () {
  7812. (this.d = ''), (this._mdf = !1);
  7813. };
  7814. function DashProperty(e, t, r, i) {
  7815. (this.elem = e),
  7816. (this.frameId = -1),
  7817. (this.dataProps = createSizedArray(t.length)),
  7818. (this.renderer = r),
  7819. (this.k = !1),
  7820. (this.dashStr = ''),
  7821. (this.dashArray = createTypedArray(
  7822. 'float32',
  7823. t.length ? t.length - 1 : 0
  7824. )),
  7825. (this.dashoffset = createTypedArray('float32', 1)),
  7826. this.initDynamicPropertyContainer(i);
  7827. var s,
  7828. n = t.length || 0,
  7829. a;
  7830. for (s = 0; s < n; s += 1)
  7831. (a = PropertyFactory.getProp(e, t[s].v, 0, 0, this)),
  7832. (this.k = a.k || this.k),
  7833. (this.dataProps[s] = { n: t[s].n, p: a });
  7834. this.k || this.getValue(!0), (this._isAnimated = this.k);
  7835. }
  7836. (DashProperty.prototype.getValue = function (e) {
  7837. if (
  7838. !(this.elem.globalData.frameId === this.frameId && !e) &&
  7839. ((this.frameId = this.elem.globalData.frameId),
  7840. this.iterateDynamicProperties(),
  7841. (this._mdf = this._mdf || e),
  7842. this._mdf)
  7843. ) {
  7844. var t = 0,
  7845. r = this.dataProps.length;
  7846. for (
  7847. this.renderer === 'svg' && (this.dashStr = ''), t = 0;
  7848. t < r;
  7849. t += 1
  7850. )
  7851. this.dataProps[t].n !== 'o'
  7852. ? this.renderer === 'svg'
  7853. ? (this.dashStr += ' ' + this.dataProps[t].p.v)
  7854. : (this.dashArray[t] = this.dataProps[t].p.v)
  7855. : (this.dashoffset[0] = this.dataProps[t].p.v);
  7856. }
  7857. }),
  7858. extendPrototype([DynamicPropertyContainer], DashProperty);
  7859. function SVGStrokeStyleData(e, t, r) {
  7860. this.initDynamicPropertyContainer(e),
  7861. (this.getValue = this.iterateDynamicProperties),
  7862. (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
  7863. (this.w = PropertyFactory.getProp(e, t.w, 0, null, this)),
  7864. (this.d = new DashProperty(e, t.d || {}, 'svg', this)),
  7865. (this.c = PropertyFactory.getProp(e, t.c, 1, 255, this)),
  7866. (this.style = r),
  7867. (this._isAnimated = !!this._isAnimated);
  7868. }
  7869. extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
  7870. function SVGFillStyleData(e, t, r) {
  7871. this.initDynamicPropertyContainer(e),
  7872. (this.getValue = this.iterateDynamicProperties),
  7873. (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
  7874. (this.c = PropertyFactory.getProp(e, t.c, 1, 255, this)),
  7875. (this.style = r);
  7876. }
  7877. extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
  7878. function SVGNoStyleData(e, t, r) {
  7879. this.initDynamicPropertyContainer(e),
  7880. (this.getValue = this.iterateDynamicProperties),
  7881. (this.style = r);
  7882. }
  7883. extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
  7884. function GradientProperty(e, t, r) {
  7885. (this.data = t), (this.c = createTypedArray('uint8c', t.p * 4));
  7886. var i = t.k.k[0].s
  7887. ? t.k.k[0].s.length - t.p * 4
  7888. : t.k.k.length - t.p * 4;
  7889. (this.o = createTypedArray('float32', i)),
  7890. (this._cmdf = !1),
  7891. (this._omdf = !1),
  7892. (this._collapsable = this.checkCollapsable()),
  7893. (this._hasOpacity = i),
  7894. this.initDynamicPropertyContainer(r),
  7895. (this.prop = PropertyFactory.getProp(e, t.k, 1, null, this)),
  7896. (this.k = this.prop.k),
  7897. this.getValue(!0);
  7898. }
  7899. (GradientProperty.prototype.comparePoints = function (e, t) {
  7900. for (var r = 0, i = this.o.length / 2, s; r < i; ) {
  7901. if (((s = Math.abs(e[r * 4] - e[t * 4 + r * 2])), s > 0.01))
  7902. return !1;
  7903. r += 1;
  7904. }
  7905. return !0;
  7906. }),
  7907. (GradientProperty.prototype.checkCollapsable = function () {
  7908. if (this.o.length / 2 !== this.c.length / 4) return !1;
  7909. if (this.data.k.k[0].s)
  7910. for (var e = 0, t = this.data.k.k.length; e < t; ) {
  7911. if (!this.comparePoints(this.data.k.k[e].s, this.data.p))
  7912. return !1;
  7913. e += 1;
  7914. }
  7915. else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1;
  7916. return !0;
  7917. }),
  7918. (GradientProperty.prototype.getValue = function (e) {
  7919. if (
  7920. (this.prop.getValue(),
  7921. (this._mdf = !1),
  7922. (this._cmdf = !1),
  7923. (this._omdf = !1),
  7924. this.prop._mdf || e)
  7925. ) {
  7926. var t,
  7927. r = this.data.p * 4,
  7928. i,
  7929. s;
  7930. for (t = 0; t < r; t += 1)
  7931. (i = t % 4 === 0 ? 100 : 255),
  7932. (s = Math.round(this.prop.v[t] * i)),
  7933. this.c[t] !== s && ((this.c[t] = s), (this._cmdf = !e));
  7934. if (this.o.length)
  7935. for (r = this.prop.v.length, t = this.data.p * 4; t < r; t += 1)
  7936. (i = t % 2 === 0 ? 100 : 1),
  7937. (s =
  7938. t % 2 === 0
  7939. ? Math.round(this.prop.v[t] * 100)
  7940. : this.prop.v[t]),
  7941. this.o[t - this.data.p * 4] !== s &&
  7942. ((this.o[t - this.data.p * 4] = s), (this._omdf = !e));
  7943. this._mdf = !e;
  7944. }
  7945. }),
  7946. extendPrototype([DynamicPropertyContainer], GradientProperty);
  7947. function SVGGradientFillStyleData(e, t, r) {
  7948. this.initDynamicPropertyContainer(e),
  7949. (this.getValue = this.iterateDynamicProperties),
  7950. this.initGradientData(e, t, r);
  7951. }
  7952. (SVGGradientFillStyleData.prototype.initGradientData = function (
  7953. e,
  7954. t,
  7955. r
  7956. ) {
  7957. (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
  7958. (this.s = PropertyFactory.getProp(e, t.s, 1, null, this)),
  7959. (this.e = PropertyFactory.getProp(e, t.e, 1, null, this)),
  7960. (this.h = PropertyFactory.getProp(e, t.h || { k: 0 }, 0, 0.01, this)),
  7961. (this.a = PropertyFactory.getProp(
  7962. e,
  7963. t.a || { k: 0 },
  7964. 0,
  7965. degToRads,
  7966. this
  7967. )),
  7968. (this.g = new GradientProperty(e, t.g, this)),
  7969. (this.style = r),
  7970. (this.stops = []),
  7971. this.setGradientData(r.pElem, t),
  7972. this.setGradientOpacity(t, r),
  7973. (this._isAnimated = !!this._isAnimated);
  7974. }),
  7975. (SVGGradientFillStyleData.prototype.setGradientData = function (e, t) {
  7976. var r = createElementID(),
  7977. i = createNS(t.t === 1 ? 'linearGradient' : 'radialGradient');
  7978. i.setAttribute('id', r),
  7979. i.setAttribute('spreadMethod', 'pad'),
  7980. i.setAttribute('gradientUnits', 'userSpaceOnUse');
  7981. var s = [],
  7982. n,
  7983. a,
  7984. o;
  7985. for (o = t.g.p * 4, a = 0; a < o; a += 4)
  7986. (n = createNS('stop')), i.appendChild(n), s.push(n);
  7987. e.setAttribute(
  7988. t.ty === 'gf' ? 'fill' : 'stroke',
  7989. 'url(' + getLocationHref() + '#' + r + ')'
  7990. ),
  7991. (this.gf = i),
  7992. (this.cst = s);
  7993. }),
  7994. (SVGGradientFillStyleData.prototype.setGradientOpacity = function (
  7995. e,
  7996. t
  7997. ) {
  7998. if (this.g._hasOpacity && !this.g._collapsable) {
  7999. var r,
  8000. i,
  8001. s,
  8002. n = createNS('mask'),
  8003. a = createNS('path');
  8004. n.appendChild(a);
  8005. var o = createElementID(),
  8006. l = createElementID();
  8007. n.setAttribute('id', l);
  8008. var c = createNS(e.t === 1 ? 'linearGradient' : 'radialGradient');
  8009. c.setAttribute('id', o),
  8010. c.setAttribute('spreadMethod', 'pad'),
  8011. c.setAttribute('gradientUnits', 'userSpaceOnUse'),
  8012. (s = e.g.k.k[0].s ? e.g.k.k[0].s.length : e.g.k.k.length);
  8013. var g = this.stops;
  8014. for (i = e.g.p * 4; i < s; i += 2)
  8015. (r = createNS('stop')),
  8016. r.setAttribute('stop-color', 'rgb(255,255,255)'),
  8017. c.appendChild(r),
  8018. g.push(r);
  8019. a.setAttribute(
  8020. e.ty === 'gf' ? 'fill' : 'stroke',
  8021. 'url(' + getLocationHref() + '#' + o + ')'
  8022. ),
  8023. e.ty === 'gs' &&
  8024. (a.setAttribute('stroke-linecap', lineCapEnum[e.lc || 2]),
  8025. a.setAttribute('stroke-linejoin', lineJoinEnum[e.lj || 2]),
  8026. e.lj === 1 && a.setAttribute('stroke-miterlimit', e.ml)),
  8027. (this.of = c),
  8028. (this.ms = n),
  8029. (this.ost = g),
  8030. (this.maskId = l),
  8031. (t.msElem = a);
  8032. }
  8033. }),
  8034. extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
  8035. function SVGGradientStrokeStyleData(e, t, r) {
  8036. this.initDynamicPropertyContainer(e),
  8037. (this.getValue = this.iterateDynamicProperties),
  8038. (this.w = PropertyFactory.getProp(e, t.w, 0, null, this)),
  8039. (this.d = new DashProperty(e, t.d || {}, 'svg', this)),
  8040. this.initGradientData(e, t, r),
  8041. (this._isAnimated = !!this._isAnimated);
  8042. }
  8043. extendPrototype(
  8044. [SVGGradientFillStyleData, DynamicPropertyContainer],
  8045. SVGGradientStrokeStyleData
  8046. );
  8047. function ShapeGroupData() {
  8048. (this.it = []), (this.prevViewData = []), (this.gr = createNS('g'));
  8049. }
  8050. function SVGTransformData(e, t, r) {
  8051. (this.transform = { mProps: e, op: t, container: r }),
  8052. (this.elements = []),
  8053. (this._isAnimated =
  8054. this.transform.mProps.dynamicProperties.length ||
  8055. this.transform.op.effectsSequence.length);
  8056. }
  8057. var buildShapeString = function (t, r, i, s) {
  8058. if (r === 0) return '';
  8059. var n = t.o,
  8060. a = t.i,
  8061. o = t.v,
  8062. l,
  8063. c = ' M' + s.applyToPointStringified(o[0][0], o[0][1]);
  8064. for (l = 1; l < r; l += 1)
  8065. c +=
  8066. ' C' +
  8067. s.applyToPointStringified(n[l - 1][0], n[l - 1][1]) +
  8068. ' ' +
  8069. s.applyToPointStringified(a[l][0], a[l][1]) +
  8070. ' ' +
  8071. s.applyToPointStringified(o[l][0], o[l][1]);
  8072. return (
  8073. i &&
  8074. r &&
  8075. ((c +=
  8076. ' C' +
  8077. s.applyToPointStringified(n[l - 1][0], n[l - 1][1]) +
  8078. ' ' +
  8079. s.applyToPointStringified(a[0][0], a[0][1]) +
  8080. ' ' +
  8081. s.applyToPointStringified(o[0][0], o[0][1])),
  8082. (c += 'z')),
  8083. c
  8084. );
  8085. },
  8086. SVGElementsRenderer = (function () {
  8087. var e = new Matrix(),
  8088. t = new Matrix(),
  8089. r = { createRenderFunction: i };
  8090. function i(S) {
  8091. switch (S.ty) {
  8092. case 'fl':
  8093. return o;
  8094. case 'gf':
  8095. return c;
  8096. case 'gs':
  8097. return l;
  8098. case 'st':
  8099. return g;
  8100. case 'sh':
  8101. case 'el':
  8102. case 'rc':
  8103. case 'sr':
  8104. return a;
  8105. case 'tr':
  8106. return s;
  8107. case 'no':
  8108. return n;
  8109. default:
  8110. return null;
  8111. }
  8112. }
  8113. function s(S, p, P) {
  8114. (P || p.transform.op._mdf) &&
  8115. p.transform.container.setAttribute('opacity', p.transform.op.v),
  8116. (P || p.transform.mProps._mdf) &&
  8117. p.transform.container.setAttribute(
  8118. 'transform',
  8119. p.transform.mProps.v.to2dCSS()
  8120. );
  8121. }
  8122. function n() {}
  8123. function a(S, p, P) {
  8124. var b,
  8125. y,
  8126. A,
  8127. u,
  8128. f,
  8129. m,
  8130. d = p.styles.length,
  8131. E = p.lvl,
  8132. T,
  8133. x,
  8134. _,
  8135. I,
  8136. V;
  8137. for (m = 0; m < d; m += 1) {
  8138. if (((u = p.sh._mdf || P), p.styles[m].lvl < E)) {
  8139. for (
  8140. x = t.reset(),
  8141. I = E - p.styles[m].lvl,
  8142. V = p.transformers.length - 1;
  8143. !u && I > 0;
  8144. )
  8145. (u = p.transformers[V].mProps._mdf || u), (I -= 1), (V -= 1);
  8146. if (u)
  8147. for (
  8148. I = E - p.styles[m].lvl, V = p.transformers.length - 1;
  8149. I > 0;
  8150. )
  8151. (_ = p.transformers[V].mProps.v.props),
  8152. x.transform(
  8153. _[0],
  8154. _[1],
  8155. _[2],
  8156. _[3],
  8157. _[4],
  8158. _[5],
  8159. _[6],
  8160. _[7],
  8161. _[8],
  8162. _[9],
  8163. _[10],
  8164. _[11],
  8165. _[12],
  8166. _[13],
  8167. _[14],
  8168. _[15]
  8169. ),
  8170. (I -= 1),
  8171. (V -= 1);
  8172. } else x = e;
  8173. if (((T = p.sh.paths), (y = T._length), u)) {
  8174. for (A = '', b = 0; b < y; b += 1)
  8175. (f = T.shapes[b]),
  8176. f &&
  8177. f._length &&
  8178. (A += buildShapeString(f, f._length, f.c, x));
  8179. p.caches[m] = A;
  8180. } else A = p.caches[m];
  8181. (p.styles[m].d += S.hd === !0 ? '' : A),
  8182. (p.styles[m]._mdf = u || p.styles[m]._mdf);
  8183. }
  8184. }
  8185. function o(S, p, P) {
  8186. var b = p.style;
  8187. (p.c._mdf || P) &&
  8188. b.pElem.setAttribute(
  8189. 'fill',
  8190. 'rgb(' +
  8191. bmFloor(p.c.v[0]) +
  8192. ',' +
  8193. bmFloor(p.c.v[1]) +
  8194. ',' +
  8195. bmFloor(p.c.v[2]) +
  8196. ')'
  8197. ),
  8198. (p.o._mdf || P) && b.pElem.setAttribute('fill-opacity', p.o.v);
  8199. }
  8200. function l(S, p, P) {
  8201. c(S, p, P), g(S, p, P);
  8202. }
  8203. function c(S, p, P) {
  8204. var b = p.gf,
  8205. y = p.g._hasOpacity,
  8206. A = p.s.v,
  8207. u = p.e.v;
  8208. if (p.o._mdf || P) {
  8209. var f = S.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
  8210. p.style.pElem.setAttribute(f, p.o.v);
  8211. }
  8212. if (p.s._mdf || P) {
  8213. var m = S.t === 1 ? 'x1' : 'cx',
  8214. d = m === 'x1' ? 'y1' : 'cy';
  8215. b.setAttribute(m, A[0]),
  8216. b.setAttribute(d, A[1]),
  8217. y &&
  8218. !p.g._collapsable &&
  8219. (p.of.setAttribute(m, A[0]), p.of.setAttribute(d, A[1]));
  8220. }
  8221. var E, T, x, _;
  8222. if (p.g._cmdf || P) {
  8223. E = p.cst;
  8224. var I = p.g.c;
  8225. for (x = E.length, T = 0; T < x; T += 1)
  8226. (_ = E[T]),
  8227. _.setAttribute('offset', I[T * 4] + '%'),
  8228. _.setAttribute(
  8229. 'stop-color',
  8230. 'rgb(' +
  8231. I[T * 4 + 1] +
  8232. ',' +
  8233. I[T * 4 + 2] +
  8234. ',' +
  8235. I[T * 4 + 3] +
  8236. ')'
  8237. );
  8238. }
  8239. if (y && (p.g._omdf || P)) {
  8240. var V = p.g.o;
  8241. for (
  8242. p.g._collapsable ? (E = p.cst) : (E = p.ost),
  8243. x = E.length,
  8244. T = 0;
  8245. T < x;
  8246. T += 1
  8247. )
  8248. (_ = E[T]),
  8249. p.g._collapsable || _.setAttribute('offset', V[T * 2] + '%'),
  8250. _.setAttribute('stop-opacity', V[T * 2 + 1]);
  8251. }
  8252. if (S.t === 1)
  8253. (p.e._mdf || P) &&
  8254. (b.setAttribute('x2', u[0]),
  8255. b.setAttribute('y2', u[1]),
  8256. y &&
  8257. !p.g._collapsable &&
  8258. (p.of.setAttribute('x2', u[0]),
  8259. p.of.setAttribute('y2', u[1])));
  8260. else {
  8261. var D;
  8262. if (
  8263. ((p.s._mdf || p.e._mdf || P) &&
  8264. ((D = Math.sqrt(
  8265. Math.pow(A[0] - u[0], 2) + Math.pow(A[1] - u[1], 2)
  8266. )),
  8267. b.setAttribute('r', D),
  8268. y && !p.g._collapsable && p.of.setAttribute('r', D)),
  8269. p.e._mdf || p.h._mdf || p.a._mdf || P)
  8270. ) {
  8271. D ||
  8272. (D = Math.sqrt(
  8273. Math.pow(A[0] - u[0], 2) + Math.pow(A[1] - u[1], 2)
  8274. ));
  8275. var N = Math.atan2(u[1] - A[1], u[0] - A[0]),
  8276. $ = p.h.v;
  8277. $ >= 1 ? ($ = 0.99) : $ <= -1 && ($ = -0.99);
  8278. var O = D * $,
  8279. B = Math.cos(N + p.a.v) * O + A[0],
  8280. F = Math.sin(N + p.a.v) * O + A[1];
  8281. b.setAttribute('fx', B),
  8282. b.setAttribute('fy', F),
  8283. y &&
  8284. !p.g._collapsable &&
  8285. (p.of.setAttribute('fx', B), p.of.setAttribute('fy', F));
  8286. }
  8287. }
  8288. }
  8289. function g(S, p, P) {
  8290. var b = p.style,
  8291. y = p.d;
  8292. y &&
  8293. (y._mdf || P) &&
  8294. y.dashStr &&
  8295. (b.pElem.setAttribute('stroke-dasharray', y.dashStr),
  8296. b.pElem.setAttribute('stroke-dashoffset', y.dashoffset[0])),
  8297. p.c &&
  8298. (p.c._mdf || P) &&
  8299. b.pElem.setAttribute(
  8300. 'stroke',
  8301. 'rgb(' +
  8302. bmFloor(p.c.v[0]) +
  8303. ',' +
  8304. bmFloor(p.c.v[1]) +
  8305. ',' +
  8306. bmFloor(p.c.v[2]) +
  8307. ')'
  8308. ),
  8309. (p.o._mdf || P) && b.pElem.setAttribute('stroke-opacity', p.o.v),
  8310. (p.w._mdf || P) &&
  8311. (b.pElem.setAttribute('stroke-width', p.w.v),
  8312. b.msElem && b.msElem.setAttribute('stroke-width', p.w.v));
  8313. }
  8314. return r;
  8315. })();
  8316. function SVGShapeElement(e, t, r) {
  8317. (this.shapes = []),
  8318. (this.shapesData = e.shapes),
  8319. (this.stylesList = []),
  8320. (this.shapeModifiers = []),
  8321. (this.itemsData = []),
  8322. (this.processedElements = []),
  8323. (this.animatedContents = []),
  8324. this.initElement(e, t, r),
  8325. (this.prevViewData = []);
  8326. }
  8327. extendPrototype(
  8328. [
  8329. BaseElement,
  8330. TransformElement,
  8331. SVGBaseElement,
  8332. IShapeElement,
  8333. HierarchyElement,
  8334. FrameElement,
  8335. RenderableDOMElement
  8336. ],
  8337. SVGShapeElement
  8338. ),
  8339. (SVGShapeElement.prototype.initSecondaryElement = function () {}),
  8340. (SVGShapeElement.prototype.identityMatrix = new Matrix()),
  8341. (SVGShapeElement.prototype.buildExpressionInterface = function () {}),
  8342. (SVGShapeElement.prototype.createContent = function () {
  8343. this.searchShapes(
  8344. this.shapesData,
  8345. this.itemsData,
  8346. this.prevViewData,
  8347. this.layerElement,
  8348. 0,
  8349. [],
  8350. !0
  8351. ),
  8352. this.filterUniqueShapes();
  8353. }),
  8354. (SVGShapeElement.prototype.filterUniqueShapes = function () {
  8355. var e,
  8356. t = this.shapes.length,
  8357. r,
  8358. i,
  8359. s = this.stylesList.length,
  8360. n,
  8361. a = [],
  8362. o = !1;
  8363. for (i = 0; i < s; i += 1) {
  8364. for (
  8365. n = this.stylesList[i], o = !1, a.length = 0, e = 0;
  8366. e < t;
  8367. e += 1
  8368. )
  8369. (r = this.shapes[e]),
  8370. r.styles.indexOf(n) !== -1 &&
  8371. (a.push(r), (o = r._isAnimated || o));
  8372. a.length > 1 && o && this.setShapesAsAnimated(a);
  8373. }
  8374. }),
  8375. (SVGShapeElement.prototype.setShapesAsAnimated = function (e) {
  8376. var t,
  8377. r = e.length;
  8378. for (t = 0; t < r; t += 1) e[t].setAsAnimated();
  8379. }),
  8380. (SVGShapeElement.prototype.createStyleElement = function (e, t) {
  8381. var r,
  8382. i = new SVGStyleData(e, t),
  8383. s = i.pElem;
  8384. if (e.ty === 'st') r = new SVGStrokeStyleData(this, e, i);
  8385. else if (e.ty === 'fl') r = new SVGFillStyleData(this, e, i);
  8386. else if (e.ty === 'gf' || e.ty === 'gs') {
  8387. var n =
  8388. e.ty === 'gf'
  8389. ? SVGGradientFillStyleData
  8390. : SVGGradientStrokeStyleData;
  8391. (r = new n(this, e, i)),
  8392. this.globalData.defs.appendChild(r.gf),
  8393. r.maskId &&
  8394. (this.globalData.defs.appendChild(r.ms),
  8395. this.globalData.defs.appendChild(r.of),
  8396. s.setAttribute(
  8397. 'mask',
  8398. 'url(' + getLocationHref() + '#' + r.maskId + ')'
  8399. ));
  8400. } else e.ty === 'no' && (r = new SVGNoStyleData(this, e, i));
  8401. return (
  8402. (e.ty === 'st' || e.ty === 'gs') &&
  8403. (s.setAttribute('stroke-linecap', lineCapEnum[e.lc || 2]),
  8404. s.setAttribute('stroke-linejoin', lineJoinEnum[e.lj || 2]),
  8405. s.setAttribute('fill-opacity', '0'),
  8406. e.lj === 1 && s.setAttribute('stroke-miterlimit', e.ml)),
  8407. e.r === 2 && s.setAttribute('fill-rule', 'evenodd'),
  8408. e.ln && s.setAttribute('id', e.ln),
  8409. e.cl && s.setAttribute('class', e.cl),
  8410. e.bm && (s.style['mix-blend-mode'] = getBlendMode(e.bm)),
  8411. this.stylesList.push(i),
  8412. this.addToAnimatedContents(e, r),
  8413. r
  8414. );
  8415. }),
  8416. (SVGShapeElement.prototype.createGroupElement = function (e) {
  8417. var t = new ShapeGroupData();
  8418. return (
  8419. e.ln && t.gr.setAttribute('id', e.ln),
  8420. e.cl && t.gr.setAttribute('class', e.cl),
  8421. e.bm && (t.gr.style['mix-blend-mode'] = getBlendMode(e.bm)),
  8422. t
  8423. );
  8424. }),
  8425. (SVGShapeElement.prototype.createTransformElement = function (e, t) {
  8426. var r = TransformPropertyFactory.getTransformProperty(this, e, this),
  8427. i = new SVGTransformData(r, r.o, t);
  8428. return this.addToAnimatedContents(e, i), i;
  8429. }),
  8430. (SVGShapeElement.prototype.createShapeElement = function (e, t, r) {
  8431. var i = 4;
  8432. e.ty === 'rc'
  8433. ? (i = 5)
  8434. : e.ty === 'el'
  8435. ? (i = 6)
  8436. : e.ty === 'sr' && (i = 7);
  8437. var s = ShapePropertyFactory.getShapeProp(this, e, i, this),
  8438. n = new SVGShapeData(t, r, s);
  8439. return (
  8440. this.shapes.push(n),
  8441. this.addShapeToModifiers(n),
  8442. this.addToAnimatedContents(e, n),
  8443. n
  8444. );
  8445. }),
  8446. (SVGShapeElement.prototype.addToAnimatedContents = function (e, t) {
  8447. for (var r = 0, i = this.animatedContents.length; r < i; ) {
  8448. if (this.animatedContents[r].element === t) return;
  8449. r += 1;
  8450. }
  8451. this.animatedContents.push({
  8452. fn: SVGElementsRenderer.createRenderFunction(e),
  8453. element: t,
  8454. data: e
  8455. });
  8456. }),
  8457. (SVGShapeElement.prototype.setElementStyles = function (e) {
  8458. var t = e.styles,
  8459. r,
  8460. i = this.stylesList.length;
  8461. for (r = 0; r < i; r += 1)
  8462. this.stylesList[r].closed || t.push(this.stylesList[r]);
  8463. }),
  8464. (SVGShapeElement.prototype.reloadShapes = function () {
  8465. this._isFirstFrame = !0;
  8466. var e,
  8467. t = this.itemsData.length;
  8468. for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
  8469. for (
  8470. this.searchShapes(
  8471. this.shapesData,
  8472. this.itemsData,
  8473. this.prevViewData,
  8474. this.layerElement,
  8475. 0,
  8476. [],
  8477. !0
  8478. ),
  8479. this.filterUniqueShapes(),
  8480. t = this.dynamicProperties.length,
  8481. e = 0;
  8482. e < t;
  8483. e += 1
  8484. )
  8485. this.dynamicProperties[e].getValue();
  8486. this.renderModifiers();
  8487. }),
  8488. (SVGShapeElement.prototype.searchShapes = function (
  8489. e,
  8490. t,
  8491. r,
  8492. i,
  8493. s,
  8494. n,
  8495. a
  8496. ) {
  8497. var o = [].concat(n),
  8498. l,
  8499. c = e.length - 1,
  8500. g,
  8501. S,
  8502. p = [],
  8503. P = [],
  8504. b,
  8505. y,
  8506. A;
  8507. for (l = c; l >= 0; l -= 1) {
  8508. if (
  8509. ((A = this.searchProcessedElement(e[l])),
  8510. A ? (t[l] = r[A - 1]) : (e[l]._render = a),
  8511. e[l].ty === 'fl' ||
  8512. e[l].ty === 'st' ||
  8513. e[l].ty === 'gf' ||
  8514. e[l].ty === 'gs' ||
  8515. e[l].ty === 'no')
  8516. )
  8517. A
  8518. ? (t[l].style.closed = !1)
  8519. : (t[l] = this.createStyleElement(e[l], s)),
  8520. e[l]._render &&
  8521. t[l].style.pElem.parentNode !== i &&
  8522. i.appendChild(t[l].style.pElem),
  8523. p.push(t[l].style);
  8524. else if (e[l].ty === 'gr') {
  8525. if (!A) t[l] = this.createGroupElement(e[l]);
  8526. else
  8527. for (S = t[l].it.length, g = 0; g < S; g += 1)
  8528. t[l].prevViewData[g] = t[l].it[g];
  8529. this.searchShapes(
  8530. e[l].it,
  8531. t[l].it,
  8532. t[l].prevViewData,
  8533. t[l].gr,
  8534. s + 1,
  8535. o,
  8536. a
  8537. ),
  8538. e[l]._render &&
  8539. t[l].gr.parentNode !== i &&
  8540. i.appendChild(t[l].gr);
  8541. } else
  8542. e[l].ty === 'tr'
  8543. ? (A || (t[l] = this.createTransformElement(e[l], i)),
  8544. (b = t[l].transform),
  8545. o.push(b))
  8546. : e[l].ty === 'sh' ||
  8547. e[l].ty === 'rc' ||
  8548. e[l].ty === 'el' ||
  8549. e[l].ty === 'sr'
  8550. ? (A || (t[l] = this.createShapeElement(e[l], o, s)),
  8551. this.setElementStyles(t[l]))
  8552. : e[l].ty === 'tm' ||
  8553. e[l].ty === 'rd' ||
  8554. e[l].ty === 'ms' ||
  8555. e[l].ty === 'pb' ||
  8556. e[l].ty === 'zz' ||
  8557. e[l].ty === 'op'
  8558. ? (A
  8559. ? ((y = t[l]), (y.closed = !1))
  8560. : ((y = ShapeModifiers.getModifier(e[l].ty)),
  8561. y.init(this, e[l]),
  8562. (t[l] = y),
  8563. this.shapeModifiers.push(y)),
  8564. P.push(y))
  8565. : e[l].ty === 'rp' &&
  8566. (A
  8567. ? ((y = t[l]), (y.closed = !0))
  8568. : ((y = ShapeModifiers.getModifier(e[l].ty)),
  8569. (t[l] = y),
  8570. y.init(this, e, l, t),
  8571. this.shapeModifiers.push(y),
  8572. (a = !1)),
  8573. P.push(y));
  8574. this.addProcessedElement(e[l], l + 1);
  8575. }
  8576. for (c = p.length, l = 0; l < c; l += 1) p[l].closed = !0;
  8577. for (c = P.length, l = 0; l < c; l += 1) P[l].closed = !0;
  8578. }),
  8579. (SVGShapeElement.prototype.renderInnerContent = function () {
  8580. this.renderModifiers();
  8581. var e,
  8582. t = this.stylesList.length;
  8583. for (e = 0; e < t; e += 1) this.stylesList[e].reset();
  8584. for (this.renderShape(), e = 0; e < t; e += 1)
  8585. (this.stylesList[e]._mdf || this._isFirstFrame) &&
  8586. (this.stylesList[e].msElem &&
  8587. (this.stylesList[e].msElem.setAttribute(
  8588. 'd',
  8589. this.stylesList[e].d
  8590. ),
  8591. (this.stylesList[e].d = 'M0 0' + this.stylesList[e].d)),
  8592. this.stylesList[e].pElem.setAttribute(
  8593. 'd',
  8594. this.stylesList[e].d || 'M0 0'
  8595. ));
  8596. }),
  8597. (SVGShapeElement.prototype.renderShape = function () {
  8598. var e,
  8599. t = this.animatedContents.length,
  8600. r;
  8601. for (e = 0; e < t; e += 1)
  8602. (r = this.animatedContents[e]),
  8603. (this._isFirstFrame || r.element._isAnimated) &&
  8604. r.data !== !0 &&
  8605. r.fn(r.data, r.element, this._isFirstFrame);
  8606. }),
  8607. (SVGShapeElement.prototype.destroy = function () {
  8608. this.destroyBaseElement(),
  8609. (this.shapesData = null),
  8610. (this.itemsData = null);
  8611. });
  8612. function LetterProps(e, t, r, i, s, n) {
  8613. (this.o = e),
  8614. (this.sw = t),
  8615. (this.sc = r),
  8616. (this.fc = i),
  8617. (this.m = s),
  8618. (this.p = n),
  8619. (this._mdf = { o: !0, sw: !!t, sc: !!r, fc: !!i, m: !0, p: !0 });
  8620. }
  8621. LetterProps.prototype.update = function (e, t, r, i, s, n) {
  8622. (this._mdf.o = !1),
  8623. (this._mdf.sw = !1),
  8624. (this._mdf.sc = !1),
  8625. (this._mdf.fc = !1),
  8626. (this._mdf.m = !1),
  8627. (this._mdf.p = !1);
  8628. var a = !1;
  8629. return (
  8630. this.o !== e && ((this.o = e), (this._mdf.o = !0), (a = !0)),
  8631. this.sw !== t && ((this.sw = t), (this._mdf.sw = !0), (a = !0)),
  8632. this.sc !== r && ((this.sc = r), (this._mdf.sc = !0), (a = !0)),
  8633. this.fc !== i && ((this.fc = i), (this._mdf.fc = !0), (a = !0)),
  8634. this.m !== s && ((this.m = s), (this._mdf.m = !0), (a = !0)),
  8635. n.length &&
  8636. (this.p[0] !== n[0] ||
  8637. this.p[1] !== n[1] ||
  8638. this.p[4] !== n[4] ||
  8639. this.p[5] !== n[5] ||
  8640. this.p[12] !== n[12] ||
  8641. this.p[13] !== n[13]) &&
  8642. ((this.p = n), (this._mdf.p = !0), (a = !0)),
  8643. a
  8644. );
  8645. };
  8646. function TextProperty(e, t) {
  8647. (this._frameId = initialDefaultFrame),
  8648. (this.pv = ''),
  8649. (this.v = ''),
  8650. (this.kf = !1),
  8651. (this._isFirstFrame = !0),
  8652. (this._mdf = !1),
  8653. t.d && t.d.sid && (t.d = e.globalData.slotManager.getProp(t.d)),
  8654. (this.data = t),
  8655. (this.elem = e),
  8656. (this.comp = this.elem.comp),
  8657. (this.keysIndex = 0),
  8658. (this.canResize = !1),
  8659. (this.minimumFontSize = 1),
  8660. (this.effectsSequence = []),
  8661. (this.currentData = {
  8662. ascent: 0,
  8663. boxWidth: this.defaultBoxWidth,
  8664. f: '',
  8665. fStyle: '',
  8666. fWeight: '',
  8667. fc: '',
  8668. j: '',
  8669. justifyOffset: '',
  8670. l: [],
  8671. lh: 0,
  8672. lineWidths: [],
  8673. ls: '',
  8674. of: '',
  8675. s: '',
  8676. sc: '',
  8677. sw: 0,
  8678. t: 0,
  8679. tr: 0,
  8680. sz: 0,
  8681. ps: null,
  8682. fillColorAnim: !1,
  8683. strokeColorAnim: !1,
  8684. strokeWidthAnim: !1,
  8685. yOffset: 0,
  8686. finalSize: 0,
  8687. finalText: [],
  8688. finalLineHeight: 0,
  8689. __complete: !1
  8690. }),
  8691. this.copyData(this.currentData, this.data.d.k[0].s),
  8692. this.searchProperty() || this.completeTextData(this.currentData);
  8693. }
  8694. (TextProperty.prototype.defaultBoxWidth = [0, 0]),
  8695. (TextProperty.prototype.copyData = function (e, t) {
  8696. for (var r in t)
  8697. Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
  8698. return e;
  8699. }),
  8700. (TextProperty.prototype.setCurrentData = function (e) {
  8701. e.__complete || this.completeTextData(e),
  8702. (this.currentData = e),
  8703. (this.currentData.boxWidth =
  8704. this.currentData.boxWidth || this.defaultBoxWidth),
  8705. (this._mdf = !0);
  8706. }),
  8707. (TextProperty.prototype.searchProperty = function () {
  8708. return this.searchKeyframes();
  8709. }),
  8710. (TextProperty.prototype.searchKeyframes = function () {
  8711. return (
  8712. (this.kf = this.data.d.k.length > 1),
  8713. this.kf && this.addEffect(this.getKeyframeValue.bind(this)),
  8714. this.kf
  8715. );
  8716. }),
  8717. (TextProperty.prototype.addEffect = function (e) {
  8718. this.effectsSequence.push(e), this.elem.addDynamicProperty(this);
  8719. }),
  8720. (TextProperty.prototype.getValue = function (e) {
  8721. if (
  8722. !(
  8723. (this.elem.globalData.frameId === this.frameId ||
  8724. !this.effectsSequence.length) &&
  8725. !e
  8726. )
  8727. ) {
  8728. this.currentData.t = this.data.d.k[this.keysIndex].s.t;
  8729. var t = this.currentData,
  8730. r = this.keysIndex;
  8731. if (this.lock) {
  8732. this.setCurrentData(this.currentData);
  8733. return;
  8734. }
  8735. (this.lock = !0), (this._mdf = !1);
  8736. var i,
  8737. s = this.effectsSequence.length,
  8738. n = e || this.data.d.k[this.keysIndex].s;
  8739. for (i = 0; i < s; i += 1)
  8740. r !== this.keysIndex
  8741. ? (n = this.effectsSequence[i](n, n.t))
  8742. : (n = this.effectsSequence[i](this.currentData, n.t));
  8743. t !== n && this.setCurrentData(n),
  8744. (this.v = this.currentData),
  8745. (this.pv = this.v),
  8746. (this.lock = !1),
  8747. (this.frameId = this.elem.globalData.frameId);
  8748. }
  8749. }),
  8750. (TextProperty.prototype.getKeyframeValue = function () {
  8751. for (
  8752. var e = this.data.d.k,
  8753. t = this.elem.comp.renderedFrame,
  8754. r = 0,
  8755. i = e.length;
  8756. r <= i - 1 && !(r === i - 1 || e[r + 1].t > t);
  8757. )
  8758. r += 1;
  8759. return (
  8760. this.keysIndex !== r && (this.keysIndex = r),
  8761. this.data.d.k[this.keysIndex].s
  8762. );
  8763. }),
  8764. (TextProperty.prototype.buildFinalText = function (e) {
  8765. for (var t = [], r = 0, i = e.length, s, n, a = !1; r < i; )
  8766. (s = e.charCodeAt(r)),
  8767. FontManager.isCombinedCharacter(s)
  8768. ? (t[t.length - 1] += e.charAt(r))
  8769. : s >= 55296 && s <= 56319
  8770. ? ((n = e.charCodeAt(r + 1)),
  8771. n >= 56320 && n <= 57343
  8772. ? (a || FontManager.isModifier(s, n)
  8773. ? ((t[t.length - 1] += e.substr(r, 2)), (a = !1))
  8774. : t.push(e.substr(r, 2)),
  8775. (r += 1))
  8776. : t.push(e.charAt(r)))
  8777. : s > 56319
  8778. ? ((n = e.charCodeAt(r + 1)),
  8779. FontManager.isZeroWidthJoiner(s, n)
  8780. ? ((a = !0), (t[t.length - 1] += e.substr(r, 2)), (r += 1))
  8781. : t.push(e.charAt(r)))
  8782. : FontManager.isZeroWidthJoiner(s)
  8783. ? ((t[t.length - 1] += e.charAt(r)), (a = !0))
  8784. : t.push(e.charAt(r)),
  8785. (r += 1);
  8786. return t;
  8787. }),
  8788. (TextProperty.prototype.completeTextData = function (e) {
  8789. e.__complete = !0;
  8790. var t = this.elem.globalData.fontManager,
  8791. r = this.data,
  8792. i = [],
  8793. s,
  8794. n,
  8795. a,
  8796. o = 0,
  8797. l,
  8798. c = r.m.g,
  8799. g = 0,
  8800. S = 0,
  8801. p = 0,
  8802. P = [],
  8803. b = 0,
  8804. y = 0,
  8805. A,
  8806. u,
  8807. f = t.getFontByName(e.f),
  8808. m,
  8809. d = 0,
  8810. E = getFontProperties(f);
  8811. (e.fWeight = E.weight),
  8812. (e.fStyle = E.style),
  8813. (e.finalSize = e.s),
  8814. (e.finalText = this.buildFinalText(e.t)),
  8815. (n = e.finalText.length),
  8816. (e.finalLineHeight = e.lh);
  8817. var T = (e.tr / 1e3) * e.finalSize,
  8818. x;
  8819. if (e.sz)
  8820. for (var _ = !0, I = e.sz[0], V = e.sz[1], D, N; _; ) {
  8821. (N = this.buildFinalText(e.t)),
  8822. (D = 0),
  8823. (b = 0),
  8824. (n = N.length),
  8825. (T = (e.tr / 1e3) * e.finalSize);
  8826. var $ = -1;
  8827. for (s = 0; s < n; s += 1)
  8828. (x = N[s].charCodeAt(0)),
  8829. (a = !1),
  8830. N[s] === ' '
  8831. ? ($ = s)
  8832. : (x === 13 || x === 3) &&
  8833. ((b = 0),
  8834. (a = !0),
  8835. (D += e.finalLineHeight || e.finalSize * 1.2)),
  8836. t.chars
  8837. ? ((m = t.getCharData(N[s], f.fStyle, f.fFamily)),
  8838. (d = a ? 0 : (m.w * e.finalSize) / 100))
  8839. : (d = t.measureText(N[s], e.f, e.finalSize)),
  8840. b + d > I && N[s] !== ' '
  8841. ? ($ === -1 ? (n += 1) : (s = $),
  8842. (D += e.finalLineHeight || e.finalSize * 1.2),
  8843. N.splice(s, $ === s ? 1 : 0, '\r'),
  8844. ($ = -1),
  8845. (b = 0))
  8846. : ((b += d), (b += T));
  8847. (D += (f.ascent * e.finalSize) / 100),
  8848. this.canResize && e.finalSize > this.minimumFontSize && V < D
  8849. ? ((e.finalSize -= 1),
  8850. (e.finalLineHeight = (e.finalSize * e.lh) / e.s))
  8851. : ((e.finalText = N), (n = e.finalText.length), (_ = !1));
  8852. }
  8853. (b = -T), (d = 0);
  8854. var O = 0,
  8855. B;
  8856. for (s = 0; s < n; s += 1)
  8857. if (
  8858. ((a = !1),
  8859. (B = e.finalText[s]),
  8860. (x = B.charCodeAt(0)),
  8861. x === 13 || x === 3
  8862. ? ((O = 0),
  8863. P.push(b),
  8864. (y = b > y ? b : y),
  8865. (b = -2 * T),
  8866. (l = ''),
  8867. (a = !0),
  8868. (p += 1))
  8869. : (l = B),
  8870. t.chars
  8871. ? ((m = t.getCharData(
  8872. B,
  8873. f.fStyle,
  8874. t.getFontByName(e.f).fFamily
  8875. )),
  8876. (d = a ? 0 : (m.w * e.finalSize) / 100))
  8877. : (d = t.measureText(l, e.f, e.finalSize)),
  8878. B === ' ' ? (O += d + T) : ((b += d + T + O), (O = 0)),
  8879. i.push({
  8880. l: d,
  8881. an: d,
  8882. add: g,
  8883. n: a,
  8884. anIndexes: [],
  8885. val: l,
  8886. line: p,
  8887. animatorJustifyOffset: 0
  8888. }),
  8889. c == 2)
  8890. ) {
  8891. if (((g += d), l === '' || l === ' ' || s === n - 1)) {
  8892. for ((l === '' || l === ' ') && (g -= d); S <= s; )
  8893. (i[S].an = g), (i[S].ind = o), (i[S].extra = d), (S += 1);
  8894. (o += 1), (g = 0);
  8895. }
  8896. } else if (c == 3) {
  8897. if (((g += d), l === '' || s === n - 1)) {
  8898. for (l === '' && (g -= d); S <= s; )
  8899. (i[S].an = g), (i[S].ind = o), (i[S].extra = d), (S += 1);
  8900. (g = 0), (o += 1);
  8901. }
  8902. } else (i[o].ind = o), (i[o].extra = 0), (o += 1);
  8903. if (((e.l = i), (y = b > y ? b : y), P.push(b), e.sz))
  8904. (e.boxWidth = e.sz[0]), (e.justifyOffset = 0);
  8905. else
  8906. switch (((e.boxWidth = y), e.j)) {
  8907. case 1:
  8908. e.justifyOffset = -e.boxWidth;
  8909. break;
  8910. case 2:
  8911. e.justifyOffset = -e.boxWidth / 2;
  8912. break;
  8913. default:
  8914. e.justifyOffset = 0;
  8915. }
  8916. e.lineWidths = P;
  8917. var F = r.a,
  8918. k,
  8919. C;
  8920. u = F.length;
  8921. var M,
  8922. R,
  8923. L = [];
  8924. for (A = 0; A < u; A += 1) {
  8925. for (
  8926. k = F[A],
  8927. k.a.sc && (e.strokeColorAnim = !0),
  8928. k.a.sw && (e.strokeWidthAnim = !0),
  8929. (k.a.fc || k.a.fh || k.a.fs || k.a.fb) &&
  8930. (e.fillColorAnim = !0),
  8931. R = 0,
  8932. M = k.s.b,
  8933. s = 0;
  8934. s < n;
  8935. s += 1
  8936. )
  8937. (C = i[s]),
  8938. (C.anIndexes[A] = R),
  8939. ((M == 1 && C.val !== '') ||
  8940. (M == 2 && C.val !== '' && C.val !== ' ') ||
  8941. (M == 3 && (C.n || C.val == ' ' || s == n - 1)) ||
  8942. (M == 4 && (C.n || s == n - 1))) &&
  8943. (k.s.rn === 1 && L.push(R), (R += 1));
  8944. r.a[A].s.totalChars = R;
  8945. var j = -1,
  8946. z;
  8947. if (k.s.rn === 1)
  8948. for (s = 0; s < n; s += 1)
  8949. (C = i[s]),
  8950. j != C.anIndexes[A] &&
  8951. ((j = C.anIndexes[A]),
  8952. (z = L.splice(Math.floor(Math.random() * L.length), 1)[0])),
  8953. (C.anIndexes[A] = z);
  8954. }
  8955. (e.yOffset = e.finalLineHeight || e.finalSize * 1.2),
  8956. (e.ls = e.ls || 0),
  8957. (e.ascent = (f.ascent * e.finalSize) / 100);
  8958. }),
  8959. (TextProperty.prototype.updateDocumentData = function (e, t) {
  8960. t = t === void 0 ? this.keysIndex : t;
  8961. var r = this.copyData({}, this.data.d.k[t].s);
  8962. (r = this.copyData(r, e)),
  8963. (this.data.d.k[t].s = r),
  8964. this.recalculate(t),
  8965. this.setCurrentData(r),
  8966. this.elem.addDynamicProperty(this);
  8967. }),
  8968. (TextProperty.prototype.recalculate = function (e) {
  8969. var t = this.data.d.k[e].s;
  8970. (t.__complete = !1),
  8971. (this.keysIndex = 0),
  8972. (this._isFirstFrame = !0),
  8973. this.getValue(t);
  8974. }),
  8975. (TextProperty.prototype.canResizeFont = function (e) {
  8976. (this.canResize = e),
  8977. this.recalculate(this.keysIndex),
  8978. this.elem.addDynamicProperty(this);
  8979. }),
  8980. (TextProperty.prototype.setMinimumFontSize = function (e) {
  8981. (this.minimumFontSize = Math.floor(e) || 1),
  8982. this.recalculate(this.keysIndex),
  8983. this.elem.addDynamicProperty(this);
  8984. });
  8985. var TextSelectorProp = (function () {
  8986. var e = Math.max,
  8987. t = Math.min,
  8988. r = Math.floor;
  8989. function i(n, a) {
  8990. (this._currentTextLength = -1),
  8991. (this.k = !1),
  8992. (this.data = a),
  8993. (this.elem = n),
  8994. (this.comp = n.comp),
  8995. (this.finalS = 0),
  8996. (this.finalE = 0),
  8997. this.initDynamicPropertyContainer(n),
  8998. (this.s = PropertyFactory.getProp(n, a.s || { k: 0 }, 0, 0, this)),
  8999. 'e' in a
  9000. ? (this.e = PropertyFactory.getProp(n, a.e, 0, 0, this))
  9001. : (this.e = { v: 100 }),
  9002. (this.o = PropertyFactory.getProp(n, a.o || { k: 0 }, 0, 0, this)),
  9003. (this.xe = PropertyFactory.getProp(
  9004. n,
  9005. a.xe || { k: 0 },
  9006. 0,
  9007. 0,
  9008. this
  9009. )),
  9010. (this.ne = PropertyFactory.getProp(
  9011. n,
  9012. a.ne || { k: 0 },
  9013. 0,
  9014. 0,
  9015. this
  9016. )),
  9017. (this.sm = PropertyFactory.getProp(
  9018. n,
  9019. a.sm || { k: 100 },
  9020. 0,
  9021. 0,
  9022. this
  9023. )),
  9024. (this.a = PropertyFactory.getProp(n, a.a, 0, 0.01, this)),
  9025. this.dynamicProperties.length || this.getValue();
  9026. }
  9027. (i.prototype = {
  9028. getMult: function (a) {
  9029. this._currentTextLength !==
  9030. this.elem.textProperty.currentData.l.length && this.getValue();
  9031. var o = 0,
  9032. l = 0,
  9033. c = 1,
  9034. g = 1;
  9035. this.ne.v > 0 ? (o = this.ne.v / 100) : (l = -this.ne.v / 100),
  9036. this.xe.v > 0
  9037. ? (c = 1 - this.xe.v / 100)
  9038. : (g = 1 + this.xe.v / 100);
  9039. var S = BezierFactory.getBezierEasing(o, l, c, g).get,
  9040. p = 0,
  9041. P = this.finalS,
  9042. b = this.finalE,
  9043. y = this.data.sh;
  9044. if (y === 2)
  9045. b === P
  9046. ? (p = a >= b ? 1 : 0)
  9047. : (p = e(0, t(0.5 / (b - P) + (a - P) / (b - P), 1))),
  9048. (p = S(p));
  9049. else if (y === 3)
  9050. b === P
  9051. ? (p = a >= b ? 0 : 1)
  9052. : (p = 1 - e(0, t(0.5 / (b - P) + (a - P) / (b - P), 1))),
  9053. (p = S(p));
  9054. else if (y === 4)
  9055. b === P
  9056. ? (p = 0)
  9057. : ((p = e(0, t(0.5 / (b - P) + (a - P) / (b - P), 1))),
  9058. p < 0.5 ? (p *= 2) : (p = 1 - 2 * (p - 0.5))),
  9059. (p = S(p));
  9060. else if (y === 5) {
  9061. if (b === P) p = 0;
  9062. else {
  9063. var A = b - P;
  9064. a = t(e(0, a + 0.5 - P), b - P);
  9065. var u = -A / 2 + a,
  9066. f = A / 2;
  9067. p = Math.sqrt(1 - (u * u) / (f * f));
  9068. }
  9069. p = S(p);
  9070. } else
  9071. y === 6
  9072. ? (b === P
  9073. ? (p = 0)
  9074. : ((a = t(e(0, a + 0.5 - P), b - P)),
  9075. (p =
  9076. (1 + Math.cos(Math.PI + (Math.PI * 2 * a) / (b - P))) /
  9077. 2)),
  9078. (p = S(p)))
  9079. : (a >= r(P) &&
  9080. (a - P < 0
  9081. ? (p = e(0, t(t(b, 1) - (P - a), 1)))
  9082. : (p = e(0, t(b - a, 1)))),
  9083. (p = S(p)));
  9084. if (this.sm.v !== 100) {
  9085. var m = this.sm.v * 0.01;
  9086. m === 0 && (m = 1e-8);
  9087. var d = 0.5 - m * 0.5;
  9088. p < d ? (p = 0) : ((p = (p - d) / m), p > 1 && (p = 1));
  9089. }
  9090. return p * this.a.v;
  9091. },
  9092. getValue: function (a) {
  9093. this.iterateDynamicProperties(),
  9094. (this._mdf = a || this._mdf),
  9095. (this._currentTextLength =
  9096. this.elem.textProperty.currentData.l.length || 0),
  9097. a && this.data.r === 2 && (this.e.v = this._currentTextLength);
  9098. var o = this.data.r === 2 ? 1 : 100 / this.data.totalChars,
  9099. l = this.o.v / o,
  9100. c = this.s.v / o + l,
  9101. g = this.e.v / o + l;
  9102. if (c > g) {
  9103. var S = c;
  9104. (c = g), (g = S);
  9105. }
  9106. (this.finalS = c), (this.finalE = g);
  9107. }
  9108. }),
  9109. extendPrototype([DynamicPropertyContainer], i);
  9110. function s(n, a, o) {
  9111. return new i(n, a);
  9112. }
  9113. return { getTextSelectorProp: s };
  9114. })();
  9115. function TextAnimatorDataProperty(e, t, r) {
  9116. var i = { propType: !1 },
  9117. s = PropertyFactory.getProp,
  9118. n = t.a;
  9119. (this.a = {
  9120. r: n.r ? s(e, n.r, 0, degToRads, r) : i,
  9121. rx: n.rx ? s(e, n.rx, 0, degToRads, r) : i,
  9122. ry: n.ry ? s(e, n.ry, 0, degToRads, r) : i,
  9123. sk: n.sk ? s(e, n.sk, 0, degToRads, r) : i,
  9124. sa: n.sa ? s(e, n.sa, 0, degToRads, r) : i,
  9125. s: n.s ? s(e, n.s, 1, 0.01, r) : i,
  9126. a: n.a ? s(e, n.a, 1, 0, r) : i,
  9127. o: n.o ? s(e, n.o, 0, 0.01, r) : i,
  9128. p: n.p ? s(e, n.p, 1, 0, r) : i,
  9129. sw: n.sw ? s(e, n.sw, 0, 0, r) : i,
  9130. sc: n.sc ? s(e, n.sc, 1, 0, r) : i,
  9131. fc: n.fc ? s(e, n.fc, 1, 0, r) : i,
  9132. fh: n.fh ? s(e, n.fh, 0, 0, r) : i,
  9133. fs: n.fs ? s(e, n.fs, 0, 0.01, r) : i,
  9134. fb: n.fb ? s(e, n.fb, 0, 0.01, r) : i,
  9135. t: n.t ? s(e, n.t, 0, 0, r) : i
  9136. }),
  9137. (this.s = TextSelectorProp.getTextSelectorProp(e, t.s, r)),
  9138. (this.s.t = t.s.t);
  9139. }
  9140. function TextAnimatorProperty(e, t, r) {
  9141. (this._isFirstFrame = !0),
  9142. (this._hasMaskedPath = !1),
  9143. (this._frameId = -1),
  9144. (this._textData = e),
  9145. (this._renderType = t),
  9146. (this._elem = r),
  9147. (this._animatorsData = createSizedArray(this._textData.a.length)),
  9148. (this._pathData = {}),
  9149. (this._moreOptions = { alignment: {} }),
  9150. (this.renderedLetters = []),
  9151. (this.lettersChangedFlag = !1),
  9152. this.initDynamicPropertyContainer(r);
  9153. }
  9154. (TextAnimatorProperty.prototype.searchProperties = function () {
  9155. var e,
  9156. t = this._textData.a.length,
  9157. r,
  9158. i = PropertyFactory.getProp;
  9159. for (e = 0; e < t; e += 1)
  9160. (r = this._textData.a[e]),
  9161. (this._animatorsData[e] = new TextAnimatorDataProperty(
  9162. this._elem,
  9163. r,
  9164. this
  9165. ));
  9166. this._textData.p && 'm' in this._textData.p
  9167. ? ((this._pathData = {
  9168. a: i(this._elem, this._textData.p.a, 0, 0, this),
  9169. f: i(this._elem, this._textData.p.f, 0, 0, this),
  9170. l: i(this._elem, this._textData.p.l, 0, 0, this),
  9171. r: i(this._elem, this._textData.p.r, 0, 0, this),
  9172. p: i(this._elem, this._textData.p.p, 0, 0, this),
  9173. m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
  9174. }),
  9175. (this._hasMaskedPath = !0))
  9176. : (this._hasMaskedPath = !1),
  9177. (this._moreOptions.alignment = i(
  9178. this._elem,
  9179. this._textData.m.a,
  9180. 1,
  9181. 0,
  9182. this
  9183. ));
  9184. }),
  9185. (TextAnimatorProperty.prototype.getMeasures = function (e, t) {
  9186. if (
  9187. ((this.lettersChangedFlag = t),
  9188. !(
  9189. !this._mdf &&
  9190. !this._isFirstFrame &&
  9191. !t &&
  9192. (!this._hasMaskedPath || !this._pathData.m._mdf)
  9193. ))
  9194. ) {
  9195. this._isFirstFrame = !1;
  9196. var r = this._moreOptions.alignment.v,
  9197. i = this._animatorsData,
  9198. s = this._textData,
  9199. n = this.mHelper,
  9200. a = this._renderType,
  9201. o = this.renderedLetters.length,
  9202. l,
  9203. c,
  9204. g,
  9205. S,
  9206. p = e.l,
  9207. P,
  9208. b,
  9209. y,
  9210. A,
  9211. u,
  9212. f,
  9213. m,
  9214. d,
  9215. E,
  9216. T,
  9217. x,
  9218. _,
  9219. I,
  9220. V,
  9221. D;
  9222. if (this._hasMaskedPath) {
  9223. if (
  9224. ((D = this._pathData.m),
  9225. !this._pathData.n || this._pathData._mdf)
  9226. ) {
  9227. var N = D.v;
  9228. this._pathData.r.v && (N = N.reverse()),
  9229. (P = { tLength: 0, segments: [] }),
  9230. (S = N._length - 1);
  9231. var $;
  9232. for (_ = 0, g = 0; g < S; g += 1)
  9233. ($ = bez.buildBezierData(
  9234. N.v[g],
  9235. N.v[g + 1],
  9236. [N.o[g][0] - N.v[g][0], N.o[g][1] - N.v[g][1]],
  9237. [
  9238. N.i[g + 1][0] - N.v[g + 1][0],
  9239. N.i[g + 1][1] - N.v[g + 1][1]
  9240. ]
  9241. )),
  9242. (P.tLength += $.segmentLength),
  9243. P.segments.push($),
  9244. (_ += $.segmentLength);
  9245. (g = S),
  9246. D.v.c &&
  9247. (($ = bez.buildBezierData(
  9248. N.v[g],
  9249. N.v[0],
  9250. [N.o[g][0] - N.v[g][0], N.o[g][1] - N.v[g][1]],
  9251. [N.i[0][0] - N.v[0][0], N.i[0][1] - N.v[0][1]]
  9252. )),
  9253. (P.tLength += $.segmentLength),
  9254. P.segments.push($),
  9255. (_ += $.segmentLength)),
  9256. (this._pathData.pi = P);
  9257. }
  9258. if (
  9259. ((P = this._pathData.pi),
  9260. (b = this._pathData.f.v),
  9261. (m = 0),
  9262. (f = 1),
  9263. (A = 0),
  9264. (u = !0),
  9265. (T = P.segments),
  9266. b < 0 && D.v.c)
  9267. )
  9268. for (
  9269. P.tLength < Math.abs(b) && (b = -Math.abs(b) % P.tLength),
  9270. m = T.length - 1,
  9271. E = T[m].points,
  9272. f = E.length - 1;
  9273. b < 0;
  9274. )
  9275. (b += E[f].partialLength),
  9276. (f -= 1),
  9277. f < 0 && ((m -= 1), (E = T[m].points), (f = E.length - 1));
  9278. (E = T[m].points),
  9279. (d = E[f - 1]),
  9280. (y = E[f]),
  9281. (x = y.partialLength);
  9282. }
  9283. (S = p.length), (l = 0), (c = 0);
  9284. var O = e.finalSize * 1.2 * 0.714,
  9285. B = !0,
  9286. F,
  9287. k,
  9288. C,
  9289. M,
  9290. R;
  9291. M = i.length;
  9292. var L,
  9293. j = -1,
  9294. z,
  9295. H,
  9296. U,
  9297. q = b,
  9298. ee = m,
  9299. ie = f,
  9300. te = -1,
  9301. Y,
  9302. X,
  9303. J,
  9304. G,
  9305. W,
  9306. se,
  9307. le,
  9308. ne,
  9309. re = '',
  9310. ae = this.defaultPropsArray,
  9311. oe;
  9312. if (e.j === 2 || e.j === 1) {
  9313. var K = 0,
  9314. he = 0,
  9315. ce = e.j === 2 ? -0.5 : -1,
  9316. Z = 0,
  9317. pe = !0;
  9318. for (g = 0; g < S; g += 1)
  9319. if (p[g].n) {
  9320. for (K && (K += he); Z < g; )
  9321. (p[Z].animatorJustifyOffset = K), (Z += 1);
  9322. (K = 0), (pe = !0);
  9323. } else {
  9324. for (C = 0; C < M; C += 1)
  9325. (F = i[C].a),
  9326. F.t.propType &&
  9327. (pe && e.j === 2 && (he += F.t.v * ce),
  9328. (k = i[C].s),
  9329. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9330. L.length
  9331. ? (K += F.t.v * L[0] * ce)
  9332. : (K += F.t.v * L * ce));
  9333. pe = !1;
  9334. }
  9335. for (K && (K += he); Z < g; )
  9336. (p[Z].animatorJustifyOffset = K), (Z += 1);
  9337. }
  9338. for (g = 0; g < S; g += 1) {
  9339. if ((n.reset(), (Y = 1), p[g].n))
  9340. (l = 0),
  9341. (c += e.yOffset),
  9342. (c += B ? 1 : 0),
  9343. (b = q),
  9344. (B = !1),
  9345. this._hasMaskedPath &&
  9346. ((m = ee),
  9347. (f = ie),
  9348. (E = T[m].points),
  9349. (d = E[f - 1]),
  9350. (y = E[f]),
  9351. (x = y.partialLength),
  9352. (A = 0)),
  9353. (re = ''),
  9354. (ne = ''),
  9355. (se = ''),
  9356. (oe = ''),
  9357. (ae = this.defaultPropsArray);
  9358. else {
  9359. if (this._hasMaskedPath) {
  9360. if (te !== p[g].line) {
  9361. switch (e.j) {
  9362. case 1:
  9363. b += _ - e.lineWidths[p[g].line];
  9364. break;
  9365. case 2:
  9366. b += (_ - e.lineWidths[p[g].line]) / 2;
  9367. break;
  9368. }
  9369. te = p[g].line;
  9370. }
  9371. j !== p[g].ind &&
  9372. (p[j] && (b += p[j].extra),
  9373. (b += p[g].an / 2),
  9374. (j = p[g].ind)),
  9375. (b += r[0] * p[g].an * 0.005);
  9376. var Q = 0;
  9377. for (C = 0; C < M; C += 1)
  9378. (F = i[C].a),
  9379. F.p.propType &&
  9380. ((k = i[C].s),
  9381. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9382. L.length
  9383. ? (Q += F.p.v[0] * L[0])
  9384. : (Q += F.p.v[0] * L)),
  9385. F.a.propType &&
  9386. ((k = i[C].s),
  9387. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9388. L.length
  9389. ? (Q += F.a.v[0] * L[0])
  9390. : (Q += F.a.v[0] * L));
  9391. for (
  9392. u = !0,
  9393. this._pathData.a.v &&
  9394. ((b =
  9395. p[0].an * 0.5 +
  9396. ((_ -
  9397. this._pathData.f.v -
  9398. p[0].an * 0.5 -
  9399. p[p.length - 1].an * 0.5) *
  9400. j) /
  9401. (S - 1)),
  9402. (b += this._pathData.f.v));
  9403. u;
  9404. )
  9405. A + x >= b + Q || !E
  9406. ? ((I = (b + Q - A) / y.partialLength),
  9407. (H = d.point[0] + (y.point[0] - d.point[0]) * I),
  9408. (U = d.point[1] + (y.point[1] - d.point[1]) * I),
  9409. n.translate(
  9410. -r[0] * p[g].an * 0.005,
  9411. -(r[1] * O) * 0.01
  9412. ),
  9413. (u = !1))
  9414. : E &&
  9415. ((A += y.partialLength),
  9416. (f += 1),
  9417. f >= E.length &&
  9418. ((f = 0),
  9419. (m += 1),
  9420. T[m]
  9421. ? (E = T[m].points)
  9422. : D.v.c
  9423. ? ((f = 0), (m = 0), (E = T[m].points))
  9424. : ((A -= y.partialLength), (E = null))),
  9425. E && ((d = y), (y = E[f]), (x = y.partialLength)));
  9426. (z = p[g].an / 2 - p[g].add), n.translate(-z, 0, 0);
  9427. } else
  9428. (z = p[g].an / 2 - p[g].add),
  9429. n.translate(-z, 0, 0),
  9430. n.translate(-r[0] * p[g].an * 0.005, -r[1] * O * 0.01, 0);
  9431. for (C = 0; C < M; C += 1)
  9432. (F = i[C].a),
  9433. F.t.propType &&
  9434. ((k = i[C].s),
  9435. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9436. (l !== 0 || e.j !== 0) &&
  9437. (this._hasMaskedPath
  9438. ? L.length
  9439. ? (b += F.t.v * L[0])
  9440. : (b += F.t.v * L)
  9441. : L.length
  9442. ? (l += F.t.v * L[0])
  9443. : (l += F.t.v * L)));
  9444. for (
  9445. e.strokeWidthAnim && (J = e.sw || 0),
  9446. e.strokeColorAnim &&
  9447. (e.sc
  9448. ? (X = [e.sc[0], e.sc[1], e.sc[2]])
  9449. : (X = [0, 0, 0])),
  9450. e.fillColorAnim &&
  9451. e.fc &&
  9452. (G = [e.fc[0], e.fc[1], e.fc[2]]),
  9453. C = 0;
  9454. C < M;
  9455. C += 1
  9456. )
  9457. (F = i[C].a),
  9458. F.a.propType &&
  9459. ((k = i[C].s),
  9460. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9461. L.length
  9462. ? n.translate(
  9463. -F.a.v[0] * L[0],
  9464. -F.a.v[1] * L[1],
  9465. F.a.v[2] * L[2]
  9466. )
  9467. : n.translate(
  9468. -F.a.v[0] * L,
  9469. -F.a.v[1] * L,
  9470. F.a.v[2] * L
  9471. ));
  9472. for (C = 0; C < M; C += 1)
  9473. (F = i[C].a),
  9474. F.s.propType &&
  9475. ((k = i[C].s),
  9476. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9477. L.length
  9478. ? n.scale(
  9479. 1 + (F.s.v[0] - 1) * L[0],
  9480. 1 + (F.s.v[1] - 1) * L[1],
  9481. 1
  9482. )
  9483. : n.scale(
  9484. 1 + (F.s.v[0] - 1) * L,
  9485. 1 + (F.s.v[1] - 1) * L,
  9486. 1
  9487. ));
  9488. for (C = 0; C < M; C += 1) {
  9489. if (
  9490. ((F = i[C].a),
  9491. (k = i[C].s),
  9492. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9493. F.sk.propType &&
  9494. (L.length
  9495. ? n.skewFromAxis(-F.sk.v * L[0], F.sa.v * L[1])
  9496. : n.skewFromAxis(-F.sk.v * L, F.sa.v * L)),
  9497. F.r.propType &&
  9498. (L.length
  9499. ? n.rotateZ(-F.r.v * L[2])
  9500. : n.rotateZ(-F.r.v * L)),
  9501. F.ry.propType &&
  9502. (L.length
  9503. ? n.rotateY(F.ry.v * L[1])
  9504. : n.rotateY(F.ry.v * L)),
  9505. F.rx.propType &&
  9506. (L.length
  9507. ? n.rotateX(F.rx.v * L[0])
  9508. : n.rotateX(F.rx.v * L)),
  9509. F.o.propType &&
  9510. (L.length
  9511. ? (Y += (F.o.v * L[0] - Y) * L[0])
  9512. : (Y += (F.o.v * L - Y) * L)),
  9513. e.strokeWidthAnim &&
  9514. F.sw.propType &&
  9515. (L.length ? (J += F.sw.v * L[0]) : (J += F.sw.v * L)),
  9516. e.strokeColorAnim && F.sc.propType)
  9517. )
  9518. for (W = 0; W < 3; W += 1)
  9519. L.length
  9520. ? (X[W] += (F.sc.v[W] - X[W]) * L[0])
  9521. : (X[W] += (F.sc.v[W] - X[W]) * L);
  9522. if (e.fillColorAnim && e.fc) {
  9523. if (F.fc.propType)
  9524. for (W = 0; W < 3; W += 1)
  9525. L.length
  9526. ? (G[W] += (F.fc.v[W] - G[W]) * L[0])
  9527. : (G[W] += (F.fc.v[W] - G[W]) * L);
  9528. F.fh.propType &&
  9529. (L.length
  9530. ? (G = addHueToRGB(G, F.fh.v * L[0]))
  9531. : (G = addHueToRGB(G, F.fh.v * L))),
  9532. F.fs.propType &&
  9533. (L.length
  9534. ? (G = addSaturationToRGB(G, F.fs.v * L[0]))
  9535. : (G = addSaturationToRGB(G, F.fs.v * L))),
  9536. F.fb.propType &&
  9537. (L.length
  9538. ? (G = addBrightnessToRGB(G, F.fb.v * L[0]))
  9539. : (G = addBrightnessToRGB(G, F.fb.v * L)));
  9540. }
  9541. }
  9542. for (C = 0; C < M; C += 1)
  9543. (F = i[C].a),
  9544. F.p.propType &&
  9545. ((k = i[C].s),
  9546. (L = k.getMult(p[g].anIndexes[C], s.a[C].s.totalChars)),
  9547. this._hasMaskedPath
  9548. ? L.length
  9549. ? n.translate(0, F.p.v[1] * L[0], -F.p.v[2] * L[1])
  9550. : n.translate(0, F.p.v[1] * L, -F.p.v[2] * L)
  9551. : L.length
  9552. ? n.translate(
  9553. F.p.v[0] * L[0],
  9554. F.p.v[1] * L[1],
  9555. -F.p.v[2] * L[2]
  9556. )
  9557. : n.translate(
  9558. F.p.v[0] * L,
  9559. F.p.v[1] * L,
  9560. -F.p.v[2] * L
  9561. ));
  9562. if (
  9563. (e.strokeWidthAnim && (se = J < 0 ? 0 : J),
  9564. e.strokeColorAnim &&
  9565. (le =
  9566. 'rgb(' +
  9567. Math.round(X[0] * 255) +
  9568. ',' +
  9569. Math.round(X[1] * 255) +
  9570. ',' +
  9571. Math.round(X[2] * 255) +
  9572. ')'),
  9573. e.fillColorAnim &&
  9574. e.fc &&
  9575. (ne =
  9576. 'rgb(' +
  9577. Math.round(G[0] * 255) +
  9578. ',' +
  9579. Math.round(G[1] * 255) +
  9580. ',' +
  9581. Math.round(G[2] * 255) +
  9582. ')'),
  9583. this._hasMaskedPath)
  9584. ) {
  9585. if (
  9586. (n.translate(0, -e.ls),
  9587. n.translate(0, r[1] * O * 0.01 + c, 0),
  9588. this._pathData.p.v)
  9589. ) {
  9590. V = (y.point[1] - d.point[1]) / (y.point[0] - d.point[0]);
  9591. var ue = (Math.atan(V) * 180) / Math.PI;
  9592. y.point[0] < d.point[0] && (ue += 180),
  9593. n.rotate((-ue * Math.PI) / 180);
  9594. }
  9595. n.translate(H, U, 0),
  9596. (b -= r[0] * p[g].an * 0.005),
  9597. p[g + 1] &&
  9598. j !== p[g + 1].ind &&
  9599. ((b += p[g].an / 2), (b += e.tr * 0.001 * e.finalSize));
  9600. } else {
  9601. switch (
  9602. (n.translate(l, c, 0),
  9603. e.ps && n.translate(e.ps[0], e.ps[1] + e.ascent, 0),
  9604. e.j)
  9605. ) {
  9606. case 1:
  9607. n.translate(
  9608. p[g].animatorJustifyOffset +
  9609. e.justifyOffset +
  9610. (e.boxWidth - e.lineWidths[p[g].line]),
  9611. 0,
  9612. 0
  9613. );
  9614. break;
  9615. case 2:
  9616. n.translate(
  9617. p[g].animatorJustifyOffset +
  9618. e.justifyOffset +
  9619. (e.boxWidth - e.lineWidths[p[g].line]) / 2,
  9620. 0,
  9621. 0
  9622. );
  9623. break;
  9624. }
  9625. n.translate(0, -e.ls),
  9626. n.translate(z, 0, 0),
  9627. n.translate(r[0] * p[g].an * 0.005, r[1] * O * 0.01, 0),
  9628. (l += p[g].l + e.tr * 0.001 * e.finalSize);
  9629. }
  9630. a === 'html'
  9631. ? (re = n.toCSS())
  9632. : a === 'svg'
  9633. ? (re = n.to2dCSS())
  9634. : (ae = [
  9635. n.props[0],
  9636. n.props[1],
  9637. n.props[2],
  9638. n.props[3],
  9639. n.props[4],
  9640. n.props[5],
  9641. n.props[6],
  9642. n.props[7],
  9643. n.props[8],
  9644. n.props[9],
  9645. n.props[10],
  9646. n.props[11],
  9647. n.props[12],
  9648. n.props[13],
  9649. n.props[14],
  9650. n.props[15]
  9651. ]),
  9652. (oe = Y);
  9653. }
  9654. o <= g
  9655. ? ((R = new LetterProps(oe, se, le, ne, re, ae)),
  9656. this.renderedLetters.push(R),
  9657. (o += 1),
  9658. (this.lettersChangedFlag = !0))
  9659. : ((R = this.renderedLetters[g]),
  9660. (this.lettersChangedFlag =
  9661. R.update(oe, se, le, ne, re, ae) ||
  9662. this.lettersChangedFlag));
  9663. }
  9664. }
  9665. }),
  9666. (TextAnimatorProperty.prototype.getValue = function () {
  9667. this._elem.globalData.frameId !== this._frameId &&
  9668. ((this._frameId = this._elem.globalData.frameId),
  9669. this.iterateDynamicProperties());
  9670. }),
  9671. (TextAnimatorProperty.prototype.mHelper = new Matrix()),
  9672. (TextAnimatorProperty.prototype.defaultPropsArray = []),
  9673. extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
  9674. function ITextElement() {}
  9675. (ITextElement.prototype.initElement = function (e, t, r) {
  9676. (this.lettersChangedFlag = !0),
  9677. this.initFrame(),
  9678. this.initBaseData(e, t, r),
  9679. (this.textProperty = new TextProperty(
  9680. this,
  9681. e.t,
  9682. this.dynamicProperties
  9683. )),
  9684. (this.textAnimator = new TextAnimatorProperty(
  9685. e.t,
  9686. this.renderType,
  9687. this
  9688. )),
  9689. this.initTransform(e, t, r),
  9690. this.initHierarchy(),
  9691. this.initRenderable(),
  9692. this.initRendererElement(),
  9693. this.createContainerElements(),
  9694. this.createRenderableComponents(),
  9695. this.createContent(),
  9696. this.hide(),
  9697. this.textAnimator.searchProperties(this.dynamicProperties);
  9698. }),
  9699. (ITextElement.prototype.prepareFrame = function (e) {
  9700. (this._mdf = !1),
  9701. this.prepareRenderableFrame(e),
  9702. this.prepareProperties(e, this.isInRange),
  9703. (this.textProperty._mdf || this.textProperty._isFirstFrame) &&
  9704. (this.buildNewText(),
  9705. (this.textProperty._isFirstFrame = !1),
  9706. (this.textProperty._mdf = !1));
  9707. }),
  9708. (ITextElement.prototype.createPathShape = function (e, t) {
  9709. var r,
  9710. i = t.length,
  9711. s,
  9712. n = '';
  9713. for (r = 0; r < i; r += 1)
  9714. t[r].ty === 'sh' &&
  9715. ((s = t[r].ks.k), (n += buildShapeString(s, s.i.length, !0, e)));
  9716. return n;
  9717. }),
  9718. (ITextElement.prototype.updateDocumentData = function (e, t) {
  9719. this.textProperty.updateDocumentData(e, t);
  9720. }),
  9721. (ITextElement.prototype.canResizeFont = function (e) {
  9722. this.textProperty.canResizeFont(e);
  9723. }),
  9724. (ITextElement.prototype.setMinimumFontSize = function (e) {
  9725. this.textProperty.setMinimumFontSize(e);
  9726. }),
  9727. (ITextElement.prototype.applyTextPropertiesToMatrix = function (
  9728. e,
  9729. t,
  9730. r,
  9731. i,
  9732. s
  9733. ) {
  9734. switch (
  9735. (e.ps && t.translate(e.ps[0], e.ps[1] + e.ascent, 0),
  9736. t.translate(0, -e.ls, 0),
  9737. e.j)
  9738. ) {
  9739. case 1:
  9740. t.translate(
  9741. e.justifyOffset + (e.boxWidth - e.lineWidths[r]),
  9742. 0,
  9743. 0
  9744. );
  9745. break;
  9746. case 2:
  9747. t.translate(
  9748. e.justifyOffset + (e.boxWidth - e.lineWidths[r]) / 2,
  9749. 0,
  9750. 0
  9751. );
  9752. break;
  9753. }
  9754. t.translate(i, s, 0);
  9755. }),
  9756. (ITextElement.prototype.buildColor = function (e) {
  9757. return (
  9758. 'rgb(' +
  9759. Math.round(e[0] * 255) +
  9760. ',' +
  9761. Math.round(e[1] * 255) +
  9762. ',' +
  9763. Math.round(e[2] * 255) +
  9764. ')'
  9765. );
  9766. }),
  9767. (ITextElement.prototype.emptyProp = new LetterProps()),
  9768. (ITextElement.prototype.destroy = function () {});
  9769. var emptyShapeData = { shapes: [] };
  9770. function SVGTextLottieElement(e, t, r) {
  9771. (this.textSpans = []),
  9772. (this.renderType = 'svg'),
  9773. this.initElement(e, t, r);
  9774. }
  9775. extendPrototype(
  9776. [
  9777. BaseElement,
  9778. TransformElement,
  9779. SVGBaseElement,
  9780. HierarchyElement,
  9781. FrameElement,
  9782. RenderableDOMElement,
  9783. ITextElement
  9784. ],
  9785. SVGTextLottieElement
  9786. ),
  9787. (SVGTextLottieElement.prototype.createContent = function () {
  9788. this.data.singleShape &&
  9789. !this.globalData.fontManager.chars &&
  9790. (this.textContainer = createNS('text'));
  9791. }),
  9792. (SVGTextLottieElement.prototype.buildTextContents = function (e) {
  9793. for (var t = 0, r = e.length, i = [], s = ''; t < r; )
  9794. e[t] === String.fromCharCode(13) || e[t] === String.fromCharCode(3)
  9795. ? (i.push(s), (s = ''))
  9796. : (s += e[t]),
  9797. (t += 1);
  9798. return i.push(s), i;
  9799. }),
  9800. (SVGTextLottieElement.prototype.buildShapeData = function (e, t) {
  9801. if (e.shapes && e.shapes.length) {
  9802. var r = e.shapes[0];
  9803. if (r.it) {
  9804. var i = r.it[r.it.length - 1];
  9805. i.s && ((i.s.k[0] = t), (i.s.k[1] = t));
  9806. }
  9807. }
  9808. return e;
  9809. }),
  9810. (SVGTextLottieElement.prototype.buildNewText = function () {
  9811. this.addDynamicProperty(this);
  9812. var e,
  9813. t,
  9814. r = this.textProperty.currentData;
  9815. (this.renderedLetters = createSizedArray(r ? r.l.length : 0)),
  9816. r.fc
  9817. ? this.layerElement.setAttribute('fill', this.buildColor(r.fc))
  9818. : this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)'),
  9819. r.sc &&
  9820. (this.layerElement.setAttribute('stroke', this.buildColor(r.sc)),
  9821. this.layerElement.setAttribute('stroke-width', r.sw)),
  9822. this.layerElement.setAttribute('font-size', r.finalSize);
  9823. var i = this.globalData.fontManager.getFontByName(r.f);
  9824. if (i.fClass) this.layerElement.setAttribute('class', i.fClass);
  9825. else {
  9826. this.layerElement.setAttribute('font-family', i.fFamily);
  9827. var s = r.fWeight,
  9828. n = r.fStyle;
  9829. this.layerElement.setAttribute('font-style', n),
  9830. this.layerElement.setAttribute('font-weight', s);
  9831. }
  9832. this.layerElement.setAttribute('aria-label', r.t);
  9833. var a = r.l || [],
  9834. o = !!this.globalData.fontManager.chars;
  9835. t = a.length;
  9836. var l,
  9837. c = this.mHelper,
  9838. g = '',
  9839. S = this.data.singleShape,
  9840. p = 0,
  9841. P = 0,
  9842. b = !0,
  9843. y = r.tr * 0.001 * r.finalSize;
  9844. if (S && !o && !r.sz) {
  9845. var A = this.textContainer,
  9846. u = 'start';
  9847. switch (r.j) {
  9848. case 1:
  9849. u = 'end';
  9850. break;
  9851. case 2:
  9852. u = 'middle';
  9853. break;
  9854. default:
  9855. u = 'start';
  9856. break;
  9857. }
  9858. A.setAttribute('text-anchor', u),
  9859. A.setAttribute('letter-spacing', y);
  9860. var f = this.buildTextContents(r.finalText);
  9861. for (
  9862. t = f.length, P = r.ps ? r.ps[1] + r.ascent : 0, e = 0;
  9863. e < t;
  9864. e += 1
  9865. )
  9866. (l = this.textSpans[e].span || createNS('tspan')),
  9867. (l.textContent = f[e]),
  9868. l.setAttribute('x', 0),
  9869. l.setAttribute('y', P),
  9870. (l.style.display = 'inherit'),
  9871. A.appendChild(l),
  9872. this.textSpans[e] ||
  9873. (this.textSpans[e] = { span: null, glyph: null }),
  9874. (this.textSpans[e].span = l),
  9875. (P += r.finalLineHeight);
  9876. this.layerElement.appendChild(A);
  9877. } else {
  9878. var m = this.textSpans.length,
  9879. d;
  9880. for (e = 0; e < t; e += 1) {
  9881. if (
  9882. (this.textSpans[e] ||
  9883. (this.textSpans[e] = {
  9884. span: null,
  9885. childSpan: null,
  9886. glyph: null
  9887. }),
  9888. !o || !S || e === 0)
  9889. ) {
  9890. if (
  9891. ((l =
  9892. m > e
  9893. ? this.textSpans[e].span
  9894. : createNS(o ? 'g' : 'text')),
  9895. m <= e)
  9896. ) {
  9897. if (
  9898. (l.setAttribute('stroke-linecap', 'butt'),
  9899. l.setAttribute('stroke-linejoin', 'round'),
  9900. l.setAttribute('stroke-miterlimit', '4'),
  9901. (this.textSpans[e].span = l),
  9902. o)
  9903. ) {
  9904. var E = createNS('g');
  9905. l.appendChild(E), (this.textSpans[e].childSpan = E);
  9906. }
  9907. (this.textSpans[e].span = l),
  9908. this.layerElement.appendChild(l);
  9909. }
  9910. l.style.display = 'inherit';
  9911. }
  9912. if (
  9913. (c.reset(),
  9914. S &&
  9915. (a[e].n &&
  9916. ((p = -y), (P += r.yOffset), (P += b ? 1 : 0), (b = !1)),
  9917. this.applyTextPropertiesToMatrix(r, c, a[e].line, p, P),
  9918. (p += a[e].l || 0),
  9919. (p += y)),
  9920. o)
  9921. ) {
  9922. d = this.globalData.fontManager.getCharData(
  9923. r.finalText[e],
  9924. i.fStyle,
  9925. this.globalData.fontManager.getFontByName(r.f).fFamily
  9926. );
  9927. var T;
  9928. if (d.t === 1)
  9929. T = new SVGCompElement(d.data, this.globalData, this);
  9930. else {
  9931. var x = emptyShapeData;
  9932. d.data &&
  9933. d.data.shapes &&
  9934. (x = this.buildShapeData(d.data, r.finalSize)),
  9935. (T = new SVGShapeElement(x, this.globalData, this));
  9936. }
  9937. if (this.textSpans[e].glyph) {
  9938. var _ = this.textSpans[e].glyph;
  9939. this.textSpans[e].childSpan.removeChild(_.layerElement),
  9940. _.destroy();
  9941. }
  9942. (this.textSpans[e].glyph = T),
  9943. (T._debug = !0),
  9944. T.prepareFrame(0),
  9945. T.renderFrame(),
  9946. this.textSpans[e].childSpan.appendChild(T.layerElement),
  9947. d.t === 1 &&
  9948. this.textSpans[e].childSpan.setAttribute(
  9949. 'transform',
  9950. 'scale(' +
  9951. r.finalSize / 100 +
  9952. ',' +
  9953. r.finalSize / 100 +
  9954. ')'
  9955. );
  9956. } else
  9957. S &&
  9958. l.setAttribute(
  9959. 'transform',
  9960. 'translate(' + c.props[12] + ',' + c.props[13] + ')'
  9961. ),
  9962. (l.textContent = a[e].val),
  9963. l.setAttributeNS(
  9964. 'http://www.w3.org/XML/1998/namespace',
  9965. 'xml:space',
  9966. 'preserve'
  9967. );
  9968. }
  9969. S && l && l.setAttribute('d', g);
  9970. }
  9971. for (; e < this.textSpans.length; )
  9972. (this.textSpans[e].span.style.display = 'none'), (e += 1);
  9973. this._sizeChanged = !0;
  9974. }),
  9975. (SVGTextLottieElement.prototype.sourceRectAtTime = function () {
  9976. if (
  9977. (this.prepareFrame(this.comp.renderedFrame - this.data.st),
  9978. this.renderInnerContent(),
  9979. this._sizeChanged)
  9980. ) {
  9981. this._sizeChanged = !1;
  9982. var e = this.layerElement.getBBox();
  9983. this.bbox = {
  9984. top: e.y,
  9985. left: e.x,
  9986. width: e.width,
  9987. height: e.height
  9988. };
  9989. }
  9990. return this.bbox;
  9991. }),
  9992. (SVGTextLottieElement.prototype.getValue = function () {
  9993. var e,
  9994. t = this.textSpans.length,
  9995. r;
  9996. for (
  9997. this.renderedFrame = this.comp.renderedFrame, e = 0;
  9998. e < t;
  9999. e += 1
  10000. )
  10001. (r = this.textSpans[e].glyph),
  10002. r &&
  10003. (r.prepareFrame(this.comp.renderedFrame - this.data.st),
  10004. r._mdf && (this._mdf = !0));
  10005. }),
  10006. (SVGTextLottieElement.prototype.renderInnerContent = function () {
  10007. if (
  10008. (!this.data.singleShape || this._mdf) &&
  10009. (this.textAnimator.getMeasures(
  10010. this.textProperty.currentData,
  10011. this.lettersChangedFlag
  10012. ),
  10013. this.lettersChangedFlag || this.textAnimator.lettersChangedFlag)
  10014. ) {
  10015. this._sizeChanged = !0;
  10016. var e,
  10017. t,
  10018. r = this.textAnimator.renderedLetters,
  10019. i = this.textProperty.currentData.l;
  10020. t = i.length;
  10021. var s, n, a;
  10022. for (e = 0; e < t; e += 1)
  10023. i[e].n ||
  10024. ((s = r[e]),
  10025. (n = this.textSpans[e].span),
  10026. (a = this.textSpans[e].glyph),
  10027. a && a.renderFrame(),
  10028. s._mdf.m && n.setAttribute('transform', s.m),
  10029. s._mdf.o && n.setAttribute('opacity', s.o),
  10030. s._mdf.sw && n.setAttribute('stroke-width', s.sw),
  10031. s._mdf.sc && n.setAttribute('stroke', s.sc),
  10032. s._mdf.fc && n.setAttribute('fill', s.fc));
  10033. }
  10034. });
  10035. function ISolidElement(e, t, r) {
  10036. this.initElement(e, t, r);
  10037. }
  10038. extendPrototype([IImageElement], ISolidElement),
  10039. (ISolidElement.prototype.createContent = function () {
  10040. var e = createNS('rect');
  10041. e.setAttribute('width', this.data.sw),
  10042. e.setAttribute('height', this.data.sh),
  10043. e.setAttribute('fill', this.data.sc),
  10044. this.layerElement.appendChild(e);
  10045. });
  10046. function NullElement(e, t, r) {
  10047. this.initFrame(),
  10048. this.initBaseData(e, t, r),
  10049. this.initFrame(),
  10050. this.initTransform(e, t, r),
  10051. this.initHierarchy();
  10052. }
  10053. (NullElement.prototype.prepareFrame = function (e) {
  10054. this.prepareProperties(e, !0);
  10055. }),
  10056. (NullElement.prototype.renderFrame = function () {}),
  10057. (NullElement.prototype.getBaseElement = function () {
  10058. return null;
  10059. }),
  10060. (NullElement.prototype.destroy = function () {}),
  10061. (NullElement.prototype.sourceRectAtTime = function () {}),
  10062. (NullElement.prototype.hide = function () {}),
  10063. extendPrototype(
  10064. [BaseElement, TransformElement, HierarchyElement, FrameElement],
  10065. NullElement
  10066. );
  10067. function SVGRendererBase() {}
  10068. extendPrototype([BaseRenderer], SVGRendererBase),
  10069. (SVGRendererBase.prototype.createNull = function (e) {
  10070. return new NullElement(e, this.globalData, this);
  10071. }),
  10072. (SVGRendererBase.prototype.createShape = function (e) {
  10073. return new SVGShapeElement(e, this.globalData, this);
  10074. }),
  10075. (SVGRendererBase.prototype.createText = function (e) {
  10076. return new SVGTextLottieElement(e, this.globalData, this);
  10077. }),
  10078. (SVGRendererBase.prototype.createImage = function (e) {
  10079. return new IImageElement(e, this.globalData, this);
  10080. }),
  10081. (SVGRendererBase.prototype.createSolid = function (e) {
  10082. return new ISolidElement(e, this.globalData, this);
  10083. }),
  10084. (SVGRendererBase.prototype.configAnimation = function (e) {
  10085. this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg'),
  10086. this.svgElement.setAttribute(
  10087. 'xmlns:xlink',
  10088. 'http://www.w3.org/1999/xlink'
  10089. ),
  10090. this.renderConfig.viewBoxSize
  10091. ? this.svgElement.setAttribute(
  10092. 'viewBox',
  10093. this.renderConfig.viewBoxSize
  10094. )
  10095. : this.svgElement.setAttribute(
  10096. 'viewBox',
  10097. '0 0 ' + e.w + ' ' + e.h
  10098. ),
  10099. this.renderConfig.viewBoxOnly ||
  10100. (this.svgElement.setAttribute('width', e.w),
  10101. this.svgElement.setAttribute('height', e.h),
  10102. (this.svgElement.style.width = '100%'),
  10103. (this.svgElement.style.height = '100%'),
  10104. (this.svgElement.style.transform = 'translate3d(0,0,0)'),
  10105. (this.svgElement.style.contentVisibility =
  10106. this.renderConfig.contentVisibility)),
  10107. this.renderConfig.width &&
  10108. this.svgElement.setAttribute('width', this.renderConfig.width),
  10109. this.renderConfig.height &&
  10110. this.svgElement.setAttribute('height', this.renderConfig.height),
  10111. this.renderConfig.className &&
  10112. this.svgElement.setAttribute(
  10113. 'class',
  10114. this.renderConfig.className
  10115. ),
  10116. this.renderConfig.id &&
  10117. this.svgElement.setAttribute('id', this.renderConfig.id),
  10118. this.renderConfig.focusable !== void 0 &&
  10119. this.svgElement.setAttribute(
  10120. 'focusable',
  10121. this.renderConfig.focusable
  10122. ),
  10123. this.svgElement.setAttribute(
  10124. 'preserveAspectRatio',
  10125. this.renderConfig.preserveAspectRatio
  10126. ),
  10127. this.animationItem.wrapper.appendChild(this.svgElement);
  10128. var t = this.globalData.defs;
  10129. this.setupGlobalData(e, t),
  10130. (this.globalData.progressiveLoad =
  10131. this.renderConfig.progressiveLoad),
  10132. (this.data = e);
  10133. var r = createNS('clipPath'),
  10134. i = createNS('rect');
  10135. i.setAttribute('width', e.w),
  10136. i.setAttribute('height', e.h),
  10137. i.setAttribute('x', 0),
  10138. i.setAttribute('y', 0);
  10139. var s = createElementID();
  10140. r.setAttribute('id', s),
  10141. r.appendChild(i),
  10142. this.layerElement.setAttribute(
  10143. 'clip-path',
  10144. 'url(' + getLocationHref() + '#' + s + ')'
  10145. ),
  10146. t.appendChild(r),
  10147. (this.layers = e.layers),
  10148. (this.elements = createSizedArray(e.layers.length));
  10149. }),
  10150. (SVGRendererBase.prototype.destroy = function () {
  10151. this.animationItem.wrapper &&
  10152. (this.animationItem.wrapper.innerText = ''),
  10153. (this.layerElement = null),
  10154. (this.globalData.defs = null);
  10155. var e,
  10156. t = this.layers ? this.layers.length : 0;
  10157. for (e = 0; e < t; e += 1)
  10158. this.elements[e] &&
  10159. this.elements[e].destroy &&
  10160. this.elements[e].destroy();
  10161. (this.elements.length = 0),
  10162. (this.destroyed = !0),
  10163. (this.animationItem = null);
  10164. }),
  10165. (SVGRendererBase.prototype.updateContainerSize = function () {}),
  10166. (SVGRendererBase.prototype.findIndexByInd = function (e) {
  10167. var t = 0,
  10168. r = this.layers.length;
  10169. for (t = 0; t < r; t += 1) if (this.layers[t].ind === e) return t;
  10170. return -1;
  10171. }),
  10172. (SVGRendererBase.prototype.buildItem = function (e) {
  10173. var t = this.elements;
  10174. if (!(t[e] || this.layers[e].ty === 99)) {
  10175. t[e] = !0;
  10176. var r = this.createItem(this.layers[e]);
  10177. if (
  10178. ((t[e] = r),
  10179. getExpressionsPlugin() &&
  10180. (this.layers[e].ty === 0 &&
  10181. this.globalData.projectInterface.registerComposition(r),
  10182. r.initExpressions()),
  10183. this.appendElementInPos(r, e),
  10184. this.layers[e].tt)
  10185. ) {
  10186. var i =
  10187. 'tp' in this.layers[e]
  10188. ? this.findIndexByInd(this.layers[e].tp)
  10189. : e - 1;
  10190. if (i === -1) return;
  10191. if (!this.elements[i] || this.elements[i] === !0)
  10192. this.buildItem(i), this.addPendingElement(r);
  10193. else {
  10194. var s = t[i],
  10195. n = s.getMatte(this.layers[e].tt);
  10196. r.setMatte(n);
  10197. }
  10198. }
  10199. }
  10200. }),
  10201. (SVGRendererBase.prototype.checkPendingElements = function () {
  10202. for (; this.pendingElements.length; ) {
  10203. var e = this.pendingElements.pop();
  10204. if ((e.checkParenting(), e.data.tt))
  10205. for (var t = 0, r = this.elements.length; t < r; ) {
  10206. if (this.elements[t] === e) {
  10207. var i =
  10208. 'tp' in e.data ? this.findIndexByInd(e.data.tp) : t - 1,
  10209. s = this.elements[i],
  10210. n = s.getMatte(this.layers[t].tt);
  10211. e.setMatte(n);
  10212. break;
  10213. }
  10214. t += 1;
  10215. }
  10216. }
  10217. }),
  10218. (SVGRendererBase.prototype.renderFrame = function (e) {
  10219. if (!(this.renderedFrame === e || this.destroyed)) {
  10220. e === null ? (e = this.renderedFrame) : (this.renderedFrame = e),
  10221. (this.globalData.frameNum = e),
  10222. (this.globalData.frameId += 1),
  10223. (this.globalData.projectInterface.currentFrame = e),
  10224. (this.globalData._mdf = !1);
  10225. var t,
  10226. r = this.layers.length;
  10227. for (
  10228. this.completeLayers || this.checkLayers(e), t = r - 1;
  10229. t >= 0;
  10230. t -= 1
  10231. )
  10232. (this.completeLayers || this.elements[t]) &&
  10233. this.elements[t].prepareFrame(e - this.layers[t].st);
  10234. if (this.globalData._mdf)
  10235. for (t = 0; t < r; t += 1)
  10236. (this.completeLayers || this.elements[t]) &&
  10237. this.elements[t].renderFrame();
  10238. }
  10239. }),
  10240. (SVGRendererBase.prototype.appendElementInPos = function (e, t) {
  10241. var r = e.getBaseElement();
  10242. if (r) {
  10243. for (var i = 0, s; i < t; )
  10244. this.elements[i] &&
  10245. this.elements[i] !== !0 &&
  10246. this.elements[i].getBaseElement() &&
  10247. (s = this.elements[i].getBaseElement()),
  10248. (i += 1);
  10249. s
  10250. ? this.layerElement.insertBefore(r, s)
  10251. : this.layerElement.appendChild(r);
  10252. }
  10253. }),
  10254. (SVGRendererBase.prototype.hide = function () {
  10255. this.layerElement.style.display = 'none';
  10256. }),
  10257. (SVGRendererBase.prototype.show = function () {
  10258. this.layerElement.style.display = 'block';
  10259. });
  10260. function ICompElement() {}
  10261. extendPrototype(
  10262. [
  10263. BaseElement,
  10264. TransformElement,
  10265. HierarchyElement,
  10266. FrameElement,
  10267. RenderableDOMElement
  10268. ],
  10269. ICompElement
  10270. ),
  10271. (ICompElement.prototype.initElement = function (e, t, r) {
  10272. this.initFrame(),
  10273. this.initBaseData(e, t, r),
  10274. this.initTransform(e, t, r),
  10275. this.initRenderable(),
  10276. this.initHierarchy(),
  10277. this.initRendererElement(),
  10278. this.createContainerElements(),
  10279. this.createRenderableComponents(),
  10280. (this.data.xt || !t.progressiveLoad) && this.buildAllItems(),
  10281. this.hide();
  10282. }),
  10283. (ICompElement.prototype.prepareFrame = function (e) {
  10284. if (
  10285. ((this._mdf = !1),
  10286. this.prepareRenderableFrame(e),
  10287. this.prepareProperties(e, this.isInRange),
  10288. !(!this.isInRange && !this.data.xt))
  10289. ) {
  10290. if (this.tm._placeholder) this.renderedFrame = e / this.data.sr;
  10291. else {
  10292. var t = this.tm.v;
  10293. t === this.data.op && (t = this.data.op - 1),
  10294. (this.renderedFrame = t);
  10295. }
  10296. var r,
  10297. i = this.elements.length;
  10298. for (
  10299. this.completeLayers || this.checkLayers(this.renderedFrame),
  10300. r = i - 1;
  10301. r >= 0;
  10302. r -= 1
  10303. )
  10304. (this.completeLayers || this.elements[r]) &&
  10305. (this.elements[r].prepareFrame(
  10306. this.renderedFrame - this.layers[r].st
  10307. ),
  10308. this.elements[r]._mdf && (this._mdf = !0));
  10309. }
  10310. }),
  10311. (ICompElement.prototype.renderInnerContent = function () {
  10312. var e,
  10313. t = this.layers.length;
  10314. for (e = 0; e < t; e += 1)
  10315. (this.completeLayers || this.elements[e]) &&
  10316. this.elements[e].renderFrame();
  10317. }),
  10318. (ICompElement.prototype.setElements = function (e) {
  10319. this.elements = e;
  10320. }),
  10321. (ICompElement.prototype.getElements = function () {
  10322. return this.elements;
  10323. }),
  10324. (ICompElement.prototype.destroyElements = function () {
  10325. var e,
  10326. t = this.layers.length;
  10327. for (e = 0; e < t; e += 1)
  10328. this.elements[e] && this.elements[e].destroy();
  10329. }),
  10330. (ICompElement.prototype.destroy = function () {
  10331. this.destroyElements(), this.destroyBaseElement();
  10332. });
  10333. function SVGCompElement(e, t, r) {
  10334. (this.layers = e.layers),
  10335. (this.supports3d = !0),
  10336. (this.completeLayers = !1),
  10337. (this.pendingElements = []),
  10338. (this.elements = this.layers
  10339. ? createSizedArray(this.layers.length)
  10340. : []),
  10341. this.initElement(e, t, r),
  10342. (this.tm = e.tm
  10343. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  10344. : { _placeholder: !0 });
  10345. }
  10346. extendPrototype(
  10347. [SVGRendererBase, ICompElement, SVGBaseElement],
  10348. SVGCompElement
  10349. ),
  10350. (SVGCompElement.prototype.createComp = function (e) {
  10351. return new SVGCompElement(e, this.globalData, this);
  10352. });
  10353. function SVGRenderer(e, t) {
  10354. (this.animationItem = e),
  10355. (this.layers = null),
  10356. (this.renderedFrame = -1),
  10357. (this.svgElement = createNS('svg'));
  10358. var r = '';
  10359. if (t && t.title) {
  10360. var i = createNS('title'),
  10361. s = createElementID();
  10362. i.setAttribute('id', s),
  10363. (i.textContent = t.title),
  10364. this.svgElement.appendChild(i),
  10365. (r += s);
  10366. }
  10367. if (t && t.description) {
  10368. var n = createNS('desc'),
  10369. a = createElementID();
  10370. n.setAttribute('id', a),
  10371. (n.textContent = t.description),
  10372. this.svgElement.appendChild(n),
  10373. (r += ' ' + a);
  10374. }
  10375. r && this.svgElement.setAttribute('aria-labelledby', r);
  10376. var o = createNS('defs');
  10377. this.svgElement.appendChild(o);
  10378. var l = createNS('g');
  10379. this.svgElement.appendChild(l),
  10380. (this.layerElement = l),
  10381. (this.renderConfig = {
  10382. preserveAspectRatio:
  10383. (t && t.preserveAspectRatio) || 'xMidYMid meet',
  10384. imagePreserveAspectRatio:
  10385. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  10386. contentVisibility: (t && t.contentVisibility) || 'visible',
  10387. progressiveLoad: (t && t.progressiveLoad) || !1,
  10388. hideOnTransparent: !(t && t.hideOnTransparent === !1),
  10389. viewBoxOnly: (t && t.viewBoxOnly) || !1,
  10390. viewBoxSize: (t && t.viewBoxSize) || !1,
  10391. className: (t && t.className) || '',
  10392. id: (t && t.id) || '',
  10393. focusable: t && t.focusable,
  10394. filterSize: {
  10395. width: (t && t.filterSize && t.filterSize.width) || '100%',
  10396. height: (t && t.filterSize && t.filterSize.height) || '100%',
  10397. x: (t && t.filterSize && t.filterSize.x) || '0%',
  10398. y: (t && t.filterSize && t.filterSize.y) || '0%'
  10399. },
  10400. width: t && t.width,
  10401. height: t && t.height,
  10402. runExpressions:
  10403. !t || t.runExpressions === void 0 || t.runExpressions
  10404. }),
  10405. (this.globalData = {
  10406. _mdf: !1,
  10407. frameNum: -1,
  10408. defs: o,
  10409. renderConfig: this.renderConfig
  10410. }),
  10411. (this.elements = []),
  10412. (this.pendingElements = []),
  10413. (this.destroyed = !1),
  10414. (this.rendererType = 'svg');
  10415. }
  10416. extendPrototype([SVGRendererBase], SVGRenderer),
  10417. (SVGRenderer.prototype.createComp = function (e) {
  10418. return new SVGCompElement(e, this.globalData, this);
  10419. });
  10420. function CVContextData() {
  10421. (this.saved = []),
  10422. (this.cArrPos = 0),
  10423. (this.cTr = new Matrix()),
  10424. (this.cO = 1);
  10425. var e,
  10426. t = 15;
  10427. for (
  10428. this.savedOp = createTypedArray('float32', t), e = 0;
  10429. e < t;
  10430. e += 1
  10431. )
  10432. this.saved[e] = createTypedArray('float32', 16);
  10433. this._length = t;
  10434. }
  10435. (CVContextData.prototype.duplicate = function () {
  10436. var e = this._length * 2,
  10437. t = this.savedOp;
  10438. (this.savedOp = createTypedArray('float32', e)), this.savedOp.set(t);
  10439. var r = 0;
  10440. for (r = this._length; r < e; r += 1)
  10441. this.saved[r] = createTypedArray('float32', 16);
  10442. this._length = e;
  10443. }),
  10444. (CVContextData.prototype.reset = function () {
  10445. (this.cArrPos = 0), this.cTr.reset(), (this.cO = 1);
  10446. }),
  10447. (CVContextData.prototype.popTransform = function () {
  10448. var e = this.saved[this.cArrPos],
  10449. t,
  10450. r = this.cTr.props;
  10451. for (t = 0; t < 16; t += 1) r[t] = e[t];
  10452. return e;
  10453. }),
  10454. (CVContextData.prototype.popOpacity = function () {
  10455. var e = this.savedOp[this.cArrPos];
  10456. return (this.cO = e), e;
  10457. }),
  10458. (CVContextData.prototype.pop = function () {
  10459. this.cArrPos -= 1;
  10460. var e = this.popTransform(),
  10461. t = this.popOpacity();
  10462. return { transform: e, opacity: t };
  10463. }),
  10464. (CVContextData.prototype.push = function () {
  10465. var e = this.cTr.props;
  10466. this._length <= this.cArrPos && this.duplicate();
  10467. var t,
  10468. r = this.saved[this.cArrPos];
  10469. for (t = 0; t < 16; t += 1) r[t] = e[t];
  10470. (this.savedOp[this.cArrPos] = this.cO), (this.cArrPos += 1);
  10471. }),
  10472. (CVContextData.prototype.getTransform = function () {
  10473. return this.cTr;
  10474. }),
  10475. (CVContextData.prototype.getOpacity = function () {
  10476. return this.cO;
  10477. }),
  10478. (CVContextData.prototype.setOpacity = function (e) {
  10479. this.cO = e;
  10480. });
  10481. function ShapeTransformManager() {
  10482. (this.sequences = {}),
  10483. (this.sequenceList = []),
  10484. (this.transform_key_count = 0);
  10485. }
  10486. ShapeTransformManager.prototype = {
  10487. addTransformSequence: function (t) {
  10488. var r,
  10489. i = t.length,
  10490. s = '_';
  10491. for (r = 0; r < i; r += 1) s += t[r].transform.key + '_';
  10492. var n = this.sequences[s];
  10493. return (
  10494. n ||
  10495. ((n = {
  10496. transforms: [].concat(t),
  10497. finalTransform: new Matrix(),
  10498. _mdf: !1
  10499. }),
  10500. (this.sequences[s] = n),
  10501. this.sequenceList.push(n)),
  10502. n
  10503. );
  10504. },
  10505. processSequence: function (t, r) {
  10506. for (var i = 0, s = t.transforms.length, n = r; i < s && !r; ) {
  10507. if (t.transforms[i].transform.mProps._mdf) {
  10508. n = !0;
  10509. break;
  10510. }
  10511. i += 1;
  10512. }
  10513. if (n) {
  10514. var a;
  10515. for (t.finalTransform.reset(), i = s - 1; i >= 0; i -= 1)
  10516. (a = t.transforms[i].transform.mProps.v.props),
  10517. t.finalTransform.transform(
  10518. a[0],
  10519. a[1],
  10520. a[2],
  10521. a[3],
  10522. a[4],
  10523. a[5],
  10524. a[6],
  10525. a[7],
  10526. a[8],
  10527. a[9],
  10528. a[10],
  10529. a[11],
  10530. a[12],
  10531. a[13],
  10532. a[14],
  10533. a[15]
  10534. );
  10535. }
  10536. t._mdf = n;
  10537. },
  10538. processSequences: function (t) {
  10539. var r,
  10540. i = this.sequenceList.length;
  10541. for (r = 0; r < i; r += 1)
  10542. this.processSequence(this.sequenceList[r], t);
  10543. },
  10544. getNewKey: function () {
  10545. return (
  10546. (this.transform_key_count += 1), '_' + this.transform_key_count
  10547. );
  10548. }
  10549. };
  10550. var lumaLoader = function () {
  10551. var t = '__lottie_element_luma_buffer',
  10552. r = null,
  10553. i = null,
  10554. s = null;
  10555. function n() {
  10556. var l = createNS('svg'),
  10557. c = createNS('filter'),
  10558. g = createNS('feColorMatrix');
  10559. return (
  10560. c.setAttribute('id', t),
  10561. g.setAttribute('type', 'matrix'),
  10562. g.setAttribute('color-interpolation-filters', 'sRGB'),
  10563. g.setAttribute(
  10564. 'values',
  10565. '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0'
  10566. ),
  10567. c.appendChild(g),
  10568. l.appendChild(c),
  10569. l.setAttribute('id', t + '_svg'),
  10570. featureSupport.svgLumaHidden && (l.style.display = 'none'),
  10571. l
  10572. );
  10573. }
  10574. function a() {
  10575. r ||
  10576. ((s = n()),
  10577. document.body.appendChild(s),
  10578. (r = createTag('canvas')),
  10579. (i = r.getContext('2d')),
  10580. (i.filter = 'url(#' + t + ')'),
  10581. (i.fillStyle = 'rgba(0,0,0,0)'),
  10582. i.fillRect(0, 0, 1, 1));
  10583. }
  10584. function o(l) {
  10585. return (
  10586. r || a(),
  10587. (r.width = l.width),
  10588. (r.height = l.height),
  10589. (i.filter = 'url(#' + t + ')'),
  10590. r
  10591. );
  10592. }
  10593. return { load: a, get: o };
  10594. };
  10595. function createCanvas(e, t) {
  10596. if (featureSupport.offscreenCanvas) return new OffscreenCanvas(e, t);
  10597. var r = createTag('canvas');
  10598. return (r.width = e), (r.height = t), r;
  10599. }
  10600. var assetLoader = (function () {
  10601. return {
  10602. loadLumaCanvas: lumaLoader.load,
  10603. getLumaCanvas: lumaLoader.get,
  10604. createCanvas
  10605. };
  10606. })();
  10607. function CVEffects() {}
  10608. CVEffects.prototype.renderFrame = function () {};
  10609. function CVMaskElement(e, t) {
  10610. (this.data = e),
  10611. (this.element = t),
  10612. (this.masksProperties = this.data.masksProperties || []),
  10613. (this.viewData = createSizedArray(this.masksProperties.length));
  10614. var r,
  10615. i = this.masksProperties.length,
  10616. s = !1;
  10617. for (r = 0; r < i; r += 1)
  10618. this.masksProperties[r].mode !== 'n' && (s = !0),
  10619. (this.viewData[r] = ShapePropertyFactory.getShapeProp(
  10620. this.element,
  10621. this.masksProperties[r],
  10622. 3
  10623. ));
  10624. (this.hasMasks = s), s && this.element.addRenderableComponent(this);
  10625. }
  10626. (CVMaskElement.prototype.renderFrame = function () {
  10627. if (this.hasMasks) {
  10628. var e = this.element.finalTransform.mat,
  10629. t = this.element.canvasContext,
  10630. r,
  10631. i = this.masksProperties.length,
  10632. s,
  10633. n,
  10634. a;
  10635. for (t.beginPath(), r = 0; r < i; r += 1)
  10636. if (this.masksProperties[r].mode !== 'n') {
  10637. this.masksProperties[r].inv &&
  10638. (t.moveTo(0, 0),
  10639. t.lineTo(this.element.globalData.compSize.w, 0),
  10640. t.lineTo(
  10641. this.element.globalData.compSize.w,
  10642. this.element.globalData.compSize.h
  10643. ),
  10644. t.lineTo(0, this.element.globalData.compSize.h),
  10645. t.lineTo(0, 0)),
  10646. (a = this.viewData[r].v),
  10647. (s = e.applyToPointArray(a.v[0][0], a.v[0][1], 0)),
  10648. t.moveTo(s[0], s[1]);
  10649. var o,
  10650. l = a._length;
  10651. for (o = 1; o < l; o += 1)
  10652. (n = e.applyToTriplePoints(a.o[o - 1], a.i[o], a.v[o])),
  10653. t.bezierCurveTo(n[0], n[1], n[2], n[3], n[4], n[5]);
  10654. (n = e.applyToTriplePoints(a.o[o - 1], a.i[0], a.v[0])),
  10655. t.bezierCurveTo(n[0], n[1], n[2], n[3], n[4], n[5]);
  10656. }
  10657. this.element.globalData.renderer.save(!0), t.clip();
  10658. }
  10659. }),
  10660. (CVMaskElement.prototype.getMaskProperty =
  10661. MaskElement.prototype.getMaskProperty),
  10662. (CVMaskElement.prototype.destroy = function () {
  10663. this.element = null;
  10664. });
  10665. function CVBaseElement() {}
  10666. var operationsMap = {
  10667. 1: 'source-in',
  10668. 2: 'source-out',
  10669. 3: 'source-in',
  10670. 4: 'source-out'
  10671. };
  10672. (CVBaseElement.prototype = {
  10673. createElements: function () {},
  10674. initRendererElement: function () {},
  10675. createContainerElements: function () {
  10676. if (this.data.tt >= 1) {
  10677. this.buffers = [];
  10678. var t = this.globalData.canvasContext,
  10679. r = assetLoader.createCanvas(t.canvas.width, t.canvas.height);
  10680. this.buffers.push(r);
  10681. var i = assetLoader.createCanvas(t.canvas.width, t.canvas.height);
  10682. this.buffers.push(i),
  10683. this.data.tt >= 3 &&
  10684. !document._isProxy &&
  10685. assetLoader.loadLumaCanvas();
  10686. }
  10687. (this.canvasContext = this.globalData.canvasContext),
  10688. (this.transformCanvas = this.globalData.transformCanvas),
  10689. (this.renderableEffectsManager = new CVEffects());
  10690. },
  10691. createContent: function () {},
  10692. setBlendMode: function () {
  10693. var t = this.globalData;
  10694. if (t.blendMode !== this.data.bm) {
  10695. t.blendMode = this.data.bm;
  10696. var r = getBlendMode(this.data.bm);
  10697. t.canvasContext.globalCompositeOperation = r;
  10698. }
  10699. },
  10700. createRenderableComponents: function () {
  10701. this.maskManager = new CVMaskElement(this.data, this);
  10702. },
  10703. hideElement: function () {
  10704. !this.hidden &&
  10705. (!this.isInRange || this.isTransparent) &&
  10706. (this.hidden = !0);
  10707. },
  10708. showElement: function () {
  10709. this.isInRange &&
  10710. !this.isTransparent &&
  10711. ((this.hidden = !1),
  10712. (this._isFirstFrame = !0),
  10713. (this.maskManager._isFirstFrame = !0));
  10714. },
  10715. clearCanvas: function (t) {
  10716. t.clearRect(
  10717. this.transformCanvas.tx,
  10718. this.transformCanvas.ty,
  10719. this.transformCanvas.w * this.transformCanvas.sx,
  10720. this.transformCanvas.h * this.transformCanvas.sy
  10721. );
  10722. },
  10723. prepareLayer: function () {
  10724. if (this.data.tt >= 1) {
  10725. var t = this.buffers[0],
  10726. r = t.getContext('2d');
  10727. this.clearCanvas(r),
  10728. r.drawImage(this.canvasContext.canvas, 0, 0),
  10729. (this.currentTransform = this.canvasContext.getTransform()),
  10730. this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
  10731. this.clearCanvas(this.canvasContext),
  10732. this.canvasContext.setTransform(this.currentTransform);
  10733. }
  10734. },
  10735. exitLayer: function () {
  10736. if (this.data.tt >= 1) {
  10737. var t = this.buffers[1],
  10738. r = t.getContext('2d');
  10739. this.clearCanvas(r),
  10740. r.drawImage(this.canvasContext.canvas, 0, 0),
  10741. this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
  10742. this.clearCanvas(this.canvasContext),
  10743. this.canvasContext.setTransform(this.currentTransform);
  10744. var i = this.comp.getElementById(
  10745. 'tp' in this.data ? this.data.tp : this.data.ind - 1
  10746. );
  10747. if (
  10748. (i.renderFrame(!0),
  10749. this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
  10750. this.data.tt >= 3 && !document._isProxy)
  10751. ) {
  10752. var s = assetLoader.getLumaCanvas(this.canvasContext.canvas),
  10753. n = s.getContext('2d');
  10754. n.drawImage(this.canvasContext.canvas, 0, 0),
  10755. this.clearCanvas(this.canvasContext),
  10756. this.canvasContext.drawImage(s, 0, 0);
  10757. }
  10758. (this.canvasContext.globalCompositeOperation =
  10759. operationsMap[this.data.tt]),
  10760. this.canvasContext.drawImage(t, 0, 0),
  10761. (this.canvasContext.globalCompositeOperation =
  10762. 'destination-over'),
  10763. this.canvasContext.drawImage(this.buffers[0], 0, 0),
  10764. this.canvasContext.setTransform(this.currentTransform),
  10765. (this.canvasContext.globalCompositeOperation = 'source-over');
  10766. }
  10767. },
  10768. renderFrame: function (t) {
  10769. if (!(this.hidden || this.data.hd) && !(this.data.td === 1 && !t)) {
  10770. this.renderTransform(),
  10771. this.renderRenderable(),
  10772. this.setBlendMode();
  10773. var r = this.data.ty === 0;
  10774. this.prepareLayer(),
  10775. this.globalData.renderer.save(r),
  10776. this.globalData.renderer.ctxTransform(
  10777. this.finalTransform.mat.props
  10778. ),
  10779. this.globalData.renderer.ctxOpacity(
  10780. this.finalTransform.mProp.o.v
  10781. ),
  10782. this.renderInnerContent(),
  10783. this.globalData.renderer.restore(r),
  10784. this.exitLayer(),
  10785. this.maskManager.hasMasks && this.globalData.renderer.restore(!0),
  10786. this._isFirstFrame && (this._isFirstFrame = !1);
  10787. }
  10788. },
  10789. destroy: function () {
  10790. (this.canvasContext = null),
  10791. (this.data = null),
  10792. (this.globalData = null),
  10793. this.maskManager.destroy();
  10794. },
  10795. mHelper: new Matrix()
  10796. }),
  10797. (CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement),
  10798. (CVBaseElement.prototype.show = CVBaseElement.prototype.showElement);
  10799. function CVShapeData(e, t, r, i) {
  10800. (this.styledShapes = []), (this.tr = [0, 0, 0, 0, 0, 0]);
  10801. var s = 4;
  10802. t.ty === 'rc'
  10803. ? (s = 5)
  10804. : t.ty === 'el'
  10805. ? (s = 6)
  10806. : t.ty === 'sr' && (s = 7),
  10807. (this.sh = ShapePropertyFactory.getShapeProp(e, t, s, e));
  10808. var n,
  10809. a = r.length,
  10810. o;
  10811. for (n = 0; n < a; n += 1)
  10812. r[n].closed ||
  10813. ((o = {
  10814. transforms: i.addTransformSequence(r[n].transforms),
  10815. trNodes: []
  10816. }),
  10817. this.styledShapes.push(o),
  10818. r[n].elements.push(o));
  10819. }
  10820. CVShapeData.prototype.setAsAnimated =
  10821. SVGShapeData.prototype.setAsAnimated;
  10822. function CVShapeElement(e, t, r) {
  10823. (this.shapes = []),
  10824. (this.shapesData = e.shapes),
  10825. (this.stylesList = []),
  10826. (this.itemsData = []),
  10827. (this.prevViewData = []),
  10828. (this.shapeModifiers = []),
  10829. (this.processedElements = []),
  10830. (this.transformsManager = new ShapeTransformManager()),
  10831. this.initElement(e, t, r);
  10832. }
  10833. extendPrototype(
  10834. [
  10835. BaseElement,
  10836. TransformElement,
  10837. CVBaseElement,
  10838. IShapeElement,
  10839. HierarchyElement,
  10840. FrameElement,
  10841. RenderableElement
  10842. ],
  10843. CVShapeElement
  10844. ),
  10845. (CVShapeElement.prototype.initElement =
  10846. RenderableDOMElement.prototype.initElement),
  10847. (CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: !1 }),
  10848. (CVShapeElement.prototype.dashResetter = []),
  10849. (CVShapeElement.prototype.createContent = function () {
  10850. this.searchShapes(
  10851. this.shapesData,
  10852. this.itemsData,
  10853. this.prevViewData,
  10854. !0,
  10855. []
  10856. );
  10857. }),
  10858. (CVShapeElement.prototype.createStyleElement = function (e, t) {
  10859. var r = {
  10860. data: e,
  10861. type: e.ty,
  10862. preTransforms: this.transformsManager.addTransformSequence(t),
  10863. transforms: [],
  10864. elements: [],
  10865. closed: e.hd === !0
  10866. },
  10867. i = {};
  10868. if (
  10869. (e.ty === 'fl' || e.ty === 'st'
  10870. ? ((i.c = PropertyFactory.getProp(this, e.c, 1, 255, this)),
  10871. i.c.k ||
  10872. (r.co =
  10873. 'rgb(' +
  10874. bmFloor(i.c.v[0]) +
  10875. ',' +
  10876. bmFloor(i.c.v[1]) +
  10877. ',' +
  10878. bmFloor(i.c.v[2]) +
  10879. ')'))
  10880. : (e.ty === 'gf' || e.ty === 'gs') &&
  10881. ((i.s = PropertyFactory.getProp(this, e.s, 1, null, this)),
  10882. (i.e = PropertyFactory.getProp(this, e.e, 1, null, this)),
  10883. (i.h = PropertyFactory.getProp(
  10884. this,
  10885. e.h || { k: 0 },
  10886. 0,
  10887. 0.01,
  10888. this
  10889. )),
  10890. (i.a = PropertyFactory.getProp(
  10891. this,
  10892. e.a || { k: 0 },
  10893. 0,
  10894. degToRads,
  10895. this
  10896. )),
  10897. (i.g = new GradientProperty(this, e.g, this))),
  10898. (i.o = PropertyFactory.getProp(this, e.o, 0, 0.01, this)),
  10899. e.ty === 'st' || e.ty === 'gs')
  10900. ) {
  10901. if (
  10902. ((r.lc = lineCapEnum[e.lc || 2]),
  10903. (r.lj = lineJoinEnum[e.lj || 2]),
  10904. e.lj == 1 && (r.ml = e.ml),
  10905. (i.w = PropertyFactory.getProp(this, e.w, 0, null, this)),
  10906. i.w.k || (r.wi = i.w.v),
  10907. e.d)
  10908. ) {
  10909. var s = new DashProperty(this, e.d, 'canvas', this);
  10910. (i.d = s),
  10911. i.d.k || ((r.da = i.d.dashArray), (r.do = i.d.dashoffset[0]));
  10912. }
  10913. } else r.r = e.r === 2 ? 'evenodd' : 'nonzero';
  10914. return this.stylesList.push(r), (i.style = r), i;
  10915. }),
  10916. (CVShapeElement.prototype.createGroupElement = function () {
  10917. var e = { it: [], prevViewData: [] };
  10918. return e;
  10919. }),
  10920. (CVShapeElement.prototype.createTransformElement = function (e) {
  10921. var t = {
  10922. transform: {
  10923. opacity: 1,
  10924. _opMdf: !1,
  10925. key: this.transformsManager.getNewKey(),
  10926. op: PropertyFactory.getProp(this, e.o, 0, 0.01, this),
  10927. mProps: TransformPropertyFactory.getTransformProperty(
  10928. this,
  10929. e,
  10930. this
  10931. )
  10932. }
  10933. };
  10934. return t;
  10935. }),
  10936. (CVShapeElement.prototype.createShapeElement = function (e) {
  10937. var t = new CVShapeData(
  10938. this,
  10939. e,
  10940. this.stylesList,
  10941. this.transformsManager
  10942. );
  10943. return this.shapes.push(t), this.addShapeToModifiers(t), t;
  10944. }),
  10945. (CVShapeElement.prototype.reloadShapes = function () {
  10946. this._isFirstFrame = !0;
  10947. var e,
  10948. t = this.itemsData.length;
  10949. for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
  10950. for (
  10951. this.searchShapes(
  10952. this.shapesData,
  10953. this.itemsData,
  10954. this.prevViewData,
  10955. !0,
  10956. []
  10957. ),
  10958. t = this.dynamicProperties.length,
  10959. e = 0;
  10960. e < t;
  10961. e += 1
  10962. )
  10963. this.dynamicProperties[e].getValue();
  10964. this.renderModifiers(),
  10965. this.transformsManager.processSequences(this._isFirstFrame);
  10966. }),
  10967. (CVShapeElement.prototype.addTransformToStyleList = function (e) {
  10968. var t,
  10969. r = this.stylesList.length;
  10970. for (t = 0; t < r; t += 1)
  10971. this.stylesList[t].closed || this.stylesList[t].transforms.push(e);
  10972. }),
  10973. (CVShapeElement.prototype.removeTransformFromStyleList = function () {
  10974. var e,
  10975. t = this.stylesList.length;
  10976. for (e = 0; e < t; e += 1)
  10977. this.stylesList[e].closed || this.stylesList[e].transforms.pop();
  10978. }),
  10979. (CVShapeElement.prototype.closeStyles = function (e) {
  10980. var t,
  10981. r = e.length;
  10982. for (t = 0; t < r; t += 1) e[t].closed = !0;
  10983. }),
  10984. (CVShapeElement.prototype.searchShapes = function (e, t, r, i, s) {
  10985. var n,
  10986. a = e.length - 1,
  10987. o,
  10988. l,
  10989. c = [],
  10990. g = [],
  10991. S,
  10992. p,
  10993. P,
  10994. b = [].concat(s);
  10995. for (n = a; n >= 0; n -= 1) {
  10996. if (
  10997. ((S = this.searchProcessedElement(e[n])),
  10998. S ? (t[n] = r[S - 1]) : (e[n]._shouldRender = i),
  10999. e[n].ty === 'fl' ||
  11000. e[n].ty === 'st' ||
  11001. e[n].ty === 'gf' ||
  11002. e[n].ty === 'gs')
  11003. )
  11004. S
  11005. ? (t[n].style.closed = !1)
  11006. : (t[n] = this.createStyleElement(e[n], b)),
  11007. c.push(t[n].style);
  11008. else if (e[n].ty === 'gr') {
  11009. if (!S) t[n] = this.createGroupElement(e[n]);
  11010. else
  11011. for (l = t[n].it.length, o = 0; o < l; o += 1)
  11012. t[n].prevViewData[o] = t[n].it[o];
  11013. this.searchShapes(e[n].it, t[n].it, t[n].prevViewData, i, b);
  11014. } else
  11015. e[n].ty === 'tr'
  11016. ? (S || ((P = this.createTransformElement(e[n])), (t[n] = P)),
  11017. b.push(t[n]),
  11018. this.addTransformToStyleList(t[n]))
  11019. : e[n].ty === 'sh' ||
  11020. e[n].ty === 'rc' ||
  11021. e[n].ty === 'el' ||
  11022. e[n].ty === 'sr'
  11023. ? S || (t[n] = this.createShapeElement(e[n]))
  11024. : e[n].ty === 'tm' ||
  11025. e[n].ty === 'rd' ||
  11026. e[n].ty === 'pb' ||
  11027. e[n].ty === 'zz' ||
  11028. e[n].ty === 'op'
  11029. ? (S
  11030. ? ((p = t[n]), (p.closed = !1))
  11031. : ((p = ShapeModifiers.getModifier(e[n].ty)),
  11032. p.init(this, e[n]),
  11033. (t[n] = p),
  11034. this.shapeModifiers.push(p)),
  11035. g.push(p))
  11036. : e[n].ty === 'rp' &&
  11037. (S
  11038. ? ((p = t[n]), (p.closed = !0))
  11039. : ((p = ShapeModifiers.getModifier(e[n].ty)),
  11040. (t[n] = p),
  11041. p.init(this, e, n, t),
  11042. this.shapeModifiers.push(p),
  11043. (i = !1)),
  11044. g.push(p));
  11045. this.addProcessedElement(e[n], n + 1);
  11046. }
  11047. for (
  11048. this.removeTransformFromStyleList(),
  11049. this.closeStyles(c),
  11050. a = g.length,
  11051. n = 0;
  11052. n < a;
  11053. n += 1
  11054. )
  11055. g[n].closed = !0;
  11056. }),
  11057. (CVShapeElement.prototype.renderInnerContent = function () {
  11058. (this.transformHelper.opacity = 1),
  11059. (this.transformHelper._opMdf = !1),
  11060. this.renderModifiers(),
  11061. this.transformsManager.processSequences(this._isFirstFrame),
  11062. this.renderShape(
  11063. this.transformHelper,
  11064. this.shapesData,
  11065. this.itemsData,
  11066. !0
  11067. );
  11068. }),
  11069. (CVShapeElement.prototype.renderShapeTransform = function (e, t) {
  11070. (e._opMdf || t.op._mdf || this._isFirstFrame) &&
  11071. ((t.opacity = e.opacity), (t.opacity *= t.op.v), (t._opMdf = !0));
  11072. }),
  11073. (CVShapeElement.prototype.drawLayer = function () {
  11074. var e,
  11075. t = this.stylesList.length,
  11076. r,
  11077. i,
  11078. s,
  11079. n,
  11080. a,
  11081. o,
  11082. l = this.globalData.renderer,
  11083. c = this.globalData.canvasContext,
  11084. g,
  11085. S;
  11086. for (e = 0; e < t; e += 1)
  11087. if (
  11088. ((S = this.stylesList[e]),
  11089. (g = S.type),
  11090. !(
  11091. ((g === 'st' || g === 'gs') && S.wi === 0) ||
  11092. !S.data._shouldRender ||
  11093. S.coOp === 0 ||
  11094. this.globalData.currentGlobalAlpha === 0
  11095. ))
  11096. ) {
  11097. for (
  11098. l.save(),
  11099. a = S.elements,
  11100. g === 'st' || g === 'gs'
  11101. ? ((c.strokeStyle = g === 'st' ? S.co : S.grd),
  11102. (c.lineWidth = S.wi),
  11103. (c.lineCap = S.lc),
  11104. (c.lineJoin = S.lj),
  11105. (c.miterLimit = S.ml || 0))
  11106. : (c.fillStyle = g === 'fl' ? S.co : S.grd),
  11107. l.ctxOpacity(S.coOp),
  11108. g !== 'st' && g !== 'gs' && c.beginPath(),
  11109. l.ctxTransform(S.preTransforms.finalTransform.props),
  11110. i = a.length,
  11111. r = 0;
  11112. r < i;
  11113. r += 1
  11114. ) {
  11115. for (
  11116. (g === 'st' || g === 'gs') &&
  11117. (c.beginPath(),
  11118. S.da && (c.setLineDash(S.da), (c.lineDashOffset = S.do))),
  11119. o = a[r].trNodes,
  11120. n = o.length,
  11121. s = 0;
  11122. s < n;
  11123. s += 1
  11124. )
  11125. o[s].t === 'm'
  11126. ? c.moveTo(o[s].p[0], o[s].p[1])
  11127. : o[s].t === 'c'
  11128. ? c.bezierCurveTo(
  11129. o[s].pts[0],
  11130. o[s].pts[1],
  11131. o[s].pts[2],
  11132. o[s].pts[3],
  11133. o[s].pts[4],
  11134. o[s].pts[5]
  11135. )
  11136. : c.closePath();
  11137. (g === 'st' || g === 'gs') &&
  11138. (c.stroke(), S.da && c.setLineDash(this.dashResetter));
  11139. }
  11140. g !== 'st' && g !== 'gs' && c.fill(S.r), l.restore();
  11141. }
  11142. }),
  11143. (CVShapeElement.prototype.renderShape = function (e, t, r, i) {
  11144. var s,
  11145. n = t.length - 1,
  11146. a;
  11147. for (a = e, s = n; s >= 0; s -= 1)
  11148. t[s].ty === 'tr'
  11149. ? ((a = r[s].transform), this.renderShapeTransform(e, a))
  11150. : t[s].ty === 'sh' ||
  11151. t[s].ty === 'el' ||
  11152. t[s].ty === 'rc' ||
  11153. t[s].ty === 'sr'
  11154. ? this.renderPath(t[s], r[s])
  11155. : t[s].ty === 'fl'
  11156. ? this.renderFill(t[s], r[s], a)
  11157. : t[s].ty === 'st'
  11158. ? this.renderStroke(t[s], r[s], a)
  11159. : t[s].ty === 'gf' || t[s].ty === 'gs'
  11160. ? this.renderGradientFill(t[s], r[s], a)
  11161. : t[s].ty === 'gr'
  11162. ? this.renderShape(a, t[s].it, r[s].it)
  11163. : t[s].ty;
  11164. i && this.drawLayer();
  11165. }),
  11166. (CVShapeElement.prototype.renderStyledShape = function (e, t) {
  11167. if (this._isFirstFrame || t._mdf || e.transforms._mdf) {
  11168. var r = e.trNodes,
  11169. i = t.paths,
  11170. s,
  11171. n,
  11172. a,
  11173. o = i._length;
  11174. r.length = 0;
  11175. var l = e.transforms.finalTransform;
  11176. for (a = 0; a < o; a += 1) {
  11177. var c = i.shapes[a];
  11178. if (c && c.v) {
  11179. for (n = c._length, s = 1; s < n; s += 1)
  11180. s === 1 &&
  11181. r.push({
  11182. t: 'm',
  11183. p: l.applyToPointArray(c.v[0][0], c.v[0][1], 0)
  11184. }),
  11185. r.push({
  11186. t: 'c',
  11187. pts: l.applyToTriplePoints(c.o[s - 1], c.i[s], c.v[s])
  11188. });
  11189. n === 1 &&
  11190. r.push({
  11191. t: 'm',
  11192. p: l.applyToPointArray(c.v[0][0], c.v[0][1], 0)
  11193. }),
  11194. c.c &&
  11195. n &&
  11196. (r.push({
  11197. t: 'c',
  11198. pts: l.applyToTriplePoints(c.o[s - 1], c.i[0], c.v[0])
  11199. }),
  11200. r.push({ t: 'z' }));
  11201. }
  11202. }
  11203. e.trNodes = r;
  11204. }
  11205. }),
  11206. (CVShapeElement.prototype.renderPath = function (e, t) {
  11207. if (e.hd !== !0 && e._shouldRender) {
  11208. var r,
  11209. i = t.styledShapes.length;
  11210. for (r = 0; r < i; r += 1)
  11211. this.renderStyledShape(t.styledShapes[r], t.sh);
  11212. }
  11213. }),
  11214. (CVShapeElement.prototype.renderFill = function (e, t, r) {
  11215. var i = t.style;
  11216. (t.c._mdf || this._isFirstFrame) &&
  11217. (i.co =
  11218. 'rgb(' +
  11219. bmFloor(t.c.v[0]) +
  11220. ',' +
  11221. bmFloor(t.c.v[1]) +
  11222. ',' +
  11223. bmFloor(t.c.v[2]) +
  11224. ')'),
  11225. (t.o._mdf || r._opMdf || this._isFirstFrame) &&
  11226. (i.coOp = t.o.v * r.opacity);
  11227. }),
  11228. (CVShapeElement.prototype.renderGradientFill = function (e, t, r) {
  11229. var i = t.style,
  11230. s;
  11231. if (
  11232. !i.grd ||
  11233. t.g._mdf ||
  11234. t.s._mdf ||
  11235. t.e._mdf ||
  11236. (e.t !== 1 && (t.h._mdf || t.a._mdf))
  11237. ) {
  11238. var n = this.globalData.canvasContext,
  11239. a = t.s.v,
  11240. o = t.e.v;
  11241. if (e.t === 1) s = n.createLinearGradient(a[0], a[1], o[0], o[1]);
  11242. else {
  11243. var l = Math.sqrt(
  11244. Math.pow(a[0] - o[0], 2) + Math.pow(a[1] - o[1], 2)
  11245. ),
  11246. c = Math.atan2(o[1] - a[1], o[0] - a[0]),
  11247. g = t.h.v;
  11248. g >= 1 ? (g = 0.99) : g <= -1 && (g = -0.99);
  11249. var S = l * g,
  11250. p = Math.cos(c + t.a.v) * S + a[0],
  11251. P = Math.sin(c + t.a.v) * S + a[1];
  11252. s = n.createRadialGradient(p, P, 0, a[0], a[1], l);
  11253. }
  11254. var b,
  11255. y = e.g.p,
  11256. A = t.g.c,
  11257. u = 1;
  11258. for (b = 0; b < y; b += 1)
  11259. t.g._hasOpacity && t.g._collapsable && (u = t.g.o[b * 2 + 1]),
  11260. s.addColorStop(
  11261. A[b * 4] / 100,
  11262. 'rgba(' +
  11263. A[b * 4 + 1] +
  11264. ',' +
  11265. A[b * 4 + 2] +
  11266. ',' +
  11267. A[b * 4 + 3] +
  11268. ',' +
  11269. u +
  11270. ')'
  11271. );
  11272. i.grd = s;
  11273. }
  11274. i.coOp = t.o.v * r.opacity;
  11275. }),
  11276. (CVShapeElement.prototype.renderStroke = function (e, t, r) {
  11277. var i = t.style,
  11278. s = t.d;
  11279. s &&
  11280. (s._mdf || this._isFirstFrame) &&
  11281. ((i.da = s.dashArray), (i.do = s.dashoffset[0])),
  11282. (t.c._mdf || this._isFirstFrame) &&
  11283. (i.co =
  11284. 'rgb(' +
  11285. bmFloor(t.c.v[0]) +
  11286. ',' +
  11287. bmFloor(t.c.v[1]) +
  11288. ',' +
  11289. bmFloor(t.c.v[2]) +
  11290. ')'),
  11291. (t.o._mdf || r._opMdf || this._isFirstFrame) &&
  11292. (i.coOp = t.o.v * r.opacity),
  11293. (t.w._mdf || this._isFirstFrame) && (i.wi = t.w.v);
  11294. }),
  11295. (CVShapeElement.prototype.destroy = function () {
  11296. (this.shapesData = null),
  11297. (this.globalData = null),
  11298. (this.canvasContext = null),
  11299. (this.stylesList.length = 0),
  11300. (this.itemsData.length = 0);
  11301. });
  11302. function CVTextElement(e, t, r) {
  11303. (this.textSpans = []),
  11304. (this.yOffset = 0),
  11305. (this.fillColorAnim = !1),
  11306. (this.strokeColorAnim = !1),
  11307. (this.strokeWidthAnim = !1),
  11308. (this.stroke = !1),
  11309. (this.fill = !1),
  11310. (this.justifyOffset = 0),
  11311. (this.currentRender = null),
  11312. (this.renderType = 'canvas'),
  11313. (this.values = {
  11314. fill: 'rgba(0,0,0,0)',
  11315. stroke: 'rgba(0,0,0,0)',
  11316. sWidth: 0,
  11317. fValue: ''
  11318. }),
  11319. this.initElement(e, t, r);
  11320. }
  11321. extendPrototype(
  11322. [
  11323. BaseElement,
  11324. TransformElement,
  11325. CVBaseElement,
  11326. HierarchyElement,
  11327. FrameElement,
  11328. RenderableElement,
  11329. ITextElement
  11330. ],
  11331. CVTextElement
  11332. ),
  11333. (CVTextElement.prototype.tHelper =
  11334. createTag('canvas').getContext('2d')),
  11335. (CVTextElement.prototype.buildNewText = function () {
  11336. var e = this.textProperty.currentData;
  11337. this.renderedLetters = createSizedArray(e.l ? e.l.length : 0);
  11338. var t = !1;
  11339. e.fc
  11340. ? ((t = !0), (this.values.fill = this.buildColor(e.fc)))
  11341. : (this.values.fill = 'rgba(0,0,0,0)'),
  11342. (this.fill = t);
  11343. var r = !1;
  11344. e.sc &&
  11345. ((r = !0),
  11346. (this.values.stroke = this.buildColor(e.sc)),
  11347. (this.values.sWidth = e.sw));
  11348. var i = this.globalData.fontManager.getFontByName(e.f),
  11349. s,
  11350. n,
  11351. a = e.l,
  11352. o = this.mHelper;
  11353. (this.stroke = r),
  11354. (this.values.fValue =
  11355. e.finalSize +
  11356. 'px ' +
  11357. this.globalData.fontManager.getFontByName(e.f).fFamily),
  11358. (n = e.finalText.length);
  11359. var l,
  11360. c,
  11361. g,
  11362. S,
  11363. p,
  11364. P,
  11365. b,
  11366. y,
  11367. A,
  11368. u,
  11369. f = this.data.singleShape,
  11370. m = e.tr * 0.001 * e.finalSize,
  11371. d = 0,
  11372. E = 0,
  11373. T = !0,
  11374. x = 0;
  11375. for (s = 0; s < n; s += 1) {
  11376. (l = this.globalData.fontManager.getCharData(
  11377. e.finalText[s],
  11378. i.fStyle,
  11379. this.globalData.fontManager.getFontByName(e.f).fFamily
  11380. )),
  11381. (c = (l && l.data) || {}),
  11382. o.reset(),
  11383. f &&
  11384. a[s].n &&
  11385. ((d = -m), (E += e.yOffset), (E += T ? 1 : 0), (T = !1)),
  11386. (p = c.shapes ? c.shapes[0].it : []),
  11387. (b = p.length),
  11388. o.scale(e.finalSize / 100, e.finalSize / 100),
  11389. f && this.applyTextPropertiesToMatrix(e, o, a[s].line, d, E),
  11390. (A = createSizedArray(b - 1));
  11391. var _ = 0;
  11392. for (P = 0; P < b; P += 1)
  11393. if (p[P].ty === 'sh') {
  11394. for (
  11395. S = p[P].ks.k.i.length, y = p[P].ks.k, u = [], g = 1;
  11396. g < S;
  11397. g += 1
  11398. )
  11399. g === 1 &&
  11400. u.push(
  11401. o.applyToX(y.v[0][0], y.v[0][1], 0),
  11402. o.applyToY(y.v[0][0], y.v[0][1], 0)
  11403. ),
  11404. u.push(
  11405. o.applyToX(y.o[g - 1][0], y.o[g - 1][1], 0),
  11406. o.applyToY(y.o[g - 1][0], y.o[g - 1][1], 0),
  11407. o.applyToX(y.i[g][0], y.i[g][1], 0),
  11408. o.applyToY(y.i[g][0], y.i[g][1], 0),
  11409. o.applyToX(y.v[g][0], y.v[g][1], 0),
  11410. o.applyToY(y.v[g][0], y.v[g][1], 0)
  11411. );
  11412. u.push(
  11413. o.applyToX(y.o[g - 1][0], y.o[g - 1][1], 0),
  11414. o.applyToY(y.o[g - 1][0], y.o[g - 1][1], 0),
  11415. o.applyToX(y.i[0][0], y.i[0][1], 0),
  11416. o.applyToY(y.i[0][0], y.i[0][1], 0),
  11417. o.applyToX(y.v[0][0], y.v[0][1], 0),
  11418. o.applyToY(y.v[0][0], y.v[0][1], 0)
  11419. ),
  11420. (A[_] = u),
  11421. (_ += 1);
  11422. }
  11423. f && ((d += a[s].l), (d += m)),
  11424. this.textSpans[x]
  11425. ? (this.textSpans[x].elem = A)
  11426. : (this.textSpans[x] = { elem: A }),
  11427. (x += 1);
  11428. }
  11429. }),
  11430. (CVTextElement.prototype.renderInnerContent = function () {
  11431. var e = this.canvasContext;
  11432. (e.font = this.values.fValue),
  11433. (e.lineCap = 'butt'),
  11434. (e.lineJoin = 'miter'),
  11435. (e.miterLimit = 4),
  11436. this.data.singleShape ||
  11437. this.textAnimator.getMeasures(
  11438. this.textProperty.currentData,
  11439. this.lettersChangedFlag
  11440. );
  11441. var t,
  11442. r,
  11443. i,
  11444. s,
  11445. n,
  11446. a,
  11447. o = this.textAnimator.renderedLetters,
  11448. l = this.textProperty.currentData.l;
  11449. r = l.length;
  11450. var c,
  11451. g = null,
  11452. S = null,
  11453. p = null,
  11454. P,
  11455. b;
  11456. for (t = 0; t < r; t += 1)
  11457. if (!l[t].n) {
  11458. if (
  11459. ((c = o[t]),
  11460. c &&
  11461. (this.globalData.renderer.save(),
  11462. this.globalData.renderer.ctxTransform(c.p),
  11463. this.globalData.renderer.ctxOpacity(c.o)),
  11464. this.fill)
  11465. ) {
  11466. for (
  11467. c && c.fc
  11468. ? g !== c.fc && ((g = c.fc), (e.fillStyle = c.fc))
  11469. : g !== this.values.fill &&
  11470. ((g = this.values.fill),
  11471. (e.fillStyle = this.values.fill)),
  11472. P = this.textSpans[t].elem,
  11473. s = P.length,
  11474. this.globalData.canvasContext.beginPath(),
  11475. i = 0;
  11476. i < s;
  11477. i += 1
  11478. )
  11479. for (
  11480. b = P[i],
  11481. a = b.length,
  11482. this.globalData.canvasContext.moveTo(b[0], b[1]),
  11483. n = 2;
  11484. n < a;
  11485. n += 6
  11486. )
  11487. this.globalData.canvasContext.bezierCurveTo(
  11488. b[n],
  11489. b[n + 1],
  11490. b[n + 2],
  11491. b[n + 3],
  11492. b[n + 4],
  11493. b[n + 5]
  11494. );
  11495. this.globalData.canvasContext.closePath(),
  11496. this.globalData.canvasContext.fill();
  11497. }
  11498. if (this.stroke) {
  11499. for (
  11500. c && c.sw
  11501. ? p !== c.sw && ((p = c.sw), (e.lineWidth = c.sw))
  11502. : p !== this.values.sWidth &&
  11503. ((p = this.values.sWidth),
  11504. (e.lineWidth = this.values.sWidth)),
  11505. c && c.sc
  11506. ? S !== c.sc && ((S = c.sc), (e.strokeStyle = c.sc))
  11507. : S !== this.values.stroke &&
  11508. ((S = this.values.stroke),
  11509. (e.strokeStyle = this.values.stroke)),
  11510. P = this.textSpans[t].elem,
  11511. s = P.length,
  11512. this.globalData.canvasContext.beginPath(),
  11513. i = 0;
  11514. i < s;
  11515. i += 1
  11516. )
  11517. for (
  11518. b = P[i],
  11519. a = b.length,
  11520. this.globalData.canvasContext.moveTo(b[0], b[1]),
  11521. n = 2;
  11522. n < a;
  11523. n += 6
  11524. )
  11525. this.globalData.canvasContext.bezierCurveTo(
  11526. b[n],
  11527. b[n + 1],
  11528. b[n + 2],
  11529. b[n + 3],
  11530. b[n + 4],
  11531. b[n + 5]
  11532. );
  11533. this.globalData.canvasContext.closePath(),
  11534. this.globalData.canvasContext.stroke();
  11535. }
  11536. c && this.globalData.renderer.restore();
  11537. }
  11538. });
  11539. function CVImageElement(e, t, r) {
  11540. (this.assetData = t.getAssetData(e.refId)),
  11541. (this.img = t.imageLoader.getAsset(this.assetData)),
  11542. this.initElement(e, t, r);
  11543. }
  11544. extendPrototype(
  11545. [
  11546. BaseElement,
  11547. TransformElement,
  11548. CVBaseElement,
  11549. HierarchyElement,
  11550. FrameElement,
  11551. RenderableElement
  11552. ],
  11553. CVImageElement
  11554. ),
  11555. (CVImageElement.prototype.initElement =
  11556. SVGShapeElement.prototype.initElement),
  11557. (CVImageElement.prototype.prepareFrame =
  11558. IImageElement.prototype.prepareFrame),
  11559. (CVImageElement.prototype.createContent = function () {
  11560. if (
  11561. this.img.width &&
  11562. (this.assetData.w !== this.img.width ||
  11563. this.assetData.h !== this.img.height)
  11564. ) {
  11565. var e = createTag('canvas');
  11566. (e.width = this.assetData.w), (e.height = this.assetData.h);
  11567. var t = e.getContext('2d'),
  11568. r = this.img.width,
  11569. i = this.img.height,
  11570. s = r / i,
  11571. n = this.assetData.w / this.assetData.h,
  11572. a,
  11573. o,
  11574. l =
  11575. this.assetData.pr ||
  11576. this.globalData.renderConfig.imagePreserveAspectRatio;
  11577. (s > n && l === 'xMidYMid slice') ||
  11578. (s < n && l !== 'xMidYMid slice')
  11579. ? ((o = i), (a = o * n))
  11580. : ((a = r), (o = a / n)),
  11581. t.drawImage(
  11582. this.img,
  11583. (r - a) / 2,
  11584. (i - o) / 2,
  11585. a,
  11586. o,
  11587. 0,
  11588. 0,
  11589. this.assetData.w,
  11590. this.assetData.h
  11591. ),
  11592. (this.img = e);
  11593. }
  11594. }),
  11595. (CVImageElement.prototype.renderInnerContent = function () {
  11596. this.canvasContext.drawImage(this.img, 0, 0);
  11597. }),
  11598. (CVImageElement.prototype.destroy = function () {
  11599. this.img = null;
  11600. });
  11601. function CVSolidElement(e, t, r) {
  11602. this.initElement(e, t, r);
  11603. }
  11604. extendPrototype(
  11605. [
  11606. BaseElement,
  11607. TransformElement,
  11608. CVBaseElement,
  11609. HierarchyElement,
  11610. FrameElement,
  11611. RenderableElement
  11612. ],
  11613. CVSolidElement
  11614. ),
  11615. (CVSolidElement.prototype.initElement =
  11616. SVGShapeElement.prototype.initElement),
  11617. (CVSolidElement.prototype.prepareFrame =
  11618. IImageElement.prototype.prepareFrame),
  11619. (CVSolidElement.prototype.renderInnerContent = function () {
  11620. var e = this.canvasContext;
  11621. (e.fillStyle = this.data.sc),
  11622. e.fillRect(0, 0, this.data.sw, this.data.sh);
  11623. });
  11624. function CanvasRendererBase(e, t) {
  11625. (this.animationItem = e),
  11626. (this.renderConfig = {
  11627. clearCanvas: t && t.clearCanvas !== void 0 ? t.clearCanvas : !0,
  11628. context: (t && t.context) || null,
  11629. progressiveLoad: (t && t.progressiveLoad) || !1,
  11630. preserveAspectRatio:
  11631. (t && t.preserveAspectRatio) || 'xMidYMid meet',
  11632. imagePreserveAspectRatio:
  11633. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  11634. contentVisibility: (t && t.contentVisibility) || 'visible',
  11635. className: (t && t.className) || '',
  11636. id: (t && t.id) || ''
  11637. }),
  11638. (this.renderConfig.dpr = (t && t.dpr) || 1),
  11639. this.animationItem.wrapper &&
  11640. (this.renderConfig.dpr =
  11641. (t && t.dpr) || window.devicePixelRatio || 1),
  11642. (this.renderedFrame = -1),
  11643. (this.globalData = {
  11644. frameNum: -1,
  11645. _mdf: !1,
  11646. renderConfig: this.renderConfig,
  11647. currentGlobalAlpha: -1
  11648. }),
  11649. (this.contextData = new CVContextData()),
  11650. (this.elements = []),
  11651. (this.pendingElements = []),
  11652. (this.transformMat = new Matrix()),
  11653. (this.completeLayers = !1),
  11654. (this.rendererType = 'canvas');
  11655. }
  11656. extendPrototype([BaseRenderer], CanvasRendererBase),
  11657. (CanvasRendererBase.prototype.createShape = function (e) {
  11658. return new CVShapeElement(e, this.globalData, this);
  11659. }),
  11660. (CanvasRendererBase.prototype.createText = function (e) {
  11661. return new CVTextElement(e, this.globalData, this);
  11662. }),
  11663. (CanvasRendererBase.prototype.createImage = function (e) {
  11664. return new CVImageElement(e, this.globalData, this);
  11665. }),
  11666. (CanvasRendererBase.prototype.createSolid = function (e) {
  11667. return new CVSolidElement(e, this.globalData, this);
  11668. }),
  11669. (CanvasRendererBase.prototype.createNull =
  11670. SVGRenderer.prototype.createNull),
  11671. (CanvasRendererBase.prototype.ctxTransform = function (e) {
  11672. if (
  11673. !(
  11674. e[0] === 1 &&
  11675. e[1] === 0 &&
  11676. e[4] === 0 &&
  11677. e[5] === 1 &&
  11678. e[12] === 0 &&
  11679. e[13] === 0
  11680. )
  11681. ) {
  11682. if (!this.renderConfig.clearCanvas) {
  11683. this.canvasContext.transform(
  11684. e[0],
  11685. e[1],
  11686. e[4],
  11687. e[5],
  11688. e[12],
  11689. e[13]
  11690. );
  11691. return;
  11692. }
  11693. this.transformMat.cloneFromProps(e);
  11694. var t = this.contextData.getTransform(),
  11695. r = t.props;
  11696. this.transformMat.transform(
  11697. r[0],
  11698. r[1],
  11699. r[2],
  11700. r[3],
  11701. r[4],
  11702. r[5],
  11703. r[6],
  11704. r[7],
  11705. r[8],
  11706. r[9],
  11707. r[10],
  11708. r[11],
  11709. r[12],
  11710. r[13],
  11711. r[14],
  11712. r[15]
  11713. ),
  11714. t.cloneFromProps(this.transformMat.props);
  11715. var i = t.props;
  11716. this.canvasContext.setTransform(
  11717. i[0],
  11718. i[1],
  11719. i[4],
  11720. i[5],
  11721. i[12],
  11722. i[13]
  11723. );
  11724. }
  11725. }),
  11726. (CanvasRendererBase.prototype.ctxOpacity = function (e) {
  11727. var t = this.contextData.getOpacity();
  11728. if (!this.renderConfig.clearCanvas) {
  11729. (this.canvasContext.globalAlpha *= e < 0 ? 0 : e),
  11730. (this.globalData.currentGlobalAlpha = t);
  11731. return;
  11732. }
  11733. (t *= e < 0 ? 0 : e),
  11734. this.contextData.setOpacity(t),
  11735. this.globalData.currentGlobalAlpha !== t &&
  11736. ((this.canvasContext.globalAlpha = t),
  11737. (this.globalData.currentGlobalAlpha = t));
  11738. }),
  11739. (CanvasRendererBase.prototype.reset = function () {
  11740. if (!this.renderConfig.clearCanvas) {
  11741. this.canvasContext.restore();
  11742. return;
  11743. }
  11744. this.contextData.reset();
  11745. }),
  11746. (CanvasRendererBase.prototype.save = function (e) {
  11747. if (!this.renderConfig.clearCanvas) {
  11748. this.canvasContext.save();
  11749. return;
  11750. }
  11751. e && this.canvasContext.save(), this.contextData.push();
  11752. }),
  11753. (CanvasRendererBase.prototype.restore = function (e) {
  11754. if (!this.renderConfig.clearCanvas) {
  11755. this.canvasContext.restore();
  11756. return;
  11757. }
  11758. e &&
  11759. (this.canvasContext.restore(),
  11760. (this.globalData.blendMode = 'source-over'));
  11761. var t = this.contextData.pop(),
  11762. r = t.transform,
  11763. i = t.opacity;
  11764. this.canvasContext.setTransform(r[0], r[1], r[4], r[5], r[12], r[13]),
  11765. this.globalData.currentGlobalAlpha !== i &&
  11766. ((this.canvasContext.globalAlpha = i),
  11767. (this.globalData.currentGlobalAlpha = i));
  11768. }),
  11769. (CanvasRendererBase.prototype.configAnimation = function (e) {
  11770. if (this.animationItem.wrapper) {
  11771. this.animationItem.container = createTag('canvas');
  11772. var t = this.animationItem.container.style;
  11773. (t.width = '100%'), (t.height = '100%');
  11774. var r = '0px 0px 0px';
  11775. (t.transformOrigin = r),
  11776. (t.mozTransformOrigin = r),
  11777. (t.webkitTransformOrigin = r),
  11778. (t['-webkit-transform'] = r),
  11779. (t.contentVisibility = this.renderConfig.contentVisibility),
  11780. this.animationItem.wrapper.appendChild(
  11781. this.animationItem.container
  11782. ),
  11783. (this.canvasContext =
  11784. this.animationItem.container.getContext('2d')),
  11785. this.renderConfig.className &&
  11786. this.animationItem.container.setAttribute(
  11787. 'class',
  11788. this.renderConfig.className
  11789. ),
  11790. this.renderConfig.id &&
  11791. this.animationItem.container.setAttribute(
  11792. 'id',
  11793. this.renderConfig.id
  11794. );
  11795. } else this.canvasContext = this.renderConfig.context;
  11796. (this.data = e),
  11797. (this.layers = e.layers),
  11798. (this.transformCanvas = {
  11799. w: e.w,
  11800. h: e.h,
  11801. sx: 0,
  11802. sy: 0,
  11803. tx: 0,
  11804. ty: 0
  11805. }),
  11806. this.setupGlobalData(e, document.body),
  11807. (this.globalData.canvasContext = this.canvasContext),
  11808. (this.globalData.renderer = this),
  11809. (this.globalData.isDashed = !1),
  11810. (this.globalData.progressiveLoad =
  11811. this.renderConfig.progressiveLoad),
  11812. (this.globalData.transformCanvas = this.transformCanvas),
  11813. (this.elements = createSizedArray(e.layers.length)),
  11814. this.updateContainerSize();
  11815. }),
  11816. (CanvasRendererBase.prototype.updateContainerSize = function (e, t) {
  11817. this.reset();
  11818. var r, i;
  11819. e
  11820. ? ((r = e),
  11821. (i = t),
  11822. (this.canvasContext.canvas.width = r),
  11823. (this.canvasContext.canvas.height = i))
  11824. : (this.animationItem.wrapper && this.animationItem.container
  11825. ? ((r = this.animationItem.wrapper.offsetWidth),
  11826. (i = this.animationItem.wrapper.offsetHeight))
  11827. : ((r = this.canvasContext.canvas.width),
  11828. (i = this.canvasContext.canvas.height)),
  11829. (this.canvasContext.canvas.width = r * this.renderConfig.dpr),
  11830. (this.canvasContext.canvas.height = i * this.renderConfig.dpr));
  11831. var s, n;
  11832. if (
  11833. this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 ||
  11834. this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1
  11835. ) {
  11836. var a = this.renderConfig.preserveAspectRatio.split(' '),
  11837. o = a[1] || 'meet',
  11838. l = a[0] || 'xMidYMid',
  11839. c = l.substr(0, 4),
  11840. g = l.substr(4);
  11841. (s = r / i),
  11842. (n = this.transformCanvas.w / this.transformCanvas.h),
  11843. (n > s && o === 'meet') || (n < s && o === 'slice')
  11844. ? ((this.transformCanvas.sx =
  11845. r / (this.transformCanvas.w / this.renderConfig.dpr)),
  11846. (this.transformCanvas.sy =
  11847. r / (this.transformCanvas.w / this.renderConfig.dpr)))
  11848. : ((this.transformCanvas.sx =
  11849. i / (this.transformCanvas.h / this.renderConfig.dpr)),
  11850. (this.transformCanvas.sy =
  11851. i / (this.transformCanvas.h / this.renderConfig.dpr))),
  11852. c === 'xMid' &&
  11853. ((n < s && o === 'meet') || (n > s && o === 'slice'))
  11854. ? (this.transformCanvas.tx =
  11855. ((r -
  11856. this.transformCanvas.w * (i / this.transformCanvas.h)) /
  11857. 2) *
  11858. this.renderConfig.dpr)
  11859. : c === 'xMax' &&
  11860. ((n < s && o === 'meet') || (n > s && o === 'slice'))
  11861. ? (this.transformCanvas.tx =
  11862. (r -
  11863. this.transformCanvas.w * (i / this.transformCanvas.h)) *
  11864. this.renderConfig.dpr)
  11865. : (this.transformCanvas.tx = 0),
  11866. g === 'YMid' &&
  11867. ((n > s && o === 'meet') || (n < s && o === 'slice'))
  11868. ? (this.transformCanvas.ty =
  11869. ((i -
  11870. this.transformCanvas.h * (r / this.transformCanvas.w)) /
  11871. 2) *
  11872. this.renderConfig.dpr)
  11873. : g === 'YMax' &&
  11874. ((n > s && o === 'meet') || (n < s && o === 'slice'))
  11875. ? (this.transformCanvas.ty =
  11876. (i -
  11877. this.transformCanvas.h * (r / this.transformCanvas.w)) *
  11878. this.renderConfig.dpr)
  11879. : (this.transformCanvas.ty = 0);
  11880. } else
  11881. this.renderConfig.preserveAspectRatio === 'none'
  11882. ? ((this.transformCanvas.sx =
  11883. r / (this.transformCanvas.w / this.renderConfig.dpr)),
  11884. (this.transformCanvas.sy =
  11885. i / (this.transformCanvas.h / this.renderConfig.dpr)),
  11886. (this.transformCanvas.tx = 0),
  11887. (this.transformCanvas.ty = 0))
  11888. : ((this.transformCanvas.sx = this.renderConfig.dpr),
  11889. (this.transformCanvas.sy = this.renderConfig.dpr),
  11890. (this.transformCanvas.tx = 0),
  11891. (this.transformCanvas.ty = 0));
  11892. (this.transformCanvas.props = [
  11893. this.transformCanvas.sx,
  11894. 0,
  11895. 0,
  11896. 0,
  11897. 0,
  11898. this.transformCanvas.sy,
  11899. 0,
  11900. 0,
  11901. 0,
  11902. 0,
  11903. 1,
  11904. 0,
  11905. this.transformCanvas.tx,
  11906. this.transformCanvas.ty,
  11907. 0,
  11908. 1
  11909. ]),
  11910. this.ctxTransform(this.transformCanvas.props),
  11911. this.canvasContext.beginPath(),
  11912. this.canvasContext.rect(
  11913. 0,
  11914. 0,
  11915. this.transformCanvas.w,
  11916. this.transformCanvas.h
  11917. ),
  11918. this.canvasContext.closePath(),
  11919. this.canvasContext.clip(),
  11920. this.renderFrame(this.renderedFrame, !0);
  11921. }),
  11922. (CanvasRendererBase.prototype.destroy = function () {
  11923. this.renderConfig.clearCanvas &&
  11924. this.animationItem.wrapper &&
  11925. (this.animationItem.wrapper.innerText = '');
  11926. var e,
  11927. t = this.layers ? this.layers.length : 0;
  11928. for (e = t - 1; e >= 0; e -= 1)
  11929. this.elements[e] &&
  11930. this.elements[e].destroy &&
  11931. this.elements[e].destroy();
  11932. (this.elements.length = 0),
  11933. (this.globalData.canvasContext = null),
  11934. (this.animationItem.container = null),
  11935. (this.destroyed = !0);
  11936. }),
  11937. (CanvasRendererBase.prototype.renderFrame = function (e, t) {
  11938. if (
  11939. !(
  11940. (this.renderedFrame === e &&
  11941. this.renderConfig.clearCanvas === !0 &&
  11942. !t) ||
  11943. this.destroyed ||
  11944. e === -1
  11945. )
  11946. ) {
  11947. (this.renderedFrame = e),
  11948. (this.globalData.frameNum = e - this.animationItem._isFirstFrame),
  11949. (this.globalData.frameId += 1),
  11950. (this.globalData._mdf = !this.renderConfig.clearCanvas || t),
  11951. (this.globalData.projectInterface.currentFrame = e);
  11952. var r,
  11953. i = this.layers.length;
  11954. for (
  11955. this.completeLayers || this.checkLayers(e), r = 0;
  11956. r < i;
  11957. r += 1
  11958. )
  11959. (this.completeLayers || this.elements[r]) &&
  11960. this.elements[r].prepareFrame(e - this.layers[r].st);
  11961. if (this.globalData._mdf) {
  11962. for (
  11963. this.renderConfig.clearCanvas === !0
  11964. ? this.canvasContext.clearRect(
  11965. 0,
  11966. 0,
  11967. this.transformCanvas.w,
  11968. this.transformCanvas.h
  11969. )
  11970. : this.save(),
  11971. r = i - 1;
  11972. r >= 0;
  11973. r -= 1
  11974. )
  11975. (this.completeLayers || this.elements[r]) &&
  11976. this.elements[r].renderFrame();
  11977. this.renderConfig.clearCanvas !== !0 && this.restore();
  11978. }
  11979. }
  11980. }),
  11981. (CanvasRendererBase.prototype.buildItem = function (e) {
  11982. var t = this.elements;
  11983. if (!(t[e] || this.layers[e].ty === 99)) {
  11984. var r = this.createItem(this.layers[e], this, this.globalData);
  11985. (t[e] = r), r.initExpressions();
  11986. }
  11987. }),
  11988. (CanvasRendererBase.prototype.checkPendingElements = function () {
  11989. for (; this.pendingElements.length; ) {
  11990. var e = this.pendingElements.pop();
  11991. e.checkParenting();
  11992. }
  11993. }),
  11994. (CanvasRendererBase.prototype.hide = function () {
  11995. this.animationItem.container.style.display = 'none';
  11996. }),
  11997. (CanvasRendererBase.prototype.show = function () {
  11998. this.animationItem.container.style.display = 'block';
  11999. });
  12000. function CVCompElement(e, t, r) {
  12001. (this.completeLayers = !1),
  12002. (this.layers = e.layers),
  12003. (this.pendingElements = []),
  12004. (this.elements = createSizedArray(this.layers.length)),
  12005. this.initElement(e, t, r),
  12006. (this.tm = e.tm
  12007. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  12008. : { _placeholder: !0 });
  12009. }
  12010. extendPrototype(
  12011. [CanvasRendererBase, ICompElement, CVBaseElement],
  12012. CVCompElement
  12013. ),
  12014. (CVCompElement.prototype.renderInnerContent = function () {
  12015. var e = this.canvasContext;
  12016. e.beginPath(),
  12017. e.moveTo(0, 0),
  12018. e.lineTo(this.data.w, 0),
  12019. e.lineTo(this.data.w, this.data.h),
  12020. e.lineTo(0, this.data.h),
  12021. e.lineTo(0, 0),
  12022. e.clip();
  12023. var t,
  12024. r = this.layers.length;
  12025. for (t = r - 1; t >= 0; t -= 1)
  12026. (this.completeLayers || this.elements[t]) &&
  12027. this.elements[t].renderFrame();
  12028. }),
  12029. (CVCompElement.prototype.destroy = function () {
  12030. var e,
  12031. t = this.layers.length;
  12032. for (e = t - 1; e >= 0; e -= 1)
  12033. this.elements[e] && this.elements[e].destroy();
  12034. (this.layers = null), (this.elements = null);
  12035. }),
  12036. (CVCompElement.prototype.createComp = function (e) {
  12037. return new CVCompElement(e, this.globalData, this);
  12038. });
  12039. function CanvasRenderer(e, t) {
  12040. (this.animationItem = e),
  12041. (this.renderConfig = {
  12042. clearCanvas: t && t.clearCanvas !== void 0 ? t.clearCanvas : !0,
  12043. context: (t && t.context) || null,
  12044. progressiveLoad: (t && t.progressiveLoad) || !1,
  12045. preserveAspectRatio:
  12046. (t && t.preserveAspectRatio) || 'xMidYMid meet',
  12047. imagePreserveAspectRatio:
  12048. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  12049. contentVisibility: (t && t.contentVisibility) || 'visible',
  12050. className: (t && t.className) || '',
  12051. id: (t && t.id) || '',
  12052. runExpressions:
  12053. !t || t.runExpressions === void 0 || t.runExpressions
  12054. }),
  12055. (this.renderConfig.dpr = (t && t.dpr) || 1),
  12056. this.animationItem.wrapper &&
  12057. (this.renderConfig.dpr =
  12058. (t && t.dpr) || window.devicePixelRatio || 1),
  12059. (this.renderedFrame = -1),
  12060. (this.globalData = {
  12061. frameNum: -1,
  12062. _mdf: !1,
  12063. renderConfig: this.renderConfig,
  12064. currentGlobalAlpha: -1
  12065. }),
  12066. (this.contextData = new CVContextData()),
  12067. (this.elements = []),
  12068. (this.pendingElements = []),
  12069. (this.transformMat = new Matrix()),
  12070. (this.completeLayers = !1),
  12071. (this.rendererType = 'canvas');
  12072. }
  12073. extendPrototype([CanvasRendererBase], CanvasRenderer),
  12074. (CanvasRenderer.prototype.createComp = function (e) {
  12075. return new CVCompElement(e, this.globalData, this);
  12076. });
  12077. function HBaseElement() {}
  12078. (HBaseElement.prototype = {
  12079. checkBlendMode: function () {},
  12080. initRendererElement: function () {
  12081. (this.baseElement = createTag(this.data.tg || 'div')),
  12082. this.data.hasMask
  12083. ? ((this.svgElement = createNS('svg')),
  12084. (this.layerElement = createNS('g')),
  12085. (this.maskedElement = this.layerElement),
  12086. this.svgElement.appendChild(this.layerElement),
  12087. this.baseElement.appendChild(this.svgElement))
  12088. : (this.layerElement = this.baseElement),
  12089. styleDiv(this.baseElement);
  12090. },
  12091. createContainerElements: function () {
  12092. (this.renderableEffectsManager = new CVEffects()),
  12093. (this.transformedElement = this.baseElement),
  12094. (this.maskedElement = this.layerElement),
  12095. this.data.ln && this.layerElement.setAttribute('id', this.data.ln),
  12096. this.data.cl &&
  12097. this.layerElement.setAttribute('class', this.data.cl),
  12098. this.data.bm !== 0 && this.setBlendMode();
  12099. },
  12100. renderElement: function () {
  12101. var t = this.transformedElement ? this.transformedElement.style : {};
  12102. if (this.finalTransform._matMdf) {
  12103. var r = this.finalTransform.mat.toCSS();
  12104. (t.transform = r), (t.webkitTransform = r);
  12105. }
  12106. this.finalTransform._opMdf &&
  12107. (t.opacity = this.finalTransform.mProp.o.v);
  12108. },
  12109. renderFrame: function () {
  12110. this.data.hd ||
  12111. this.hidden ||
  12112. (this.renderTransform(),
  12113. this.renderRenderable(),
  12114. this.renderElement(),
  12115. this.renderInnerContent(),
  12116. this._isFirstFrame && (this._isFirstFrame = !1));
  12117. },
  12118. destroy: function () {
  12119. (this.layerElement = null),
  12120. (this.transformedElement = null),
  12121. this.matteElement && (this.matteElement = null),
  12122. this.maskManager &&
  12123. (this.maskManager.destroy(), (this.maskManager = null));
  12124. },
  12125. createRenderableComponents: function () {
  12126. this.maskManager = new MaskElement(this.data, this, this.globalData);
  12127. },
  12128. addEffects: function () {},
  12129. setMatte: function () {}
  12130. }),
  12131. (HBaseElement.prototype.getBaseElement =
  12132. SVGBaseElement.prototype.getBaseElement),
  12133. (HBaseElement.prototype.destroyBaseElement =
  12134. HBaseElement.prototype.destroy),
  12135. (HBaseElement.prototype.buildElementParenting =
  12136. BaseRenderer.prototype.buildElementParenting);
  12137. function HSolidElement(e, t, r) {
  12138. this.initElement(e, t, r);
  12139. }
  12140. extendPrototype(
  12141. [
  12142. BaseElement,
  12143. TransformElement,
  12144. HBaseElement,
  12145. HierarchyElement,
  12146. FrameElement,
  12147. RenderableDOMElement
  12148. ],
  12149. HSolidElement
  12150. ),
  12151. (HSolidElement.prototype.createContent = function () {
  12152. var e;
  12153. this.data.hasMask
  12154. ? ((e = createNS('rect')),
  12155. e.setAttribute('width', this.data.sw),
  12156. e.setAttribute('height', this.data.sh),
  12157. e.setAttribute('fill', this.data.sc),
  12158. this.svgElement.setAttribute('width', this.data.sw),
  12159. this.svgElement.setAttribute('height', this.data.sh))
  12160. : ((e = createTag('div')),
  12161. (e.style.width = this.data.sw + 'px'),
  12162. (e.style.height = this.data.sh + 'px'),
  12163. (e.style.backgroundColor = this.data.sc)),
  12164. this.layerElement.appendChild(e);
  12165. });
  12166. function HShapeElement(e, t, r) {
  12167. (this.shapes = []),
  12168. (this.shapesData = e.shapes),
  12169. (this.stylesList = []),
  12170. (this.shapeModifiers = []),
  12171. (this.itemsData = []),
  12172. (this.processedElements = []),
  12173. (this.animatedContents = []),
  12174. (this.shapesContainer = createNS('g')),
  12175. this.initElement(e, t, r),
  12176. (this.prevViewData = []),
  12177. (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 });
  12178. }
  12179. extendPrototype(
  12180. [
  12181. BaseElement,
  12182. TransformElement,
  12183. HSolidElement,
  12184. SVGShapeElement,
  12185. HBaseElement,
  12186. HierarchyElement,
  12187. FrameElement,
  12188. RenderableElement
  12189. ],
  12190. HShapeElement
  12191. ),
  12192. (HShapeElement.prototype._renderShapeFrame =
  12193. HShapeElement.prototype.renderInnerContent),
  12194. (HShapeElement.prototype.createContent = function () {
  12195. var e;
  12196. if (((this.baseElement.style.fontSize = 0), this.data.hasMask))
  12197. this.layerElement.appendChild(this.shapesContainer),
  12198. (e = this.svgElement);
  12199. else {
  12200. e = createNS('svg');
  12201. var t = this.comp.data ? this.comp.data : this.globalData.compSize;
  12202. e.setAttribute('width', t.w),
  12203. e.setAttribute('height', t.h),
  12204. e.appendChild(this.shapesContainer),
  12205. this.layerElement.appendChild(e);
  12206. }
  12207. this.searchShapes(
  12208. this.shapesData,
  12209. this.itemsData,
  12210. this.prevViewData,
  12211. this.shapesContainer,
  12212. 0,
  12213. [],
  12214. !0
  12215. ),
  12216. this.filterUniqueShapes(),
  12217. (this.shapeCont = e);
  12218. }),
  12219. (HShapeElement.prototype.getTransformedPoint = function (e, t) {
  12220. var r,
  12221. i = e.length;
  12222. for (r = 0; r < i; r += 1)
  12223. t = e[r].mProps.v.applyToPointArray(t[0], t[1], 0);
  12224. return t;
  12225. }),
  12226. (HShapeElement.prototype.calculateShapeBoundingBox = function (e, t) {
  12227. var r = e.sh.v,
  12228. i = e.transformers,
  12229. s,
  12230. n = r._length,
  12231. a,
  12232. o,
  12233. l,
  12234. c;
  12235. if (!(n <= 1)) {
  12236. for (s = 0; s < n - 1; s += 1)
  12237. (a = this.getTransformedPoint(i, r.v[s])),
  12238. (o = this.getTransformedPoint(i, r.o[s])),
  12239. (l = this.getTransformedPoint(i, r.i[s + 1])),
  12240. (c = this.getTransformedPoint(i, r.v[s + 1])),
  12241. this.checkBounds(a, o, l, c, t);
  12242. r.c &&
  12243. ((a = this.getTransformedPoint(i, r.v[s])),
  12244. (o = this.getTransformedPoint(i, r.o[s])),
  12245. (l = this.getTransformedPoint(i, r.i[0])),
  12246. (c = this.getTransformedPoint(i, r.v[0])),
  12247. this.checkBounds(a, o, l, c, t));
  12248. }
  12249. }),
  12250. (HShapeElement.prototype.checkBounds = function (e, t, r, i, s) {
  12251. this.getBoundsOfCurve(e, t, r, i);
  12252. var n = this.shapeBoundingBox;
  12253. (s.x = bmMin(n.left, s.x)),
  12254. (s.xMax = bmMax(n.right, s.xMax)),
  12255. (s.y = bmMin(n.top, s.y)),
  12256. (s.yMax = bmMax(n.bottom, s.yMax));
  12257. }),
  12258. (HShapeElement.prototype.shapeBoundingBox = {
  12259. left: 0,
  12260. right: 0,
  12261. top: 0,
  12262. bottom: 0
  12263. }),
  12264. (HShapeElement.prototype.tempBoundingBox = {
  12265. x: 0,
  12266. xMax: 0,
  12267. y: 0,
  12268. yMax: 0,
  12269. width: 0,
  12270. height: 0
  12271. }),
  12272. (HShapeElement.prototype.getBoundsOfCurve = function (e, t, r, i) {
  12273. for (
  12274. var s = [
  12275. [e[0], i[0]],
  12276. [e[1], i[1]]
  12277. ],
  12278. n,
  12279. a,
  12280. o,
  12281. l,
  12282. c,
  12283. g,
  12284. S,
  12285. p = 0;
  12286. p < 2;
  12287. ++p
  12288. )
  12289. (a = 6 * e[p] - 12 * t[p] + 6 * r[p]),
  12290. (n = -3 * e[p] + 9 * t[p] - 9 * r[p] + 3 * i[p]),
  12291. (o = 3 * t[p] - 3 * e[p]),
  12292. (a |= 0),
  12293. (n |= 0),
  12294. (o |= 0),
  12295. (n === 0 && a === 0) ||
  12296. (n === 0
  12297. ? ((l = -o / a),
  12298. l > 0 &&
  12299. l < 1 &&
  12300. s[p].push(this.calculateF(l, e, t, r, i, p)))
  12301. : ((c = a * a - 4 * o * n),
  12302. c >= 0 &&
  12303. ((g = (-a + bmSqrt(c)) / (2 * n)),
  12304. g > 0 &&
  12305. g < 1 &&
  12306. s[p].push(this.calculateF(g, e, t, r, i, p)),
  12307. (S = (-a - bmSqrt(c)) / (2 * n)),
  12308. S > 0 &&
  12309. S < 1 &&
  12310. s[p].push(this.calculateF(S, e, t, r, i, p)))));
  12311. (this.shapeBoundingBox.left = bmMin.apply(null, s[0])),
  12312. (this.shapeBoundingBox.top = bmMin.apply(null, s[1])),
  12313. (this.shapeBoundingBox.right = bmMax.apply(null, s[0])),
  12314. (this.shapeBoundingBox.bottom = bmMax.apply(null, s[1]));
  12315. }),
  12316. (HShapeElement.prototype.calculateF = function (e, t, r, i, s, n) {
  12317. return (
  12318. bmPow(1 - e, 3) * t[n] +
  12319. 3 * bmPow(1 - e, 2) * e * r[n] +
  12320. 3 * (1 - e) * bmPow(e, 2) * i[n] +
  12321. bmPow(e, 3) * s[n]
  12322. );
  12323. }),
  12324. (HShapeElement.prototype.calculateBoundingBox = function (e, t) {
  12325. var r,
  12326. i = e.length;
  12327. for (r = 0; r < i; r += 1)
  12328. e[r] && e[r].sh
  12329. ? this.calculateShapeBoundingBox(e[r], t)
  12330. : e[r] && e[r].it
  12331. ? this.calculateBoundingBox(e[r].it, t)
  12332. : e[r] &&
  12333. e[r].style &&
  12334. e[r].w &&
  12335. this.expandStrokeBoundingBox(e[r].w, t);
  12336. }),
  12337. (HShapeElement.prototype.expandStrokeBoundingBox = function (e, t) {
  12338. var r = 0;
  12339. if (e.keyframes) {
  12340. for (var i = 0; i < e.keyframes.length; i += 1) {
  12341. var s = e.keyframes[i].s;
  12342. s > r && (r = s);
  12343. }
  12344. r *= e.mult;
  12345. } else r = e.v * e.mult;
  12346. (t.x -= r), (t.xMax += r), (t.y -= r), (t.yMax += r);
  12347. }),
  12348. (HShapeElement.prototype.currentBoxContains = function (e) {
  12349. return (
  12350. this.currentBBox.x <= e.x &&
  12351. this.currentBBox.y <= e.y &&
  12352. this.currentBBox.width + this.currentBBox.x >= e.x + e.width &&
  12353. this.currentBBox.height + this.currentBBox.y >= e.y + e.height
  12354. );
  12355. }),
  12356. (HShapeElement.prototype.renderInnerContent = function () {
  12357. if (
  12358. (this._renderShapeFrame(),
  12359. !this.hidden && (this._isFirstFrame || this._mdf))
  12360. ) {
  12361. var e = this.tempBoundingBox,
  12362. t = 999999;
  12363. if (
  12364. ((e.x = t),
  12365. (e.xMax = -t),
  12366. (e.y = t),
  12367. (e.yMax = -t),
  12368. this.calculateBoundingBox(this.itemsData, e),
  12369. (e.width = e.xMax < e.x ? 0 : e.xMax - e.x),
  12370. (e.height = e.yMax < e.y ? 0 : e.yMax - e.y),
  12371. this.currentBoxContains(e))
  12372. )
  12373. return;
  12374. var r = !1;
  12375. if (
  12376. (this.currentBBox.w !== e.width &&
  12377. ((this.currentBBox.w = e.width),
  12378. this.shapeCont.setAttribute('width', e.width),
  12379. (r = !0)),
  12380. this.currentBBox.h !== e.height &&
  12381. ((this.currentBBox.h = e.height),
  12382. this.shapeCont.setAttribute('height', e.height),
  12383. (r = !0)),
  12384. r || this.currentBBox.x !== e.x || this.currentBBox.y !== e.y)
  12385. ) {
  12386. (this.currentBBox.w = e.width),
  12387. (this.currentBBox.h = e.height),
  12388. (this.currentBBox.x = e.x),
  12389. (this.currentBBox.y = e.y),
  12390. this.shapeCont.setAttribute(
  12391. 'viewBox',
  12392. this.currentBBox.x +
  12393. ' ' +
  12394. this.currentBBox.y +
  12395. ' ' +
  12396. this.currentBBox.w +
  12397. ' ' +
  12398. this.currentBBox.h
  12399. );
  12400. var i = this.shapeCont.style,
  12401. s =
  12402. 'translate(' +
  12403. this.currentBBox.x +
  12404. 'px,' +
  12405. this.currentBBox.y +
  12406. 'px)';
  12407. (i.transform = s), (i.webkitTransform = s);
  12408. }
  12409. }
  12410. });
  12411. function HTextElement(e, t, r) {
  12412. (this.textSpans = []),
  12413. (this.textPaths = []),
  12414. (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }),
  12415. (this.renderType = 'svg'),
  12416. (this.isMasked = !1),
  12417. this.initElement(e, t, r);
  12418. }
  12419. extendPrototype(
  12420. [
  12421. BaseElement,
  12422. TransformElement,
  12423. HBaseElement,
  12424. HierarchyElement,
  12425. FrameElement,
  12426. RenderableDOMElement,
  12427. ITextElement
  12428. ],
  12429. HTextElement
  12430. ),
  12431. (HTextElement.prototype.createContent = function () {
  12432. if (((this.isMasked = this.checkMasks()), this.isMasked)) {
  12433. (this.renderType = 'svg'),
  12434. (this.compW = this.comp.data.w),
  12435. (this.compH = this.comp.data.h),
  12436. this.svgElement.setAttribute('width', this.compW),
  12437. this.svgElement.setAttribute('height', this.compH);
  12438. var e = createNS('g');
  12439. this.maskedElement.appendChild(e), (this.innerElem = e);
  12440. } else
  12441. (this.renderType = 'html'), (this.innerElem = this.layerElement);
  12442. this.checkParenting();
  12443. }),
  12444. (HTextElement.prototype.buildNewText = function () {
  12445. var e = this.textProperty.currentData;
  12446. this.renderedLetters = createSizedArray(e.l ? e.l.length : 0);
  12447. var t = this.innerElem.style,
  12448. r = e.fc ? this.buildColor(e.fc) : 'rgba(0,0,0,0)';
  12449. (t.fill = r),
  12450. (t.color = r),
  12451. e.sc &&
  12452. ((t.stroke = this.buildColor(e.sc)),
  12453. (t.strokeWidth = e.sw + 'px'));
  12454. var i = this.globalData.fontManager.getFontByName(e.f);
  12455. if (!this.globalData.fontManager.chars)
  12456. if (
  12457. ((t.fontSize = e.finalSize + 'px'),
  12458. (t.lineHeight = e.finalSize + 'px'),
  12459. i.fClass)
  12460. )
  12461. this.innerElem.className = i.fClass;
  12462. else {
  12463. t.fontFamily = i.fFamily;
  12464. var s = e.fWeight,
  12465. n = e.fStyle;
  12466. (t.fontStyle = n), (t.fontWeight = s);
  12467. }
  12468. var a,
  12469. o,
  12470. l = e.l;
  12471. o = l.length;
  12472. var c,
  12473. g,
  12474. S,
  12475. p = this.mHelper,
  12476. P,
  12477. b = '',
  12478. y = 0;
  12479. for (a = 0; a < o; a += 1) {
  12480. if (
  12481. (this.globalData.fontManager.chars
  12482. ? (this.textPaths[y]
  12483. ? (c = this.textPaths[y])
  12484. : ((c = createNS('path')),
  12485. c.setAttribute('stroke-linecap', lineCapEnum[1]),
  12486. c.setAttribute('stroke-linejoin', lineJoinEnum[2]),
  12487. c.setAttribute('stroke-miterlimit', '4')),
  12488. this.isMasked ||
  12489. (this.textSpans[y]
  12490. ? ((g = this.textSpans[y]), (S = g.children[0]))
  12491. : ((g = createTag('div')),
  12492. (g.style.lineHeight = 0),
  12493. (S = createNS('svg')),
  12494. S.appendChild(c),
  12495. styleDiv(g))))
  12496. : this.isMasked
  12497. ? (c = this.textPaths[y] ? this.textPaths[y] : createNS('text'))
  12498. : this.textSpans[y]
  12499. ? ((g = this.textSpans[y]), (c = this.textPaths[y]))
  12500. : ((g = createTag('span')),
  12501. styleDiv(g),
  12502. (c = createTag('span')),
  12503. styleDiv(c),
  12504. g.appendChild(c)),
  12505. this.globalData.fontManager.chars)
  12506. ) {
  12507. var A = this.globalData.fontManager.getCharData(
  12508. e.finalText[a],
  12509. i.fStyle,
  12510. this.globalData.fontManager.getFontByName(e.f).fFamily
  12511. ),
  12512. u;
  12513. if (
  12514. (A ? (u = A.data) : (u = null),
  12515. p.reset(),
  12516. u &&
  12517. u.shapes &&
  12518. u.shapes.length &&
  12519. ((P = u.shapes[0].it),
  12520. p.scale(e.finalSize / 100, e.finalSize / 100),
  12521. (b = this.createPathShape(p, P)),
  12522. c.setAttribute('d', b)),
  12523. this.isMasked)
  12524. )
  12525. this.innerElem.appendChild(c);
  12526. else {
  12527. if ((this.innerElem.appendChild(g), u && u.shapes)) {
  12528. document.body.appendChild(S);
  12529. var f = S.getBBox();
  12530. S.setAttribute('width', f.width + 2),
  12531. S.setAttribute('height', f.height + 2),
  12532. S.setAttribute(
  12533. 'viewBox',
  12534. f.x -
  12535. 1 +
  12536. ' ' +
  12537. (f.y - 1) +
  12538. ' ' +
  12539. (f.width + 2) +
  12540. ' ' +
  12541. (f.height + 2)
  12542. );
  12543. var m = S.style,
  12544. d = 'translate(' + (f.x - 1) + 'px,' + (f.y - 1) + 'px)';
  12545. (m.transform = d),
  12546. (m.webkitTransform = d),
  12547. (l[a].yOffset = f.y - 1);
  12548. } else S.setAttribute('width', 1), S.setAttribute('height', 1);
  12549. g.appendChild(S);
  12550. }
  12551. } else if (
  12552. ((c.textContent = l[a].val),
  12553. c.setAttributeNS(
  12554. 'http://www.w3.org/XML/1998/namespace',
  12555. 'xml:space',
  12556. 'preserve'
  12557. ),
  12558. this.isMasked)
  12559. )
  12560. this.innerElem.appendChild(c);
  12561. else {
  12562. this.innerElem.appendChild(g);
  12563. var E = c.style,
  12564. T = 'translate3d(0,' + -e.finalSize / 1.2 + 'px,0)';
  12565. (E.transform = T), (E.webkitTransform = T);
  12566. }
  12567. this.isMasked ? (this.textSpans[y] = c) : (this.textSpans[y] = g),
  12568. (this.textSpans[y].style.display = 'block'),
  12569. (this.textPaths[y] = c),
  12570. (y += 1);
  12571. }
  12572. for (; y < this.textSpans.length; )
  12573. (this.textSpans[y].style.display = 'none'), (y += 1);
  12574. }),
  12575. (HTextElement.prototype.renderInnerContent = function () {
  12576. var e;
  12577. if (this.data.singleShape) {
  12578. if (!this._isFirstFrame && !this.lettersChangedFlag) return;
  12579. if (this.isMasked && this.finalTransform._matMdf) {
  12580. this.svgElement.setAttribute(
  12581. 'viewBox',
  12582. -this.finalTransform.mProp.p.v[0] +
  12583. ' ' +
  12584. -this.finalTransform.mProp.p.v[1] +
  12585. ' ' +
  12586. this.compW +
  12587. ' ' +
  12588. this.compH
  12589. ),
  12590. (e = this.svgElement.style);
  12591. var t =
  12592. 'translate(' +
  12593. -this.finalTransform.mProp.p.v[0] +
  12594. 'px,' +
  12595. -this.finalTransform.mProp.p.v[1] +
  12596. 'px)';
  12597. (e.transform = t), (e.webkitTransform = t);
  12598. }
  12599. }
  12600. if (
  12601. (this.textAnimator.getMeasures(
  12602. this.textProperty.currentData,
  12603. this.lettersChangedFlag
  12604. ),
  12605. !(
  12606. !this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag
  12607. ))
  12608. ) {
  12609. var r,
  12610. i,
  12611. s = 0,
  12612. n = this.textAnimator.renderedLetters,
  12613. a = this.textProperty.currentData.l;
  12614. i = a.length;
  12615. var o, l, c;
  12616. for (r = 0; r < i; r += 1)
  12617. a[r].n
  12618. ? (s += 1)
  12619. : ((l = this.textSpans[r]),
  12620. (c = this.textPaths[r]),
  12621. (o = n[s]),
  12622. (s += 1),
  12623. o._mdf.m &&
  12624. (this.isMasked
  12625. ? l.setAttribute('transform', o.m)
  12626. : ((l.style.webkitTransform = o.m),
  12627. (l.style.transform = o.m))),
  12628. (l.style.opacity = o.o),
  12629. o.sw && o._mdf.sw && c.setAttribute('stroke-width', o.sw),
  12630. o.sc && o._mdf.sc && c.setAttribute('stroke', o.sc),
  12631. o.fc &&
  12632. o._mdf.fc &&
  12633. (c.setAttribute('fill', o.fc), (c.style.color = o.fc)));
  12634. if (
  12635. this.innerElem.getBBox &&
  12636. !this.hidden &&
  12637. (this._isFirstFrame || this._mdf)
  12638. ) {
  12639. var g = this.innerElem.getBBox();
  12640. this.currentBBox.w !== g.width &&
  12641. ((this.currentBBox.w = g.width),
  12642. this.svgElement.setAttribute('width', g.width)),
  12643. this.currentBBox.h !== g.height &&
  12644. ((this.currentBBox.h = g.height),
  12645. this.svgElement.setAttribute('height', g.height));
  12646. var S = 1;
  12647. if (
  12648. this.currentBBox.w !== g.width + S * 2 ||
  12649. this.currentBBox.h !== g.height + S * 2 ||
  12650. this.currentBBox.x !== g.x - S ||
  12651. this.currentBBox.y !== g.y - S
  12652. ) {
  12653. (this.currentBBox.w = g.width + S * 2),
  12654. (this.currentBBox.h = g.height + S * 2),
  12655. (this.currentBBox.x = g.x - S),
  12656. (this.currentBBox.y = g.y - S),
  12657. this.svgElement.setAttribute(
  12658. 'viewBox',
  12659. this.currentBBox.x +
  12660. ' ' +
  12661. this.currentBBox.y +
  12662. ' ' +
  12663. this.currentBBox.w +
  12664. ' ' +
  12665. this.currentBBox.h
  12666. ),
  12667. (e = this.svgElement.style);
  12668. var p =
  12669. 'translate(' +
  12670. this.currentBBox.x +
  12671. 'px,' +
  12672. this.currentBBox.y +
  12673. 'px)';
  12674. (e.transform = p), (e.webkitTransform = p);
  12675. }
  12676. }
  12677. }
  12678. });
  12679. function HCameraElement(e, t, r) {
  12680. this.initFrame(), this.initBaseData(e, t, r), this.initHierarchy();
  12681. var i = PropertyFactory.getProp;
  12682. if (
  12683. ((this.pe = i(this, e.pe, 0, 0, this)),
  12684. e.ks.p.s
  12685. ? ((this.px = i(this, e.ks.p.x, 1, 0, this)),
  12686. (this.py = i(this, e.ks.p.y, 1, 0, this)),
  12687. (this.pz = i(this, e.ks.p.z, 1, 0, this)))
  12688. : (this.p = i(this, e.ks.p, 1, 0, this)),
  12689. e.ks.a && (this.a = i(this, e.ks.a, 1, 0, this)),
  12690. e.ks.or.k.length && e.ks.or.k[0].to)
  12691. ) {
  12692. var s,
  12693. n = e.ks.or.k.length;
  12694. for (s = 0; s < n; s += 1)
  12695. (e.ks.or.k[s].to = null), (e.ks.or.k[s].ti = null);
  12696. }
  12697. (this.or = i(this, e.ks.or, 1, degToRads, this)),
  12698. (this.or.sh = !0),
  12699. (this.rx = i(this, e.ks.rx, 0, degToRads, this)),
  12700. (this.ry = i(this, e.ks.ry, 0, degToRads, this)),
  12701. (this.rz = i(this, e.ks.rz, 0, degToRads, this)),
  12702. (this.mat = new Matrix()),
  12703. (this._prevMat = new Matrix()),
  12704. (this._isFirstFrame = !0),
  12705. (this.finalTransform = { mProp: this });
  12706. }
  12707. extendPrototype(
  12708. [BaseElement, FrameElement, HierarchyElement],
  12709. HCameraElement
  12710. ),
  12711. (HCameraElement.prototype.setup = function () {
  12712. var e,
  12713. t = this.comp.threeDElements.length,
  12714. r,
  12715. i,
  12716. s;
  12717. for (e = 0; e < t; e += 1)
  12718. if (((r = this.comp.threeDElements[e]), r.type === '3d')) {
  12719. (i = r.perspectiveElem.style), (s = r.container.style);
  12720. var n = this.pe.v + 'px',
  12721. a = '0px 0px 0px',
  12722. o = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
  12723. (i.perspective = n),
  12724. (i.webkitPerspective = n),
  12725. (s.transformOrigin = a),
  12726. (s.mozTransformOrigin = a),
  12727. (s.webkitTransformOrigin = a),
  12728. (i.transform = o),
  12729. (i.webkitTransform = o);
  12730. }
  12731. }),
  12732. (HCameraElement.prototype.createElements = function () {}),
  12733. (HCameraElement.prototype.hide = function () {}),
  12734. (HCameraElement.prototype.renderFrame = function () {
  12735. var e = this._isFirstFrame,
  12736. t,
  12737. r;
  12738. if (this.hierarchy)
  12739. for (r = this.hierarchy.length, t = 0; t < r; t += 1)
  12740. e = this.hierarchy[t].finalTransform.mProp._mdf || e;
  12741. if (
  12742. e ||
  12743. this.pe._mdf ||
  12744. (this.p && this.p._mdf) ||
  12745. (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) ||
  12746. this.rx._mdf ||
  12747. this.ry._mdf ||
  12748. this.rz._mdf ||
  12749. this.or._mdf ||
  12750. (this.a && this.a._mdf)
  12751. ) {
  12752. if ((this.mat.reset(), this.hierarchy))
  12753. for (r = this.hierarchy.length - 1, t = r; t >= 0; t -= 1) {
  12754. var i = this.hierarchy[t].finalTransform.mProp;
  12755. this.mat.translate(-i.p.v[0], -i.p.v[1], i.p.v[2]),
  12756. this.mat
  12757. .rotateX(-i.or.v[0])
  12758. .rotateY(-i.or.v[1])
  12759. .rotateZ(i.or.v[2]),
  12760. this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),
  12761. this.mat.scale(1 / i.s.v[0], 1 / i.s.v[1], 1 / i.s.v[2]),
  12762. this.mat.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
  12763. }
  12764. if (
  12765. (this.p
  12766. ? this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2])
  12767. : this.mat.translate(-this.px.v, -this.py.v, this.pz.v),
  12768. this.a)
  12769. ) {
  12770. var s;
  12771. this.p
  12772. ? (s = [
  12773. this.p.v[0] - this.a.v[0],
  12774. this.p.v[1] - this.a.v[1],
  12775. this.p.v[2] - this.a.v[2]
  12776. ])
  12777. : (s = [
  12778. this.px.v - this.a.v[0],
  12779. this.py.v - this.a.v[1],
  12780. this.pz.v - this.a.v[2]
  12781. ]);
  12782. var n = Math.sqrt(
  12783. Math.pow(s[0], 2) + Math.pow(s[1], 2) + Math.pow(s[2], 2)
  12784. ),
  12785. a = [s[0] / n, s[1] / n, s[2] / n],
  12786. o = Math.sqrt(a[2] * a[2] + a[0] * a[0]),
  12787. l = Math.atan2(a[1], o),
  12788. c = Math.atan2(a[0], -a[2]);
  12789. this.mat.rotateY(c).rotateX(-l);
  12790. }
  12791. this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),
  12792. this.mat
  12793. .rotateX(-this.or.v[0])
  12794. .rotateY(-this.or.v[1])
  12795. .rotateZ(this.or.v[2]),
  12796. this.mat.translate(
  12797. this.globalData.compSize.w / 2,
  12798. this.globalData.compSize.h / 2,
  12799. 0
  12800. ),
  12801. this.mat.translate(0, 0, this.pe.v);
  12802. var g = !this._prevMat.equals(this.mat);
  12803. if ((g || this.pe._mdf) && this.comp.threeDElements) {
  12804. r = this.comp.threeDElements.length;
  12805. var S, p, P;
  12806. for (t = 0; t < r; t += 1)
  12807. if (((S = this.comp.threeDElements[t]), S.type === '3d')) {
  12808. if (g) {
  12809. var b = this.mat.toCSS();
  12810. (P = S.container.style),
  12811. (P.transform = b),
  12812. (P.webkitTransform = b);
  12813. }
  12814. this.pe._mdf &&
  12815. ((p = S.perspectiveElem.style),
  12816. (p.perspective = this.pe.v + 'px'),
  12817. (p.webkitPerspective = this.pe.v + 'px'));
  12818. }
  12819. this.mat.clone(this._prevMat);
  12820. }
  12821. }
  12822. this._isFirstFrame = !1;
  12823. }),
  12824. (HCameraElement.prototype.prepareFrame = function (e) {
  12825. this.prepareProperties(e, !0);
  12826. }),
  12827. (HCameraElement.prototype.destroy = function () {}),
  12828. (HCameraElement.prototype.getBaseElement = function () {
  12829. return null;
  12830. });
  12831. function HImageElement(e, t, r) {
  12832. (this.assetData = t.getAssetData(e.refId)), this.initElement(e, t, r);
  12833. }
  12834. extendPrototype(
  12835. [
  12836. BaseElement,
  12837. TransformElement,
  12838. HBaseElement,
  12839. HSolidElement,
  12840. HierarchyElement,
  12841. FrameElement,
  12842. RenderableElement
  12843. ],
  12844. HImageElement
  12845. ),
  12846. (HImageElement.prototype.createContent = function () {
  12847. var e = this.globalData.getAssetsPath(this.assetData),
  12848. t = new Image();
  12849. this.data.hasMask
  12850. ? ((this.imageElem = createNS('image')),
  12851. this.imageElem.setAttribute('width', this.assetData.w + 'px'),
  12852. this.imageElem.setAttribute('height', this.assetData.h + 'px'),
  12853. this.imageElem.setAttributeNS(
  12854. 'http://www.w3.org/1999/xlink',
  12855. 'href',
  12856. e
  12857. ),
  12858. this.layerElement.appendChild(this.imageElem),
  12859. this.baseElement.setAttribute('width', this.assetData.w),
  12860. this.baseElement.setAttribute('height', this.assetData.h))
  12861. : this.layerElement.appendChild(t),
  12862. (t.crossOrigin = 'anonymous'),
  12863. (t.src = e),
  12864. this.data.ln && this.baseElement.setAttribute('id', this.data.ln);
  12865. });
  12866. function HybridRendererBase(e, t) {
  12867. (this.animationItem = e),
  12868. (this.layers = null),
  12869. (this.renderedFrame = -1),
  12870. (this.renderConfig = {
  12871. className: (t && t.className) || '',
  12872. imagePreserveAspectRatio:
  12873. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  12874. hideOnTransparent: !(t && t.hideOnTransparent === !1),
  12875. filterSize: {
  12876. width: (t && t.filterSize && t.filterSize.width) || '400%',
  12877. height: (t && t.filterSize && t.filterSize.height) || '400%',
  12878. x: (t && t.filterSize && t.filterSize.x) || '-100%',
  12879. y: (t && t.filterSize && t.filterSize.y) || '-100%'
  12880. }
  12881. }),
  12882. (this.globalData = {
  12883. _mdf: !1,
  12884. frameNum: -1,
  12885. renderConfig: this.renderConfig
  12886. }),
  12887. (this.pendingElements = []),
  12888. (this.elements = []),
  12889. (this.threeDElements = []),
  12890. (this.destroyed = !1),
  12891. (this.camera = null),
  12892. (this.supports3d = !0),
  12893. (this.rendererType = 'html');
  12894. }
  12895. extendPrototype([BaseRenderer], HybridRendererBase),
  12896. (HybridRendererBase.prototype.buildItem =
  12897. SVGRenderer.prototype.buildItem),
  12898. (HybridRendererBase.prototype.checkPendingElements = function () {
  12899. for (; this.pendingElements.length; ) {
  12900. var e = this.pendingElements.pop();
  12901. e.checkParenting();
  12902. }
  12903. }),
  12904. (HybridRendererBase.prototype.appendElementInPos = function (e, t) {
  12905. var r = e.getBaseElement();
  12906. if (r) {
  12907. var i = this.layers[t];
  12908. if (!i.ddd || !this.supports3d)
  12909. if (this.threeDElements) this.addTo3dContainer(r, t);
  12910. else {
  12911. for (var s = 0, n, a, o; s < t; )
  12912. this.elements[s] &&
  12913. this.elements[s] !== !0 &&
  12914. this.elements[s].getBaseElement &&
  12915. ((a = this.elements[s]),
  12916. (o = this.layers[s].ddd
  12917. ? this.getThreeDContainerByPos(s)
  12918. : a.getBaseElement()),
  12919. (n = o || n)),
  12920. (s += 1);
  12921. n
  12922. ? (!i.ddd || !this.supports3d) &&
  12923. this.layerElement.insertBefore(r, n)
  12924. : (!i.ddd || !this.supports3d) &&
  12925. this.layerElement.appendChild(r);
  12926. }
  12927. else this.addTo3dContainer(r, t);
  12928. }
  12929. }),
  12930. (HybridRendererBase.prototype.createShape = function (e) {
  12931. return this.supports3d
  12932. ? new HShapeElement(e, this.globalData, this)
  12933. : new SVGShapeElement(e, this.globalData, this);
  12934. }),
  12935. (HybridRendererBase.prototype.createText = function (e) {
  12936. return this.supports3d
  12937. ? new HTextElement(e, this.globalData, this)
  12938. : new SVGTextLottieElement(e, this.globalData, this);
  12939. }),
  12940. (HybridRendererBase.prototype.createCamera = function (e) {
  12941. return (
  12942. (this.camera = new HCameraElement(e, this.globalData, this)),
  12943. this.camera
  12944. );
  12945. }),
  12946. (HybridRendererBase.prototype.createImage = function (e) {
  12947. return this.supports3d
  12948. ? new HImageElement(e, this.globalData, this)
  12949. : new IImageElement(e, this.globalData, this);
  12950. }),
  12951. (HybridRendererBase.prototype.createSolid = function (e) {
  12952. return this.supports3d
  12953. ? new HSolidElement(e, this.globalData, this)
  12954. : new ISolidElement(e, this.globalData, this);
  12955. }),
  12956. (HybridRendererBase.prototype.createNull =
  12957. SVGRenderer.prototype.createNull),
  12958. (HybridRendererBase.prototype.getThreeDContainerByPos = function (e) {
  12959. for (var t = 0, r = this.threeDElements.length; t < r; ) {
  12960. if (
  12961. this.threeDElements[t].startPos <= e &&
  12962. this.threeDElements[t].endPos >= e
  12963. )
  12964. return this.threeDElements[t].perspectiveElem;
  12965. t += 1;
  12966. }
  12967. return null;
  12968. }),
  12969. (HybridRendererBase.prototype.createThreeDContainer = function (e, t) {
  12970. var r = createTag('div'),
  12971. i,
  12972. s;
  12973. styleDiv(r);
  12974. var n = createTag('div');
  12975. if ((styleDiv(n), t === '3d')) {
  12976. (i = r.style),
  12977. (i.width = this.globalData.compSize.w + 'px'),
  12978. (i.height = this.globalData.compSize.h + 'px');
  12979. var a = '50% 50%';
  12980. (i.webkitTransformOrigin = a),
  12981. (i.mozTransformOrigin = a),
  12982. (i.transformOrigin = a),
  12983. (s = n.style);
  12984. var o = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
  12985. (s.transform = o), (s.webkitTransform = o);
  12986. }
  12987. r.appendChild(n);
  12988. var l = {
  12989. container: n,
  12990. perspectiveElem: r,
  12991. startPos: e,
  12992. endPos: e,
  12993. type: t
  12994. };
  12995. return this.threeDElements.push(l), l;
  12996. }),
  12997. (HybridRendererBase.prototype.build3dContainers = function () {
  12998. var e,
  12999. t = this.layers.length,
  13000. r,
  13001. i = '';
  13002. for (e = 0; e < t; e += 1)
  13003. this.layers[e].ddd && this.layers[e].ty !== 3
  13004. ? (i !== '3d' &&
  13005. ((i = '3d'), (r = this.createThreeDContainer(e, '3d'))),
  13006. (r.endPos = Math.max(r.endPos, e)))
  13007. : (i !== '2d' &&
  13008. ((i = '2d'), (r = this.createThreeDContainer(e, '2d'))),
  13009. (r.endPos = Math.max(r.endPos, e)));
  13010. for (t = this.threeDElements.length, e = t - 1; e >= 0; e -= 1)
  13011. this.resizerElem.appendChild(
  13012. this.threeDElements[e].perspectiveElem
  13013. );
  13014. }),
  13015. (HybridRendererBase.prototype.addTo3dContainer = function (e, t) {
  13016. for (var r = 0, i = this.threeDElements.length; r < i; ) {
  13017. if (t <= this.threeDElements[r].endPos) {
  13018. for (var s = this.threeDElements[r].startPos, n; s < t; )
  13019. this.elements[s] &&
  13020. this.elements[s].getBaseElement &&
  13021. (n = this.elements[s].getBaseElement()),
  13022. (s += 1);
  13023. n
  13024. ? this.threeDElements[r].container.insertBefore(e, n)
  13025. : this.threeDElements[r].container.appendChild(e);
  13026. break;
  13027. }
  13028. r += 1;
  13029. }
  13030. }),
  13031. (HybridRendererBase.prototype.configAnimation = function (e) {
  13032. var t = createTag('div'),
  13033. r = this.animationItem.wrapper,
  13034. i = t.style;
  13035. (i.width = e.w + 'px'),
  13036. (i.height = e.h + 'px'),
  13037. (this.resizerElem = t),
  13038. styleDiv(t),
  13039. (i.transformStyle = 'flat'),
  13040. (i.mozTransformStyle = 'flat'),
  13041. (i.webkitTransformStyle = 'flat'),
  13042. this.renderConfig.className &&
  13043. t.setAttribute('class', this.renderConfig.className),
  13044. r.appendChild(t),
  13045. (i.overflow = 'hidden');
  13046. var s = createNS('svg');
  13047. s.setAttribute('width', '1'),
  13048. s.setAttribute('height', '1'),
  13049. styleDiv(s),
  13050. this.resizerElem.appendChild(s);
  13051. var n = createNS('defs');
  13052. s.appendChild(n),
  13053. (this.data = e),
  13054. this.setupGlobalData(e, s),
  13055. (this.globalData.defs = n),
  13056. (this.layers = e.layers),
  13057. (this.layerElement = this.resizerElem),
  13058. this.build3dContainers(),
  13059. this.updateContainerSize();
  13060. }),
  13061. (HybridRendererBase.prototype.destroy = function () {
  13062. this.animationItem.wrapper &&
  13063. (this.animationItem.wrapper.innerText = ''),
  13064. (this.animationItem.container = null),
  13065. (this.globalData.defs = null);
  13066. var e,
  13067. t = this.layers ? this.layers.length : 0;
  13068. for (e = 0; e < t; e += 1)
  13069. this.elements[e] &&
  13070. this.elements[e].destroy &&
  13071. this.elements[e].destroy();
  13072. (this.elements.length = 0),
  13073. (this.destroyed = !0),
  13074. (this.animationItem = null);
  13075. }),
  13076. (HybridRendererBase.prototype.updateContainerSize = function () {
  13077. var e = this.animationItem.wrapper.offsetWidth,
  13078. t = this.animationItem.wrapper.offsetHeight,
  13079. r = e / t,
  13080. i = this.globalData.compSize.w / this.globalData.compSize.h,
  13081. s,
  13082. n,
  13083. a,
  13084. o;
  13085. i > r
  13086. ? ((s = e / this.globalData.compSize.w),
  13087. (n = e / this.globalData.compSize.w),
  13088. (a = 0),
  13089. (o =
  13090. (t -
  13091. this.globalData.compSize.h *
  13092. (e / this.globalData.compSize.w)) /
  13093. 2))
  13094. : ((s = t / this.globalData.compSize.h),
  13095. (n = t / this.globalData.compSize.h),
  13096. (a =
  13097. (e -
  13098. this.globalData.compSize.w *
  13099. (t / this.globalData.compSize.h)) /
  13100. 2),
  13101. (o = 0));
  13102. var l = this.resizerElem.style;
  13103. (l.webkitTransform =
  13104. 'matrix3d(' +
  13105. s +
  13106. ',0,0,0,0,' +
  13107. n +
  13108. ',0,0,0,0,1,0,' +
  13109. a +
  13110. ',' +
  13111. o +
  13112. ',0,1)'),
  13113. (l.transform = l.webkitTransform);
  13114. }),
  13115. (HybridRendererBase.prototype.renderFrame =
  13116. SVGRenderer.prototype.renderFrame),
  13117. (HybridRendererBase.prototype.hide = function () {
  13118. this.resizerElem.style.display = 'none';
  13119. }),
  13120. (HybridRendererBase.prototype.show = function () {
  13121. this.resizerElem.style.display = 'block';
  13122. }),
  13123. (HybridRendererBase.prototype.initItems = function () {
  13124. if ((this.buildAllItems(), this.camera)) this.camera.setup();
  13125. else {
  13126. var e = this.globalData.compSize.w,
  13127. t = this.globalData.compSize.h,
  13128. r,
  13129. i = this.threeDElements.length;
  13130. for (r = 0; r < i; r += 1) {
  13131. var s = this.threeDElements[r].perspectiveElem.style;
  13132. (s.webkitPerspective =
  13133. Math.sqrt(Math.pow(e, 2) + Math.pow(t, 2)) + 'px'),
  13134. (s.perspective = s.webkitPerspective);
  13135. }
  13136. }
  13137. }),
  13138. (HybridRendererBase.prototype.searchExtraCompositions = function (e) {
  13139. var t,
  13140. r = e.length,
  13141. i = createTag('div');
  13142. for (t = 0; t < r; t += 1)
  13143. if (e[t].xt) {
  13144. var s = this.createComp(e[t], i, this.globalData.comp, null);
  13145. s.initExpressions(),
  13146. this.globalData.projectInterface.registerComposition(s);
  13147. }
  13148. });
  13149. function HCompElement(e, t, r) {
  13150. (this.layers = e.layers),
  13151. (this.supports3d = !e.hasMask),
  13152. (this.completeLayers = !1),
  13153. (this.pendingElements = []),
  13154. (this.elements = this.layers
  13155. ? createSizedArray(this.layers.length)
  13156. : []),
  13157. this.initElement(e, t, r),
  13158. (this.tm = e.tm
  13159. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  13160. : { _placeholder: !0 });
  13161. }
  13162. extendPrototype(
  13163. [HybridRendererBase, ICompElement, HBaseElement],
  13164. HCompElement
  13165. ),
  13166. (HCompElement.prototype._createBaseContainerElements =
  13167. HCompElement.prototype.createContainerElements),
  13168. (HCompElement.prototype.createContainerElements = function () {
  13169. this._createBaseContainerElements(),
  13170. this.data.hasMask
  13171. ? (this.svgElement.setAttribute('width', this.data.w),
  13172. this.svgElement.setAttribute('height', this.data.h),
  13173. (this.transformedElement = this.baseElement))
  13174. : (this.transformedElement = this.layerElement);
  13175. }),
  13176. (HCompElement.prototype.addTo3dContainer = function (e, t) {
  13177. for (var r = 0, i; r < t; )
  13178. this.elements[r] &&
  13179. this.elements[r].getBaseElement &&
  13180. (i = this.elements[r].getBaseElement()),
  13181. (r += 1);
  13182. i
  13183. ? this.layerElement.insertBefore(e, i)
  13184. : this.layerElement.appendChild(e);
  13185. }),
  13186. (HCompElement.prototype.createComp = function (e) {
  13187. return this.supports3d
  13188. ? new HCompElement(e, this.globalData, this)
  13189. : new SVGCompElement(e, this.globalData, this);
  13190. });
  13191. function HybridRenderer(e, t) {
  13192. (this.animationItem = e),
  13193. (this.layers = null),
  13194. (this.renderedFrame = -1),
  13195. (this.renderConfig = {
  13196. className: (t && t.className) || '',
  13197. imagePreserveAspectRatio:
  13198. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  13199. hideOnTransparent: !(t && t.hideOnTransparent === !1),
  13200. filterSize: {
  13201. width: (t && t.filterSize && t.filterSize.width) || '400%',
  13202. height: (t && t.filterSize && t.filterSize.height) || '400%',
  13203. x: (t && t.filterSize && t.filterSize.x) || '-100%',
  13204. y: (t && t.filterSize && t.filterSize.y) || '-100%'
  13205. },
  13206. runExpressions:
  13207. !t || t.runExpressions === void 0 || t.runExpressions
  13208. }),
  13209. (this.globalData = {
  13210. _mdf: !1,
  13211. frameNum: -1,
  13212. renderConfig: this.renderConfig
  13213. }),
  13214. (this.pendingElements = []),
  13215. (this.elements = []),
  13216. (this.threeDElements = []),
  13217. (this.destroyed = !1),
  13218. (this.camera = null),
  13219. (this.supports3d = !0),
  13220. (this.rendererType = 'html');
  13221. }
  13222. extendPrototype([HybridRendererBase], HybridRenderer),
  13223. (HybridRenderer.prototype.createComp = function (e) {
  13224. return this.supports3d
  13225. ? new HCompElement(e, this.globalData, this)
  13226. : new SVGCompElement(e, this.globalData, this);
  13227. });
  13228. var CompExpressionInterface = (function () {
  13229. return function (e) {
  13230. function t(r) {
  13231. for (var i = 0, s = e.layers.length; i < s; ) {
  13232. if (e.layers[i].nm === r || e.layers[i].ind === r)
  13233. return e.elements[i].layerInterface;
  13234. i += 1;
  13235. }
  13236. return null;
  13237. }
  13238. return (
  13239. Object.defineProperty(t, '_name', { value: e.data.nm }),
  13240. (t.layer = t),
  13241. (t.pixelAspect = 1),
  13242. (t.height = e.data.h || e.globalData.compSize.h),
  13243. (t.width = e.data.w || e.globalData.compSize.w),
  13244. (t.pixelAspect = 1),
  13245. (t.frameDuration = 1 / e.globalData.frameRate),
  13246. (t.displayStartTime = 0),
  13247. (t.numLayers = e.layers.length),
  13248. t
  13249. );
  13250. };
  13251. })(),
  13252. Expressions = (function () {
  13253. var e = {};
  13254. e.initExpressions = t;
  13255. function t(r) {
  13256. var i = 0,
  13257. s = [];
  13258. function n() {
  13259. i += 1;
  13260. }
  13261. function a() {
  13262. (i -= 1), i === 0 && l();
  13263. }
  13264. function o(c) {
  13265. s.indexOf(c) === -1 && s.push(c);
  13266. }
  13267. function l() {
  13268. var c,
  13269. g = s.length;
  13270. for (c = 0; c < g; c += 1) s[c].release();
  13271. s.length = 0;
  13272. }
  13273. (r.renderer.compInterface = CompExpressionInterface(r.renderer)),
  13274. r.renderer.globalData.projectInterface.registerComposition(
  13275. r.renderer
  13276. ),
  13277. (r.renderer.globalData.pushExpression = n),
  13278. (r.renderer.globalData.popExpression = a),
  13279. (r.renderer.globalData.registerExpressionProperty = o);
  13280. }
  13281. return e;
  13282. })(),
  13283. MaskManagerInterface = (function () {
  13284. function e(r, i) {
  13285. (this._mask = r), (this._data = i);
  13286. }
  13287. Object.defineProperty(e.prototype, 'maskPath', {
  13288. get: function () {
  13289. return (
  13290. this._mask.prop.k && this._mask.prop.getValue(), this._mask.prop
  13291. );
  13292. }
  13293. }),
  13294. Object.defineProperty(e.prototype, 'maskOpacity', {
  13295. get: function () {
  13296. return (
  13297. this._mask.op.k && this._mask.op.getValue(),
  13298. this._mask.op.v * 100
  13299. );
  13300. }
  13301. });
  13302. var t = function (i) {
  13303. var s = createSizedArray(i.viewData.length),
  13304. n,
  13305. a = i.viewData.length;
  13306. for (n = 0; n < a; n += 1)
  13307. s[n] = new e(i.viewData[n], i.masksProperties[n]);
  13308. var o = function (c) {
  13309. for (n = 0; n < a; ) {
  13310. if (i.masksProperties[n].nm === c) return s[n];
  13311. n += 1;
  13312. }
  13313. return null;
  13314. };
  13315. return o;
  13316. };
  13317. return t;
  13318. })(),
  13319. ExpressionPropertyInterface = (function () {
  13320. var e = { pv: 0, v: 0, mult: 1 },
  13321. t = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
  13322. function r(a, o, l) {
  13323. Object.defineProperty(a, 'velocity', {
  13324. get: function () {
  13325. return o.getVelocityAtTime(o.comp.currentFrame);
  13326. }
  13327. }),
  13328. (a.numKeys = o.keyframes ? o.keyframes.length : 0),
  13329. (a.key = function (c) {
  13330. if (!a.numKeys) return 0;
  13331. var g = '';
  13332. 's' in o.keyframes[c - 1]
  13333. ? (g = o.keyframes[c - 1].s)
  13334. : 'e' in o.keyframes[c - 2]
  13335. ? (g = o.keyframes[c - 2].e)
  13336. : (g = o.keyframes[c - 2].s);
  13337. var S =
  13338. l === 'unidimensional' ? new Number(g) : Object.assign({}, g);
  13339. return (
  13340. (S.time =
  13341. o.keyframes[c - 1].t / o.elem.comp.globalData.frameRate),
  13342. (S.value = l === 'unidimensional' ? g[0] : g),
  13343. S
  13344. );
  13345. }),
  13346. (a.valueAtTime = o.getValueAtTime),
  13347. (a.speedAtTime = o.getSpeedAtTime),
  13348. (a.velocityAtTime = o.getVelocityAtTime),
  13349. (a.propertyGroup = o.propertyGroup);
  13350. }
  13351. function i(a) {
  13352. (!a || !('pv' in a)) && (a = e);
  13353. var o = 1 / a.mult,
  13354. l = a.pv * o,
  13355. c = new Number(l);
  13356. return (
  13357. (c.value = l),
  13358. r(c, a, 'unidimensional'),
  13359. function () {
  13360. return (
  13361. a.k && a.getValue(),
  13362. (l = a.v * o),
  13363. c.value !== l &&
  13364. ((c = new Number(l)),
  13365. (c.value = l),
  13366. r(c, a, 'unidimensional')),
  13367. c
  13368. );
  13369. }
  13370. );
  13371. }
  13372. function s(a) {
  13373. (!a || !('pv' in a)) && (a = t);
  13374. var o = 1 / a.mult,
  13375. l = (a.data && a.data.l) || a.pv.length,
  13376. c = createTypedArray('float32', l),
  13377. g = createTypedArray('float32', l);
  13378. return (
  13379. (c.value = g),
  13380. r(c, a, 'multidimensional'),
  13381. function () {
  13382. a.k && a.getValue();
  13383. for (var S = 0; S < l; S += 1)
  13384. (g[S] = a.v[S] * o), (c[S] = g[S]);
  13385. return c;
  13386. }
  13387. );
  13388. }
  13389. function n() {
  13390. return e;
  13391. }
  13392. return function (a) {
  13393. return a ? (a.propType === 'unidimensional' ? i(a) : s(a)) : n;
  13394. };
  13395. })(),
  13396. TransformExpressionInterface = (function () {
  13397. return function (e) {
  13398. function t(a) {
  13399. switch (a) {
  13400. case 'scale':
  13401. case 'Scale':
  13402. case 'ADBE Scale':
  13403. case 6:
  13404. return t.scale;
  13405. case 'rotation':
  13406. case 'Rotation':
  13407. case 'ADBE Rotation':
  13408. case 'ADBE Rotate Z':
  13409. case 10:
  13410. return t.rotation;
  13411. case 'ADBE Rotate X':
  13412. return t.xRotation;
  13413. case 'ADBE Rotate Y':
  13414. return t.yRotation;
  13415. case 'position':
  13416. case 'Position':
  13417. case 'ADBE Position':
  13418. case 2:
  13419. return t.position;
  13420. case 'ADBE Position_0':
  13421. return t.xPosition;
  13422. case 'ADBE Position_1':
  13423. return t.yPosition;
  13424. case 'ADBE Position_2':
  13425. return t.zPosition;
  13426. case 'anchorPoint':
  13427. case 'AnchorPoint':
  13428. case 'Anchor Point':
  13429. case 'ADBE AnchorPoint':
  13430. case 1:
  13431. return t.anchorPoint;
  13432. case 'opacity':
  13433. case 'Opacity':
  13434. case 11:
  13435. return t.opacity;
  13436. default:
  13437. return null;
  13438. }
  13439. }
  13440. Object.defineProperty(t, 'rotation', {
  13441. get: ExpressionPropertyInterface(e.r || e.rz)
  13442. }),
  13443. Object.defineProperty(t, 'zRotation', {
  13444. get: ExpressionPropertyInterface(e.rz || e.r)
  13445. }),
  13446. Object.defineProperty(t, 'xRotation', {
  13447. get: ExpressionPropertyInterface(e.rx)
  13448. }),
  13449. Object.defineProperty(t, 'yRotation', {
  13450. get: ExpressionPropertyInterface(e.ry)
  13451. }),
  13452. Object.defineProperty(t, 'scale', {
  13453. get: ExpressionPropertyInterface(e.s)
  13454. });
  13455. var r, i, s, n;
  13456. return (
  13457. e.p
  13458. ? (n = ExpressionPropertyInterface(e.p))
  13459. : ((r = ExpressionPropertyInterface(e.px)),
  13460. (i = ExpressionPropertyInterface(e.py)),
  13461. e.pz && (s = ExpressionPropertyInterface(e.pz))),
  13462. Object.defineProperty(t, 'position', {
  13463. get: function () {
  13464. return e.p ? n() : [r(), i(), s ? s() : 0];
  13465. }
  13466. }),
  13467. Object.defineProperty(t, 'xPosition', {
  13468. get: ExpressionPropertyInterface(e.px)
  13469. }),
  13470. Object.defineProperty(t, 'yPosition', {
  13471. get: ExpressionPropertyInterface(e.py)
  13472. }),
  13473. Object.defineProperty(t, 'zPosition', {
  13474. get: ExpressionPropertyInterface(e.pz)
  13475. }),
  13476. Object.defineProperty(t, 'anchorPoint', {
  13477. get: ExpressionPropertyInterface(e.a)
  13478. }),
  13479. Object.defineProperty(t, 'opacity', {
  13480. get: ExpressionPropertyInterface(e.o)
  13481. }),
  13482. Object.defineProperty(t, 'skew', {
  13483. get: ExpressionPropertyInterface(e.sk)
  13484. }),
  13485. Object.defineProperty(t, 'skewAxis', {
  13486. get: ExpressionPropertyInterface(e.sa)
  13487. }),
  13488. Object.defineProperty(t, 'orientation', {
  13489. get: ExpressionPropertyInterface(e.or)
  13490. }),
  13491. t
  13492. );
  13493. };
  13494. })(),
  13495. LayerExpressionInterface = (function () {
  13496. function e(c) {
  13497. var g = new Matrix();
  13498. if (c !== void 0) {
  13499. var S = this._elem.finalTransform.mProp.getValueAtTime(c);
  13500. S.clone(g);
  13501. } else {
  13502. var p = this._elem.finalTransform.mProp;
  13503. p.applyToMatrix(g);
  13504. }
  13505. return g;
  13506. }
  13507. function t(c, g) {
  13508. var S = this.getMatrix(g);
  13509. return (
  13510. (S.props[12] = 0),
  13511. (S.props[13] = 0),
  13512. (S.props[14] = 0),
  13513. this.applyPoint(S, c)
  13514. );
  13515. }
  13516. function r(c, g) {
  13517. var S = this.getMatrix(g);
  13518. return this.applyPoint(S, c);
  13519. }
  13520. function i(c, g) {
  13521. var S = this.getMatrix(g);
  13522. return (
  13523. (S.props[12] = 0),
  13524. (S.props[13] = 0),
  13525. (S.props[14] = 0),
  13526. this.invertPoint(S, c)
  13527. );
  13528. }
  13529. function s(c, g) {
  13530. var S = this.getMatrix(g);
  13531. return this.invertPoint(S, c);
  13532. }
  13533. function n(c, g) {
  13534. if (this._elem.hierarchy && this._elem.hierarchy.length) {
  13535. var S,
  13536. p = this._elem.hierarchy.length;
  13537. for (S = 0; S < p; S += 1)
  13538. this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(c);
  13539. }
  13540. return c.applyToPointArray(g[0], g[1], g[2] || 0);
  13541. }
  13542. function a(c, g) {
  13543. if (this._elem.hierarchy && this._elem.hierarchy.length) {
  13544. var S,
  13545. p = this._elem.hierarchy.length;
  13546. for (S = 0; S < p; S += 1)
  13547. this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(c);
  13548. }
  13549. return c.inversePoint(g);
  13550. }
  13551. function o(c) {
  13552. var g = new Matrix();
  13553. if (
  13554. (g.reset(),
  13555. this._elem.finalTransform.mProp.applyToMatrix(g),
  13556. this._elem.hierarchy && this._elem.hierarchy.length)
  13557. ) {
  13558. var S,
  13559. p = this._elem.hierarchy.length;
  13560. for (S = 0; S < p; S += 1)
  13561. this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(g);
  13562. return g.inversePoint(c);
  13563. }
  13564. return g.inversePoint(c);
  13565. }
  13566. function l() {
  13567. return [1, 1, 1, 1];
  13568. }
  13569. return function (c) {
  13570. var g;
  13571. function S(y) {
  13572. P.mask = new MaskManagerInterface(y, c);
  13573. }
  13574. function p(y) {
  13575. P.effect = y;
  13576. }
  13577. function P(y) {
  13578. switch (y) {
  13579. case 'ADBE Root Vectors Group':
  13580. case 'Contents':
  13581. case 2:
  13582. return P.shapeInterface;
  13583. case 1:
  13584. case 6:
  13585. case 'Transform':
  13586. case 'transform':
  13587. case 'ADBE Transform Group':
  13588. return g;
  13589. case 4:
  13590. case 'ADBE Effect Parade':
  13591. case 'effects':
  13592. case 'Effects':
  13593. return P.effect;
  13594. case 'ADBE Text Properties':
  13595. return P.textInterface;
  13596. default:
  13597. return null;
  13598. }
  13599. }
  13600. (P.getMatrix = e),
  13601. (P.invertPoint = a),
  13602. (P.applyPoint = n),
  13603. (P.toWorld = r),
  13604. (P.toWorldVec = t),
  13605. (P.fromWorld = s),
  13606. (P.fromWorldVec = i),
  13607. (P.toComp = r),
  13608. (P.fromComp = o),
  13609. (P.sampleImage = l),
  13610. (P.sourceRectAtTime = c.sourceRectAtTime.bind(c)),
  13611. (P._elem = c),
  13612. (g = TransformExpressionInterface(c.finalTransform.mProp));
  13613. var b = getDescriptor(g, 'anchorPoint');
  13614. return (
  13615. Object.defineProperties(P, {
  13616. hasParent: {
  13617. get: function () {
  13618. return c.hierarchy.length;
  13619. }
  13620. },
  13621. parent: {
  13622. get: function () {
  13623. return c.hierarchy[0].layerInterface;
  13624. }
  13625. },
  13626. rotation: getDescriptor(g, 'rotation'),
  13627. scale: getDescriptor(g, 'scale'),
  13628. position: getDescriptor(g, 'position'),
  13629. opacity: getDescriptor(g, 'opacity'),
  13630. anchorPoint: b,
  13631. anchor_point: b,
  13632. transform: {
  13633. get: function () {
  13634. return g;
  13635. }
  13636. },
  13637. active: {
  13638. get: function () {
  13639. return c.isInRange;
  13640. }
  13641. }
  13642. }),
  13643. (P.startTime = c.data.st),
  13644. (P.index = c.data.ind),
  13645. (P.source = c.data.refId),
  13646. (P.height = c.data.ty === 0 ? c.data.h : 100),
  13647. (P.width = c.data.ty === 0 ? c.data.w : 100),
  13648. (P.inPoint = c.data.ip / c.comp.globalData.frameRate),
  13649. (P.outPoint = c.data.op / c.comp.globalData.frameRate),
  13650. (P._name = c.data.nm),
  13651. (P.registerMaskInterface = S),
  13652. (P.registerEffectsInterface = p),
  13653. P
  13654. );
  13655. };
  13656. })(),
  13657. propertyGroupFactory = (function () {
  13658. return function (e, t) {
  13659. return function (r) {
  13660. return (r = r === void 0 ? 1 : r), r <= 0 ? e : t(r - 1);
  13661. };
  13662. };
  13663. })(),
  13664. PropertyInterface = (function () {
  13665. return function (e, t) {
  13666. var r = { _name: e };
  13667. function i(s) {
  13668. return (s = s === void 0 ? 1 : s), s <= 0 ? r : t(s - 1);
  13669. }
  13670. return i;
  13671. };
  13672. })(),
  13673. EffectsExpressionInterface = (function () {
  13674. var e = { createEffectsInterface: t };
  13675. function t(s, n) {
  13676. if (s.effectsManager) {
  13677. var a = [],
  13678. o = s.data.ef,
  13679. l,
  13680. c = s.effectsManager.effectElements.length;
  13681. for (l = 0; l < c; l += 1)
  13682. a.push(r(o[l], s.effectsManager.effectElements[l], n, s));
  13683. var g = s.data.ef || [],
  13684. S = function (P) {
  13685. for (l = 0, c = g.length; l < c; ) {
  13686. if (P === g[l].nm || P === g[l].mn || P === g[l].ix)
  13687. return a[l];
  13688. l += 1;
  13689. }
  13690. return null;
  13691. };
  13692. return (
  13693. Object.defineProperty(S, 'numProperties', {
  13694. get: function () {
  13695. return g.length;
  13696. }
  13697. }),
  13698. S
  13699. );
  13700. }
  13701. return null;
  13702. }
  13703. function r(s, n, a, o) {
  13704. function l(P) {
  13705. for (var b = s.ef, y = 0, A = b.length; y < A; ) {
  13706. if (P === b[y].nm || P === b[y].mn || P === b[y].ix)
  13707. return b[y].ty === 5 ? g[y] : g[y]();
  13708. y += 1;
  13709. }
  13710. throw new Error();
  13711. }
  13712. var c = propertyGroupFactory(l, a),
  13713. g = [],
  13714. S,
  13715. p = s.ef.length;
  13716. for (S = 0; S < p; S += 1)
  13717. s.ef[S].ty === 5
  13718. ? g.push(
  13719. r(
  13720. s.ef[S],
  13721. n.effectElements[S],
  13722. n.effectElements[S].propertyGroup,
  13723. o
  13724. )
  13725. )
  13726. : g.push(i(n.effectElements[S], s.ef[S].ty, o, c));
  13727. return (
  13728. s.mn === 'ADBE Color Control' &&
  13729. Object.defineProperty(l, 'color', {
  13730. get: function () {
  13731. return g[0]();
  13732. }
  13733. }),
  13734. Object.defineProperties(l, {
  13735. numProperties: {
  13736. get: function () {
  13737. return s.np;
  13738. }
  13739. },
  13740. _name: { value: s.nm },
  13741. propertyGroup: { value: c }
  13742. }),
  13743. (l.enabled = s.en !== 0),
  13744. (l.active = l.enabled),
  13745. l
  13746. );
  13747. }
  13748. function i(s, n, a, o) {
  13749. var l = ExpressionPropertyInterface(s.p);
  13750. function c() {
  13751. return n === 10 ? a.comp.compInterface(s.p.v) : l();
  13752. }
  13753. return (
  13754. s.p.setGroupProperty &&
  13755. s.p.setGroupProperty(PropertyInterface('', o)),
  13756. c
  13757. );
  13758. }
  13759. return e;
  13760. })(),
  13761. ShapePathInterface = (function () {
  13762. return function (t, r, i) {
  13763. var s = r.sh;
  13764. function n(o) {
  13765. return o === 'Shape' ||
  13766. o === 'shape' ||
  13767. o === 'Path' ||
  13768. o === 'path' ||
  13769. o === 'ADBE Vector Shape' ||
  13770. o === 2
  13771. ? n.path
  13772. : null;
  13773. }
  13774. var a = propertyGroupFactory(n, i);
  13775. return (
  13776. s.setGroupProperty(PropertyInterface('Path', a)),
  13777. Object.defineProperties(n, {
  13778. path: {
  13779. get: function () {
  13780. return s.k && s.getValue(), s;
  13781. }
  13782. },
  13783. shape: {
  13784. get: function () {
  13785. return s.k && s.getValue(), s;
  13786. }
  13787. },
  13788. _name: { value: t.nm },
  13789. ix: { value: t.ix },
  13790. propertyIndex: { value: t.ix },
  13791. mn: { value: t.mn },
  13792. propertyGroup: { value: i }
  13793. }),
  13794. n
  13795. );
  13796. };
  13797. })(),
  13798. ShapeExpressionInterface = (function () {
  13799. function e(b, y, A) {
  13800. var u = [],
  13801. f,
  13802. m = b ? b.length : 0;
  13803. for (f = 0; f < m; f += 1)
  13804. b[f].ty === 'gr'
  13805. ? u.push(r(b[f], y[f], A))
  13806. : b[f].ty === 'fl'
  13807. ? u.push(i(b[f], y[f], A))
  13808. : b[f].ty === 'st'
  13809. ? u.push(a(b[f], y[f], A))
  13810. : b[f].ty === 'tm'
  13811. ? u.push(o(b[f], y[f], A))
  13812. : b[f].ty === 'tr' ||
  13813. (b[f].ty === 'el'
  13814. ? u.push(c(b[f], y[f], A))
  13815. : b[f].ty === 'sr'
  13816. ? u.push(g(b[f], y[f], A))
  13817. : b[f].ty === 'sh'
  13818. ? u.push(ShapePathInterface(b[f], y[f], A))
  13819. : b[f].ty === 'rc'
  13820. ? u.push(S(b[f], y[f], A))
  13821. : b[f].ty === 'rd'
  13822. ? u.push(p(b[f], y[f], A))
  13823. : b[f].ty === 'rp'
  13824. ? u.push(P(b[f], y[f], A))
  13825. : b[f].ty === 'gf'
  13826. ? u.push(s(b[f], y[f], A))
  13827. : u.push(n(b[f], y[f])));
  13828. return u;
  13829. }
  13830. function t(b, y, A) {
  13831. var u,
  13832. f = function (E) {
  13833. for (var T = 0, x = u.length; T < x; ) {
  13834. if (
  13835. u[T]._name === E ||
  13836. u[T].mn === E ||
  13837. u[T].propertyIndex === E ||
  13838. u[T].ix === E ||
  13839. u[T].ind === E
  13840. )
  13841. return u[T];
  13842. T += 1;
  13843. }
  13844. return typeof E == 'number' ? u[E - 1] : null;
  13845. };
  13846. (f.propertyGroup = propertyGroupFactory(f, A)),
  13847. (u = e(b.it, y.it, f.propertyGroup)),
  13848. (f.numProperties = u.length);
  13849. var m = l(
  13850. b.it[b.it.length - 1],
  13851. y.it[y.it.length - 1],
  13852. f.propertyGroup
  13853. );
  13854. return (
  13855. (f.transform = m), (f.propertyIndex = b.cix), (f._name = b.nm), f
  13856. );
  13857. }
  13858. function r(b, y, A) {
  13859. var u = function (E) {
  13860. switch (E) {
  13861. case 'ADBE Vectors Group':
  13862. case 'Contents':
  13863. case 2:
  13864. return u.content;
  13865. default:
  13866. return u.transform;
  13867. }
  13868. };
  13869. u.propertyGroup = propertyGroupFactory(u, A);
  13870. var f = t(b, y, u.propertyGroup),
  13871. m = l(
  13872. b.it[b.it.length - 1],
  13873. y.it[y.it.length - 1],
  13874. u.propertyGroup
  13875. );
  13876. return (
  13877. (u.content = f),
  13878. (u.transform = m),
  13879. Object.defineProperty(u, '_name', {
  13880. get: function () {
  13881. return b.nm;
  13882. }
  13883. }),
  13884. (u.numProperties = b.np),
  13885. (u.propertyIndex = b.ix),
  13886. (u.nm = b.nm),
  13887. (u.mn = b.mn),
  13888. u
  13889. );
  13890. }
  13891. function i(b, y, A) {
  13892. function u(f) {
  13893. return f === 'Color' || f === 'color'
  13894. ? u.color
  13895. : f === 'Opacity' || f === 'opacity'
  13896. ? u.opacity
  13897. : null;
  13898. }
  13899. return (
  13900. Object.defineProperties(u, {
  13901. color: { get: ExpressionPropertyInterface(y.c) },
  13902. opacity: { get: ExpressionPropertyInterface(y.o) },
  13903. _name: { value: b.nm },
  13904. mn: { value: b.mn }
  13905. }),
  13906. y.c.setGroupProperty(PropertyInterface('Color', A)),
  13907. y.o.setGroupProperty(PropertyInterface('Opacity', A)),
  13908. u
  13909. );
  13910. }
  13911. function s(b, y, A) {
  13912. function u(f) {
  13913. return f === 'Start Point' || f === 'start point'
  13914. ? u.startPoint
  13915. : f === 'End Point' || f === 'end point'
  13916. ? u.endPoint
  13917. : f === 'Opacity' || f === 'opacity'
  13918. ? u.opacity
  13919. : null;
  13920. }
  13921. return (
  13922. Object.defineProperties(u, {
  13923. startPoint: { get: ExpressionPropertyInterface(y.s) },
  13924. endPoint: { get: ExpressionPropertyInterface(y.e) },
  13925. opacity: { get: ExpressionPropertyInterface(y.o) },
  13926. type: {
  13927. get: function () {
  13928. return 'a';
  13929. }
  13930. },
  13931. _name: { value: b.nm },
  13932. mn: { value: b.mn }
  13933. }),
  13934. y.s.setGroupProperty(PropertyInterface('Start Point', A)),
  13935. y.e.setGroupProperty(PropertyInterface('End Point', A)),
  13936. y.o.setGroupProperty(PropertyInterface('Opacity', A)),
  13937. u
  13938. );
  13939. }
  13940. function n() {
  13941. function b() {
  13942. return null;
  13943. }
  13944. return b;
  13945. }
  13946. function a(b, y, A) {
  13947. var u = propertyGroupFactory(x, A),
  13948. f = propertyGroupFactory(T, u);
  13949. function m(_) {
  13950. Object.defineProperty(T, b.d[_].nm, {
  13951. get: ExpressionPropertyInterface(y.d.dataProps[_].p)
  13952. });
  13953. }
  13954. var d,
  13955. E = b.d ? b.d.length : 0,
  13956. T = {};
  13957. for (d = 0; d < E; d += 1)
  13958. m(d), y.d.dataProps[d].p.setGroupProperty(f);
  13959. function x(_) {
  13960. return _ === 'Color' || _ === 'color'
  13961. ? x.color
  13962. : _ === 'Opacity' || _ === 'opacity'
  13963. ? x.opacity
  13964. : _ === 'Stroke Width' || _ === 'stroke width'
  13965. ? x.strokeWidth
  13966. : null;
  13967. }
  13968. return (
  13969. Object.defineProperties(x, {
  13970. color: { get: ExpressionPropertyInterface(y.c) },
  13971. opacity: { get: ExpressionPropertyInterface(y.o) },
  13972. strokeWidth: { get: ExpressionPropertyInterface(y.w) },
  13973. dash: {
  13974. get: function () {
  13975. return T;
  13976. }
  13977. },
  13978. _name: { value: b.nm },
  13979. mn: { value: b.mn }
  13980. }),
  13981. y.c.setGroupProperty(PropertyInterface('Color', u)),
  13982. y.o.setGroupProperty(PropertyInterface('Opacity', u)),
  13983. y.w.setGroupProperty(PropertyInterface('Stroke Width', u)),
  13984. x
  13985. );
  13986. }
  13987. function o(b, y, A) {
  13988. function u(m) {
  13989. return m === b.e.ix || m === 'End' || m === 'end'
  13990. ? u.end
  13991. : m === b.s.ix
  13992. ? u.start
  13993. : m === b.o.ix
  13994. ? u.offset
  13995. : null;
  13996. }
  13997. var f = propertyGroupFactory(u, A);
  13998. return (
  13999. (u.propertyIndex = b.ix),
  14000. y.s.setGroupProperty(PropertyInterface('Start', f)),
  14001. y.e.setGroupProperty(PropertyInterface('End', f)),
  14002. y.o.setGroupProperty(PropertyInterface('Offset', f)),
  14003. (u.propertyIndex = b.ix),
  14004. (u.propertyGroup = A),
  14005. Object.defineProperties(u, {
  14006. start: { get: ExpressionPropertyInterface(y.s) },
  14007. end: { get: ExpressionPropertyInterface(y.e) },
  14008. offset: { get: ExpressionPropertyInterface(y.o) },
  14009. _name: { value: b.nm }
  14010. }),
  14011. (u.mn = b.mn),
  14012. u
  14013. );
  14014. }
  14015. function l(b, y, A) {
  14016. function u(m) {
  14017. return b.a.ix === m || m === 'Anchor Point'
  14018. ? u.anchorPoint
  14019. : b.o.ix === m || m === 'Opacity'
  14020. ? u.opacity
  14021. : b.p.ix === m || m === 'Position'
  14022. ? u.position
  14023. : b.r.ix === m ||
  14024. m === 'Rotation' ||
  14025. m === 'ADBE Vector Rotation'
  14026. ? u.rotation
  14027. : b.s.ix === m || m === 'Scale'
  14028. ? u.scale
  14029. : (b.sk && b.sk.ix === m) || m === 'Skew'
  14030. ? u.skew
  14031. : (b.sa && b.sa.ix === m) || m === 'Skew Axis'
  14032. ? u.skewAxis
  14033. : null;
  14034. }
  14035. var f = propertyGroupFactory(u, A);
  14036. return (
  14037. y.transform.mProps.o.setGroupProperty(
  14038. PropertyInterface('Opacity', f)
  14039. ),
  14040. y.transform.mProps.p.setGroupProperty(
  14041. PropertyInterface('Position', f)
  14042. ),
  14043. y.transform.mProps.a.setGroupProperty(
  14044. PropertyInterface('Anchor Point', f)
  14045. ),
  14046. y.transform.mProps.s.setGroupProperty(
  14047. PropertyInterface('Scale', f)
  14048. ),
  14049. y.transform.mProps.r.setGroupProperty(
  14050. PropertyInterface('Rotation', f)
  14051. ),
  14052. y.transform.mProps.sk &&
  14053. (y.transform.mProps.sk.setGroupProperty(
  14054. PropertyInterface('Skew', f)
  14055. ),
  14056. y.transform.mProps.sa.setGroupProperty(
  14057. PropertyInterface('Skew Angle', f)
  14058. )),
  14059. y.transform.op.setGroupProperty(PropertyInterface('Opacity', f)),
  14060. Object.defineProperties(u, {
  14061. opacity: {
  14062. get: ExpressionPropertyInterface(y.transform.mProps.o)
  14063. },
  14064. position: {
  14065. get: ExpressionPropertyInterface(y.transform.mProps.p)
  14066. },
  14067. anchorPoint: {
  14068. get: ExpressionPropertyInterface(y.transform.mProps.a)
  14069. },
  14070. scale: {
  14071. get: ExpressionPropertyInterface(y.transform.mProps.s)
  14072. },
  14073. rotation: {
  14074. get: ExpressionPropertyInterface(y.transform.mProps.r)
  14075. },
  14076. skew: {
  14077. get: ExpressionPropertyInterface(y.transform.mProps.sk)
  14078. },
  14079. skewAxis: {
  14080. get: ExpressionPropertyInterface(y.transform.mProps.sa)
  14081. },
  14082. _name: { value: b.nm }
  14083. }),
  14084. (u.ty = 'tr'),
  14085. (u.mn = b.mn),
  14086. (u.propertyGroup = A),
  14087. u
  14088. );
  14089. }
  14090. function c(b, y, A) {
  14091. function u(d) {
  14092. return b.p.ix === d ? u.position : b.s.ix === d ? u.size : null;
  14093. }
  14094. var f = propertyGroupFactory(u, A);
  14095. u.propertyIndex = b.ix;
  14096. var m = y.sh.ty === 'tm' ? y.sh.prop : y.sh;
  14097. return (
  14098. m.s.setGroupProperty(PropertyInterface('Size', f)),
  14099. m.p.setGroupProperty(PropertyInterface('Position', f)),
  14100. Object.defineProperties(u, {
  14101. size: { get: ExpressionPropertyInterface(m.s) },
  14102. position: { get: ExpressionPropertyInterface(m.p) },
  14103. _name: { value: b.nm }
  14104. }),
  14105. (u.mn = b.mn),
  14106. u
  14107. );
  14108. }
  14109. function g(b, y, A) {
  14110. function u(d) {
  14111. return b.p.ix === d
  14112. ? u.position
  14113. : b.r.ix === d
  14114. ? u.rotation
  14115. : b.pt.ix === d
  14116. ? u.points
  14117. : b.or.ix === d || d === 'ADBE Vector Star Outer Radius'
  14118. ? u.outerRadius
  14119. : b.os.ix === d
  14120. ? u.outerRoundness
  14121. : b.ir &&
  14122. (b.ir.ix === d || d === 'ADBE Vector Star Inner Radius')
  14123. ? u.innerRadius
  14124. : b.is && b.is.ix === d
  14125. ? u.innerRoundness
  14126. : null;
  14127. }
  14128. var f = propertyGroupFactory(u, A),
  14129. m = y.sh.ty === 'tm' ? y.sh.prop : y.sh;
  14130. return (
  14131. (u.propertyIndex = b.ix),
  14132. m.or.setGroupProperty(PropertyInterface('Outer Radius', f)),
  14133. m.os.setGroupProperty(PropertyInterface('Outer Roundness', f)),
  14134. m.pt.setGroupProperty(PropertyInterface('Points', f)),
  14135. m.p.setGroupProperty(PropertyInterface('Position', f)),
  14136. m.r.setGroupProperty(PropertyInterface('Rotation', f)),
  14137. b.ir &&
  14138. (m.ir.setGroupProperty(PropertyInterface('Inner Radius', f)),
  14139. m.is.setGroupProperty(PropertyInterface('Inner Roundness', f))),
  14140. Object.defineProperties(u, {
  14141. position: { get: ExpressionPropertyInterface(m.p) },
  14142. rotation: { get: ExpressionPropertyInterface(m.r) },
  14143. points: { get: ExpressionPropertyInterface(m.pt) },
  14144. outerRadius: { get: ExpressionPropertyInterface(m.or) },
  14145. outerRoundness: { get: ExpressionPropertyInterface(m.os) },
  14146. innerRadius: { get: ExpressionPropertyInterface(m.ir) },
  14147. innerRoundness: { get: ExpressionPropertyInterface(m.is) },
  14148. _name: { value: b.nm }
  14149. }),
  14150. (u.mn = b.mn),
  14151. u
  14152. );
  14153. }
  14154. function S(b, y, A) {
  14155. function u(d) {
  14156. return b.p.ix === d
  14157. ? u.position
  14158. : b.r.ix === d
  14159. ? u.roundness
  14160. : b.s.ix === d || d === 'Size' || d === 'ADBE Vector Rect Size'
  14161. ? u.size
  14162. : null;
  14163. }
  14164. var f = propertyGroupFactory(u, A),
  14165. m = y.sh.ty === 'tm' ? y.sh.prop : y.sh;
  14166. return (
  14167. (u.propertyIndex = b.ix),
  14168. m.p.setGroupProperty(PropertyInterface('Position', f)),
  14169. m.s.setGroupProperty(PropertyInterface('Size', f)),
  14170. m.r.setGroupProperty(PropertyInterface('Rotation', f)),
  14171. Object.defineProperties(u, {
  14172. position: { get: ExpressionPropertyInterface(m.p) },
  14173. roundness: { get: ExpressionPropertyInterface(m.r) },
  14174. size: { get: ExpressionPropertyInterface(m.s) },
  14175. _name: { value: b.nm }
  14176. }),
  14177. (u.mn = b.mn),
  14178. u
  14179. );
  14180. }
  14181. function p(b, y, A) {
  14182. function u(d) {
  14183. return b.r.ix === d || d === 'Round Corners 1' ? u.radius : null;
  14184. }
  14185. var f = propertyGroupFactory(u, A),
  14186. m = y;
  14187. return (
  14188. (u.propertyIndex = b.ix),
  14189. m.rd.setGroupProperty(PropertyInterface('Radius', f)),
  14190. Object.defineProperties(u, {
  14191. radius: { get: ExpressionPropertyInterface(m.rd) },
  14192. _name: { value: b.nm }
  14193. }),
  14194. (u.mn = b.mn),
  14195. u
  14196. );
  14197. }
  14198. function P(b, y, A) {
  14199. function u(d) {
  14200. return b.c.ix === d || d === 'Copies'
  14201. ? u.copies
  14202. : b.o.ix === d || d === 'Offset'
  14203. ? u.offset
  14204. : null;
  14205. }
  14206. var f = propertyGroupFactory(u, A),
  14207. m = y;
  14208. return (
  14209. (u.propertyIndex = b.ix),
  14210. m.c.setGroupProperty(PropertyInterface('Copies', f)),
  14211. m.o.setGroupProperty(PropertyInterface('Offset', f)),
  14212. Object.defineProperties(u, {
  14213. copies: { get: ExpressionPropertyInterface(m.c) },
  14214. offset: { get: ExpressionPropertyInterface(m.o) },
  14215. _name: { value: b.nm }
  14216. }),
  14217. (u.mn = b.mn),
  14218. u
  14219. );
  14220. }
  14221. return function (b, y, A) {
  14222. var u;
  14223. function f(d) {
  14224. if (typeof d == 'number')
  14225. return (d = d === void 0 ? 1 : d), d === 0 ? A : u[d - 1];
  14226. for (var E = 0, T = u.length; E < T; ) {
  14227. if (u[E]._name === d) return u[E];
  14228. E += 1;
  14229. }
  14230. return null;
  14231. }
  14232. function m() {
  14233. return A;
  14234. }
  14235. return (
  14236. (f.propertyGroup = propertyGroupFactory(f, m)),
  14237. (u = e(b, y, f.propertyGroup)),
  14238. (f.numProperties = u.length),
  14239. (f._name = 'Contents'),
  14240. f
  14241. );
  14242. };
  14243. })(),
  14244. TextExpressionInterface = (function () {
  14245. return function (e) {
  14246. var t;
  14247. function r(i) {
  14248. switch (i) {
  14249. case 'ADBE Text Document':
  14250. return r.sourceText;
  14251. default:
  14252. return null;
  14253. }
  14254. }
  14255. return (
  14256. Object.defineProperty(r, 'sourceText', {
  14257. get: function () {
  14258. e.textProperty.getValue();
  14259. var s = e.textProperty.currentData.t;
  14260. return (
  14261. (!t || s !== t.value) &&
  14262. ((t = new String(s)),
  14263. (t.value = s || new String(s)),
  14264. Object.defineProperty(t, 'style', {
  14265. get: function () {
  14266. return { fillColor: e.textProperty.currentData.fc };
  14267. }
  14268. })),
  14269. t
  14270. );
  14271. }
  14272. }),
  14273. r
  14274. );
  14275. };
  14276. })();
  14277. function _typeof$2(e) {
  14278. return (
  14279. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  14280. ? (_typeof$2 = function (r) {
  14281. return typeof r;
  14282. })
  14283. : (_typeof$2 = function (r) {
  14284. return r &&
  14285. typeof Symbol == 'function' &&
  14286. r.constructor === Symbol &&
  14287. r !== Symbol.prototype
  14288. ? 'symbol'
  14289. : typeof r;
  14290. }),
  14291. _typeof$2(e)
  14292. );
  14293. }
  14294. var FootageInterface = (function () {
  14295. var e = function (i) {
  14296. var s = '',
  14297. n = i.getFootageData();
  14298. function a() {
  14299. return (s = ''), (n = i.getFootageData()), o;
  14300. }
  14301. function o(l) {
  14302. if (n[l])
  14303. return (s = l), (n = n[l]), _typeof$2(n) === 'object' ? o : n;
  14304. var c = l.indexOf(s);
  14305. if (c !== -1) {
  14306. var g = parseInt(l.substr(c + s.length), 10);
  14307. return (n = n[g]), _typeof$2(n) === 'object' ? o : n;
  14308. }
  14309. return '';
  14310. }
  14311. return a;
  14312. },
  14313. t = function (i) {
  14314. function s(n) {
  14315. return n === 'Outline' ? s.outlineInterface() : null;
  14316. }
  14317. return (s._name = 'Outline'), (s.outlineInterface = e(i)), s;
  14318. };
  14319. return function (r) {
  14320. function i(s) {
  14321. return s === 'Data' ? i.dataInterface : null;
  14322. }
  14323. return (i._name = 'Data'), (i.dataInterface = t(r)), i;
  14324. };
  14325. })(),
  14326. interfaces = {
  14327. layer: LayerExpressionInterface,
  14328. effects: EffectsExpressionInterface,
  14329. comp: CompExpressionInterface,
  14330. shape: ShapeExpressionInterface,
  14331. text: TextExpressionInterface,
  14332. footage: FootageInterface
  14333. };
  14334. function getInterface(e) {
  14335. return interfaces[e] || null;
  14336. }
  14337. function _typeof$1(e) {
  14338. return (
  14339. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  14340. ? (_typeof$1 = function (r) {
  14341. return typeof r;
  14342. })
  14343. : (_typeof$1 = function (r) {
  14344. return r &&
  14345. typeof Symbol == 'function' &&
  14346. r.constructor === Symbol &&
  14347. r !== Symbol.prototype
  14348. ? 'symbol'
  14349. : typeof r;
  14350. }),
  14351. _typeof$1(e)
  14352. );
  14353. }
  14354. function seedRandom(e, t) {
  14355. var r = this,
  14356. i = 256,
  14357. s = 6,
  14358. n = 52,
  14359. a = 'random',
  14360. o = t.pow(i, s),
  14361. l = t.pow(2, n),
  14362. c = l * 2,
  14363. g = i - 1,
  14364. S;
  14365. function p(m, d, E) {
  14366. var T = [];
  14367. d = d === !0 ? { entropy: !0 } : d || {};
  14368. var x = A(y(d.entropy ? [m, f(e)] : m === null ? u() : m, 3), T),
  14369. _ = new P(T),
  14370. I = function () {
  14371. for (var D = _.g(s), N = o, $ = 0; D < l; )
  14372. (D = (D + $) * i), (N *= i), ($ = _.g(1));
  14373. for (; D >= c; ) (D /= 2), (N /= 2), ($ >>>= 1);
  14374. return (D + $) / N;
  14375. };
  14376. return (
  14377. (I.int32 = function () {
  14378. return _.g(4) | 0;
  14379. }),
  14380. (I.quick = function () {
  14381. return _.g(4) / 4294967296;
  14382. }),
  14383. (I.double = I),
  14384. A(f(_.S), e),
  14385. (
  14386. d.pass ||
  14387. E ||
  14388. function (V, D, N, $) {
  14389. return (
  14390. $ &&
  14391. ($.S && b($, _),
  14392. (V.state = function () {
  14393. return b(_, {});
  14394. })),
  14395. N ? ((t[a] = V), D) : V
  14396. );
  14397. }
  14398. )(I, x, 'global' in d ? d.global : this == t, d.state)
  14399. );
  14400. }
  14401. t['seed' + a] = p;
  14402. function P(m) {
  14403. var d,
  14404. E = m.length,
  14405. T = this,
  14406. x = 0,
  14407. _ = (T.i = T.j = 0),
  14408. I = (T.S = []);
  14409. for (E || (m = [E++]); x < i; ) I[x] = x++;
  14410. for (x = 0; x < i; x++)
  14411. (I[x] = I[(_ = g & (_ + m[x % E] + (d = I[x])))]), (I[_] = d);
  14412. T.g = function (V) {
  14413. for (var D, N = 0, $ = T.i, O = T.j, B = T.S; V--; )
  14414. (D = B[($ = g & ($ + 1))]),
  14415. (N =
  14416. N * i + B[g & ((B[$] = B[(O = g & (O + D))]) + (B[O] = D))]);
  14417. return (T.i = $), (T.j = O), N;
  14418. };
  14419. }
  14420. function b(m, d) {
  14421. return (d.i = m.i), (d.j = m.j), (d.S = m.S.slice()), d;
  14422. }
  14423. function y(m, d) {
  14424. var E = [],
  14425. T = _typeof$1(m),
  14426. x;
  14427. if (d && T == 'object')
  14428. for (x in m)
  14429. try {
  14430. E.push(y(m[x], d - 1));
  14431. } catch {}
  14432. return E.length ? E : T == 'string' ? m : m + '\0';
  14433. }
  14434. function A(m, d) {
  14435. for (var E = m + '', T, x = 0; x < E.length; )
  14436. d[g & x] = g & ((T ^= d[g & x] * 19) + E.charCodeAt(x++));
  14437. return f(d);
  14438. }
  14439. function u() {
  14440. try {
  14441. var m = new Uint8Array(i);
  14442. return (r.crypto || r.msCrypto).getRandomValues(m), f(m);
  14443. } catch {
  14444. var d = r.navigator,
  14445. E = d && d.plugins;
  14446. return [+new Date(), r, E, r.screen, f(e)];
  14447. }
  14448. }
  14449. function f(m) {
  14450. return String.fromCharCode.apply(0, m);
  14451. }
  14452. A(t.random(), e);
  14453. }
  14454. function initialize$2(e) {
  14455. seedRandom([], e);
  14456. }
  14457. var propTypes = { SHAPE: 'shape' };
  14458. function _typeof(e) {
  14459. return (
  14460. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  14461. ? (_typeof = function (r) {
  14462. return typeof r;
  14463. })
  14464. : (_typeof = function (r) {
  14465. return r &&
  14466. typeof Symbol == 'function' &&
  14467. r.constructor === Symbol &&
  14468. r !== Symbol.prototype
  14469. ? 'symbol'
  14470. : typeof r;
  14471. }),
  14472. _typeof(e)
  14473. );
  14474. }
  14475. var ExpressionManager = (function () {
  14476. var ob = {},
  14477. Math = BMMath,
  14478. window = null,
  14479. document = null,
  14480. XMLHttpRequest = null,
  14481. fetch = null,
  14482. frames = null;
  14483. initialize$2(BMMath);
  14484. function $bm_isInstanceOfArray(e) {
  14485. return e.constructor === Array || e.constructor === Float32Array;
  14486. }
  14487. function isNumerable(e, t) {
  14488. return (
  14489. e === 'number' ||
  14490. e === 'boolean' ||
  14491. e === 'string' ||
  14492. t instanceof Number
  14493. );
  14494. }
  14495. function $bm_neg(e) {
  14496. var t = _typeof(e);
  14497. if (t === 'number' || t === 'boolean' || e instanceof Number)
  14498. return -e;
  14499. if ($bm_isInstanceOfArray(e)) {
  14500. var r,
  14501. i = e.length,
  14502. s = [];
  14503. for (r = 0; r < i; r += 1) s[r] = -e[r];
  14504. return s;
  14505. }
  14506. return e.propType ? e.v : -e;
  14507. }
  14508. var easeInBez = BezierFactory.getBezierEasing(
  14509. 0.333,
  14510. 0,
  14511. 0.833,
  14512. 0.833,
  14513. 'easeIn'
  14514. ).get,
  14515. easeOutBez = BezierFactory.getBezierEasing(
  14516. 0.167,
  14517. 0.167,
  14518. 0.667,
  14519. 1,
  14520. 'easeOut'
  14521. ).get,
  14522. easeInOutBez = BezierFactory.getBezierEasing(
  14523. 0.33,
  14524. 0,
  14525. 0.667,
  14526. 1,
  14527. 'easeInOut'
  14528. ).get;
  14529. function sum(e, t) {
  14530. var r = _typeof(e),
  14531. i = _typeof(t);
  14532. if (
  14533. r === 'string' ||
  14534. i === 'string' ||
  14535. (isNumerable(r, e) && isNumerable(i, t))
  14536. )
  14537. return e + t;
  14538. if ($bm_isInstanceOfArray(e) && isNumerable(i, t))
  14539. return (e = e.slice(0)), (e[0] += t), e;
  14540. if (isNumerable(r, e) && $bm_isInstanceOfArray(t))
  14541. return (t = t.slice(0)), (t[0] = e + t[0]), t;
  14542. if ($bm_isInstanceOfArray(e) && $bm_isInstanceOfArray(t)) {
  14543. for (
  14544. var s = 0, n = e.length, a = t.length, o = [];
  14545. s < n || s < a;
  14546. )
  14547. (typeof e[s] == 'number' || e[s] instanceof Number) &&
  14548. (typeof t[s] == 'number' || t[s] instanceof Number)
  14549. ? (o[s] = e[s] + t[s])
  14550. : (o[s] = t[s] === void 0 ? e[s] : e[s] || t[s]),
  14551. (s += 1);
  14552. return o;
  14553. }
  14554. return 0;
  14555. }
  14556. var add = sum;
  14557. function sub(e, t) {
  14558. var r = _typeof(e),
  14559. i = _typeof(t);
  14560. if (isNumerable(r, e) && isNumerable(i, t))
  14561. return (
  14562. r === 'string' && (e = parseInt(e, 10)),
  14563. i === 'string' && (t = parseInt(t, 10)),
  14564. e - t
  14565. );
  14566. if ($bm_isInstanceOfArray(e) && isNumerable(i, t))
  14567. return (e = e.slice(0)), (e[0] -= t), e;
  14568. if (isNumerable(r, e) && $bm_isInstanceOfArray(t))
  14569. return (t = t.slice(0)), (t[0] = e - t[0]), t;
  14570. if ($bm_isInstanceOfArray(e) && $bm_isInstanceOfArray(t)) {
  14571. for (
  14572. var s = 0, n = e.length, a = t.length, o = [];
  14573. s < n || s < a;
  14574. )
  14575. (typeof e[s] == 'number' || e[s] instanceof Number) &&
  14576. (typeof t[s] == 'number' || t[s] instanceof Number)
  14577. ? (o[s] = e[s] - t[s])
  14578. : (o[s] = t[s] === void 0 ? e[s] : e[s] || t[s]),
  14579. (s += 1);
  14580. return o;
  14581. }
  14582. return 0;
  14583. }
  14584. function mul(e, t) {
  14585. var r = _typeof(e),
  14586. i = _typeof(t),
  14587. s;
  14588. if (isNumerable(r, e) && isNumerable(i, t)) return e * t;
  14589. var n, a;
  14590. if ($bm_isInstanceOfArray(e) && isNumerable(i, t)) {
  14591. for (
  14592. a = e.length, s = createTypedArray('float32', a), n = 0;
  14593. n < a;
  14594. n += 1
  14595. )
  14596. s[n] = e[n] * t;
  14597. return s;
  14598. }
  14599. if (isNumerable(r, e) && $bm_isInstanceOfArray(t)) {
  14600. for (
  14601. a = t.length, s = createTypedArray('float32', a), n = 0;
  14602. n < a;
  14603. n += 1
  14604. )
  14605. s[n] = e * t[n];
  14606. return s;
  14607. }
  14608. return 0;
  14609. }
  14610. function div(e, t) {
  14611. var r = _typeof(e),
  14612. i = _typeof(t),
  14613. s;
  14614. if (isNumerable(r, e) && isNumerable(i, t)) return e / t;
  14615. var n, a;
  14616. if ($bm_isInstanceOfArray(e) && isNumerable(i, t)) {
  14617. for (
  14618. a = e.length, s = createTypedArray('float32', a), n = 0;
  14619. n < a;
  14620. n += 1
  14621. )
  14622. s[n] = e[n] / t;
  14623. return s;
  14624. }
  14625. if (isNumerable(r, e) && $bm_isInstanceOfArray(t)) {
  14626. for (
  14627. a = t.length, s = createTypedArray('float32', a), n = 0;
  14628. n < a;
  14629. n += 1
  14630. )
  14631. s[n] = e / t[n];
  14632. return s;
  14633. }
  14634. return 0;
  14635. }
  14636. function mod(e, t) {
  14637. return (
  14638. typeof e == 'string' && (e = parseInt(e, 10)),
  14639. typeof t == 'string' && (t = parseInt(t, 10)),
  14640. e % t
  14641. );
  14642. }
  14643. var $bm_sum = sum,
  14644. $bm_sub = sub,
  14645. $bm_mul = mul,
  14646. $bm_div = div,
  14647. $bm_mod = mod;
  14648. function clamp(e, t, r) {
  14649. if (t > r) {
  14650. var i = r;
  14651. (r = t), (t = i);
  14652. }
  14653. return Math.min(Math.max(e, t), r);
  14654. }
  14655. function radiansToDegrees(e) {
  14656. return e / degToRads;
  14657. }
  14658. var radians_to_degrees = radiansToDegrees;
  14659. function degreesToRadians(e) {
  14660. return e * degToRads;
  14661. }
  14662. var degrees_to_radians = radiansToDegrees,
  14663. helperLengthArray = [0, 0, 0, 0, 0, 0];
  14664. function length(e, t) {
  14665. if (typeof e == 'number' || e instanceof Number)
  14666. return (t = t || 0), Math.abs(e - t);
  14667. t || (t = helperLengthArray);
  14668. var r,
  14669. i = Math.min(e.length, t.length),
  14670. s = 0;
  14671. for (r = 0; r < i; r += 1) s += Math.pow(t[r] - e[r], 2);
  14672. return Math.sqrt(s);
  14673. }
  14674. function normalize(e) {
  14675. return div(e, length(e));
  14676. }
  14677. function rgbToHsl(e) {
  14678. var t = e[0],
  14679. r = e[1],
  14680. i = e[2],
  14681. s = Math.max(t, r, i),
  14682. n = Math.min(t, r, i),
  14683. a,
  14684. o,
  14685. l = (s + n) / 2;
  14686. if (s === n) (a = 0), (o = 0);
  14687. else {
  14688. var c = s - n;
  14689. switch (((o = l > 0.5 ? c / (2 - s - n) : c / (s + n)), s)) {
  14690. case t:
  14691. a = (r - i) / c + (r < i ? 6 : 0);
  14692. break;
  14693. case r:
  14694. a = (i - t) / c + 2;
  14695. break;
  14696. case i:
  14697. a = (t - r) / c + 4;
  14698. break;
  14699. }
  14700. a /= 6;
  14701. }
  14702. return [a, o, l, e[3]];
  14703. }
  14704. function hue2rgb(e, t, r) {
  14705. return (
  14706. r < 0 && (r += 1),
  14707. r > 1 && (r -= 1),
  14708. r < 1 / 6
  14709. ? e + (t - e) * 6 * r
  14710. : r < 1 / 2
  14711. ? t
  14712. : r < 2 / 3
  14713. ? e + (t - e) * (2 / 3 - r) * 6
  14714. : e
  14715. );
  14716. }
  14717. function hslToRgb(e) {
  14718. var t = e[0],
  14719. r = e[1],
  14720. i = e[2],
  14721. s,
  14722. n,
  14723. a;
  14724. if (r === 0) (s = i), (a = i), (n = i);
  14725. else {
  14726. var o = i < 0.5 ? i * (1 + r) : i + r - i * r,
  14727. l = 2 * i - o;
  14728. (s = hue2rgb(l, o, t + 1 / 3)),
  14729. (n = hue2rgb(l, o, t)),
  14730. (a = hue2rgb(l, o, t - 1 / 3));
  14731. }
  14732. return [s, n, a, e[3]];
  14733. }
  14734. function linear(e, t, r, i, s) {
  14735. if (
  14736. ((i === void 0 || s === void 0) &&
  14737. ((i = t), (s = r), (t = 0), (r = 1)),
  14738. r < t)
  14739. ) {
  14740. var n = r;
  14741. (r = t), (t = n);
  14742. }
  14743. if (e <= t) return i;
  14744. if (e >= r) return s;
  14745. var a = r === t ? 0 : (e - t) / (r - t);
  14746. if (!i.length) return i + (s - i) * a;
  14747. var o,
  14748. l = i.length,
  14749. c = createTypedArray('float32', l);
  14750. for (o = 0; o < l; o += 1) c[o] = i[o] + (s[o] - i[o]) * a;
  14751. return c;
  14752. }
  14753. function random(e, t) {
  14754. if (
  14755. (t === void 0 &&
  14756. (e === void 0 ? ((e = 0), (t = 1)) : ((t = e), (e = void 0))),
  14757. t.length)
  14758. ) {
  14759. var r,
  14760. i = t.length;
  14761. e || (e = createTypedArray('float32', i));
  14762. var s = createTypedArray('float32', i),
  14763. n = BMMath.random();
  14764. for (r = 0; r < i; r += 1) s[r] = e[r] + n * (t[r] - e[r]);
  14765. return s;
  14766. }
  14767. e === void 0 && (e = 0);
  14768. var a = BMMath.random();
  14769. return e + a * (t - e);
  14770. }
  14771. function createPath(e, t, r, i) {
  14772. var s,
  14773. n = e.length,
  14774. a = shapePool.newElement();
  14775. a.setPathData(!!i, n);
  14776. var o = [0, 0],
  14777. l,
  14778. c;
  14779. for (s = 0; s < n; s += 1)
  14780. (l = t && t[s] ? t[s] : o),
  14781. (c = r && r[s] ? r[s] : o),
  14782. a.setTripleAt(
  14783. e[s][0],
  14784. e[s][1],
  14785. c[0] + e[s][0],
  14786. c[1] + e[s][1],
  14787. l[0] + e[s][0],
  14788. l[1] + e[s][1],
  14789. s,
  14790. !0
  14791. );
  14792. return a;
  14793. }
  14794. function initiateExpression(elem, data, property) {
  14795. function noOp(e) {
  14796. return e;
  14797. }
  14798. if (!elem.globalData.renderConfig.runExpressions) return noOp;
  14799. var val = data.x,
  14800. needsVelocity = /velocity(?![\w\d])/.test(val),
  14801. _needsRandom = val.indexOf('random') !== -1,
  14802. elemType = elem.data.ty,
  14803. transform,
  14804. $bm_transform,
  14805. content,
  14806. effect,
  14807. thisProperty = property;
  14808. (thisProperty.valueAtTime = thisProperty.getValueAtTime),
  14809. Object.defineProperty(thisProperty, 'value', {
  14810. get: function () {
  14811. return thisProperty.v;
  14812. }
  14813. }),
  14814. (elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate),
  14815. (elem.comp.displayStartTime = 0);
  14816. var inPoint = elem.data.ip / elem.comp.globalData.frameRate,
  14817. outPoint = elem.data.op / elem.comp.globalData.frameRate,
  14818. width = elem.data.sw ? elem.data.sw : 0,
  14819. height = elem.data.sh ? elem.data.sh : 0,
  14820. name = elem.data.nm,
  14821. loopIn,
  14822. loop_in,
  14823. loopOut,
  14824. loop_out,
  14825. smooth,
  14826. toWorld,
  14827. fromWorld,
  14828. fromComp,
  14829. toComp,
  14830. fromCompToSurface,
  14831. position,
  14832. rotation,
  14833. anchorPoint,
  14834. scale,
  14835. thisLayer,
  14836. thisComp,
  14837. mask,
  14838. valueAtTime,
  14839. velocityAtTime,
  14840. scoped_bm_rt,
  14841. expression_function = eval(
  14842. '[function _expression_function(){' +
  14843. val +
  14844. ';scoped_bm_rt=$bm_rt}]'
  14845. )[0],
  14846. numKeys = property.kf ? data.k.length : 0,
  14847. active = !this.data || this.data.hd !== !0,
  14848. wiggle = function e(t, r) {
  14849. var i,
  14850. s,
  14851. n = this.pv.length ? this.pv.length : 1,
  14852. a = createTypedArray('float32', n);
  14853. t = 5;
  14854. var o = Math.floor(time * t);
  14855. for (i = 0, s = 0; i < o; ) {
  14856. for (s = 0; s < n; s += 1)
  14857. a[s] += -r + r * 2 * BMMath.random();
  14858. i += 1;
  14859. }
  14860. var l = time * t,
  14861. c = l - Math.floor(l),
  14862. g = createTypedArray('float32', n);
  14863. if (n > 1) {
  14864. for (s = 0; s < n; s += 1)
  14865. g[s] =
  14866. this.pv[s] + a[s] + (-r + r * 2 * BMMath.random()) * c;
  14867. return g;
  14868. }
  14869. return this.pv + a[0] + (-r + r * 2 * BMMath.random()) * c;
  14870. }.bind(this);
  14871. thisProperty.loopIn &&
  14872. ((loopIn = thisProperty.loopIn.bind(thisProperty)),
  14873. (loop_in = loopIn)),
  14874. thisProperty.loopOut &&
  14875. ((loopOut = thisProperty.loopOut.bind(thisProperty)),
  14876. (loop_out = loopOut)),
  14877. thisProperty.smooth &&
  14878. (smooth = thisProperty.smooth.bind(thisProperty));
  14879. function loopInDuration(e, t) {
  14880. return loopIn(e, t, !0);
  14881. }
  14882. function loopOutDuration(e, t) {
  14883. return loopOut(e, t, !0);
  14884. }
  14885. this.getValueAtTime &&
  14886. (valueAtTime = this.getValueAtTime.bind(this)),
  14887. this.getVelocityAtTime &&
  14888. (velocityAtTime = this.getVelocityAtTime.bind(this));
  14889. var comp = elem.comp.globalData.projectInterface.bind(
  14890. elem.comp.globalData.projectInterface
  14891. );
  14892. function lookAt(e, t) {
  14893. var r = [t[0] - e[0], t[1] - e[1], t[2] - e[2]],
  14894. i =
  14895. Math.atan2(r[0], Math.sqrt(r[1] * r[1] + r[2] * r[2])) /
  14896. degToRads,
  14897. s = -Math.atan2(r[1], r[2]) / degToRads;
  14898. return [s, i, 0];
  14899. }
  14900. function easeOut(e, t, r, i, s) {
  14901. return applyEase(easeOutBez, e, t, r, i, s);
  14902. }
  14903. function easeIn(e, t, r, i, s) {
  14904. return applyEase(easeInBez, e, t, r, i, s);
  14905. }
  14906. function ease(e, t, r, i, s) {
  14907. return applyEase(easeInOutBez, e, t, r, i, s);
  14908. }
  14909. function applyEase(e, t, r, i, s, n) {
  14910. s === void 0 ? ((s = r), (n = i)) : (t = (t - r) / (i - r)),
  14911. t > 1 ? (t = 1) : t < 0 && (t = 0);
  14912. var a = e(t);
  14913. if ($bm_isInstanceOfArray(s)) {
  14914. var o,
  14915. l = s.length,
  14916. c = createTypedArray('float32', l);
  14917. for (o = 0; o < l; o += 1) c[o] = (n[o] - s[o]) * a + s[o];
  14918. return c;
  14919. }
  14920. return (n - s) * a + s;
  14921. }
  14922. function nearestKey(e) {
  14923. var t,
  14924. r = data.k.length,
  14925. i,
  14926. s;
  14927. if (!data.k.length || typeof data.k[0] == 'number')
  14928. (i = 0), (s = 0);
  14929. else if (
  14930. ((i = -1),
  14931. (e *= elem.comp.globalData.frameRate),
  14932. e < data.k[0].t)
  14933. )
  14934. (i = 1), (s = data.k[0].t);
  14935. else {
  14936. for (t = 0; t < r - 1; t += 1)
  14937. if (e === data.k[t].t) {
  14938. (i = t + 1), (s = data.k[t].t);
  14939. break;
  14940. } else if (e > data.k[t].t && e < data.k[t + 1].t) {
  14941. e - data.k[t].t > data.k[t + 1].t - e
  14942. ? ((i = t + 2), (s = data.k[t + 1].t))
  14943. : ((i = t + 1), (s = data.k[t].t));
  14944. break;
  14945. }
  14946. i === -1 && ((i = t + 1), (s = data.k[t].t));
  14947. }
  14948. var n = {};
  14949. return (
  14950. (n.index = i), (n.time = s / elem.comp.globalData.frameRate), n
  14951. );
  14952. }
  14953. function key(e) {
  14954. var t, r, i;
  14955. if (!data.k.length || typeof data.k[0] == 'number')
  14956. throw new Error('The property has no keyframe at index ' + e);
  14957. (e -= 1),
  14958. (t = {
  14959. time: data.k[e].t / elem.comp.globalData.frameRate,
  14960. value: []
  14961. });
  14962. var s = Object.prototype.hasOwnProperty.call(data.k[e], 's')
  14963. ? data.k[e].s
  14964. : data.k[e - 1].e;
  14965. for (i = s.length, r = 0; r < i; r += 1)
  14966. (t[r] = s[r]), (t.value[r] = s[r]);
  14967. return t;
  14968. }
  14969. function framesToTime(e, t) {
  14970. return t || (t = elem.comp.globalData.frameRate), e / t;
  14971. }
  14972. function timeToFrames(e, t) {
  14973. return (
  14974. !e && e !== 0 && (e = time),
  14975. t || (t = elem.comp.globalData.frameRate),
  14976. e * t
  14977. );
  14978. }
  14979. function seedRandom(e) {
  14980. BMMath.seedrandom(randSeed + e);
  14981. }
  14982. function sourceRectAtTime() {
  14983. return elem.sourceRectAtTime();
  14984. }
  14985. function substring(e, t) {
  14986. return typeof value == 'string'
  14987. ? t === void 0
  14988. ? value.substring(e)
  14989. : value.substring(e, t)
  14990. : '';
  14991. }
  14992. function substr(e, t) {
  14993. return typeof value == 'string'
  14994. ? t === void 0
  14995. ? value.substr(e)
  14996. : value.substr(e, t)
  14997. : '';
  14998. }
  14999. function posterizeTime(e) {
  15000. (time = e === 0 ? 0 : Math.floor(time * e) / e),
  15001. (value = valueAtTime(time));
  15002. }
  15003. var time,
  15004. velocity,
  15005. value,
  15006. text,
  15007. textIndex,
  15008. textTotal,
  15009. selectorValue,
  15010. index = elem.data.ind,
  15011. hasParent = !!(elem.hierarchy && elem.hierarchy.length),
  15012. parent,
  15013. randSeed = Math.floor(Math.random() * 1e6),
  15014. globalData = elem.globalData;
  15015. function executeExpression(e) {
  15016. return (
  15017. (value = e),
  15018. this.frameExpressionId === elem.globalData.frameId &&
  15019. this.propType !== 'textSelector'
  15020. ? value
  15021. : (this.propType === 'textSelector' &&
  15022. ((textIndex = this.textIndex),
  15023. (textTotal = this.textTotal),
  15024. (selectorValue = this.selectorValue)),
  15025. thisLayer ||
  15026. ((text = elem.layerInterface.text),
  15027. (thisLayer = elem.layerInterface),
  15028. (thisComp = elem.comp.compInterface),
  15029. (toWorld = thisLayer.toWorld.bind(thisLayer)),
  15030. (fromWorld = thisLayer.fromWorld.bind(thisLayer)),
  15031. (fromComp = thisLayer.fromComp.bind(thisLayer)),
  15032. (toComp = thisLayer.toComp.bind(thisLayer)),
  15033. (mask = thisLayer.mask
  15034. ? thisLayer.mask.bind(thisLayer)
  15035. : null),
  15036. (fromCompToSurface = fromComp)),
  15037. transform ||
  15038. ((transform = elem.layerInterface(
  15039. 'ADBE Transform Group'
  15040. )),
  15041. ($bm_transform = transform),
  15042. transform && (anchorPoint = transform.anchorPoint)),
  15043. elemType === 4 &&
  15044. !content &&
  15045. (content = thisLayer('ADBE Root Vectors Group')),
  15046. effect || (effect = thisLayer(4)),
  15047. (hasParent = !!(elem.hierarchy && elem.hierarchy.length)),
  15048. hasParent &&
  15049. !parent &&
  15050. (parent = elem.hierarchy[0].layerInterface),
  15051. (time =
  15052. this.comp.renderedFrame / this.comp.globalData.frameRate),
  15053. _needsRandom && seedRandom(randSeed + time),
  15054. needsVelocity && (velocity = velocityAtTime(time)),
  15055. expression_function(),
  15056. (this.frameExpressionId = elem.globalData.frameId),
  15057. (scoped_bm_rt =
  15058. scoped_bm_rt.propType === propTypes.SHAPE
  15059. ? scoped_bm_rt.v
  15060. : scoped_bm_rt),
  15061. scoped_bm_rt)
  15062. );
  15063. }
  15064. return (
  15065. (executeExpression.__preventDeadCodeRemoval = [
  15066. $bm_transform,
  15067. anchorPoint,
  15068. time,
  15069. velocity,
  15070. inPoint,
  15071. outPoint,
  15072. width,
  15073. height,
  15074. name,
  15075. loop_in,
  15076. loop_out,
  15077. smooth,
  15078. toComp,
  15079. fromCompToSurface,
  15080. toWorld,
  15081. fromWorld,
  15082. mask,
  15083. position,
  15084. rotation,
  15085. scale,
  15086. thisComp,
  15087. numKeys,
  15088. active,
  15089. wiggle,
  15090. loopInDuration,
  15091. loopOutDuration,
  15092. comp,
  15093. lookAt,
  15094. easeOut,
  15095. easeIn,
  15096. ease,
  15097. nearestKey,
  15098. key,
  15099. text,
  15100. textIndex,
  15101. textTotal,
  15102. selectorValue,
  15103. framesToTime,
  15104. timeToFrames,
  15105. sourceRectAtTime,
  15106. substring,
  15107. substr,
  15108. posterizeTime,
  15109. index,
  15110. globalData
  15111. ]),
  15112. executeExpression
  15113. );
  15114. }
  15115. return (
  15116. (ob.initiateExpression = initiateExpression),
  15117. (ob.__preventDeadCodeRemoval = [
  15118. window,
  15119. document,
  15120. XMLHttpRequest,
  15121. fetch,
  15122. frames,
  15123. $bm_neg,
  15124. add,
  15125. $bm_sum,
  15126. $bm_sub,
  15127. $bm_mul,
  15128. $bm_div,
  15129. $bm_mod,
  15130. clamp,
  15131. radians_to_degrees,
  15132. degreesToRadians,
  15133. degrees_to_radians,
  15134. normalize,
  15135. rgbToHsl,
  15136. hslToRgb,
  15137. linear,
  15138. random,
  15139. createPath
  15140. ]),
  15141. ob
  15142. );
  15143. })(),
  15144. expressionHelpers = (function () {
  15145. function e(a, o, l) {
  15146. o.x &&
  15147. ((l.k = !0),
  15148. (l.x = !0),
  15149. (l.initiateExpression = ExpressionManager.initiateExpression),
  15150. l.effectsSequence.push(l.initiateExpression(a, o, l).bind(l)));
  15151. }
  15152. function t(a) {
  15153. return (
  15154. (a *= this.elem.globalData.frameRate),
  15155. (a -= this.offsetTime),
  15156. a !== this._cachingAtTime.lastFrame &&
  15157. ((this._cachingAtTime.lastIndex =
  15158. this._cachingAtTime.lastFrame < a
  15159. ? this._cachingAtTime.lastIndex
  15160. : 0),
  15161. (this._cachingAtTime.value = this.interpolateValue(
  15162. a,
  15163. this._cachingAtTime
  15164. )),
  15165. (this._cachingAtTime.lastFrame = a)),
  15166. this._cachingAtTime.value
  15167. );
  15168. }
  15169. function r(a) {
  15170. var o = -0.01,
  15171. l = this.getValueAtTime(a),
  15172. c = this.getValueAtTime(a + o),
  15173. g = 0;
  15174. if (l.length) {
  15175. var S;
  15176. for (S = 0; S < l.length; S += 1) g += Math.pow(c[S] - l[S], 2);
  15177. g = Math.sqrt(g) * 100;
  15178. } else g = 0;
  15179. return g;
  15180. }
  15181. function i(a) {
  15182. if (this.vel !== void 0) return this.vel;
  15183. var o = -0.001,
  15184. l = this.getValueAtTime(a),
  15185. c = this.getValueAtTime(a + o),
  15186. g;
  15187. if (l.length) {
  15188. g = createTypedArray('float32', l.length);
  15189. var S;
  15190. for (S = 0; S < l.length; S += 1) g[S] = (c[S] - l[S]) / o;
  15191. } else g = (c - l) / o;
  15192. return g;
  15193. }
  15194. function s() {
  15195. return this.pv;
  15196. }
  15197. function n(a) {
  15198. this.propertyGroup = a;
  15199. }
  15200. return {
  15201. searchExpressions: e,
  15202. getSpeedAtTime: r,
  15203. getVelocityAtTime: i,
  15204. getValueAtTime: t,
  15205. getStaticValueAtTime: s,
  15206. setGroupProperty: n
  15207. };
  15208. })();
  15209. function addPropertyDecorator() {
  15210. function e(p, P, b) {
  15211. if (!this.k || !this.keyframes) return this.pv;
  15212. p = p ? p.toLowerCase() : '';
  15213. var y = this.comp.renderedFrame,
  15214. A = this.keyframes,
  15215. u = A[A.length - 1].t;
  15216. if (y <= u) return this.pv;
  15217. var f, m;
  15218. b
  15219. ? (P
  15220. ? (f = Math.abs(u - this.elem.comp.globalData.frameRate * P))
  15221. : (f = Math.max(0, u - this.elem.data.ip)),
  15222. (m = u - f))
  15223. : ((!P || P > A.length - 1) && (P = A.length - 1),
  15224. (m = A[A.length - 1 - P].t),
  15225. (f = u - m));
  15226. var d, E, T;
  15227. if (p === 'pingpong') {
  15228. var x = Math.floor((y - m) / f);
  15229. if (x % 2 !== 0)
  15230. return this.getValueAtTime(
  15231. (f - ((y - m) % f) + m) / this.comp.globalData.frameRate,
  15232. 0
  15233. );
  15234. } else if (p === 'offset') {
  15235. var _ = this.getValueAtTime(m / this.comp.globalData.frameRate, 0),
  15236. I = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  15237. V = this.getValueAtTime(
  15238. (((y - m) % f) + m) / this.comp.globalData.frameRate,
  15239. 0
  15240. ),
  15241. D = Math.floor((y - m) / f);
  15242. if (this.pv.length) {
  15243. for (T = new Array(_.length), E = T.length, d = 0; d < E; d += 1)
  15244. T[d] = (I[d] - _[d]) * D + V[d];
  15245. return T;
  15246. }
  15247. return (I - _) * D + V;
  15248. } else if (p === 'continue') {
  15249. var N = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  15250. $ = this.getValueAtTime(
  15251. (u - 0.001) / this.comp.globalData.frameRate,
  15252. 0
  15253. );
  15254. if (this.pv.length) {
  15255. for (T = new Array(N.length), E = T.length, d = 0; d < E; d += 1)
  15256. T[d] =
  15257. N[d] +
  15258. ((N[d] - $[d]) * ((y - u) / this.comp.globalData.frameRate)) /
  15259. 5e-4;
  15260. return T;
  15261. }
  15262. return N + (N - $) * ((y - u) / 0.001);
  15263. }
  15264. return this.getValueAtTime(
  15265. (((y - m) % f) + m) / this.comp.globalData.frameRate,
  15266. 0
  15267. );
  15268. }
  15269. function t(p, P, b) {
  15270. if (!this.k) return this.pv;
  15271. p = p ? p.toLowerCase() : '';
  15272. var y = this.comp.renderedFrame,
  15273. A = this.keyframes,
  15274. u = A[0].t;
  15275. if (y >= u) return this.pv;
  15276. var f, m;
  15277. b
  15278. ? (P
  15279. ? (f = Math.abs(this.elem.comp.globalData.frameRate * P))
  15280. : (f = Math.max(0, this.elem.data.op - u)),
  15281. (m = u + f))
  15282. : ((!P || P > A.length - 1) && (P = A.length - 1),
  15283. (m = A[P].t),
  15284. (f = m - u));
  15285. var d, E, T;
  15286. if (p === 'pingpong') {
  15287. var x = Math.floor((u - y) / f);
  15288. if (x % 2 === 0)
  15289. return this.getValueAtTime(
  15290. (((u - y) % f) + u) / this.comp.globalData.frameRate,
  15291. 0
  15292. );
  15293. } else if (p === 'offset') {
  15294. var _ = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  15295. I = this.getValueAtTime(m / this.comp.globalData.frameRate, 0),
  15296. V = this.getValueAtTime(
  15297. (f - ((u - y) % f) + u) / this.comp.globalData.frameRate,
  15298. 0
  15299. ),
  15300. D = Math.floor((u - y) / f) + 1;
  15301. if (this.pv.length) {
  15302. for (T = new Array(_.length), E = T.length, d = 0; d < E; d += 1)
  15303. T[d] = V[d] - (I[d] - _[d]) * D;
  15304. return T;
  15305. }
  15306. return V - (I - _) * D;
  15307. } else if (p === 'continue') {
  15308. var N = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  15309. $ = this.getValueAtTime(
  15310. (u + 0.001) / this.comp.globalData.frameRate,
  15311. 0
  15312. );
  15313. if (this.pv.length) {
  15314. for (T = new Array(N.length), E = T.length, d = 0; d < E; d += 1)
  15315. T[d] = N[d] + ((N[d] - $[d]) * (u - y)) / 0.001;
  15316. return T;
  15317. }
  15318. return N + ((N - $) * (u - y)) / 0.001;
  15319. }
  15320. return this.getValueAtTime(
  15321. (f - (((u - y) % f) + u)) / this.comp.globalData.frameRate,
  15322. 0
  15323. );
  15324. }
  15325. function r(p, P) {
  15326. if (!this.k) return this.pv;
  15327. if (((p = (p || 0.4) * 0.5), (P = Math.floor(P || 5)), P <= 1))
  15328. return this.pv;
  15329. var b = this.comp.renderedFrame / this.comp.globalData.frameRate,
  15330. y = b - p,
  15331. A = b + p,
  15332. u = P > 1 ? (A - y) / (P - 1) : 1,
  15333. f = 0,
  15334. m = 0,
  15335. d;
  15336. this.pv.length
  15337. ? (d = createTypedArray('float32', this.pv.length))
  15338. : (d = 0);
  15339. for (var E; f < P; ) {
  15340. if (((E = this.getValueAtTime(y + f * u)), this.pv.length))
  15341. for (m = 0; m < this.pv.length; m += 1) d[m] += E[m];
  15342. else d += E;
  15343. f += 1;
  15344. }
  15345. if (this.pv.length) for (m = 0; m < this.pv.length; m += 1) d[m] /= P;
  15346. else d /= P;
  15347. return d;
  15348. }
  15349. function i(p) {
  15350. this._transformCachingAtTime ||
  15351. (this._transformCachingAtTime = { v: new Matrix() });
  15352. var P = this._transformCachingAtTime.v;
  15353. if (
  15354. (P.cloneFromProps(this.pre.props), this.appliedTransformations < 1)
  15355. ) {
  15356. var b = this.a.getValueAtTime(p);
  15357. P.translate(
  15358. -b[0] * this.a.mult,
  15359. -b[1] * this.a.mult,
  15360. b[2] * this.a.mult
  15361. );
  15362. }
  15363. if (this.appliedTransformations < 2) {
  15364. var y = this.s.getValueAtTime(p);
  15365. P.scale(y[0] * this.s.mult, y[1] * this.s.mult, y[2] * this.s.mult);
  15366. }
  15367. if (this.sk && this.appliedTransformations < 3) {
  15368. var A = this.sk.getValueAtTime(p),
  15369. u = this.sa.getValueAtTime(p);
  15370. P.skewFromAxis(-A * this.sk.mult, u * this.sa.mult);
  15371. }
  15372. if (this.r && this.appliedTransformations < 4) {
  15373. var f = this.r.getValueAtTime(p);
  15374. P.rotate(-f * this.r.mult);
  15375. } else if (!this.r && this.appliedTransformations < 4) {
  15376. var m = this.rz.getValueAtTime(p),
  15377. d = this.ry.getValueAtTime(p),
  15378. E = this.rx.getValueAtTime(p),
  15379. T = this.or.getValueAtTime(p);
  15380. P.rotateZ(-m * this.rz.mult)
  15381. .rotateY(d * this.ry.mult)
  15382. .rotateX(E * this.rx.mult)
  15383. .rotateZ(-T[2] * this.or.mult)
  15384. .rotateY(T[1] * this.or.mult)
  15385. .rotateX(T[0] * this.or.mult);
  15386. }
  15387. if (this.data.p && this.data.p.s) {
  15388. var x = this.px.getValueAtTime(p),
  15389. _ = this.py.getValueAtTime(p);
  15390. if (this.data.p.z) {
  15391. var I = this.pz.getValueAtTime(p);
  15392. P.translate(
  15393. x * this.px.mult,
  15394. _ * this.py.mult,
  15395. -I * this.pz.mult
  15396. );
  15397. } else P.translate(x * this.px.mult, _ * this.py.mult, 0);
  15398. } else {
  15399. var V = this.p.getValueAtTime(p);
  15400. P.translate(
  15401. V[0] * this.p.mult,
  15402. V[1] * this.p.mult,
  15403. -V[2] * this.p.mult
  15404. );
  15405. }
  15406. return P;
  15407. }
  15408. function s() {
  15409. return this.v.clone(new Matrix());
  15410. }
  15411. var n = TransformPropertyFactory.getTransformProperty;
  15412. TransformPropertyFactory.getTransformProperty = function (p, P, b) {
  15413. var y = n(p, P, b);
  15414. return (
  15415. y.dynamicProperties.length
  15416. ? (y.getValueAtTime = i.bind(y))
  15417. : (y.getValueAtTime = s.bind(y)),
  15418. (y.setGroupProperty = expressionHelpers.setGroupProperty),
  15419. y
  15420. );
  15421. };
  15422. var a = PropertyFactory.getProp;
  15423. PropertyFactory.getProp = function (p, P, b, y, A) {
  15424. var u = a(p, P, b, y, A);
  15425. u.kf
  15426. ? (u.getValueAtTime = expressionHelpers.getValueAtTime.bind(u))
  15427. : (u.getValueAtTime =
  15428. expressionHelpers.getStaticValueAtTime.bind(u)),
  15429. (u.setGroupProperty = expressionHelpers.setGroupProperty),
  15430. (u.loopOut = e),
  15431. (u.loopIn = t),
  15432. (u.smooth = r),
  15433. (u.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(u)),
  15434. (u.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(u)),
  15435. (u.numKeys = P.a === 1 ? P.k.length : 0),
  15436. (u.propertyIndex = P.ix);
  15437. var f = 0;
  15438. return (
  15439. b !== 0 &&
  15440. (f = createTypedArray(
  15441. 'float32',
  15442. P.a === 1 ? P.k[0].s.length : P.k.length
  15443. )),
  15444. (u._cachingAtTime = {
  15445. lastFrame: initialDefaultFrame,
  15446. lastIndex: 0,
  15447. value: f
  15448. }),
  15449. expressionHelpers.searchExpressions(p, P, u),
  15450. u.k && A.addDynamicProperty(u),
  15451. u
  15452. );
  15453. };
  15454. function o(p) {
  15455. return (
  15456. this._cachingAtTime ||
  15457. (this._cachingAtTime = {
  15458. shapeValue: shapePool.clone(this.pv),
  15459. lastIndex: 0,
  15460. lastTime: initialDefaultFrame
  15461. }),
  15462. (p *= this.elem.globalData.frameRate),
  15463. (p -= this.offsetTime),
  15464. p !== this._cachingAtTime.lastTime &&
  15465. ((this._cachingAtTime.lastIndex =
  15466. this._cachingAtTime.lastTime < p ? this._caching.lastIndex : 0),
  15467. (this._cachingAtTime.lastTime = p),
  15468. this.interpolateShape(
  15469. p,
  15470. this._cachingAtTime.shapeValue,
  15471. this._cachingAtTime
  15472. )),
  15473. this._cachingAtTime.shapeValue
  15474. );
  15475. }
  15476. var l = ShapePropertyFactory.getConstructorFunction(),
  15477. c = ShapePropertyFactory.getKeyframedConstructorFunction();
  15478. function g() {}
  15479. (g.prototype = {
  15480. vertices: function (P, b) {
  15481. this.k && this.getValue();
  15482. var y = this.v;
  15483. b !== void 0 && (y = this.getValueAtTime(b, 0));
  15484. var A,
  15485. u = y._length,
  15486. f = y[P],
  15487. m = y.v,
  15488. d = createSizedArray(u);
  15489. for (A = 0; A < u; A += 1)
  15490. P === 'i' || P === 'o'
  15491. ? (d[A] = [f[A][0] - m[A][0], f[A][1] - m[A][1]])
  15492. : (d[A] = [f[A][0], f[A][1]]);
  15493. return d;
  15494. },
  15495. points: function (P) {
  15496. return this.vertices('v', P);
  15497. },
  15498. inTangents: function (P) {
  15499. return this.vertices('i', P);
  15500. },
  15501. outTangents: function (P) {
  15502. return this.vertices('o', P);
  15503. },
  15504. isClosed: function () {
  15505. return this.v.c;
  15506. },
  15507. pointOnPath: function (P, b) {
  15508. var y = this.v;
  15509. b !== void 0 && (y = this.getValueAtTime(b, 0)),
  15510. this._segmentsLength ||
  15511. (this._segmentsLength = bez.getSegmentsLength(y));
  15512. for (
  15513. var A = this._segmentsLength,
  15514. u = A.lengths,
  15515. f = A.totalLength * P,
  15516. m = 0,
  15517. d = u.length,
  15518. E = 0,
  15519. T;
  15520. m < d;
  15521. ) {
  15522. if (E + u[m].addedLength > f) {
  15523. var x = m,
  15524. _ = y.c && m === d - 1 ? 0 : m + 1,
  15525. I = (f - E) / u[m].addedLength;
  15526. T = bez.getPointInSegment(
  15527. y.v[x],
  15528. y.v[_],
  15529. y.o[x],
  15530. y.i[_],
  15531. I,
  15532. u[m]
  15533. );
  15534. break;
  15535. } else E += u[m].addedLength;
  15536. m += 1;
  15537. }
  15538. return (
  15539. T ||
  15540. (T = y.c
  15541. ? [y.v[0][0], y.v[0][1]]
  15542. : [y.v[y._length - 1][0], y.v[y._length - 1][1]]),
  15543. T
  15544. );
  15545. },
  15546. vectorOnPath: function (P, b, y) {
  15547. P == 1 ? (P = this.v.c) : P == 0 && (P = 0.999);
  15548. var A = this.pointOnPath(P, b),
  15549. u = this.pointOnPath(P + 0.001, b),
  15550. f = u[0] - A[0],
  15551. m = u[1] - A[1],
  15552. d = Math.sqrt(Math.pow(f, 2) + Math.pow(m, 2));
  15553. if (d === 0) return [0, 0];
  15554. var E = y === 'tangent' ? [f / d, m / d] : [-m / d, f / d];
  15555. return E;
  15556. },
  15557. tangentOnPath: function (P, b) {
  15558. return this.vectorOnPath(P, b, 'tangent');
  15559. },
  15560. normalOnPath: function (P, b) {
  15561. return this.vectorOnPath(P, b, 'normal');
  15562. },
  15563. setGroupProperty: expressionHelpers.setGroupProperty,
  15564. getValueAtTime: expressionHelpers.getStaticValueAtTime
  15565. }),
  15566. extendPrototype([g], l),
  15567. extendPrototype([g], c),
  15568. (c.prototype.getValueAtTime = o),
  15569. (c.prototype.initiateExpression =
  15570. ExpressionManager.initiateExpression);
  15571. var S = ShapePropertyFactory.getShapeProp;
  15572. ShapePropertyFactory.getShapeProp = function (p, P, b, y, A) {
  15573. var u = S(p, P, b, y, A);
  15574. return (
  15575. (u.propertyIndex = P.ix),
  15576. (u.lock = !1),
  15577. b === 3
  15578. ? expressionHelpers.searchExpressions(p, P.pt, u)
  15579. : b === 4 && expressionHelpers.searchExpressions(p, P.ks, u),
  15580. u.k && p.addDynamicProperty(u),
  15581. u
  15582. );
  15583. };
  15584. }
  15585. function initialize$1() {
  15586. addPropertyDecorator();
  15587. }
  15588. function addDecorator() {
  15589. function e() {
  15590. return this.data.d.x
  15591. ? ((this.calculateExpression =
  15592. ExpressionManager.initiateExpression.bind(this)(
  15593. this.elem,
  15594. this.data.d,
  15595. this
  15596. )),
  15597. this.addEffect(this.getExpressionValue.bind(this)),
  15598. !0)
  15599. : null;
  15600. }
  15601. (TextProperty.prototype.getExpressionValue = function (t, r) {
  15602. var i = this.calculateExpression(r);
  15603. if (t.t !== i) {
  15604. var s = {};
  15605. return (
  15606. this.copyData(s, t), (s.t = i.toString()), (s.__complete = !1), s
  15607. );
  15608. }
  15609. return t;
  15610. }),
  15611. (TextProperty.prototype.searchProperty = function () {
  15612. var t = this.searchKeyframes(),
  15613. r = this.searchExpressions();
  15614. return (this.kf = t || r), this.kf;
  15615. }),
  15616. (TextProperty.prototype.searchExpressions = e);
  15617. }
  15618. function initialize() {
  15619. addDecorator();
  15620. }
  15621. function SVGComposableEffect() {}
  15622. SVGComposableEffect.prototype = {
  15623. createMergeNode: function e(t, r) {
  15624. var i = createNS('feMerge');
  15625. i.setAttribute('result', t);
  15626. var s, n;
  15627. for (n = 0; n < r.length; n += 1)
  15628. (s = createNS('feMergeNode')),
  15629. s.setAttribute('in', r[n]),
  15630. i.appendChild(s),
  15631. i.appendChild(s);
  15632. return i;
  15633. }
  15634. };
  15635. var linearFilterValue =
  15636. '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0';
  15637. function SVGTintFilter(e, t, r, i, s) {
  15638. this.filterManager = t;
  15639. var n = createNS('feColorMatrix');
  15640. n.setAttribute('type', 'matrix'),
  15641. n.setAttribute('color-interpolation-filters', 'linearRGB'),
  15642. n.setAttribute('values', linearFilterValue + ' 1 0'),
  15643. (this.linearFilter = n),
  15644. n.setAttribute('result', i + '_tint_1'),
  15645. e.appendChild(n),
  15646. (n = createNS('feColorMatrix')),
  15647. n.setAttribute('type', 'matrix'),
  15648. n.setAttribute('color-interpolation-filters', 'sRGB'),
  15649. n.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'),
  15650. n.setAttribute('result', i + '_tint_2'),
  15651. e.appendChild(n),
  15652. (this.matrixFilter = n);
  15653. var a = this.createMergeNode(i, [s, i + '_tint_1', i + '_tint_2']);
  15654. e.appendChild(a);
  15655. }
  15656. extendPrototype([SVGComposableEffect], SVGTintFilter),
  15657. (SVGTintFilter.prototype.renderFrame = function (e) {
  15658. if (e || this.filterManager._mdf) {
  15659. var t = this.filterManager.effectElements[0].p.v,
  15660. r = this.filterManager.effectElements[1].p.v,
  15661. i = this.filterManager.effectElements[2].p.v / 100;
  15662. this.linearFilter.setAttribute(
  15663. 'values',
  15664. linearFilterValue + ' ' + i + ' 0'
  15665. ),
  15666. this.matrixFilter.setAttribute(
  15667. 'values',
  15668. r[0] -
  15669. t[0] +
  15670. ' 0 0 0 ' +
  15671. t[0] +
  15672. ' ' +
  15673. (r[1] - t[1]) +
  15674. ' 0 0 0 ' +
  15675. t[1] +
  15676. ' ' +
  15677. (r[2] - t[2]) +
  15678. ' 0 0 0 ' +
  15679. t[2] +
  15680. ' 0 0 0 1 0'
  15681. );
  15682. }
  15683. });
  15684. function SVGFillFilter(e, t, r, i) {
  15685. this.filterManager = t;
  15686. var s = createNS('feColorMatrix');
  15687. s.setAttribute('type', 'matrix'),
  15688. s.setAttribute('color-interpolation-filters', 'sRGB'),
  15689. s.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'),
  15690. s.setAttribute('result', i),
  15691. e.appendChild(s),
  15692. (this.matrixFilter = s);
  15693. }
  15694. SVGFillFilter.prototype.renderFrame = function (e) {
  15695. if (e || this.filterManager._mdf) {
  15696. var t = this.filterManager.effectElements[2].p.v,
  15697. r = this.filterManager.effectElements[6].p.v;
  15698. this.matrixFilter.setAttribute(
  15699. 'values',
  15700. '0 0 0 0 ' +
  15701. t[0] +
  15702. ' 0 0 0 0 ' +
  15703. t[1] +
  15704. ' 0 0 0 0 ' +
  15705. t[2] +
  15706. ' 0 0 0 ' +
  15707. r +
  15708. ' 0'
  15709. );
  15710. }
  15711. };
  15712. function SVGStrokeEffect(e, t, r) {
  15713. (this.initialized = !1),
  15714. (this.filterManager = t),
  15715. (this.elem = r),
  15716. (this.paths = []);
  15717. }
  15718. (SVGStrokeEffect.prototype.initialize = function () {
  15719. var e =
  15720. this.elem.layerElement.children ||
  15721. this.elem.layerElement.childNodes,
  15722. t,
  15723. r,
  15724. i,
  15725. s;
  15726. for (
  15727. this.filterManager.effectElements[1].p.v === 1
  15728. ? ((s = this.elem.maskManager.masksProperties.length), (i = 0))
  15729. : ((i = this.filterManager.effectElements[0].p.v - 1), (s = i + 1)),
  15730. r = createNS('g'),
  15731. r.setAttribute('fill', 'none'),
  15732. r.setAttribute('stroke-linecap', 'round'),
  15733. r.setAttribute('stroke-dashoffset', 1),
  15734. i;
  15735. i < s;
  15736. i += 1
  15737. )
  15738. (t = createNS('path')),
  15739. r.appendChild(t),
  15740. this.paths.push({ p: t, m: i });
  15741. if (this.filterManager.effectElements[10].p.v === 3) {
  15742. var n = createNS('mask'),
  15743. a = createElementID();
  15744. n.setAttribute('id', a),
  15745. n.setAttribute('mask-type', 'alpha'),
  15746. n.appendChild(r),
  15747. this.elem.globalData.defs.appendChild(n);
  15748. var o = createNS('g');
  15749. for (
  15750. o.setAttribute('mask', 'url(' + getLocationHref() + '#' + a + ')');
  15751. e[0];
  15752. )
  15753. o.appendChild(e[0]);
  15754. this.elem.layerElement.appendChild(o),
  15755. (this.masker = n),
  15756. r.setAttribute('stroke', '#fff');
  15757. } else if (
  15758. this.filterManager.effectElements[10].p.v === 1 ||
  15759. this.filterManager.effectElements[10].p.v === 2
  15760. ) {
  15761. if (this.filterManager.effectElements[10].p.v === 2)
  15762. for (
  15763. e =
  15764. this.elem.layerElement.children ||
  15765. this.elem.layerElement.childNodes;
  15766. e.length;
  15767. )
  15768. this.elem.layerElement.removeChild(e[0]);
  15769. this.elem.layerElement.appendChild(r),
  15770. this.elem.layerElement.removeAttribute('mask'),
  15771. r.setAttribute('stroke', '#fff');
  15772. }
  15773. (this.initialized = !0), (this.pathMasker = r);
  15774. }),
  15775. (SVGStrokeEffect.prototype.renderFrame = function (e) {
  15776. this.initialized || this.initialize();
  15777. var t,
  15778. r = this.paths.length,
  15779. i,
  15780. s;
  15781. for (t = 0; t < r; t += 1)
  15782. if (
  15783. this.paths[t].m !== -1 &&
  15784. ((i = this.elem.maskManager.viewData[this.paths[t].m]),
  15785. (s = this.paths[t].p),
  15786. (e || this.filterManager._mdf || i.prop._mdf) &&
  15787. s.setAttribute('d', i.lastPath),
  15788. e ||
  15789. this.filterManager.effectElements[9].p._mdf ||
  15790. this.filterManager.effectElements[4].p._mdf ||
  15791. this.filterManager.effectElements[7].p._mdf ||
  15792. this.filterManager.effectElements[8].p._mdf ||
  15793. i.prop._mdf)
  15794. ) {
  15795. var n;
  15796. if (
  15797. this.filterManager.effectElements[7].p.v !== 0 ||
  15798. this.filterManager.effectElements[8].p.v !== 100
  15799. ) {
  15800. var a =
  15801. Math.min(
  15802. this.filterManager.effectElements[7].p.v,
  15803. this.filterManager.effectElements[8].p.v
  15804. ) * 0.01,
  15805. o =
  15806. Math.max(
  15807. this.filterManager.effectElements[7].p.v,
  15808. this.filterManager.effectElements[8].p.v
  15809. ) * 0.01,
  15810. l = s.getTotalLength();
  15811. n = '0 0 0 ' + l * a + ' ';
  15812. var c = l * (o - a),
  15813. g =
  15814. 1 +
  15815. this.filterManager.effectElements[4].p.v *
  15816. 2 *
  15817. this.filterManager.effectElements[9].p.v *
  15818. 0.01,
  15819. S = Math.floor(c / g),
  15820. p;
  15821. for (p = 0; p < S; p += 1)
  15822. n +=
  15823. '1 ' +
  15824. this.filterManager.effectElements[4].p.v *
  15825. 2 *
  15826. this.filterManager.effectElements[9].p.v *
  15827. 0.01 +
  15828. ' ';
  15829. n += '0 ' + l * 10 + ' 0 0';
  15830. } else
  15831. n =
  15832. '1 ' +
  15833. this.filterManager.effectElements[4].p.v *
  15834. 2 *
  15835. this.filterManager.effectElements[9].p.v *
  15836. 0.01;
  15837. s.setAttribute('stroke-dasharray', n);
  15838. }
  15839. if (
  15840. ((e || this.filterManager.effectElements[4].p._mdf) &&
  15841. this.pathMasker.setAttribute(
  15842. 'stroke-width',
  15843. this.filterManager.effectElements[4].p.v * 2
  15844. ),
  15845. (e || this.filterManager.effectElements[6].p._mdf) &&
  15846. this.pathMasker.setAttribute(
  15847. 'opacity',
  15848. this.filterManager.effectElements[6].p.v
  15849. ),
  15850. (this.filterManager.effectElements[10].p.v === 1 ||
  15851. this.filterManager.effectElements[10].p.v === 2) &&
  15852. (e || this.filterManager.effectElements[3].p._mdf))
  15853. ) {
  15854. var P = this.filterManager.effectElements[3].p.v;
  15855. this.pathMasker.setAttribute(
  15856. 'stroke',
  15857. 'rgb(' +
  15858. bmFloor(P[0] * 255) +
  15859. ',' +
  15860. bmFloor(P[1] * 255) +
  15861. ',' +
  15862. bmFloor(P[2] * 255) +
  15863. ')'
  15864. );
  15865. }
  15866. });
  15867. function SVGTritoneFilter(e, t, r, i) {
  15868. this.filterManager = t;
  15869. var s = createNS('feColorMatrix');
  15870. s.setAttribute('type', 'matrix'),
  15871. s.setAttribute('color-interpolation-filters', 'linearRGB'),
  15872. s.setAttribute(
  15873. 'values',
  15874. '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'
  15875. ),
  15876. e.appendChild(s);
  15877. var n = createNS('feComponentTransfer');
  15878. n.setAttribute('color-interpolation-filters', 'sRGB'),
  15879. n.setAttribute('result', i),
  15880. (this.matrixFilter = n);
  15881. var a = createNS('feFuncR');
  15882. a.setAttribute('type', 'table'), n.appendChild(a), (this.feFuncR = a);
  15883. var o = createNS('feFuncG');
  15884. o.setAttribute('type', 'table'), n.appendChild(o), (this.feFuncG = o);
  15885. var l = createNS('feFuncB');
  15886. l.setAttribute('type', 'table'),
  15887. n.appendChild(l),
  15888. (this.feFuncB = l),
  15889. e.appendChild(n);
  15890. }
  15891. SVGTritoneFilter.prototype.renderFrame = function (e) {
  15892. if (e || this.filterManager._mdf) {
  15893. var t = this.filterManager.effectElements[0].p.v,
  15894. r = this.filterManager.effectElements[1].p.v,
  15895. i = this.filterManager.effectElements[2].p.v,
  15896. s = i[0] + ' ' + r[0] + ' ' + t[0],
  15897. n = i[1] + ' ' + r[1] + ' ' + t[1],
  15898. a = i[2] + ' ' + r[2] + ' ' + t[2];
  15899. this.feFuncR.setAttribute('tableValues', s),
  15900. this.feFuncG.setAttribute('tableValues', n),
  15901. this.feFuncB.setAttribute('tableValues', a);
  15902. }
  15903. };
  15904. function SVGProLevelsFilter(e, t, r, i) {
  15905. this.filterManager = t;
  15906. var s = this.filterManager.effectElements,
  15907. n = createNS('feComponentTransfer');
  15908. (s[10].p.k ||
  15909. s[10].p.v !== 0 ||
  15910. s[11].p.k ||
  15911. s[11].p.v !== 1 ||
  15912. s[12].p.k ||
  15913. s[12].p.v !== 1 ||
  15914. s[13].p.k ||
  15915. s[13].p.v !== 0 ||
  15916. s[14].p.k ||
  15917. s[14].p.v !== 1) &&
  15918. (this.feFuncR = this.createFeFunc('feFuncR', n)),
  15919. (s[17].p.k ||
  15920. s[17].p.v !== 0 ||
  15921. s[18].p.k ||
  15922. s[18].p.v !== 1 ||
  15923. s[19].p.k ||
  15924. s[19].p.v !== 1 ||
  15925. s[20].p.k ||
  15926. s[20].p.v !== 0 ||
  15927. s[21].p.k ||
  15928. s[21].p.v !== 1) &&
  15929. (this.feFuncG = this.createFeFunc('feFuncG', n)),
  15930. (s[24].p.k ||
  15931. s[24].p.v !== 0 ||
  15932. s[25].p.k ||
  15933. s[25].p.v !== 1 ||
  15934. s[26].p.k ||
  15935. s[26].p.v !== 1 ||
  15936. s[27].p.k ||
  15937. s[27].p.v !== 0 ||
  15938. s[28].p.k ||
  15939. s[28].p.v !== 1) &&
  15940. (this.feFuncB = this.createFeFunc('feFuncB', n)),
  15941. (s[31].p.k ||
  15942. s[31].p.v !== 0 ||
  15943. s[32].p.k ||
  15944. s[32].p.v !== 1 ||
  15945. s[33].p.k ||
  15946. s[33].p.v !== 1 ||
  15947. s[34].p.k ||
  15948. s[34].p.v !== 0 ||
  15949. s[35].p.k ||
  15950. s[35].p.v !== 1) &&
  15951. (this.feFuncA = this.createFeFunc('feFuncA', n)),
  15952. (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) &&
  15953. (n.setAttribute('color-interpolation-filters', 'sRGB'),
  15954. e.appendChild(n)),
  15955. (s[3].p.k ||
  15956. s[3].p.v !== 0 ||
  15957. s[4].p.k ||
  15958. s[4].p.v !== 1 ||
  15959. s[5].p.k ||
  15960. s[5].p.v !== 1 ||
  15961. s[6].p.k ||
  15962. s[6].p.v !== 0 ||
  15963. s[7].p.k ||
  15964. s[7].p.v !== 1) &&
  15965. ((n = createNS('feComponentTransfer')),
  15966. n.setAttribute('color-interpolation-filters', 'sRGB'),
  15967. n.setAttribute('result', i),
  15968. e.appendChild(n),
  15969. (this.feFuncRComposed = this.createFeFunc('feFuncR', n)),
  15970. (this.feFuncGComposed = this.createFeFunc('feFuncG', n)),
  15971. (this.feFuncBComposed = this.createFeFunc('feFuncB', n)));
  15972. }
  15973. (SVGProLevelsFilter.prototype.createFeFunc = function (e, t) {
  15974. var r = createNS(e);
  15975. return r.setAttribute('type', 'table'), t.appendChild(r), r;
  15976. }),
  15977. (SVGProLevelsFilter.prototype.getTableValue = function (e, t, r, i, s) {
  15978. for (
  15979. var n = 0,
  15980. a = 256,
  15981. o,
  15982. l = Math.min(e, t),
  15983. c = Math.max(e, t),
  15984. g = Array.call(null, { length: a }),
  15985. S,
  15986. p = 0,
  15987. P = s - i,
  15988. b = t - e;
  15989. n <= 256;
  15990. )
  15991. (o = n / 256),
  15992. o <= l
  15993. ? (S = b < 0 ? s : i)
  15994. : o >= c
  15995. ? (S = b < 0 ? i : s)
  15996. : (S = i + P * Math.pow((o - e) / b, 1 / r)),
  15997. (g[p] = S),
  15998. (p += 1),
  15999. (n += 256 / (a - 1));
  16000. return g.join(' ');
  16001. }),
  16002. (SVGProLevelsFilter.prototype.renderFrame = function (e) {
  16003. if (e || this.filterManager._mdf) {
  16004. var t,
  16005. r = this.filterManager.effectElements;
  16006. this.feFuncRComposed &&
  16007. (e ||
  16008. r[3].p._mdf ||
  16009. r[4].p._mdf ||
  16010. r[5].p._mdf ||
  16011. r[6].p._mdf ||
  16012. r[7].p._mdf) &&
  16013. ((t = this.getTableValue(
  16014. r[3].p.v,
  16015. r[4].p.v,
  16016. r[5].p.v,
  16017. r[6].p.v,
  16018. r[7].p.v
  16019. )),
  16020. this.feFuncRComposed.setAttribute('tableValues', t),
  16021. this.feFuncGComposed.setAttribute('tableValues', t),
  16022. this.feFuncBComposed.setAttribute('tableValues', t)),
  16023. this.feFuncR &&
  16024. (e ||
  16025. r[10].p._mdf ||
  16026. r[11].p._mdf ||
  16027. r[12].p._mdf ||
  16028. r[13].p._mdf ||
  16029. r[14].p._mdf) &&
  16030. ((t = this.getTableValue(
  16031. r[10].p.v,
  16032. r[11].p.v,
  16033. r[12].p.v,
  16034. r[13].p.v,
  16035. r[14].p.v
  16036. )),
  16037. this.feFuncR.setAttribute('tableValues', t)),
  16038. this.feFuncG &&
  16039. (e ||
  16040. r[17].p._mdf ||
  16041. r[18].p._mdf ||
  16042. r[19].p._mdf ||
  16043. r[20].p._mdf ||
  16044. r[21].p._mdf) &&
  16045. ((t = this.getTableValue(
  16046. r[17].p.v,
  16047. r[18].p.v,
  16048. r[19].p.v,
  16049. r[20].p.v,
  16050. r[21].p.v
  16051. )),
  16052. this.feFuncG.setAttribute('tableValues', t)),
  16053. this.feFuncB &&
  16054. (e ||
  16055. r[24].p._mdf ||
  16056. r[25].p._mdf ||
  16057. r[26].p._mdf ||
  16058. r[27].p._mdf ||
  16059. r[28].p._mdf) &&
  16060. ((t = this.getTableValue(
  16061. r[24].p.v,
  16062. r[25].p.v,
  16063. r[26].p.v,
  16064. r[27].p.v,
  16065. r[28].p.v
  16066. )),
  16067. this.feFuncB.setAttribute('tableValues', t)),
  16068. this.feFuncA &&
  16069. (e ||
  16070. r[31].p._mdf ||
  16071. r[32].p._mdf ||
  16072. r[33].p._mdf ||
  16073. r[34].p._mdf ||
  16074. r[35].p._mdf) &&
  16075. ((t = this.getTableValue(
  16076. r[31].p.v,
  16077. r[32].p.v,
  16078. r[33].p.v,
  16079. r[34].p.v,
  16080. r[35].p.v
  16081. )),
  16082. this.feFuncA.setAttribute('tableValues', t));
  16083. }
  16084. });
  16085. function SVGDropShadowEffect(e, t, r, i, s) {
  16086. var n = t.container.globalData.renderConfig.filterSize,
  16087. a = t.data.fs || n;
  16088. e.setAttribute('x', a.x || n.x),
  16089. e.setAttribute('y', a.y || n.y),
  16090. e.setAttribute('width', a.width || n.width),
  16091. e.setAttribute('height', a.height || n.height),
  16092. (this.filterManager = t);
  16093. var o = createNS('feGaussianBlur');
  16094. o.setAttribute('in', 'SourceAlpha'),
  16095. o.setAttribute('result', i + '_drop_shadow_1'),
  16096. o.setAttribute('stdDeviation', '0'),
  16097. (this.feGaussianBlur = o),
  16098. e.appendChild(o);
  16099. var l = createNS('feOffset');
  16100. l.setAttribute('dx', '25'),
  16101. l.setAttribute('dy', '0'),
  16102. l.setAttribute('in', i + '_drop_shadow_1'),
  16103. l.setAttribute('result', i + '_drop_shadow_2'),
  16104. (this.feOffset = l),
  16105. e.appendChild(l);
  16106. var c = createNS('feFlood');
  16107. c.setAttribute('flood-color', '#00ff00'),
  16108. c.setAttribute('flood-opacity', '1'),
  16109. c.setAttribute('result', i + '_drop_shadow_3'),
  16110. (this.feFlood = c),
  16111. e.appendChild(c);
  16112. var g = createNS('feComposite');
  16113. g.setAttribute('in', i + '_drop_shadow_3'),
  16114. g.setAttribute('in2', i + '_drop_shadow_2'),
  16115. g.setAttribute('operator', 'in'),
  16116. g.setAttribute('result', i + '_drop_shadow_4'),
  16117. e.appendChild(g);
  16118. var S = this.createMergeNode(i, [i + '_drop_shadow_4', s]);
  16119. e.appendChild(S);
  16120. }
  16121. extendPrototype([SVGComposableEffect], SVGDropShadowEffect),
  16122. (SVGDropShadowEffect.prototype.renderFrame = function (e) {
  16123. if (e || this.filterManager._mdf) {
  16124. if (
  16125. ((e || this.filterManager.effectElements[4].p._mdf) &&
  16126. this.feGaussianBlur.setAttribute(
  16127. 'stdDeviation',
  16128. this.filterManager.effectElements[4].p.v / 4
  16129. ),
  16130. e || this.filterManager.effectElements[0].p._mdf)
  16131. ) {
  16132. var t = this.filterManager.effectElements[0].p.v;
  16133. this.feFlood.setAttribute(
  16134. 'flood-color',
  16135. rgbToHex(
  16136. Math.round(t[0] * 255),
  16137. Math.round(t[1] * 255),
  16138. Math.round(t[2] * 255)
  16139. )
  16140. );
  16141. }
  16142. if (
  16143. ((e || this.filterManager.effectElements[1].p._mdf) &&
  16144. this.feFlood.setAttribute(
  16145. 'flood-opacity',
  16146. this.filterManager.effectElements[1].p.v / 255
  16147. ),
  16148. e ||
  16149. this.filterManager.effectElements[2].p._mdf ||
  16150. this.filterManager.effectElements[3].p._mdf)
  16151. ) {
  16152. var r = this.filterManager.effectElements[3].p.v,
  16153. i = (this.filterManager.effectElements[2].p.v - 90) * degToRads,
  16154. s = r * Math.cos(i),
  16155. n = r * Math.sin(i);
  16156. this.feOffset.setAttribute('dx', s),
  16157. this.feOffset.setAttribute('dy', n);
  16158. }
  16159. }
  16160. });
  16161. var _svgMatteSymbols = [];
  16162. function SVGMatte3Effect(e, t, r) {
  16163. (this.initialized = !1),
  16164. (this.filterManager = t),
  16165. (this.filterElem = e),
  16166. (this.elem = r),
  16167. (r.matteElement = createNS('g')),
  16168. r.matteElement.appendChild(r.layerElement),
  16169. r.matteElement.appendChild(r.transformedElement),
  16170. (r.baseElement = r.matteElement);
  16171. }
  16172. (SVGMatte3Effect.prototype.findSymbol = function (e) {
  16173. for (var t = 0, r = _svgMatteSymbols.length; t < r; ) {
  16174. if (_svgMatteSymbols[t] === e) return _svgMatteSymbols[t];
  16175. t += 1;
  16176. }
  16177. return null;
  16178. }),
  16179. (SVGMatte3Effect.prototype.replaceInParent = function (e, t) {
  16180. var r = e.layerElement.parentNode;
  16181. if (r) {
  16182. for (
  16183. var i = r.children, s = 0, n = i.length;
  16184. s < n && i[s] !== e.layerElement;
  16185. )
  16186. s += 1;
  16187. var a;
  16188. s <= n - 2 && (a = i[s + 1]);
  16189. var o = createNS('use');
  16190. o.setAttribute('href', '#' + t),
  16191. a ? r.insertBefore(o, a) : r.appendChild(o);
  16192. }
  16193. }),
  16194. (SVGMatte3Effect.prototype.setElementAsMask = function (e, t) {
  16195. if (!this.findSymbol(t)) {
  16196. var r = createElementID(),
  16197. i = createNS('mask');
  16198. i.setAttribute('id', t.layerId),
  16199. i.setAttribute('mask-type', 'alpha'),
  16200. _svgMatteSymbols.push(t);
  16201. var s = e.globalData.defs;
  16202. s.appendChild(i);
  16203. var n = createNS('symbol');
  16204. n.setAttribute('id', r),
  16205. this.replaceInParent(t, r),
  16206. n.appendChild(t.layerElement),
  16207. s.appendChild(n);
  16208. var a = createNS('use');
  16209. a.setAttribute('href', '#' + r),
  16210. i.appendChild(a),
  16211. (t.data.hd = !1),
  16212. t.show();
  16213. }
  16214. e.setMatte(t.layerId);
  16215. }),
  16216. (SVGMatte3Effect.prototype.initialize = function () {
  16217. for (
  16218. var e = this.filterManager.effectElements[0].p.v,
  16219. t = this.elem.comp.elements,
  16220. r = 0,
  16221. i = t.length;
  16222. r < i;
  16223. )
  16224. t[r] &&
  16225. t[r].data.ind === e &&
  16226. this.setElementAsMask(this.elem, t[r]),
  16227. (r += 1);
  16228. this.initialized = !0;
  16229. }),
  16230. (SVGMatte3Effect.prototype.renderFrame = function () {
  16231. this.initialized || this.initialize();
  16232. });
  16233. function SVGGaussianBlurEffect(e, t, r, i) {
  16234. e.setAttribute('x', '-100%'),
  16235. e.setAttribute('y', '-100%'),
  16236. e.setAttribute('width', '300%'),
  16237. e.setAttribute('height', '300%'),
  16238. (this.filterManager = t);
  16239. var s = createNS('feGaussianBlur');
  16240. s.setAttribute('result', i),
  16241. e.appendChild(s),
  16242. (this.feGaussianBlur = s);
  16243. }
  16244. return (
  16245. (SVGGaussianBlurEffect.prototype.renderFrame = function (e) {
  16246. if (e || this.filterManager._mdf) {
  16247. var t = 0.3,
  16248. r = this.filterManager.effectElements[0].p.v * t,
  16249. i = this.filterManager.effectElements[1].p.v,
  16250. s = i == 3 ? 0 : r,
  16251. n = i == 2 ? 0 : r;
  16252. this.feGaussianBlur.setAttribute('stdDeviation', s + ' ' + n);
  16253. var a =
  16254. this.filterManager.effectElements[2].p.v == 1
  16255. ? 'wrap'
  16256. : 'duplicate';
  16257. this.feGaussianBlur.setAttribute('edgeMode', a);
  16258. }
  16259. }),
  16260. registerRenderer('canvas', CanvasRenderer),
  16261. registerRenderer('html', HybridRenderer),
  16262. registerRenderer('svg', SVGRenderer),
  16263. ShapeModifiers.registerModifier('tm', TrimModifier),
  16264. ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier),
  16265. ShapeModifiers.registerModifier('rp', RepeaterModifier),
  16266. ShapeModifiers.registerModifier('rd', RoundCornersModifier),
  16267. ShapeModifiers.registerModifier('zz', ZigZagModifier),
  16268. ShapeModifiers.registerModifier('op', OffsetPathModifier),
  16269. setExpressionsPlugin(Expressions),
  16270. setExpressionInterfaces(getInterface),
  16271. initialize$1(),
  16272. initialize(),
  16273. registerEffect(20, SVGTintFilter, !0),
  16274. registerEffect(21, SVGFillFilter, !0),
  16275. registerEffect(22, SVGStrokeEffect, !1),
  16276. registerEffect(23, SVGTritoneFilter, !0),
  16277. registerEffect(24, SVGProLevelsFilter, !0),
  16278. registerEffect(25, SVGDropShadowEffect, !0),
  16279. registerEffect(28, SVGMatte3Effect, !1),
  16280. registerEffect(29, SVGGaussianBlurEffect, !0),
  16281. lottie
  16282. );
  16283. });
  16284. })(lottie, lottieExports);
  16285. const Lottie = lottieExports;
  16286. var freeGlobal =
  16287. typeof global == 'object' && global && global.Object === Object && global,
  16288. freeGlobal$1 = freeGlobal,
  16289. freeSelf = typeof self == 'object' && self && self.Object === Object && self,
  16290. root = freeGlobal$1 || freeSelf || Function('return this')(),
  16291. root$1 = root,
  16292. Symbol$1 = root$1.Symbol,
  16293. Symbol$2 = Symbol$1,
  16294. objectProto$e = Object.prototype,
  16295. hasOwnProperty$b = objectProto$e.hasOwnProperty,
  16296. nativeObjectToString$1 = objectProto$e.toString,
  16297. symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
  16298. function getRawTag(e) {
  16299. var t = hasOwnProperty$b.call(e, symToStringTag$1),
  16300. r = e[symToStringTag$1];
  16301. try {
  16302. e[symToStringTag$1] = void 0;
  16303. var i = !0;
  16304. } catch {}
  16305. var s = nativeObjectToString$1.call(e);
  16306. return i && (t ? (e[symToStringTag$1] = r) : delete e[symToStringTag$1]), s;
  16307. }
  16308. var objectProto$d = Object.prototype,
  16309. nativeObjectToString = objectProto$d.toString;
  16310. function objectToString(e) {
  16311. return nativeObjectToString.call(e);
  16312. }
  16313. var nullTag = '[object Null]',
  16314. undefinedTag = '[object Undefined]',
  16315. symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
  16316. function baseGetTag(e) {
  16317. return e == null
  16318. ? e === void 0
  16319. ? undefinedTag
  16320. : nullTag
  16321. : symToStringTag && symToStringTag in Object(e)
  16322. ? getRawTag(e)
  16323. : objectToString(e);
  16324. }
  16325. function isObjectLike(e) {
  16326. return e != null && typeof e == 'object';
  16327. }
  16328. var isArray$2 = Array.isArray,
  16329. isArray$1$1 = isArray$2;
  16330. function isObject$2(e) {
  16331. var t = typeof e;
  16332. return e != null && (t == 'object' || t == 'function');
  16333. }
  16334. var asyncTag = '[object AsyncFunction]',
  16335. funcTag$2 = '[object Function]',
  16336. genTag$1 = '[object GeneratorFunction]',
  16337. proxyTag = '[object Proxy]';
  16338. function isFunction$2(e) {
  16339. if (!isObject$2(e)) return !1;
  16340. var t = baseGetTag(e);
  16341. return t == funcTag$2 || t == genTag$1 || t == asyncTag || t == proxyTag;
  16342. }
  16343. var coreJsData = root$1['__core-js_shared__'],
  16344. coreJsData$1 = coreJsData,
  16345. maskSrcKey = (function () {
  16346. var e = /[^.]+$/.exec(
  16347. (coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO) || ''
  16348. );
  16349. return e ? 'Symbol(src)_1.' + e : '';
  16350. })();
  16351. function isMasked(e) {
  16352. return !!maskSrcKey && maskSrcKey in e;
  16353. }
  16354. var funcProto$1 = Function.prototype,
  16355. funcToString$1 = funcProto$1.toString;
  16356. function toSource(e) {
  16357. if (e != null) {
  16358. try {
  16359. return funcToString$1.call(e);
  16360. } catch {}
  16361. try {
  16362. return e + '';
  16363. } catch {}
  16364. }
  16365. return '';
  16366. }
  16367. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  16368. reIsHostCtor = /^\[object .+?Constructor\]$/,
  16369. funcProto = Function.prototype,
  16370. objectProto$c = Object.prototype,
  16371. funcToString = funcProto.toString,
  16372. hasOwnProperty$a = objectProto$c.hasOwnProperty,
  16373. reIsNative = RegExp(
  16374. '^' +
  16375. funcToString
  16376. .call(hasOwnProperty$a)
  16377. .replace(reRegExpChar, '\\$&')
  16378. .replace(
  16379. /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
  16380. '$1.*?'
  16381. ) +
  16382. '$'
  16383. );
  16384. function baseIsNative(e) {
  16385. if (!isObject$2(e) || isMasked(e)) return !1;
  16386. var t = isFunction$2(e) ? reIsNative : reIsHostCtor;
  16387. return t.test(toSource(e));
  16388. }
  16389. function getValue(e, t) {
  16390. return e == null ? void 0 : e[t];
  16391. }
  16392. function getNative(e, t) {
  16393. var r = getValue(e, t);
  16394. return baseIsNative(r) ? r : void 0;
  16395. }
  16396. var WeakMap$1 = getNative(root$1, 'WeakMap'),
  16397. WeakMap$1$1 = WeakMap$1,
  16398. objectCreate = Object.create,
  16399. baseCreate = (function () {
  16400. function e() {}
  16401. return function (t) {
  16402. if (!isObject$2(t)) return {};
  16403. if (objectCreate) return objectCreate(t);
  16404. e.prototype = t;
  16405. var r = new e();
  16406. return (e.prototype = void 0), r;
  16407. };
  16408. })(),
  16409. baseCreate$1 = baseCreate;
  16410. function copyArray(e, t) {
  16411. var r = -1,
  16412. i = e.length;
  16413. for (t || (t = Array(i)); ++r < i; ) t[r] = e[r];
  16414. return t;
  16415. }
  16416. var defineProperty = (function () {
  16417. try {
  16418. var e = getNative(Object, 'defineProperty');
  16419. return e({}, '', {}), e;
  16420. } catch {}
  16421. })(),
  16422. defineProperty$1 = defineProperty;
  16423. function arrayEach(e, t) {
  16424. for (
  16425. var r = -1, i = e == null ? 0 : e.length;
  16426. ++r < i && t(e[r], r, e) !== !1;
  16427. );
  16428. return e;
  16429. }
  16430. var MAX_SAFE_INTEGER$1 = 9007199254740991,
  16431. reIsUint = /^(?:0|[1-9]\d*)$/;
  16432. function isIndex(e, t) {
  16433. var r = typeof e;
  16434. return (
  16435. (t = t ?? MAX_SAFE_INTEGER$1),
  16436. !!t &&
  16437. (r == 'number' || (r != 'symbol' && reIsUint.test(e))) &&
  16438. e > -1 &&
  16439. e % 1 == 0 &&
  16440. e < t
  16441. );
  16442. }
  16443. function baseAssignValue(e, t, r) {
  16444. t == '__proto__' && defineProperty$1
  16445. ? defineProperty$1(e, t, {
  16446. configurable: !0,
  16447. enumerable: !0,
  16448. value: r,
  16449. writable: !0
  16450. })
  16451. : (e[t] = r);
  16452. }
  16453. function eq(e, t) {
  16454. return e === t || (e !== e && t !== t);
  16455. }
  16456. var objectProto$b = Object.prototype,
  16457. hasOwnProperty$9 = objectProto$b.hasOwnProperty;
  16458. function assignValue(e, t, r) {
  16459. var i = e[t];
  16460. (!(hasOwnProperty$9.call(e, t) && eq(i, r)) || (r === void 0 && !(t in e))) &&
  16461. baseAssignValue(e, t, r);
  16462. }
  16463. function copyObject(e, t, r, i) {
  16464. var s = !r;
  16465. r || (r = {});
  16466. for (var n = -1, a = t.length; ++n < a; ) {
  16467. var o = t[n],
  16468. l = i ? i(r[o], e[o], o, r, e) : void 0;
  16469. l === void 0 && (l = e[o]),
  16470. s ? baseAssignValue(r, o, l) : assignValue(r, o, l);
  16471. }
  16472. return r;
  16473. }
  16474. var MAX_SAFE_INTEGER = 9007199254740991;
  16475. function isLength(e) {
  16476. return typeof e == 'number' && e > -1 && e % 1 == 0 && e <= MAX_SAFE_INTEGER;
  16477. }
  16478. function isArrayLike(e) {
  16479. return e != null && isLength(e.length) && !isFunction$2(e);
  16480. }
  16481. var objectProto$a = Object.prototype;
  16482. function isPrototype(e) {
  16483. var t = e && e.constructor,
  16484. r = (typeof t == 'function' && t.prototype) || objectProto$a;
  16485. return e === r;
  16486. }
  16487. function baseTimes(e, t) {
  16488. for (var r = -1, i = Array(e); ++r < e; ) i[r] = t(r);
  16489. return i;
  16490. }
  16491. var argsTag$3 = '[object Arguments]';
  16492. function baseIsArguments(e) {
  16493. return isObjectLike(e) && baseGetTag(e) == argsTag$3;
  16494. }
  16495. var objectProto$9 = Object.prototype,
  16496. hasOwnProperty$8 = objectProto$9.hasOwnProperty,
  16497. propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable,
  16498. isArguments = baseIsArguments(
  16499. (function () {
  16500. return arguments;
  16501. })()
  16502. )
  16503. ? baseIsArguments
  16504. : function (e) {
  16505. return (
  16506. isObjectLike(e) &&
  16507. hasOwnProperty$8.call(e, 'callee') &&
  16508. !propertyIsEnumerable$1.call(e, 'callee')
  16509. );
  16510. },
  16511. isArguments$1 = isArguments;
  16512. function stubFalse() {
  16513. return !1;
  16514. }
  16515. var freeExports$2 =
  16516. typeof exports == 'object' && exports && !exports.nodeType && exports,
  16517. freeModule$2 =
  16518. freeExports$2 &&
  16519. typeof module == 'object' &&
  16520. module &&
  16521. !module.nodeType &&
  16522. module,
  16523. moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2,
  16524. Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0,
  16525. nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0,
  16526. isBuffer = nativeIsBuffer || stubFalse,
  16527. isBuffer$1 = isBuffer,
  16528. argsTag$2 = '[object Arguments]',
  16529. arrayTag$2 = '[object Array]',
  16530. boolTag$3 = '[object Boolean]',
  16531. dateTag$3 = '[object Date]',
  16532. errorTag$2 = '[object Error]',
  16533. funcTag$1 = '[object Function]',
  16534. mapTag$5 = '[object Map]',
  16535. numberTag$3 = '[object Number]',
  16536. objectTag$3 = '[object Object]',
  16537. regexpTag$3 = '[object RegExp]',
  16538. setTag$5 = '[object Set]',
  16539. stringTag$3 = '[object String]',
  16540. weakMapTag$2 = '[object WeakMap]',
  16541. arrayBufferTag$3 = '[object ArrayBuffer]',
  16542. dataViewTag$4 = '[object DataView]',
  16543. float32Tag$2 = '[object Float32Array]',
  16544. float64Tag$2 = '[object Float64Array]',
  16545. int8Tag$2 = '[object Int8Array]',
  16546. int16Tag$2 = '[object Int16Array]',
  16547. int32Tag$2 = '[object Int32Array]',
  16548. uint8Tag$2 = '[object Uint8Array]',
  16549. uint8ClampedTag$2 = '[object Uint8ClampedArray]',
  16550. uint16Tag$2 = '[object Uint16Array]',
  16551. uint32Tag$2 = '[object Uint32Array]',
  16552. typedArrayTags = {};
  16553. typedArrayTags[float32Tag$2] =
  16554. typedArrayTags[float64Tag$2] =
  16555. typedArrayTags[int8Tag$2] =
  16556. typedArrayTags[int16Tag$2] =
  16557. typedArrayTags[int32Tag$2] =
  16558. typedArrayTags[uint8Tag$2] =
  16559. typedArrayTags[uint8ClampedTag$2] =
  16560. typedArrayTags[uint16Tag$2] =
  16561. typedArrayTags[uint32Tag$2] =
  16562. !0;
  16563. typedArrayTags[argsTag$2] =
  16564. typedArrayTags[arrayTag$2] =
  16565. typedArrayTags[arrayBufferTag$3] =
  16566. typedArrayTags[boolTag$3] =
  16567. typedArrayTags[dataViewTag$4] =
  16568. typedArrayTags[dateTag$3] =
  16569. typedArrayTags[errorTag$2] =
  16570. typedArrayTags[funcTag$1] =
  16571. typedArrayTags[mapTag$5] =
  16572. typedArrayTags[numberTag$3] =
  16573. typedArrayTags[objectTag$3] =
  16574. typedArrayTags[regexpTag$3] =
  16575. typedArrayTags[setTag$5] =
  16576. typedArrayTags[stringTag$3] =
  16577. typedArrayTags[weakMapTag$2] =
  16578. !1;
  16579. function baseIsTypedArray(e) {
  16580. return (
  16581. isObjectLike(e) && isLength(e.length) && !!typedArrayTags[baseGetTag(e)]
  16582. );
  16583. }
  16584. function baseUnary(e) {
  16585. return function (t) {
  16586. return e(t);
  16587. };
  16588. }
  16589. var freeExports$1 =
  16590. typeof exports == 'object' && exports && !exports.nodeType && exports,
  16591. freeModule$1 =
  16592. freeExports$1 &&
  16593. typeof module == 'object' &&
  16594. module &&
  16595. !module.nodeType &&
  16596. module,
  16597. moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1,
  16598. freeProcess = moduleExports$1 && freeGlobal$1.process,
  16599. nodeUtil = (function () {
  16600. try {
  16601. var e =
  16602. freeModule$1 &&
  16603. freeModule$1.require &&
  16604. freeModule$1.require('util').types;
  16605. return (
  16606. e || (freeProcess && freeProcess.binding && freeProcess.binding('util'))
  16607. );
  16608. } catch {}
  16609. })(),
  16610. nodeUtil$1 = nodeUtil,
  16611. nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray,
  16612. isTypedArray = nodeIsTypedArray
  16613. ? baseUnary(nodeIsTypedArray)
  16614. : baseIsTypedArray,
  16615. isTypedArray$1 = isTypedArray,
  16616. objectProto$8 = Object.prototype,
  16617. hasOwnProperty$7 = objectProto$8.hasOwnProperty;
  16618. function arrayLikeKeys(e, t) {
  16619. var r = isArray$1$1(e),
  16620. i = !r && isArguments$1(e),
  16621. s = !r && !i && isBuffer$1(e),
  16622. n = !r && !i && !s && isTypedArray$1(e),
  16623. a = r || i || s || n,
  16624. o = a ? baseTimes(e.length, String) : [],
  16625. l = o.length;
  16626. for (var c in e)
  16627. (t || hasOwnProperty$7.call(e, c)) &&
  16628. !(
  16629. a &&
  16630. (c == 'length' ||
  16631. (s && (c == 'offset' || c == 'parent')) ||
  16632. (n && (c == 'buffer' || c == 'byteLength' || c == 'byteOffset')) ||
  16633. isIndex(c, l))
  16634. ) &&
  16635. o.push(c);
  16636. return o;
  16637. }
  16638. function overArg(e, t) {
  16639. return function (r) {
  16640. return e(t(r));
  16641. };
  16642. }
  16643. var nativeKeys = overArg(Object.keys, Object),
  16644. nativeKeys$1 = nativeKeys,
  16645. objectProto$7 = Object.prototype,
  16646. hasOwnProperty$6 = objectProto$7.hasOwnProperty;
  16647. function baseKeys(e) {
  16648. if (!isPrototype(e)) return nativeKeys$1(e);
  16649. var t = [];
  16650. for (var r in Object(e))
  16651. hasOwnProperty$6.call(e, r) && r != 'constructor' && t.push(r);
  16652. return t;
  16653. }
  16654. function keys(e) {
  16655. return isArrayLike(e) ? arrayLikeKeys(e) : baseKeys(e);
  16656. }
  16657. function nativeKeysIn(e) {
  16658. var t = [];
  16659. if (e != null) for (var r in Object(e)) t.push(r);
  16660. return t;
  16661. }
  16662. var objectProto$6 = Object.prototype,
  16663. hasOwnProperty$5 = objectProto$6.hasOwnProperty;
  16664. function baseKeysIn(e) {
  16665. if (!isObject$2(e)) return nativeKeysIn(e);
  16666. var t = isPrototype(e),
  16667. r = [];
  16668. for (var i in e)
  16669. (i == 'constructor' && (t || !hasOwnProperty$5.call(e, i))) || r.push(i);
  16670. return r;
  16671. }
  16672. function keysIn(e) {
  16673. return isArrayLike(e) ? arrayLikeKeys(e, !0) : baseKeysIn(e);
  16674. }
  16675. var nativeCreate = getNative(Object, 'create'),
  16676. nativeCreate$1 = nativeCreate;
  16677. function hashClear() {
  16678. (this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {}), (this.size = 0);
  16679. }
  16680. function hashDelete(e) {
  16681. var t = this.has(e) && delete this.__data__[e];
  16682. return (this.size -= t ? 1 : 0), t;
  16683. }
  16684. var HASH_UNDEFINED$2 = '__lodash_hash_undefined__',
  16685. objectProto$5 = Object.prototype,
  16686. hasOwnProperty$4 = objectProto$5.hasOwnProperty;
  16687. function hashGet(e) {
  16688. var t = this.__data__;
  16689. if (nativeCreate$1) {
  16690. var r = t[e];
  16691. return r === HASH_UNDEFINED$2 ? void 0 : r;
  16692. }
  16693. return hasOwnProperty$4.call(t, e) ? t[e] : void 0;
  16694. }
  16695. var objectProto$4 = Object.prototype,
  16696. hasOwnProperty$3 = objectProto$4.hasOwnProperty;
  16697. function hashHas(e) {
  16698. var t = this.__data__;
  16699. return nativeCreate$1 ? t[e] !== void 0 : hasOwnProperty$3.call(t, e);
  16700. }
  16701. var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
  16702. function hashSet(e, t) {
  16703. var r = this.__data__;
  16704. return (
  16705. (this.size += this.has(e) ? 0 : 1),
  16706. (r[e] = nativeCreate$1 && t === void 0 ? HASH_UNDEFINED$1 : t),
  16707. this
  16708. );
  16709. }
  16710. function Hash(e) {
  16711. var t = -1,
  16712. r = e == null ? 0 : e.length;
  16713. for (this.clear(); ++t < r; ) {
  16714. var i = e[t];
  16715. this.set(i[0], i[1]);
  16716. }
  16717. }
  16718. Hash.prototype.clear = hashClear;
  16719. Hash.prototype.delete = hashDelete;
  16720. Hash.prototype.get = hashGet;
  16721. Hash.prototype.has = hashHas;
  16722. Hash.prototype.set = hashSet;
  16723. function listCacheClear() {
  16724. (this.__data__ = []), (this.size = 0);
  16725. }
  16726. function assocIndexOf(e, t) {
  16727. for (var r = e.length; r--; ) if (eq(e[r][0], t)) return r;
  16728. return -1;
  16729. }
  16730. var arrayProto = Array.prototype,
  16731. splice = arrayProto.splice;
  16732. function listCacheDelete(e) {
  16733. var t = this.__data__,
  16734. r = assocIndexOf(t, e);
  16735. if (r < 0) return !1;
  16736. var i = t.length - 1;
  16737. return r == i ? t.pop() : splice.call(t, r, 1), --this.size, !0;
  16738. }
  16739. function listCacheGet(e) {
  16740. var t = this.__data__,
  16741. r = assocIndexOf(t, e);
  16742. return r < 0 ? void 0 : t[r][1];
  16743. }
  16744. function listCacheHas(e) {
  16745. return assocIndexOf(this.__data__, e) > -1;
  16746. }
  16747. function listCacheSet(e, t) {
  16748. var r = this.__data__,
  16749. i = assocIndexOf(r, e);
  16750. return i < 0 ? (++this.size, r.push([e, t])) : (r[i][1] = t), this;
  16751. }
  16752. function ListCache(e) {
  16753. var t = -1,
  16754. r = e == null ? 0 : e.length;
  16755. for (this.clear(); ++t < r; ) {
  16756. var i = e[t];
  16757. this.set(i[0], i[1]);
  16758. }
  16759. }
  16760. ListCache.prototype.clear = listCacheClear;
  16761. ListCache.prototype.delete = listCacheDelete;
  16762. ListCache.prototype.get = listCacheGet;
  16763. ListCache.prototype.has = listCacheHas;
  16764. ListCache.prototype.set = listCacheSet;
  16765. var Map = getNative(root$1, 'Map'),
  16766. Map$1 = Map;
  16767. function mapCacheClear() {
  16768. (this.size = 0),
  16769. (this.__data__ = {
  16770. hash: new Hash(),
  16771. map: new (Map$1 || ListCache)(),
  16772. string: new Hash()
  16773. });
  16774. }
  16775. function isKeyable(e) {
  16776. var t = typeof e;
  16777. return t == 'string' || t == 'number' || t == 'symbol' || t == 'boolean'
  16778. ? e !== '__proto__'
  16779. : e === null;
  16780. }
  16781. function getMapData(e, t) {
  16782. var r = e.__data__;
  16783. return isKeyable(t) ? r[typeof t == 'string' ? 'string' : 'hash'] : r.map;
  16784. }
  16785. function mapCacheDelete(e) {
  16786. var t = getMapData(this, e).delete(e);
  16787. return (this.size -= t ? 1 : 0), t;
  16788. }
  16789. function mapCacheGet(e) {
  16790. return getMapData(this, e).get(e);
  16791. }
  16792. function mapCacheHas(e) {
  16793. return getMapData(this, e).has(e);
  16794. }
  16795. function mapCacheSet(e, t) {
  16796. var r = getMapData(this, e),
  16797. i = r.size;
  16798. return r.set(e, t), (this.size += r.size == i ? 0 : 1), this;
  16799. }
  16800. function MapCache(e) {
  16801. var t = -1,
  16802. r = e == null ? 0 : e.length;
  16803. for (this.clear(); ++t < r; ) {
  16804. var i = e[t];
  16805. this.set(i[0], i[1]);
  16806. }
  16807. }
  16808. MapCache.prototype.clear = mapCacheClear;
  16809. MapCache.prototype.delete = mapCacheDelete;
  16810. MapCache.prototype.get = mapCacheGet;
  16811. MapCache.prototype.has = mapCacheHas;
  16812. MapCache.prototype.set = mapCacheSet;
  16813. function arrayPush(e, t) {
  16814. for (var r = -1, i = t.length, s = e.length; ++r < i; ) e[s + r] = t[r];
  16815. return e;
  16816. }
  16817. var getPrototype = overArg(Object.getPrototypeOf, Object),
  16818. getPrototype$1 = getPrototype;
  16819. function stackClear() {
  16820. (this.__data__ = new ListCache()), (this.size = 0);
  16821. }
  16822. function stackDelete(e) {
  16823. var t = this.__data__,
  16824. r = t.delete(e);
  16825. return (this.size = t.size), r;
  16826. }
  16827. function stackGet(e) {
  16828. return this.__data__.get(e);
  16829. }
  16830. function stackHas(e) {
  16831. return this.__data__.has(e);
  16832. }
  16833. var LARGE_ARRAY_SIZE = 200;
  16834. function stackSet(e, t) {
  16835. var r = this.__data__;
  16836. if (r instanceof ListCache) {
  16837. var i = r.__data__;
  16838. if (!Map$1 || i.length < LARGE_ARRAY_SIZE - 1)
  16839. return i.push([e, t]), (this.size = ++r.size), this;
  16840. r = this.__data__ = new MapCache(i);
  16841. }
  16842. return r.set(e, t), (this.size = r.size), this;
  16843. }
  16844. function Stack(e) {
  16845. var t = (this.__data__ = new ListCache(e));
  16846. this.size = t.size;
  16847. }
  16848. Stack.prototype.clear = stackClear;
  16849. Stack.prototype.delete = stackDelete;
  16850. Stack.prototype.get = stackGet;
  16851. Stack.prototype.has = stackHas;
  16852. Stack.prototype.set = stackSet;
  16853. function baseAssign(e, t) {
  16854. return e && copyObject(t, keys(t), e);
  16855. }
  16856. function baseAssignIn(e, t) {
  16857. return e && copyObject(t, keysIn(t), e);
  16858. }
  16859. var freeExports =
  16860. typeof exports == 'object' && exports && !exports.nodeType && exports,
  16861. freeModule =
  16862. freeExports &&
  16863. typeof module == 'object' &&
  16864. module &&
  16865. !module.nodeType &&
  16866. module,
  16867. moduleExports = freeModule && freeModule.exports === freeExports,
  16868. Buffer = moduleExports ? root$1.Buffer : void 0,
  16869. allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
  16870. function cloneBuffer(e, t) {
  16871. if (t) return e.slice();
  16872. var r = e.length,
  16873. i = allocUnsafe ? allocUnsafe(r) : new e.constructor(r);
  16874. return e.copy(i), i;
  16875. }
  16876. function arrayFilter(e, t) {
  16877. for (var r = -1, i = e == null ? 0 : e.length, s = 0, n = []; ++r < i; ) {
  16878. var a = e[r];
  16879. t(a, r, e) && (n[s++] = a);
  16880. }
  16881. return n;
  16882. }
  16883. function stubArray() {
  16884. return [];
  16885. }
  16886. var objectProto$3 = Object.prototype,
  16887. propertyIsEnumerable = objectProto$3.propertyIsEnumerable,
  16888. nativeGetSymbols$1 = Object.getOwnPropertySymbols,
  16889. getSymbols = nativeGetSymbols$1
  16890. ? function (e) {
  16891. return e == null
  16892. ? []
  16893. : ((e = Object(e)),
  16894. arrayFilter(nativeGetSymbols$1(e), function (t) {
  16895. return propertyIsEnumerable.call(e, t);
  16896. }));
  16897. }
  16898. : stubArray,
  16899. getSymbols$1 = getSymbols;
  16900. function copySymbols(e, t) {
  16901. return copyObject(e, getSymbols$1(e), t);
  16902. }
  16903. var nativeGetSymbols = Object.getOwnPropertySymbols,
  16904. getSymbolsIn = nativeGetSymbols
  16905. ? function (e) {
  16906. for (var t = []; e; )
  16907. arrayPush(t, getSymbols$1(e)), (e = getPrototype$1(e));
  16908. return t;
  16909. }
  16910. : stubArray,
  16911. getSymbolsIn$1 = getSymbolsIn;
  16912. function copySymbolsIn(e, t) {
  16913. return copyObject(e, getSymbolsIn$1(e), t);
  16914. }
  16915. function baseGetAllKeys(e, t, r) {
  16916. var i = t(e);
  16917. return isArray$1$1(e) ? i : arrayPush(i, r(e));
  16918. }
  16919. function getAllKeys(e) {
  16920. return baseGetAllKeys(e, keys, getSymbols$1);
  16921. }
  16922. function getAllKeysIn(e) {
  16923. return baseGetAllKeys(e, keysIn, getSymbolsIn$1);
  16924. }
  16925. var DataView = getNative(root$1, 'DataView'),
  16926. DataView$1 = DataView,
  16927. Promise$1 = getNative(root$1, 'Promise'),
  16928. Promise$2 = Promise$1,
  16929. Set = getNative(root$1, 'Set'),
  16930. Set$1 = Set,
  16931. mapTag$4 = '[object Map]',
  16932. objectTag$2 = '[object Object]',
  16933. promiseTag = '[object Promise]',
  16934. setTag$4 = '[object Set]',
  16935. weakMapTag$1 = '[object WeakMap]',
  16936. dataViewTag$3 = '[object DataView]',
  16937. dataViewCtorString = toSource(DataView$1),
  16938. mapCtorString = toSource(Map$1),
  16939. promiseCtorString = toSource(Promise$2),
  16940. setCtorString = toSource(Set$1),
  16941. weakMapCtorString = toSource(WeakMap$1$1),
  16942. getTag = baseGetTag;
  16943. ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3) ||
  16944. (Map$1 && getTag(new Map$1()) != mapTag$4) ||
  16945. (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
  16946. (Set$1 && getTag(new Set$1()) != setTag$4) ||
  16947. (WeakMap$1$1 && getTag(new WeakMap$1$1()) != weakMapTag$1)) &&
  16948. (getTag = function (e) {
  16949. var t = baseGetTag(e),
  16950. r = t == objectTag$2 ? e.constructor : void 0,
  16951. i = r ? toSource(r) : '';
  16952. if (i)
  16953. switch (i) {
  16954. case dataViewCtorString:
  16955. return dataViewTag$3;
  16956. case mapCtorString:
  16957. return mapTag$4;
  16958. case promiseCtorString:
  16959. return promiseTag;
  16960. case setCtorString:
  16961. return setTag$4;
  16962. case weakMapCtorString:
  16963. return weakMapTag$1;
  16964. }
  16965. return t;
  16966. });
  16967. var getTag$1 = getTag,
  16968. objectProto$2 = Object.prototype,
  16969. hasOwnProperty$2 = objectProto$2.hasOwnProperty;
  16970. function initCloneArray(e) {
  16971. var t = e.length,
  16972. r = new e.constructor(t);
  16973. return (
  16974. t &&
  16975. typeof e[0] == 'string' &&
  16976. hasOwnProperty$2.call(e, 'index') &&
  16977. ((r.index = e.index), (r.input = e.input)),
  16978. r
  16979. );
  16980. }
  16981. var Uint8Array$1 = root$1.Uint8Array,
  16982. Uint8Array$1$1 = Uint8Array$1;
  16983. function cloneArrayBuffer(e) {
  16984. var t = new e.constructor(e.byteLength);
  16985. return new Uint8Array$1$1(t).set(new Uint8Array$1$1(e)), t;
  16986. }
  16987. function cloneDataView(e, t) {
  16988. var r = t ? cloneArrayBuffer(e.buffer) : e.buffer;
  16989. return new e.constructor(r, e.byteOffset, e.byteLength);
  16990. }
  16991. var reFlags = /\w*$/;
  16992. function cloneRegExp(e) {
  16993. var t = new e.constructor(e.source, reFlags.exec(e));
  16994. return (t.lastIndex = e.lastIndex), t;
  16995. }
  16996. var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0,
  16997. symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
  16998. function cloneSymbol(e) {
  16999. return symbolValueOf$1 ? Object(symbolValueOf$1.call(e)) : {};
  17000. }
  17001. function cloneTypedArray(e, t) {
  17002. var r = t ? cloneArrayBuffer(e.buffer) : e.buffer;
  17003. return new e.constructor(r, e.byteOffset, e.length);
  17004. }
  17005. var boolTag$2 = '[object Boolean]',
  17006. dateTag$2 = '[object Date]',
  17007. mapTag$3 = '[object Map]',
  17008. numberTag$2 = '[object Number]',
  17009. regexpTag$2 = '[object RegExp]',
  17010. setTag$3 = '[object Set]',
  17011. stringTag$2 = '[object String]',
  17012. symbolTag$2 = '[object Symbol]',
  17013. arrayBufferTag$2 = '[object ArrayBuffer]',
  17014. dataViewTag$2 = '[object DataView]',
  17015. float32Tag$1 = '[object Float32Array]',
  17016. float64Tag$1 = '[object Float64Array]',
  17017. int8Tag$1 = '[object Int8Array]',
  17018. int16Tag$1 = '[object Int16Array]',
  17019. int32Tag$1 = '[object Int32Array]',
  17020. uint8Tag$1 = '[object Uint8Array]',
  17021. uint8ClampedTag$1 = '[object Uint8ClampedArray]',
  17022. uint16Tag$1 = '[object Uint16Array]',
  17023. uint32Tag$1 = '[object Uint32Array]';
  17024. function initCloneByTag(e, t, r) {
  17025. var i = e.constructor;
  17026. switch (t) {
  17027. case arrayBufferTag$2:
  17028. return cloneArrayBuffer(e);
  17029. case boolTag$2:
  17030. case dateTag$2:
  17031. return new i(+e);
  17032. case dataViewTag$2:
  17033. return cloneDataView(e, r);
  17034. case float32Tag$1:
  17035. case float64Tag$1:
  17036. case int8Tag$1:
  17037. case int16Tag$1:
  17038. case int32Tag$1:
  17039. case uint8Tag$1:
  17040. case uint8ClampedTag$1:
  17041. case uint16Tag$1:
  17042. case uint32Tag$1:
  17043. return cloneTypedArray(e, r);
  17044. case mapTag$3:
  17045. return new i();
  17046. case numberTag$2:
  17047. case stringTag$2:
  17048. return new i(e);
  17049. case regexpTag$2:
  17050. return cloneRegExp(e);
  17051. case setTag$3:
  17052. return new i();
  17053. case symbolTag$2:
  17054. return cloneSymbol(e);
  17055. }
  17056. }
  17057. function initCloneObject(e) {
  17058. return typeof e.constructor == 'function' && !isPrototype(e)
  17059. ? baseCreate$1(getPrototype$1(e))
  17060. : {};
  17061. }
  17062. var mapTag$2 = '[object Map]';
  17063. function baseIsMap(e) {
  17064. return isObjectLike(e) && getTag$1(e) == mapTag$2;
  17065. }
  17066. var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap,
  17067. isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap,
  17068. isMap$1 = isMap,
  17069. setTag$2 = '[object Set]';
  17070. function baseIsSet(e) {
  17071. return isObjectLike(e) && getTag$1(e) == setTag$2;
  17072. }
  17073. var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet,
  17074. isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet,
  17075. isSet$1 = isSet,
  17076. CLONE_DEEP_FLAG$1 = 1,
  17077. CLONE_FLAT_FLAG = 2,
  17078. CLONE_SYMBOLS_FLAG$1 = 4,
  17079. argsTag$1 = '[object Arguments]',
  17080. arrayTag$1 = '[object Array]',
  17081. boolTag$1 = '[object Boolean]',
  17082. dateTag$1 = '[object Date]',
  17083. errorTag$1 = '[object Error]',
  17084. funcTag = '[object Function]',
  17085. genTag = '[object GeneratorFunction]',
  17086. mapTag$1 = '[object Map]',
  17087. numberTag$1 = '[object Number]',
  17088. objectTag$1 = '[object Object]',
  17089. regexpTag$1 = '[object RegExp]',
  17090. setTag$1 = '[object Set]',
  17091. stringTag$1 = '[object String]',
  17092. symbolTag$1 = '[object Symbol]',
  17093. weakMapTag = '[object WeakMap]',
  17094. arrayBufferTag$1 = '[object ArrayBuffer]',
  17095. dataViewTag$1 = '[object DataView]',
  17096. float32Tag = '[object Float32Array]',
  17097. float64Tag = '[object Float64Array]',
  17098. int8Tag = '[object Int8Array]',
  17099. int16Tag = '[object Int16Array]',
  17100. int32Tag = '[object Int32Array]',
  17101. uint8Tag = '[object Uint8Array]',
  17102. uint8ClampedTag = '[object Uint8ClampedArray]',
  17103. uint16Tag = '[object Uint16Array]',
  17104. uint32Tag = '[object Uint32Array]',
  17105. cloneableTags = {};
  17106. cloneableTags[argsTag$1] =
  17107. cloneableTags[arrayTag$1] =
  17108. cloneableTags[arrayBufferTag$1] =
  17109. cloneableTags[dataViewTag$1] =
  17110. cloneableTags[boolTag$1] =
  17111. cloneableTags[dateTag$1] =
  17112. cloneableTags[float32Tag] =
  17113. cloneableTags[float64Tag] =
  17114. cloneableTags[int8Tag] =
  17115. cloneableTags[int16Tag] =
  17116. cloneableTags[int32Tag] =
  17117. cloneableTags[mapTag$1] =
  17118. cloneableTags[numberTag$1] =
  17119. cloneableTags[objectTag$1] =
  17120. cloneableTags[regexpTag$1] =
  17121. cloneableTags[setTag$1] =
  17122. cloneableTags[stringTag$1] =
  17123. cloneableTags[symbolTag$1] =
  17124. cloneableTags[uint8Tag] =
  17125. cloneableTags[uint8ClampedTag] =
  17126. cloneableTags[uint16Tag] =
  17127. cloneableTags[uint32Tag] =
  17128. !0;
  17129. cloneableTags[errorTag$1] =
  17130. cloneableTags[funcTag] =
  17131. cloneableTags[weakMapTag] =
  17132. !1;
  17133. function baseClone(e, t, r, i, s, n) {
  17134. var a,
  17135. o = t & CLONE_DEEP_FLAG$1,
  17136. l = t & CLONE_FLAT_FLAG,
  17137. c = t & CLONE_SYMBOLS_FLAG$1;
  17138. if ((r && (a = s ? r(e, i, s, n) : r(e)), a !== void 0)) return a;
  17139. if (!isObject$2(e)) return e;
  17140. var g = isArray$1$1(e);
  17141. if (g) {
  17142. if (((a = initCloneArray(e)), !o)) return copyArray(e, a);
  17143. } else {
  17144. var S = getTag$1(e),
  17145. p = S == funcTag || S == genTag;
  17146. if (isBuffer$1(e)) return cloneBuffer(e, o);
  17147. if (S == objectTag$1 || S == argsTag$1 || (p && !s)) {
  17148. if (((a = l || p ? {} : initCloneObject(e)), !o))
  17149. return l
  17150. ? copySymbolsIn(e, baseAssignIn(a, e))
  17151. : copySymbols(e, baseAssign(a, e));
  17152. } else {
  17153. if (!cloneableTags[S]) return s ? e : {};
  17154. a = initCloneByTag(e, S, o);
  17155. }
  17156. }
  17157. n || (n = new Stack());
  17158. var P = n.get(e);
  17159. if (P) return P;
  17160. n.set(e, a),
  17161. isSet$1(e)
  17162. ? e.forEach(function (A) {
  17163. a.add(baseClone(A, t, r, A, e, n));
  17164. })
  17165. : isMap$1(e) &&
  17166. e.forEach(function (A, u) {
  17167. a.set(u, baseClone(A, t, r, u, e, n));
  17168. });
  17169. var b = c ? (l ? getAllKeysIn : getAllKeys) : l ? keysIn : keys,
  17170. y = g ? void 0 : b(e);
  17171. return (
  17172. arrayEach(y || e, function (A, u) {
  17173. y && ((u = A), (A = e[u])),
  17174. assignValue(a, u, baseClone(A, t, r, u, e, n));
  17175. }),
  17176. a
  17177. );
  17178. }
  17179. var CLONE_DEEP_FLAG = 1,
  17180. CLONE_SYMBOLS_FLAG = 4;
  17181. function cloneDeep$1(e) {
  17182. return baseClone(e, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  17183. }
  17184. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  17185. function setCacheAdd(e) {
  17186. return this.__data__.set(e, HASH_UNDEFINED), this;
  17187. }
  17188. function setCacheHas(e) {
  17189. return this.__data__.has(e);
  17190. }
  17191. function SetCache(e) {
  17192. var t = -1,
  17193. r = e == null ? 0 : e.length;
  17194. for (this.__data__ = new MapCache(); ++t < r; ) this.add(e[t]);
  17195. }
  17196. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  17197. SetCache.prototype.has = setCacheHas;
  17198. function arraySome(e, t) {
  17199. for (var r = -1, i = e == null ? 0 : e.length; ++r < i; )
  17200. if (t(e[r], r, e)) return !0;
  17201. return !1;
  17202. }
  17203. function cacheHas(e, t) {
  17204. return e.has(t);
  17205. }
  17206. var COMPARE_PARTIAL_FLAG$3 = 1,
  17207. COMPARE_UNORDERED_FLAG$1 = 2;
  17208. function equalArrays(e, t, r, i, s, n) {
  17209. var a = r & COMPARE_PARTIAL_FLAG$3,
  17210. o = e.length,
  17211. l = t.length;
  17212. if (o != l && !(a && l > o)) return !1;
  17213. var c = n.get(e),
  17214. g = n.get(t);
  17215. if (c && g) return c == t && g == e;
  17216. var S = -1,
  17217. p = !0,
  17218. P = r & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
  17219. for (n.set(e, t), n.set(t, e); ++S < o; ) {
  17220. var b = e[S],
  17221. y = t[S];
  17222. if (i) var A = a ? i(y, b, S, t, e, n) : i(b, y, S, e, t, n);
  17223. if (A !== void 0) {
  17224. if (A) continue;
  17225. p = !1;
  17226. break;
  17227. }
  17228. if (P) {
  17229. if (
  17230. !arraySome(t, function (u, f) {
  17231. if (!cacheHas(P, f) && (b === u || s(b, u, r, i, n)))
  17232. return P.push(f);
  17233. })
  17234. ) {
  17235. p = !1;
  17236. break;
  17237. }
  17238. } else if (!(b === y || s(b, y, r, i, n))) {
  17239. p = !1;
  17240. break;
  17241. }
  17242. }
  17243. return n.delete(e), n.delete(t), p;
  17244. }
  17245. function mapToArray(e) {
  17246. var t = -1,
  17247. r = Array(e.size);
  17248. return (
  17249. e.forEach(function (i, s) {
  17250. r[++t] = [s, i];
  17251. }),
  17252. r
  17253. );
  17254. }
  17255. function setToArray(e) {
  17256. var t = -1,
  17257. r = Array(e.size);
  17258. return (
  17259. e.forEach(function (i) {
  17260. r[++t] = i;
  17261. }),
  17262. r
  17263. );
  17264. }
  17265. var COMPARE_PARTIAL_FLAG$2 = 1,
  17266. COMPARE_UNORDERED_FLAG = 2,
  17267. boolTag = '[object Boolean]',
  17268. dateTag = '[object Date]',
  17269. errorTag = '[object Error]',
  17270. mapTag = '[object Map]',
  17271. numberTag = '[object Number]',
  17272. regexpTag = '[object RegExp]',
  17273. setTag = '[object Set]',
  17274. stringTag = '[object String]',
  17275. symbolTag = '[object Symbol]',
  17276. arrayBufferTag = '[object ArrayBuffer]',
  17277. dataViewTag = '[object DataView]',
  17278. symbolProto = Symbol$2 ? Symbol$2.prototype : void 0,
  17279. symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  17280. function equalByTag(e, t, r, i, s, n, a) {
  17281. switch (r) {
  17282. case dataViewTag:
  17283. if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
  17284. return !1;
  17285. (e = e.buffer), (t = t.buffer);
  17286. case arrayBufferTag:
  17287. return !(
  17288. e.byteLength != t.byteLength ||
  17289. !n(new Uint8Array$1$1(e), new Uint8Array$1$1(t))
  17290. );
  17291. case boolTag:
  17292. case dateTag:
  17293. case numberTag:
  17294. return eq(+e, +t);
  17295. case errorTag:
  17296. return e.name == t.name && e.message == t.message;
  17297. case regexpTag:
  17298. case stringTag:
  17299. return e == t + '';
  17300. case mapTag:
  17301. var o = mapToArray;
  17302. case setTag:
  17303. var l = i & COMPARE_PARTIAL_FLAG$2;
  17304. if ((o || (o = setToArray), e.size != t.size && !l)) return !1;
  17305. var c = a.get(e);
  17306. if (c) return c == t;
  17307. (i |= COMPARE_UNORDERED_FLAG), a.set(e, t);
  17308. var g = equalArrays(o(e), o(t), i, s, n, a);
  17309. return a.delete(e), g;
  17310. case symbolTag:
  17311. if (symbolValueOf) return symbolValueOf.call(e) == symbolValueOf.call(t);
  17312. }
  17313. return !1;
  17314. }
  17315. var COMPARE_PARTIAL_FLAG$1 = 1,
  17316. objectProto$1 = Object.prototype,
  17317. hasOwnProperty$1 = objectProto$1.hasOwnProperty;
  17318. function equalObjects(e, t, r, i, s, n) {
  17319. var a = r & COMPARE_PARTIAL_FLAG$1,
  17320. o = getAllKeys(e),
  17321. l = o.length,
  17322. c = getAllKeys(t),
  17323. g = c.length;
  17324. if (l != g && !a) return !1;
  17325. for (var S = l; S--; ) {
  17326. var p = o[S];
  17327. if (!(a ? p in t : hasOwnProperty$1.call(t, p))) return !1;
  17328. }
  17329. var P = n.get(e),
  17330. b = n.get(t);
  17331. if (P && b) return P == t && b == e;
  17332. var y = !0;
  17333. n.set(e, t), n.set(t, e);
  17334. for (var A = a; ++S < l; ) {
  17335. p = o[S];
  17336. var u = e[p],
  17337. f = t[p];
  17338. if (i) var m = a ? i(f, u, p, t, e, n) : i(u, f, p, e, t, n);
  17339. if (!(m === void 0 ? u === f || s(u, f, r, i, n) : m)) {
  17340. y = !1;
  17341. break;
  17342. }
  17343. A || (A = p == 'constructor');
  17344. }
  17345. if (y && !A) {
  17346. var d = e.constructor,
  17347. E = t.constructor;
  17348. d != E &&
  17349. 'constructor' in e &&
  17350. 'constructor' in t &&
  17351. !(
  17352. typeof d == 'function' &&
  17353. d instanceof d &&
  17354. typeof E == 'function' &&
  17355. E instanceof E
  17356. ) &&
  17357. (y = !1);
  17358. }
  17359. return n.delete(e), n.delete(t), y;
  17360. }
  17361. var COMPARE_PARTIAL_FLAG = 1,
  17362. argsTag = '[object Arguments]',
  17363. arrayTag = '[object Array]',
  17364. objectTag = '[object Object]',
  17365. objectProto = Object.prototype,
  17366. hasOwnProperty = objectProto.hasOwnProperty;
  17367. function baseIsEqualDeep(e, t, r, i, s, n) {
  17368. var a = isArray$1$1(e),
  17369. o = isArray$1$1(t),
  17370. l = a ? arrayTag : getTag$1(e),
  17371. c = o ? arrayTag : getTag$1(t);
  17372. (l = l == argsTag ? objectTag : l), (c = c == argsTag ? objectTag : c);
  17373. var g = l == objectTag,
  17374. S = c == objectTag,
  17375. p = l == c;
  17376. if (p && isBuffer$1(e)) {
  17377. if (!isBuffer$1(t)) return !1;
  17378. (a = !0), (g = !1);
  17379. }
  17380. if (p && !g)
  17381. return (
  17382. n || (n = new Stack()),
  17383. a || isTypedArray$1(e)
  17384. ? equalArrays(e, t, r, i, s, n)
  17385. : equalByTag(e, t, l, r, i, s, n)
  17386. );
  17387. if (!(r & COMPARE_PARTIAL_FLAG)) {
  17388. var P = g && hasOwnProperty.call(e, '__wrapped__'),
  17389. b = S && hasOwnProperty.call(t, '__wrapped__');
  17390. if (P || b) {
  17391. var y = P ? e.value() : e,
  17392. A = b ? t.value() : t;
  17393. return n || (n = new Stack()), s(y, A, r, i, n);
  17394. }
  17395. }
  17396. return p ? (n || (n = new Stack()), equalObjects(e, t, r, i, s, n)) : !1;
  17397. }
  17398. function baseIsEqual(e, t, r, i, s) {
  17399. return e === t
  17400. ? !0
  17401. : e == null || t == null || (!isObjectLike(e) && !isObjectLike(t))
  17402. ? e !== e && t !== t
  17403. : baseIsEqualDeep(e, t, r, i, baseIsEqual, s);
  17404. }
  17405. function isEqual(e, t) {
  17406. return baseIsEqual(e, t);
  17407. }
  17408. var _export_sfc = (e, t) => {
  17409. const r = e.__vccOpts || e;
  17410. for (const [i, s] of t) r[i] = s;
  17411. return r;
  17412. };
  17413. const _sfc_main = defineComponent({
  17414. props: {
  17415. animationData: { type: Object, default: () => ({}) },
  17416. animationLink: { type: String, default: '' },
  17417. loop: { type: [Boolean, Number], default: !0 },
  17418. autoPlay: { type: Boolean, default: !0 },
  17419. width: { type: [Number, String], default: '100%' },
  17420. height: { type: [Number, String], default: '100%' },
  17421. speed: { type: Number, default: 1 },
  17422. delay: { type: Number, default: 0 },
  17423. direction: { type: String, default: 'forward' },
  17424. pauseOnHover: { type: Boolean, default: !1 },
  17425. playOnHover: { type: Boolean, default: !1 },
  17426. backgroundColor: { type: String, default: 'transparent' },
  17427. pauseAnimation: { type: Boolean, default: !1 },
  17428. renderer: { type: String, default: 'svg' },
  17429. rendererSettings: { type: Object, default: () => ({}) },
  17430. assetsPath: { type: String, default: '' }
  17431. },
  17432. emits: {
  17433. onComplete: null,
  17434. onLoopComplete: null,
  17435. onEnterFrame: null,
  17436. onSegmentStart: null,
  17437. onAnimationLoaded: null
  17438. },
  17439. setup(e, { emit: t }) {
  17440. let r = ref(null);
  17441. const i = ref('');
  17442. let s = 1;
  17443. const n = _ => document.querySelector(`[data-id="${_}"]`) !== null,
  17444. a = async _ => {
  17445. let I = e.autoPlay;
  17446. e.playOnHover && (I = !1);
  17447. let V = {};
  17448. if (
  17449. (isEqual(e.animationData, {}) === !1 &&
  17450. (V = cloneDeep$1(e.animationData)),
  17451. e.animationLink != '')
  17452. )
  17453. try {
  17454. V = await (await fetch(e.animationLink)).json();
  17455. } catch ($) {
  17456. console.error($);
  17457. return;
  17458. }
  17459. let D = e.loop;
  17460. typeof D == 'number' && D > 0 && (D = D - 1), e.delay > 0 && (I = !1);
  17461. const N = {
  17462. container: _,
  17463. renderer: e.renderer,
  17464. loop: D,
  17465. autoplay: I,
  17466. animationData: V,
  17467. assetsPath: e.assetsPath
  17468. };
  17469. isEqual(e.rendererSettings, {}) === !1 &&
  17470. (N.rendererSettings = e.rendererSettings),
  17471. (r = Lottie.loadAnimation(N)),
  17472. setTimeout(() => {
  17473. (I = e.autoPlay),
  17474. e.playOnHover ? r.pause() : I ? r.play() : r.pause(),
  17475. t('onAnimationLoaded');
  17476. }, e.delay),
  17477. r.setSpeed(e.speed),
  17478. e.direction === 'reverse' && r.setDirection(-1),
  17479. e.direction === 'normal' && r.setDirection(1),
  17480. (e.pauseAnimation || e.playOnHover) && r.pause(),
  17481. r.addEventListener('loopComplete', () => {
  17482. e.direction === 'alternate' &&
  17483. (r.stop(), (s = s * -1), r.setDirection(s), r.play()),
  17484. t('onLoopComplete');
  17485. }),
  17486. r.addEventListener('complete', () => {
  17487. t('onComplete');
  17488. }),
  17489. r.addEventListener('enterFrame', () => {
  17490. t('onEnterFrame');
  17491. }),
  17492. r.addEventListener('segmentStart', () => {
  17493. t('onSegmentStart');
  17494. });
  17495. },
  17496. o = computed(() => {
  17497. let _ = e.width,
  17498. I = e.height;
  17499. return (
  17500. typeof e.width == 'number' && (_ = `${e.width}px`),
  17501. typeof e.height == 'number' && (I = `${e.height}px`),
  17502. {
  17503. '--lottie-animation-container-width': _,
  17504. '--lottie-animation-container-height': I,
  17505. '--lottie-animation-container-background-color': e.backgroundColor
  17506. }
  17507. );
  17508. }),
  17509. l = () => {
  17510. r && e.pauseOnHover && r.pause(), r && e.playOnHover && r.play();
  17511. },
  17512. c = () => {
  17513. r && e.pauseOnHover && r.play(), r && e.playOnHover && r.pause();
  17514. };
  17515. watch(
  17516. () => e.pauseAnimation,
  17517. () => {
  17518. if ((e.pauseOnHover || e.playOnHover) && e.pauseAnimation) {
  17519. console.error(
  17520. 'If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover'
  17521. );
  17522. return;
  17523. }
  17524. r && (e.pauseAnimation ? r.pause() : r.play());
  17525. }
  17526. );
  17527. const g = () => {
  17528. r && r.play();
  17529. },
  17530. S = () => {
  17531. r && r.pause();
  17532. },
  17533. p = () => {
  17534. r && r.stop();
  17535. },
  17536. P = () => {
  17537. r && r.destroy();
  17538. },
  17539. b = (_ = 1) => {
  17540. if (_ <= 0) throw new Error('Speed must be greater than 0');
  17541. r && r.setSpeed(_);
  17542. },
  17543. y = _ => {
  17544. r &&
  17545. (_ === 'forward'
  17546. ? r.setDirection(1)
  17547. : _ === 'reverse' && r.setDirection(-1));
  17548. },
  17549. A = (_, I = !0) => {
  17550. r && r.goToAndStop(_, I);
  17551. },
  17552. u = (_, I = !0) => {
  17553. r && r.goToAndPlay(_, I);
  17554. },
  17555. f = (_, I = !1) => {
  17556. r && r.playSegments(_, I);
  17557. },
  17558. m = (_ = !0) => {
  17559. r && r.setSubframe(_);
  17560. },
  17561. d = (_ = !0) => {
  17562. if (r) return r.getDuration(_);
  17563. },
  17564. E = (_, I = 0) => {
  17565. r && r.renderer.elements[I].updateDocumentData(_);
  17566. },
  17567. T = _ => {
  17568. for (
  17569. var I = '',
  17570. V =
  17571. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
  17572. D = V.length,
  17573. N = 0;
  17574. N < _;
  17575. N++
  17576. )
  17577. I += V.charAt(Math.floor(Math.random() * D));
  17578. return I;
  17579. },
  17580. x = _ => {
  17581. if (e.pauseOnHover && e.playOnHover)
  17582. throw new Error(
  17583. 'You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.'
  17584. );
  17585. if (e.animationLink === '' && isEqual(e.animationData, {}))
  17586. throw new Error(
  17587. 'You must provide either animationLink or animationData'
  17588. );
  17589. const I = setInterval(() => {
  17590. if (n(_)) {
  17591. clearInterval(I);
  17592. const V = document.querySelector(`[data-id="${_}" ]`);
  17593. V && a(V);
  17594. }
  17595. }, 0);
  17596. };
  17597. return (
  17598. onMounted(async () => {
  17599. (i.value = T(20)), x(i.value);
  17600. }),
  17601. {
  17602. elementid: i,
  17603. hoverEnded: c,
  17604. hoverStarted: l,
  17605. getCurrentStyle: o,
  17606. play: g,
  17607. pause: S,
  17608. stop: p,
  17609. destroy: P,
  17610. setSpeed: b,
  17611. setDirection: y,
  17612. goToAndStop: A,
  17613. goToAndPlay: u,
  17614. playSegments: f,
  17615. setSubFrame: m,
  17616. getDuration: d,
  17617. updateDocumentData: E
  17618. }
  17619. );
  17620. }
  17621. }),
  17622. _hoisted_1 = ['data-id'];
  17623. function _sfc_render(e, t, r, i, s, n) {
  17624. return (
  17625. openBlock(),
  17626. createElementBlock(
  17627. 'div',
  17628. {
  17629. 'data-id': e.elementid,
  17630. class: 'lottie-animation-container',
  17631. style: normalizeStyle(e.getCurrentStyle),
  17632. onMouseenter:
  17633. t[0] || (t[0] = (...a) => e.hoverStarted && e.hoverStarted(...a)),
  17634. onMouseleave:
  17635. t[1] || (t[1] = (...a) => e.hoverEnded && e.hoverEnded(...a))
  17636. },
  17637. null,
  17638. 44,
  17639. _hoisted_1
  17640. )
  17641. );
  17642. }
  17643. var Vue3Lottie = _export_sfc(_sfc_main, [['render', _sfc_render]]);
  17644. const v = '5.7.1',
  17645. fr = 60,
  17646. ip = 0,
  17647. op = 120,
  17648. w = 2436,
  17649. h = 1125,
  17650. nm = '合成 1',
  17651. ddd = 0,
  17652. assets = [
  17653. {
  17654. id: 'image_0',
  17655. w: 195,
  17656. h: 264,
  17657. u: '',
  17658. p: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMMAAAEICAYAAADiJ0BpAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAgAElEQVR4nO19ebxlRXXut85tGhBoZGjAhEkRISjJQ5QYYwjghBFiVMQ5xhiHRJOoz0jEiahIElEjUcOLmJ8xosGg4hRFoy2IedHggMg8NUQF6WZqmga6++4vf1StqlW19xnu1Hc3d31w+5yzd1WtqtprrqpzBFsh7r9p1aOmNzdHgTyK4AFosFKEKwksBxj+JwEBQMZa8TV+ZvwcitC0Hu+T4R6YmpFUj6bdXDYWCKVqurlwqgMBpCiby5CESEm37Kul30Ay8dwJ4C6Qt1HkFwJ+F4PBBZze8Vu7PubEu0bP8NKELHYHJgV5zbb3rb7p+U3D14H8VeWUNpMAaDE6K2Yu7xkilQABqJlV38dylmlrgUvXbT9HCeEQASI5om/luFQZJBqxXSPU9wrwiW22HZyx06/90U/qeV7K2CqE4d4bv/lETvOjIPcLPGe0YnzIlmktoymzgsgMXDGk3lbhyEyE+FlKZq6tQmwg1RcphbBi4lxO6Yf22/03n5H72U2/qq8W0sxPukNCRAjyzF1WLDtJDn7Z3TN+KA9A9FoYSA7uvXHV36Hha0jGZ0qjlZEYCqg1JFQtF0xh3Z7KrTB1Ev18v9DMlqnQwcTI9WKbNPdzHRbFIFkA2/S72syC1KZPU6+ir1cIyEBukin+7i6PftUlrQewxNBbYSA5dd/qVR9vmuYFACptnUppWWAEQ6s/39K2hnFSOXO9m9HbblVyY6p+FfSL/pdCVGvwFk3pErQ8ztpaJcEFYjxhi7cVh5B3NAMcu/tj//h7WMIYLHYHhuG+67/5wabhC0SykU9KGQTZGOZkDCBhGMG4IsosypjJpVDtGVyb2HJ8bwQkauGsXwNjMpMJdZJqkSQPIllzQ10aAGxKbW8Z1o5ZwgCUTCpENmDR/9xWsmDqglk6af7ynBDcZUA5f8MlH9l74gf0AEQvheG+6y94CgWvslpSH3jW2qVRSwyfHGuJz9q4R1Yb1zBuB1AKh7YZGCtbjczxtdXKFsPGBDmWSA1UXcj+fym0+Vq2GtX4C7cv98mOu7AuguKVbB684b6NH0vu6BJE74SB5KDB9JmdPJutf+vhZsVoNL7RuLF665MVDm1P/9quDyGmXijfJA2c6CczZoJXy9haTobQb/U19yG5fKjGb01L6gOGj19drMbQJ5545/f+4RmdpJcAeicM969e9WSCDy0UZx3UqpUoilRPHkhlWgKjnyrhqu7aBjKd2B9RsYjuEdnkivGvyBKJmKxSdmUK+qaDkv6xoiHJAtbJgi6Lp6ndYvwqLJLL2PoN+MethpYIeicMDfkiMDM9gOyGWLfEal4biCavIufgRdckigxOTrGqK5EagaEfGmhpasuU1j3SekE5s6JvGzArA7TjYNEOTJn258pdM+9UCEVymTLTlgXABvkgnnzXZWftiiWI3gkDIY/KcaiqNiRNHPzueBslk9qHqgo6+832ThV3GAHSEkVEa1yyIgtj1hMQ4wmtK8aNyf2yMQ3ytfgh6//abc+JAFPdLPYNGX/sH+P8xQk0bdZxB0FSNq/ffBCWIHonDALsnzS2ai7VakU8AHMtfJIoAS2NV/nrNigtV5CrBTvTj9Lft+1Y+mLoR+GwgXgqafR3R2BMNrGd1M12vKF1qgC7mLfW+I3VsePXPkUrMuDmh2MJonfCQDYPjm9aWn50Nig1ED+2Y4iy3bbjY7VuQT/6+9kqFKq9oFtbmYwcYHfkkQx9w9ySa4rmuYp2peyDukz1POkEVu3W0bW231C2a3VxCWDZYnegBdKY8rb2VyeiuB59eyFvIHDOsoF8FVNYvd203HE/sHIzmodLw+Ma4rkAVsLEEEXa0bTVzdRd7hGyBbBtitHySU6sIFRpV5Rt5uko4xzlf40ZYPqf6YveKuYpp45jWePKjVQ0SwT9E4aIFHzqBQFAzc6g1GoDWSeQkx904O7/KPKYTVVT6wBcB+B83rrqTetvX/9GkG9CNXaaf/WdqOtVeUidmaeakVKALIBkF8gyYR5X6UYBmcELK6IxQGWZugxgu0WjRlTf5CClIwRfeuinMDBrypRC1X+SylMG4/XLttnmuG33f/IV45qVPY5eD+Btd1/5pVVsNp8LYNfWYlSin42UdV0i0coqGQtQaNh0IX1K7lDy6xvkVeLch2SxxNyjbbMpLZi1AMx0bQq6a5tJaRW05PS4qXxAoncxQ7bipQtjbiEH0rhtsHzqSZMIgsVOBx+3ClNTzxBgY2LMFJgY+lDPJFyss0/xInT/j8YVRUxi3L6WpgdgV7XtXVqFkEnp3fJFrYiJbdSlKhb17D2NU4oyXT1cOuifMESXIQWPkrVe6coIZEpesv3+T71hNmRWHHT8RSJ4sy6IRf8n+92BROF324xM6Ir1+7U6UbB2lCgNvMtUqxFEmyVj9u1tfFAo72IvFVK7VJdLDH2TQco7rCTTT3PfjlmWEnonDDaoY8WYthSE39zhgGO/PBdaOxx84BkYyOrEmDCuielD4d9bB9v0qbAG2h4zE2btnkvWFi/RE2Xa/LkgRJtUsO22BbVFP1K3cUs9/vkCL3nPDrdd8N59eM0Z285bowuI3sUMlmlSvr4jozRo8ME505JHblx3xXkfIZtT1ZdXTZrWHqwboerfaPvk5kg7y5THk4NWm9fPYYf68pGokoDSByyTJ/qmzVDU7JCNbRVBu1pdlIF4XkQsuj4r3Hbh6Yc0wpcBPGHNXc2+kAZrfr4Jv7jgb34iIp9aubN8QH7tL+6ZG5WFQe8sA1BpZMsoESK4f/udB1+bD1qybPB5JMbMbkqbfr4fLuTsTKyUBYG5nmW07KpkN8WO2dZJlsMwei4cr1TWsgj0bTCtgmpK1ptm6+0eMwH56am1337fM9dc+J5vTKO5jGxeT3Lf1C4AAR9FTp966x2bL7v1gtMOmxWhBUbvhCGv2jI/NGaXARCwwQ2y11PnRbvs+PDjr4RgWqJZCNpWEk/nsw3Gv1cXxLCX2eVQuU9S8Fi2FA3UrUljluwmpnjEzIWNL2iFD9WuWeMyJSGMf7oto1yRL923SXH3D85Yufai009ee9FNNxDTn6XgmDTKZKDseQ5ABPsRPP+2C967zwxIbRH0Thjyfv7qoSWXoAHQ3Dx/9GRaiDVAdmFAI4TqK6E8j9B5niAJi3a5Y2GPiUtaYy4zRyqEWduX5znKcSRX0vh3KsDapTx/1uXMFqiS46FY+5/vO2Ltd07/+L33bPofEqcS3IdpEmK7JqjP5zlUMLFyMza+ZQJSWxS9ixkK/7jQU8YPH8j280oT3D47PcbVKAsVfahXbQUAparHkmmLFo0bkzJXlcbu6GhJHxX91K6xWHaUHY3ZY6HaXr2BDwB4zRnb3rZm03NJvIYNHxvkPlun5IaxQ9DiR5YDOHb4QBcHvRMGRWAuqR5uAIlfni86vOX8He6+bf3ORdYIVTCcVKYAbIyWLYWjVqt1mSRsLMtofZu1snJV3GMQuuLUnKVftC3ZRZL6tgmw1SXtsAu3X/yBfZv7mlet/cWmlwPYvRQ+pnnJFi+3L+pKUsckYNNoDNM7N6mHwmACvwQpNBjIfe67+ksP2+4Rx10/V2obbr/3t4sVY6qJz31Rk68xdGsfj2HE5FSpxlS2IVEeqGxng+wUFEwkdvwd+5iMK9llsVrbOGKdlFkqLDHRkLL2Pz/wRDTTr27ub36Xwikr61morVumY7IbHrPVs+svAMCmmcQj26LooTDUGkx9ZDETTWyGPBvAe+ZKa5rTJySatcuRyGe6dntD6zwBCN0iJ+ZaWTZLjU1lFvSz258ItM9RV4wsAJtyp2s3/TSonMrV9uNpPSHfSzQ7hqJN0b8ybrGC1Hb5kLpfbhOfUZS+BdG7ABrIJt/un2lpYvL/8tZVO86Fzn3XfO4AsHmRugm6X8HS1cRIrVXTfRvgAkgugxjvijZ1a7JCxo+umap4hXE3oO0Y7RwvWZdLX21mqm7fBu05UQCQQRA0pG7Pv2knWaj6PEcWntb4eioNvRQGAABLLad/ZqL33HDHPe+effMcbNrYfIjANimDBBQMZ7dEDD1PEF9qS1aUExhV3T7PYN0v6/okLatNSMWUdjyt8Nj4NeXAh2SMquupOuOep47x2+SAEcr8uYjCxtBffPRPGKqHrb4mkTW1ZjuapvnTe67+0itmQ+buKz5zesPmqTaDUq8eJ1+Xdp0jM4m6EFa7FulR7XP8SxbBWIWW+9E1/vSn7WbGCj0ZQ9+0FW7kOCanfc1Kf8Xkdg5y9dzXEDpISV9QjakW5P5Zh/4JQ0SYv7ynP2hGQINEIFxsmub/3X3FF/6K5ERj4Q2rtlt32Wc+jgavSxcr3zfQZ6av2tlsjst1TWCZI/yS+dN9dUMqoUNLBqAqQOmmHactpioDW9NAu1zlRrXptT+rRSiNWwd9IwQ6oDrD1Dl/PUJPhcEEqoKklbszKATAt62/6vPfv+eqLzxtmFDwmn/f9q7LP/PidRtuvxLgi5OvXrhHpYuSy2AMfXtf+912BlS721Xp7FcbrayammU9m2HK0mPopyuVi2Qsk7UixfiL+KMqo//R9NHOg8ZVVayTy6CiX6aF+4LeuW/rr/4KkwmHPnsaHqiY0Zh7AIDIGpBfB5rVgsEdIFcSPJDAk0DuZF0L1G2iahMo6FoBsarcugZQpuxo09ZLLl9BPzVYujBi5ESdxlSldI3S2GqXpBKi7PK1LVhJP9PtnqtKoPRfNkqwmq9Mf69j3tYr/utharXL743Xgfx0DOOVC2RcCeAFoYaePzYPtxIC80gTw6j2DuWyRcjGgylXWfr72pRxD1QromCN7GNbl8HGAMm1yG23VrjTXKm6aAtqHhqLFe50BiJ/SPXJbNiSAKa5KvvLoowhWAYeRpjC/a5V7sVG79ykFMwC2TQXSQm1yalGulw2hPQQAOtXZx2mDyS5uYVFsK6ZljIBQqffXrkRJm4o/HojRK0uG6bJ9FsNoGBKMa6e5eQu+iluMdmi2K6tXtK3tCWTtvurzAjSaEx9jTxGxS2Ljd4JQxGM6QU7cYbZyiyOlZn8ITFfvKzMZh9UHSymera95J603TPVsDnLk1tIQb+yuhGCwuWL1zPTFhOQykCFgyjHb6yJtUx512+mmcJY6zKpwY1zK3YiUj/N/LOaf6BT2+cumfHnSeoVeicMQNTKhmkBlBNoTH1ZK5ZhZtqcji1KtB4cqzpZwRr6xfOrdvIUWrR0ObS09aKG7jpN9Ief51DOrYZfCpfxzbX/efxV5seUU4Zt08909UKtsErhNuNCjj90drr2QS02eicMaaLU45D8GK3LZPPuydSnBjLjpW+XiH/ZKtTnCbR6zu6oP67ucJGvUReM+rClkBjSMIGxKolOYxnGuG+kGbPZSg51+bJVMMMvhcuMudiyUVsl7RbsdeNKoXSrsryE+esal1qOJASQjudUuV89Qe+EIfmxhiE1qi3OE9SaHShMeHafqn1FRQxg3lkXClkTpjSlaSfft/Qtt2QhLLJSiT6N4JQMovuFOs9zwJ6nqOgXvJWF0KYyi5SmiZCtK1O4qZW1KzcA1pbVzn+2REVWDGY8/TMM/csmtV0Nye9ZlrOTm0rZeAPlnJe6qO1GFA9Li7S4DlE2K/rSRd9aLJb0VYPSCmC9Cm4Yx85LFLRwuTF1bXuqsROrt+kDrc19Valy3EX1WjgAVuOpLVYX/T6hd5YBQPTxE3tm6wAkl8HGAOFy249O2rEVdxi3Ad1MkHxqq50TrSx82oAVCr2Wv0KGJpgtOle4R5a6pMa66FsrFYi1LYakXaWMOf8UAyR3syOYt+OP85XcU2MtSyuLDvpqCTvusS7ZD/TOMqgFsG6P3b4NdGnwzNx2sShp5vjgas2U7U5bS2V3Jm9QSy4cyv6hYIqyTWVqxkNBxrQkt2xU4BvaGDZ+wgwWiVFN/4JwSjl+0blCi6mt5dO+WDdn6PxLUT3HTEbYmVzDfqKXliFpcGW0lt9flYsf9OGqFswOlvXRDZ3sQbRcLiNFSYNTX2Ml/eIARWIYKd2uwrKZAVi/u14QNK1CNXhmdGVSbSsL0CjNXJq0HBcpzczANfmafjV/9fih44+WKQ/QjK5/QtFLYVCdrUyUGJq5BOprqgWNy9AKP1JRpuvqAnSZfBomy5qSqeHav1cXqcjfJ4Yz7Zs6rb6aem36xfBh08FgqYWHWs9i/DkjlxSGVPMnSR5abVFviNLv7n9yzTqsXp/QS2EAkCdXspZpmfRQEIGpcj11F+oYItxuPwgpXi1zxevR32+5VKbxQvAMneH0rRsUPtffjZT7ZX4fojSLxj0pKrTpF7nT8prKa4opjDXS+9bSdYHVu5aVTeSbzvp9QP9iBvuwVMtXDJSYMlkOG9DlvTqFb43Sjal95qJN4/60sztS0Ert6jWtbpmX0NaR2a9K+3bSKq1YiqFSu9mq2cP/2v3ijIKho0xfpF2LMUlJv4qNir1YHfOnma32/CNnt3poHXprGYpV6KSZsxtgkTVrro3atUB+EF3arW1vzKIXsnWyrk1BX2XYuMSFFhezL6fDurToGx40TZT9N32zlsyOoOynGX8RXFR9QrUKrdZ5yPxVRioJbqYTVYDktvuI/lkGID1YZtVtwoVSS9XZo/RvKqNaPnngsIffuzSY+t+WaYhMs5u+akq7Mm76bHpg3Y1O/95aOrVilr7pOJktYRnLaBmr5au2h8xfsm7GSNk4JxAePn/sasD0a5S7tZjon2Uw2k/Mwza3CjVq3RyBVGUiI0guK3UDMEyXC1T0c/14M7ZRlrHWq3B3kgbv3pHTaamSkOQ2Wxvh4r3i9yFsH61CsMOz5MTSF3Mtu6PWOpZjy4ytliPPP8vX4j5RP4M+oH+WIWrBlCLVQ/Cs89Rtv9u20dlmVp6Fj201fSjesSrLwu5AOabO66Mo01HOasciRrG+tXFPkrtlrIM6/mmu7MmxNMD4ml3GMn3b9e3mZvx2lmlGnoYvZbs04y8sqOknDP1asHuA3lmGNGkEyKblHxeLA4qk8aqHa+KGsnrpD+uNei9Ne41Am46Ma55nqTWTeUnuWCajurH28XP369+HKP17MYpVisvFnJCAmb8s3KPol8qlldJNJO082/Eb5WLnXy2CeU5Dt30sInonDDqppeJgYgDr61p/WzVk3VhSTvpv0nrmQUcu1BQmbFtWa2dujW8tfdtn60aYH2VEqXUL+rG+QPtiJqQrVgCTexTmwrpoKORX76vvnxiysgrDz3NoGbMuUisOmNSwEdTiRF+yJNJHL6mHblJiHBtEIzFFoWErJqF5b59LfCyFuRcIKDTV2/t0rIuQhCJqvXKfUQf9PJqkFS0j2eo6ZjF1WvRTz5GNUtGJmr5xuapxtV2rbiEtp1jK+VcfztC042m1Wyzm1cquH+idZVAXGsgPzfBAKtTeT2/cJ2U8o7lVsxXpPY1FkOsnzQWr7a3LJclC5f4YSxI6XclJZtiWVbBjliyoagyttcseW+3ClLtjkacs5fx1qrJV6Ph9iDjqliuZYhYjeDRzqPOXXDXzFZgap+jzGJHeXmz0ThhKBVy6MpaxOn/5xronkrdxFAtrrRgku2YpTRlfrVuW2ixikFIDJjNU+N25XnmeoByz0tJ6otbGMryxLqPPc1j3qN7XZcXUvEuuTimEzI1VAXBBPjN8LNV9nqOfXxGj6J2bVGQuhsG6HJVJt+YelTku2tT6DY1A6MPOaxJ1eet+hH5ogBzcLhuTZE1o2yw7kzVoKXytAJNlf1rjVyp2/Ch9/7LFdv2iXR3zEHemc/4T/W6LZZw0M5/9Qe8sg0LSP3Xmga0HDrQfKlAKiGkuuTJaRrVom4mMSZf0sXLftEyZNQJM8Fhbk0rbF1vUI53iUI7V5smt056Y8UvH+FtzYyyoGVadXUp9qayjdj8nGLRbxmLoGDDsPIf6hf1Cb4Uh+6PmC2/rwNYEtKleelUXBbAxgFHJLe2m1/O17JJYL0yq+8k9MjSsi2JjAEMoyUSR1dE4xo5X/W5U46/6bOWsoN9yuZCESntdQ9dWVDAzfbaeh9Xy6i7mDBOM1bME3DJMhNKbLc2w/ZaJIpmCDu0umSlydJrdluIXRNFtXXLgl7VnuXCUTE2ndaEKSGTI2Kjpf5vBC60bVGvl99fzhKSdrcItzxPYXun8dI9/IFhnLkb6+ccfhy2cFdbNtFkIezEP/UIvhSH741lLM/nMWcWQyBNrGLEVLFsthrrd7MnWJj/1A22tmu4X9LNblZkm+Sp19aQ9A/1kXkDz7d551Na0mDqWvuR22+M3LXWNv2TQNw4GchSAc0WwuWRoHUBpvYDsIhX0C99Ue+/CMCHaD9e4ofVDK/z4NPHWh7UNwD4gFO0nYTIMNxH9WKB+wJl+pNeRUpT0ymK8afwxCFBXq8wG2RZKVgv/shVDDKdvX8P9lUeefMGeR735OYPl2F8GeKeI/KI1ftN4Frx6/N30Tfa5N+hlNsmmTUvfPD9gtQoyELJprhkAl5DcAAQJp+Sf7pP4ABpR6RegARp1bwAMRNCgKSNHxBfGik3s20CAJh5SEUEDYiCD0F7DSB+7gzic5F7F2LL5ylZB3Q/182smq90rlJYiuW9Un15/TKucv8KNYWmBk0uXDRQAYPfHv+VnAN7Gyz79rltvvfo5Ar4akN9otSvmmQja5zkMnUjg550MsIjonTCodqpThuEhVl/WK/J9kcFLVvzqiZctRl8nwR3fO/NZDfkPAPawv+1stXHgoVKTFqvQquGZ909Zhq3bCg20nRFdtbfVbdQTPlfSoNcfeeJGAGcDOHvNhac+enrz5tcAeD6I7bJBZv4RRxpraS1xvD4gzhsxbYuCHrpJAUUQiZJhwrTLj1cM8PidHnlCbwUBAHY54lWf3QZTvwXw3mIRjKVWjR+S2bMui83ORDOSNH62LlX8US+wpDbQpp+JTDSmlUe++Qd7HfP2P3zQDsv3JnESBrI6WRXY52TGFccekwCXL1ux/OTJZnDLobfCYJlGH1bOrRPbYPCyqK16jxW//oqrReQdaceChV2Vlayv1V20wpIzNe0t1imu0HbrDI5Y+aD5Q0l/Bvn/Fb9+8m0PedIpf7vn0ThABoNnDAbytYGgDr5SmyHukR8OZPnxuz3ulHUTE9pC6J2bBFgBqLQYwjMeiKzZ4dATLl6s/s0Kg8GXsXnzaXY7Q86QxVcbA5hFwZS7l2w8UuRg/P2EDs2cnB99b6xL9q80tprZoX2RUxoAXwDwhTXffOdB4KaXNoJnCvFwggMBbqHwsoFMfWyPJ77jbBGZzARtYfROGHIwVgbNsMqTzZWL1b/ZYped97n69ttuSNo+Zb8sD9s4oQqaS7+7nVGzP0SSMgxUwULaYJrXXtBqQwPgqTmMc+Uxb70KwF8C+Evy01Nrv3PDg1Y+4aS7c4l3zqH1hUXvhCEHY5LSg1ZrRWF5xOL1cHa4484bDwQqYU/8rtZCzPuK55N1rDcsmveq7VXSxG4OrNYetE0jXNkNmx+InDgN4O6xBXuCXsYMumpbup7GOSD2vOeycw9bnN7NDpxujq1TqcV9k0FTza1uDQDjd+vH4b8P0ZVOtSv3qZ0ixs4BeNPfrzZaUPROGAjdPm1z7jFzYnKCmzZv+ih58TaL2NWJced/f/hhEJySkzwE2ahfksacgmEto7FDlTmymRnNAtmNfe3vUGqXSxYkLQNk+oPeccWWQe+GrcFg6xAITTAZ/ODD1l16zYXrrvjXXrtMt3/3w0+fnua3Se4AMeMxatmurXSe5zDp1tEruznOsOeobZiRDvVkf9TQD0KxVC1D72KGYq9QYdhZfIzlHoeNvPzOH599+YD4UUPcG+52PU0WL1omPPgGAwzCCrQt3yCrixaHNGV7kePYxHPJkN0AHt6Q+9eZxjgAWOFQt6Uc/xDYclWMYTNxxepa3aLWbxojEMYyL0H0ThhEhARj0qRMHwKAphjzQXNMgTi0IQ/NUWdO06TtDFJnaZC0LRC2YrQCUyHQ0DBIvTJu2mpyJiexs7o3sUshEcaU94cZV7IKQG5ftJlyN6xqcEs/9yuPPf8+gw2200Qbt0nnuIcbhrYgeucmAbxZGcBmWbr385v0a3xNK7PMQjRsP325YxRITrQykAqRlIyXBKHKBqW3sf8pFlCrwZJ5ad4n8vZanTFKWaGyf7aiHVMxfhtzVP0p0riBxj1YguihMMjqasUtatC4a6ZwLewCBIoAW5GyJAXTZCFT5m9ZDTFFjb9eaO+aEVUSbJamzulLLmK7mgNdtAsDKQYY9/sQdXUmpo9lbSrVHAgpxr8Ml2IJon/CIPwOKo2VGDo961L76aXWEU5jMVraG5ZRkBnGFLCp0EJ7VylQvdE6wpmaLIUwa2+grZ2RNH6x76jrPqvxY8j4K7PY1S4RKw/k3j12PfgKLEH0TxiWDf4JQPanJT/kcj9/1mjhk2Fm5IcrRamS6aR4rc5VMweSyuStOMHk+nO3jJtVUB5HP/ejGL8Zu6ASCqTlB2P90A7MzRs7f+3zHAIh/mVr2fM13+idMKw46IQrIfJV/aza12qx/M1tWdOmbQ6tYDPHFtmHNlYlMU739mhtM+f1kbdEmBNp9oipHspJbRsBSdobVisPsQB6LcVASDFMbaFK+qa+WtQUw0RXy1i7MGYByGbZsmUfmMnzeiChd8IAAMsFr6TI3WkV2mhmoO0bD9Ps2fbHckY71lq5y9Kw0p4jfx/CWLLklmg5bUPXTkxf602idoy5n5KE2FodmL5VoUoxJi1l2x6yE/a03Y48+fJWM0sEvRSG7R954k1TkJeLJvOtZi60eaVVrU+efPXMmDTasStWyP537XMbTd7hz2tsmtusBqSamerMmfMIhqbNapXnOZjbN/FO8Yocv7SzU5mWtSK2rIAXrRwcecqQR7Ik0EthAICdDj3xnCnI74OYznwhLfVnGaxBs5gAABImSURBVLvI0FiOTNuh27ozcHKTi1nrIZUVyWajuJYXvsRoWrQK55igkpbC/cuCWQTDRf9LobULb10HhVDXLw0GQKwaLN/+d+Toozd3TNCSQRd39ArrL/3Xp2xm81E03BsVcwLMz9wyGYHiiXdYhNbhehNYqgtt65bxCRDNU263I9uV3ieL0EE/DyDVS2OMzFyvT9R9yzxfJheK8VcWIbZPkGftIfv+mRz90vuwxNF7YQAAXvfpndet3/TXEHkpyW0Ds9jgUUqmSQFuZMJKQ5Y+vxWCwNB2D5Th4sS0liGzcNbBL+P/VSxTl6vaBczh+uQWiul/GSTb9nOyQMvbHFtWFFFxXD4lg1evPPqt3xo190sJW4UwKNZf+sk9N7H5kwHlhU3THICklQMk+c2lhrTasLXa2j44kF6tP5/udmhYjRvK9lEwJKp6Zbtd11LN1E6m331GQWwd05Zx4+4F+XVM4UN7HPmWr/f1xNliYasSBosNl3xi703EURAe0FBWCqdXArIcaMAGkBgNsbFatEl8Z4UoMH7TzdC652iAGM7nDXtNukzA/r5xsafP8lu12S/RaVL1FkMPrRPoDgA0rU2EQfwEuIvk2oHg5kbwX3vs/oiLl+oagsPhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOB4okHEFSK4EsFZEuAX64+g5SA4A7Bg/bhSR+xapH8v0vYhsXmhizyP5XZINyScuKLE5gOSxJK+Nf89b7P4oSP4ZyVXx71GL3Z9hILmc5Mb4d94E5Q9hxt9V7Zy4sL0t+nFX7MNd89XmshH31gE4Ir7/YwDfGNGxnQAcNce+XCIiN82i3g4ADojvV3QVILkzgCNn27EK/yEi905Q7kDkOdl5nmgvFLaJr1MTlJ0276cAgORhAM4G8CskHyoifzPP/dsiGCUMXwHwEwCPAvAMkg8RkZuHlN0fwBfm2JdXAPjIHNsYhodj7v1TPBTA6nlqa2tESxgA3AJgp/j+NJJXi8jntmy35o6hwiAiJPkeAP8cy70cwDu2VMdqRB9RzfhFIvLXi9WXrQ0kXwdgmKs7MO+PIPmlIeUuE5GT0CEMInIzyeMBfBshnvgEyceLyCVz7PoWxSjLAACfAvAuAPsAeDnJU0VkekydCwD8y4T0nwJgUj9TADw9vh/mphxM8pjq2m0AbgDwghFtvwyZWd4D4Icjyq4Z088+4v8gz90o7DGinLp6XZYBIvIjki9AUFgPAvCvJA8XkQ2z6O+iIAkDyUcCeHRHmUsQhGEdgD8iqYPbKCLndJS/QkQ+Ognx6MvPZ9D1uvhn8WUROQ5BsIf1wwbe54jI9+exTzMCySkEZpoJNorI/SPur0FQCF0QBDcXCErmliHlfh5fbfZo26IhkS9Gb+IkAAcD+ACCR7FVwFqG4wCMcj0OAXCm+XwngC5h2Bqxn3n/00XrRcARAP5zhnX+GsCbht0UkTcAeEPXPZLLAaggfUNEjh9Dy1rlLqF9K4AnIyhWkhyISDOmzV5gnJs0Z5A8DsH1AICTFziw+hcAF1bXJslQ7RtfNwG4dV579MCDdXtawiAim0i+EMBBIvL5cY2RvBnAXnPozwqSs1kDWyciRZbPCsPnAFw7poEdAZwV6/3XhERXIJhMYOFTjBeJyFnDbpJ8GoDdqsvbANglvl8P4IVD5vbnIvLNjja/DOBXOspbOv9GctTi1NNF5IqO6z8EcNmQOrsBeNqINhcEIjJNciOA5RjizonIlQCu3KIdmwfYVbyrAVw9qjDJk0yd94wq21O8E8DhI+7vguHB/9cAtIQBwC8jpFtH4SFj7i8fcv2cYTl7kodjjDBEDf1rY2jbtYVDSP7tmPIWB05Y/mIR+fSYMhvRtuqjcDRC36cBrJpBvd8EsH3XjYndpLiw9hfx4w+7tOQSxU+RtydYrEReBPwZysCzvr9QW12OB/DcGZR/GPIzngQPmbD8xwCME4bbReTJkxKOK88rANwzw3rXIYyzhZnEDG9ANv1bzCrEAG9n5FVSANg27pkCStdrJ3Pd4vYqJbwWwHMmIC/otga5QMhUtUDynwC8NH58ep1zJ/lhhJX9hQSxMIJm97RN0v4DJ4COJlmzFZcC+LcF61EbxyCshlscj+5A9/T4V+NQhNV0xf0i8q1xhEmO3cg4AruY97d33LfuyYJYBhF5PoDnd92LG+5WisgvZtouya8DeBKCi7J8a8kWjcNgXAGSDwLwCQTNPA3gDxd8l+AWBskjSL4q/u0xT83uat53CYOd+8VgpicCuIXkzST/ZIZ1dc1hCuU4AcxZiSwaJrEMpyNng04XkYtnSMM+9NlowJ8D+OQs6lncOeb+7wJ4c3z/A8xPelUtw0YRuafj/oJbhjH4/fi6F0avuHfB7lHbE8HtBACQfDiAz5N8L4CzxywG9gojhYHkq5H92isBnDILGtaHXzfTyiLyYwAvnAXdxYYKQ5dVAEphWDDLQHJvhB0EFssAPDO+vzWW+40xTU2LyPfi+5+b63ugTP8+DWGB9qMInsQ/z6Lbi4KhwkDyWQDOMJc+O8uDHDateMcs6o9E3EP/9vjxlSJy0XzTmCXGCcOWcpNeitEbLPfAZCveGxC2ywOlMOxZlfud+DoNYNimv16iUxhIPgFhf7p9YCeT3BXAn4vIxhnQWFBhQGC6Q+L7IsVJcmqCjYXzjpgBU8a5bUgxaxm2thjMLs6mNCXJ7ZHPcFwoIsPG3ku0hIHkbwL4IoDtOsq/CsCjSZ4gIv8zIQ0rDMO05EQgeSiA0xDOPXx5VCBPci8A15H8EYBTReTf50J7hphkzHbuF1Jgz0a5W+DpAP48vj8TwGcnbMf28Yr4eQrAI8z1o5D5Zus+z0DyWACfQV5m32De/whhK/ARAH5A8vki8h8T0Pil+Ho/SvM6GzwT4WE+HSEbMmoN4NkIfX88ZhGrzBF2lXvYtgS7brJgwiAi1wO4HgBIbgPgQ/HWzwC8YUhwP67N+0leC+AglMJgdyBvvcJA8rkIWxH0IZ2FsFfntfHzqwG8BOFE2u4Azif5VhF59xgaqiWvmgeX5ffi61qEcxOjoA/mFxjvE1vG3DSLftU4wrz/7pAyVhHNB81J8AqE46gA8JcqCDGdrJb+cyIyyVnynyAIw8Gxjd0AaL3/FpGZ7v5dSfKaGZRXl3jHGdarkwkJy4CQZ0dIX2qM8H4ReX1MjymmReSVJO8E8MZY9gmjqJLcE8CD48eujWgTg+S+AA6LH88bJVgkH2L6dt4Ei0J7m/eTun+j8FjzfpgwzLcAjgTJ/QCcGj/+F4L7pBDk/VG2X6PwPQTruwvJAxEUlbpIk7peFlMIx3NnisEs67Wg2ula5Fz3X4nIKcMqiMhJUSBOQtA0o/BM8/7S2XYy4sXm/WfGlH02smBPYq51o916EVk7suQYxAWnx8SPPxWRYa6hZbqZJCRm06cphIXTnRGe85/Pw1f/2C+IeDxyCn4DglcxU0xjZopoPwQhJoAbZ1BvbwxJHC0DABG5neT/RzCR7xvXmoicRvJTxhTegLA8DwRfVPFs837bGMwCwFtE5EsAzkU4SQeMsBxxv9Eb48c7MPqbOrZDcOkA4C6M2VsUocKweoKy43AQ8ga8YVYBKIVhoRemHobSin+12qZuV4yPJ9kV9H9cRF5rPv8QITmwK8JWHZ3Df5ylQlkjIuN2/yaYjXp3z7DeRBv1niciP+sq1AURWW3er0fFoDENe1T8uBbAdcjbiXeJ9W7CZIdvTkFmsPeLyCi34lTkFfNPjimrwqO58mFHI2eCx5n3o4RBtxE34/o4V4jINSTXICyACsp9UzW2GXJ/B/tBRBqS3wLwLAQFAASh3hq39gMozzNMLAgT4hmm/fMxy4wJyd2Rz9H+FN0b8RRHIQf8tyBvsRiFY5A143wIg10tH3UASv3rLfWNdK9BGRtZ7IS8u+BShC3XNbrc3G8gCIPiYyPcwmF4OcJcbMl52AEdazsLeezTMsVHMCKKHwURWRsPqXwcwJs7vsDrPxB2Zu4E4O+RY4U/FZFJFvnsNupxGaqRiIGkfsvGjQC+M6K4Wob1c6E5KUYdromJjlPix2smcZUjbJZuM4DiIBLJhwE4JLrEw/q1RVepRaTeAZ2wIMIQmVeZ4ocicgHJF42psw2Ah4nIVfU9Efk3klcD+HHHvetI/g9CWli/reE8ETm3g8xzELTQ5khzP+TtAzcC+Hy8/iwA3xeRG0nq6vYk+fhXIluZM8dksdTt2CLCMFfUq/kxKD/NFLlWRGrL+miEI68XAThhNtvFtyTmXRgig/29uTTpVw3uDeBKklei44sDhn0hVUyjnouQ0QBC0Ny5JbnjYb0e2ZJ8MJ7vfRmAf0TY3vy0uFFwLEhuC+AP4sf7MT6jon75uB21WwI2HtiP5OsRviRhH/N6FYDfNuXeC+BY8/lgko8TEesaaqD6BCxwxmw+MK/CENcCvon8oD875LuVuqDnCA7GhHljko9DSLPqKvcGAC8a8TWYtu7bAfxZ/HgPgLNiWvRYBAH5JQAXkvy9SQ4CIVgdPQn46VEZFZIrkK3Ygu7fIflQBDdy1/i3W8d7m9k6HN3nxNPCFslXIG/pAIK/vx1CvGYX7B4ZX6+d0GXtL0i+lxm/PqbsISRvMOV/Flcl9f6LzL0Xd9R/lrk/css2yQHDQZz7TZ2bST52VL1YV0i+jyXeYe5Pkfxnc+++6DaNanMnktfNYK6eZsr+U3XvN8y9huT0iD/FaSNoHcHZ4R6Sl5P8CskzSb4ktvdUhm/sVrye5NtMf3/b0L4sXj97WP9mCy7At3CPIzhWGBiY609J3mvK3sLsa2s5Kwz1t96B5PvN/cfU92OZFSRfy5LxSPJSBqs0bjyHkvx8VbeVCoxj+rAps5Hha2aGtfsxU/bbE/TjfFP+ZdU9KwyTYpQw7GbKbWJQGj8m+Q2SnyJ5Bsm/MWW+xpDBq9uZIvl2kptN2XfFezsyPHOSvIrk9iT3ZRAOMgrSfIJ9EwaSjyf5rerB3Eyy9T1CDBpFcTXJPyB5XPw7lUETkUHbP6iqewDJD5Bc18EIX2VwO0aN4zEkzzMPR/HOGYx/A8nf6ijzHFPmLoYMit7bPzLFrgzW4zCS55jy0wyHb2x7VhiuIPnFIX8XmnJDhSG2eVDsQ+dxTJJ7mrZaq/skf5nt5/yhqszx5t6VzAJ/77jnMxuwL8LAoG2+wja+wrB1uqutvVhaj2FobbVm0GI1LmZgxJHnuFlqPcVdJF87ql6sKyQ/WdU7zNzfm+Tt5v4Lq/pnjRnrX3XQtMJw0oi+HW7KjRSGCcY5VBhI/hLJteb+NMl3d807ydM6xrggJ93YI2EQlprpDpKvmaC9l3O0QFzKyr2K9Q5i8N1J8uskn9TV/hCahzL7uLczmPoHj6+Z6m9L8jux/mqS+5t7R5JcH+99vKPuiUPGuYHDGapXwhDvnxvv3cBw8GtUW+9kdqVuYYfLNR/gAgjDyG8xIPk2hAM9AHCciPzA3DsEYZHqQwhbJCbqVGTEX0H+cQsgrE7fCOD6Ybl5hi3m187mG7JJvhEhc/ZBEZnx2QaGvVHnIHwzyOrq3mMQvm36WBG5u7q3M8LB+50RthzfgbAt5SIR6fy2a4ZtLPorQ5eJSOf25DiPR8WPV4vI5TMdV0VTLfIqEXlTdX8lwhcKv7ke45D2DkZYY/h3EVmQ1DHz3qTWd6bOFnP6Sg+Sy2d4BNThmBcwxKVTCEcL5nQ8wOFwOBwOh8PhcDgcDofD4XA4HLPG/wL++QhYbLqZPgAAAABJRU5ErkJggg==',
  17659. e: 1
  17660. },
  17661. {
  17662. id: 'image_1',
  17663. w: 1080,
  17664. h: 3,
  17665. u: '',
  17666. p: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAAECAYAAABr549KAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAQPklEQVR4nO2bW44cx5WGvz8yq9gtkbQ1tmDIkAFiYMwDX7UBbcLrEbgebYIb0CsfBoJBwMIIguwZXXjprs44vx/ikpFZ1RQHMPykAJuVGXHucT0n44hfy7+12FZ/efZMfAE8gy+fPtVfAOp/z58/1+fAc+BzgEePxGfw4sVf9bSif318qD/X55fztXj5kidPnvDNt9/r0z/Bt99dF15/hPT9UQBp/lGaHnQZfj8dBPB/P74SH33ER8APP70SgKaD+A3o1Rs95jE/pzcFLxUcpbfl/c1c36faPgteI63vb4APlfT25iSA6wp7k05qcFdccaPSLk3idCeugNtU6Sehu9qedAROWsSptJ+U9IATpKTTXdLxAHdKOgBaFqGkOy2CIwctEgXvThJL1uFw4G7JkhbBAZRFhWFZxOGAliwkwQJKWiouwEFJzMAicSi/C0sxtKoOWWJemBeJQ1JrXlRokFPvG5HXsSIV2jlq3QytPQOEYEZacRYNtHIWU5UjF6ZT001SLkQKrUkrXsQqA6U+k5k0D7KFyBmYakXDmQjFKuM0jP1oPHLRbYe35QvQcBNZ1jQ2KdTEH+VkggivfACYReQzOHKls6GSBLn9Y6p2yVE1TcCG/gQRWgnWMklEVAQIvNONitfgmzxWkzGAFBWU0tZl6DLtbcZg51irCJImFdxo/1Z7jODyyn/TFNq8d/064k6W2DxO07Y9iI6dBrk71frQnyev/OPcnnH2UMvk0hcp3YPQGGZt9OmCJPZEpQv9+c4yzpX6HgHMWtvG310ZO6NVRWyrJG37fOy/Up/OaralaRqBOsC5+gOH9ywRVZhhBL0P+jjgEqSE3w34S/TSSs/2vn4cj+W3zd8YbLcRqeI3Wr8gx2iDcUxWW9ipyxQ7cc8oJ/kyv60GWPfY7HxKkOQiS9raZ6dCdP4rnR1XcrYvdeBa8k7+xGasJbvPmZxhqtCevdJs/M91DNutV7d9Je8tmil2nxLkyExMZMvjbElddnu1zSB/an23zuPETtZLfTHqCUCByVWeor49AUxTlSC8GZONd186qnxpqs/r+tNtlTNUvRvdsz7vsNHlal3ktI7VKdkZIKdhTo02Ks/TiLfh38Qe8G33+rzayGmVcaLwnRpgssvenVZchwHM1PHmFG62siczr3CVsqGcuDyF89JsM8MM3tgpDDPz1OgvcBde5vJuT4YFnDx3AWzugHmVyZ1/5VPEKHV3VUZgJlzFMY12k9dh5tk4fFd1Pxxm+1Rp2z558rHy9xzGs0+cOB5nc4LbQ/joMLfA8eCjZ5+4xT642/IYvnL4BiAOhfYt+Jh95aNvBn2uIpuro4nsjZ7xwPAaX1+ZN0AspT2uDK/hg8X8/BB/mE3cGeDRww/MT8DDxT/+CH5U6vkB/PihAT6qsH/P5df5seF7YvmNAeLjk/kf+OQPbw2f8s3fvmH55GMDPFneGuBr4M+nVwZ4ATx9+p/mK+Dnn/2c4p89Bz7//PvC/0vgxQvzRXXu+KL3q3T/+vtr+dcXbRzu9ynNKecLePYMvgC+fKp3OubAi+tzx/zlXBzwJwDzA3373T/0yR8/Ab6FdNR330Gaj9L0k2B1xouD/RE//PQ36T9+r98AP6XX0qtZpLeChyi91cOH8Or1JL2dxMNJenvbHPf0Nt3qmmvQSVLSjZK4PenqCm5vk0iTkHSlOxXnNOl0V54fqDjap1MSWsTxgFIk7iSUJak4xpJYFqGsRVM6QD14Zi06Fsf4kMUyI0UiSwtZM3N3rtWcP0UihzLSBGRJSJpz1jKHlGdR9+AJCYUySCFBVKc8isMkJ5iIcJpEqYtQdcQUFb/UF7xpmhThCudETGIKRRSchBQVHyRJStR2ORW+CCzZqTqHKSQlrAgEk1DlkSRZCSxkhZVSCkVYiUkoJCRcaRsVx1FClkIJWSSKDnIiJMsSStgiWW48HCJNRTaKnFiVJpJJCGEnqejiQIiKj0SFwbTASLgGHGpYBoNAzXEs9i3nyCRqnbGKh+jqKAqwcnE0Gq0yg1fnowcKAIdAuDrTogbXJGTjDlzajSksXbwGq/IPcBGZ5k80OdsbBg+Onlu9CHuArw1e8aNpg6Uib33tQrcgTDsXrbR6AKcdGJv9ql3UzmhlkHslusrZeseuJt3Yo/x6o+8eflV/ALBdTe069HfBTRqXLe1qaMImla4aAdTYVrm6bbfiuFkMrzoOtryg+14ul5Wnnd2q+dexdO5bNvac02tcPfLd8KvmbgRKN6jbcdV95a0N/oao+1joLdUYG3NUoLO+azpshnzlawmZrfoNSBdtuQ7ZLc0R5lyDOv629t/y25Bwnf8b2XQOWzgNdj3rlta3q601ot7Tv71xJ9Zm0Jzp1/n1cc34X1ejtY1khoW1tI0KDW3b50GfJpjHFa4Pm27zcbk9L7r4uFZcGvDrktbKao21B8UawelzW7buo3suY+8+1SV1lKrb1aA0LkV7+2mltVZXGQe6g/1dN7jNMrNyhbqc6EyVXuFB0DK1Rr0Y4UvdufrawfZ6b0EqPhsedTpXew/bzzjLBQSUg1eR0WO8ZJ2AG+HWBawu5tZ+W60TtEEONh8E3Om2Bg86n23/d75thRx4DjZJW7p9saj9MoowMBydtygzmjQ4/5Y2u1lqpyFc5U5NkK0OUgukbGypYROycNdl7MZy1Km7R5vPVQ411LbjVEQNNnSB3Q6/QQ65bUdmDblXvYbFUrJXeQ01vteDXB7w3bYaY4OTazSP1Ow/9r1to0Bysh3C2FHnUBQr2KQpJEdkSHJgmSRbDhY7TSmiHD6dqJE7K0hF9hK3VAlsJBkrqrBGKnFOO0pg1A4li4hwMtgp4TCRUnJyRJAM2SWQK5NwsYejjJvkEqSycxlPTlKAC2wZAU6O6LAk55xNarjJCZd3R2TsKSXnjFOFn5KCbJPsnGFKKRbK+0RypgSPphbMnMGOKAG4yfjOCzAzFZPZxor5avKyLODJnm3uCixzePZkKt0727Pr56spooRja8BqzuEWxLXNYQo7Sh+c4OiDbw9LlObwlY92ZN84fPUg/NZHXzmMj+bqle0HNYAU9vUD8yrb19kPP8x+9Qoc1z349Ojh4h/jQzsW88MP/PbxQ/PbO/O/8Pff3pl//A7XwFEsp/LbA0a/M8utX9Yh+mR56zFQRAsSwSZQxOefG74sQSKAv7xwiRF9wT5Y9D7lPT91/Fr+lWXRfiuuTvC8NIgRGoav8gAcpBYoAUm5BiEAhq+426/gLbhRv4xG6OLXwQtlmiYufmL7BfQS3NjIMLQWOdpXlXJAsAhKcEP1C63rF8ROZQZFCdyMDqMqsVTf2m9ADF+he0mWAkHlkyZB5V/4KlLZpVTCGGo7Yz2zq3ogdSeT1i/uSeGscFanULZ/9W21C9T3yvGktnNMAjZfibWeuO4JbmxWgdDKwZdcgaZDYd6OinYJ3Aw21iBn1d3IBWmQTUG9qTDoJaMWLAjQGty46Imcl0ZLTfbCpb6cnyAvELiv5QzSlKDVemwWa99X83f77OQf9E4l+Gb1MVnItpNTUUttcg5E+mmNzcPofN4v/vbV53VtLFwgYu/H34Z/HeOsf97pr2F+NHusWg14rn/a2Q+VwJylfhrtvoA4Wz9pzVt5KqV7dBn/9gZoqu7gLtrlMs02LqxhjKhMlTpHmo4Xcdv4O5PVbZyk9c/teQPX1bmgWnNsL8ei9vYYNOyRtPfD2TmmA6kSZPF+4p5JvI70zr4tvbyjN96ll3Yw2veBi01NUjnFFtu6fxBqI+vd/df6f9fe+tSuNHyx/R69Gr0N3Xv07/v9Fu7SyBjGnM9CBT2WcWGeXphLdVtounijV9dusJ13MqoQ8a6trBcbDQYdtjK/e1xfXD/Oagb3e0d4Azv2l0BK6z7hqGeG8dZeQiTVerZrYueyrhsedRz3m7b/nE2hy+v6RtOu2KUNIHT5SpVgF6Tf2Wa1Q3PXJUVdr2VJXs+DYRQezw11nd/OgX7OS/Q1sY0Q9aiGh/HZbTIouhnTQ4yw/mzm3AjbDqEtKjfA9n7RVndIIs7tWmejUhUs2tlUVgn3WDg6ZF08tufKQNFh+8cfqaxZVYaoUhWYcNszo35IXD8sdQUShK31xme9QTXsteVmlol2G3n0HquvEf3cszqXqWnP4HAOH1zVfIR6XfDecuat1ruk0/tsSCPPpnSn0z/uThOUU3vWFFLOIXJoUvG1yo1tyk1soEBLMJdLNXP9k7Qsud/Q1tJ8uJlfy7+vvN/A+LX8S0r/gltvwTx7VgJTX365pqc8f/7x5gbMV4/+W5/xGXwGvPhrwX8KX399np4yP/hQn/6p1H373bX4Y3ke01PgY9qNGLg/RUW1XlNJT+HxT/z8qqYltBSV12/FI85SVN6kWR98AHp7ozc39fnmVlxf8/bmpDE9BUCadAXcKIkb0PWd4Iqr0125WQMo3QkegO6k9uX+tIgH0NM/Tqm83y2CpLsl6XAALYtODUZJl9JTOMBhSVq0aObAUusgq6ScHJBygV2SOMwlrWTJXZ6ZrBKA+YXUlFaUtNTGXldTVC6mp0BNUanpKT3A1OqgpagsGupaegr0jailp2SVwFiu2J1lSGsES1tZOtt9SsSF1BRgs/lfTE3Z4hb+F1JUpjSkbtClRtrZYuqktukLVacYYSlXctsGTZT0m1wJTlKO4XpwwLRPMRl1amXcdINdWkr9HhUD/8ovZKVdqsc+PWWq+jduU8nbuLyWlxtY27qpBzmHS+NV3iGVprAvn2nq5XyV7IIyYlpay/hW6NNvQU8b/tv8hijRx67vHqoFPc/rU8VdbRpwzmbyZZtskBq8z+WMy1f+pQs2hWEc3MdoKBrn1yV5GG707xOEUhkQ7TCYUn++lL5wAbs+t1SVcUqsAK0+lvXQusk9+OW8lXeXLv97onf+PdnAlz/RvEdqyMiv5VTs0EebEambuaeKtK7oqSvv4O72hTou8xvfZ3mdZxBkEhOWPeof0VIldsZLieY7v5f+Z6kSiZRGbarsiXMDeJ8aU2TqYMneZt+kjV2d7a08aWfANQSXWnpJSoZM5Pa86alKYrhN0Pj7PB2lfvVlX59J7hkRdTFLljtUKvYnjakrlBsLbZ/qPNJZX6Se/lOFy2OocUix2CBpczskB0zthsQ0DWkNsEnv2KSoDO9AsrzNhGv09jQq/55xs5XNQ0rOxET5Ul745RG223vl1VNVSl4L/GKqSktVWnw5VSXt7JDXNJVmo3nGy4rT0lRKCgn0NJWZ+r1x8gwsU5RxsZS7B8xzE6vSCjPNkKlpKiVFpcEtlPSiZZrM8v9MVZnnloFS6oZUFTjZntY0lXkyS0lTubPNPBmHD7bhgKn1wGFuNw9mw4mTZx8BjuWWABH2MYxr+olnw225PdDSVKLcGOAGbo4Fzi43AUqayg320VcPcrlNAGzSVGqKymtnf8CHXExR4SGuOC1NxbEYHuO8+H1SVIDLaSpAS1X55m+wfPLaT3jCy5cvefLpH0r7n1+ZF9s0la/4is9+/q/LNxDuuX3wa5rKv6/8EycY65bo+YM2AAAAAElFTkSuQmCC',
  17667. e: 1
  17668. }
  17669. ],
  17670. layers = [
  17671. {
  17672. ddd: 0,
  17673. ind: 1,
  17674. ty: 2,
  17675. nm: '加载视频@3x.png',
  17676. cl: 'png',
  17677. refId: 'image_0',
  17678. sr: 1,
  17679. ks: {
  17680. o: { a: 0, k: 100, ix: 11 },
  17681. r: { a: 0, k: 0, ix: 10 },
  17682. p: { a: 0, k: [1218, 562, 0], ix: 2 },
  17683. a: { a: 0, k: [97.5, 132, 0], ix: 1 },
  17684. s: { a: 0, k: [100, 100, 100], ix: 6 }
  17685. },
  17686. ao: 0,
  17687. ip: 0,
  17688. op: 300,
  17689. st: 0,
  17690. bm: 0
  17691. },
  17692. {
  17693. ddd: 0,
  17694. ind: 2,
  17695. ty: 2,
  17696. nm: '进度条@3x.png',
  17697. cl: 'png',
  17698. refId: 'image_1',
  17699. sr: 1,
  17700. ks: {
  17701. o: {
  17702. a: 1,
  17703. k: [
  17704. {
  17705. i: { x: [0.667], y: [1] },
  17706. o: { x: [0.333], y: [0] },
  17707. t: 60,
  17708. s: [100],
  17709. e: [0]
  17710. },
  17711. {
  17712. i: { x: [0.667], y: [1] },
  17713. o: { x: [0.333], y: [0] },
  17714. t: 61,
  17715. s: [0],
  17716. e: [0]
  17717. },
  17718. { t: 120 }
  17719. ],
  17720. ix: 11
  17721. },
  17722. r: { a: 0, k: 0, ix: 10 },
  17723. p: { a: 0, k: [678, 587.5, 0], ix: 2 },
  17724. a: { a: 0, k: [0, 1.5, 0], ix: 1 },
  17725. s: {
  17726. a: 1,
  17727. k: [
  17728. {
  17729. i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
  17730. o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
  17731. t: 0,
  17732. s: [0, 100, 100],
  17733. e: [100, 100, 100]
  17734. },
  17735. { t: 60 }
  17736. ],
  17737. ix: 6
  17738. }
  17739. },
  17740. ao: 0,
  17741. ip: 0,
  17742. op: 300,
  17743. st: 0,
  17744. bm: 0
  17745. },
  17746. {
  17747. ddd: 0,
  17748. ind: 3,
  17749. ty: 2,
  17750. nm: '进度条@3x.png',
  17751. cl: 'png',
  17752. refId: 'image_1',
  17753. sr: 1,
  17754. ks: {
  17755. o: {
  17756. a: 1,
  17757. k: [
  17758. {
  17759. i: { x: [0.667], y: [1] },
  17760. o: { x: [0.333], y: [0] },
  17761. t: 0,
  17762. s: [0],
  17763. e: [0]
  17764. },
  17765. {
  17766. i: { x: [0.667], y: [1] },
  17767. o: { x: [0.333], y: [0] },
  17768. t: 60,
  17769. s: [0],
  17770. e: [100]
  17771. },
  17772. { t: 61 }
  17773. ],
  17774. ix: 11
  17775. },
  17776. r: { a: 0, k: 0, ix: 10 },
  17777. p: { a: 0, k: [1758, 589, 0], ix: 2 },
  17778. a: { a: 0, k: [1080, 3, 0], ix: 1 },
  17779. s: {
  17780. a: 1,
  17781. k: [
  17782. {
  17783. i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
  17784. o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
  17785. t: 60,
  17786. s: [100, 100, 100],
  17787. e: [100, 100, 100]
  17788. },
  17789. {
  17790. i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
  17791. o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
  17792. t: 61,
  17793. s: [100, 100, 100],
  17794. e: [0, 100, 100]
  17795. },
  17796. { t: 120 }
  17797. ],
  17798. ix: 6
  17799. }
  17800. },
  17801. ao: 0,
  17802. ip: 0,
  17803. op: 300,
  17804. st: 0,
  17805. bm: 0
  17806. }
  17807. ],
  17808. markers = [],
  17809. playLoadData = { v, fr, ip, op, w, h, nm, ddd, assets, layers, markers };
  17810. function _defineProperty$1(e, t, r) {
  17811. return (
  17812. (t = _toPropertyKey(t)) in e
  17813. ? Object.defineProperty(e, t, {
  17814. value: r,
  17815. enumerable: !0,
  17816. configurable: !0,
  17817. writable: !0
  17818. })
  17819. : (e[t] = r),
  17820. e
  17821. );
  17822. }
  17823. function _toPrimitive(e, t) {
  17824. if (typeof e != 'object' || e === null) return e;
  17825. var r = e[Symbol.toPrimitive];
  17826. if (r !== void 0) {
  17827. var i = r.call(e, t || 'default');
  17828. if (typeof i != 'object') return i;
  17829. throw new TypeError('@@toPrimitive must return a primitive value.');
  17830. }
  17831. return (t === 'string' ? String : Number)(e);
  17832. }
  17833. function _toPropertyKey(e) {
  17834. var t = _toPrimitive(e, 'string');
  17835. return typeof t == 'symbol' ? t : String(t);
  17836. }
  17837. function _classCallCheck(e, t) {
  17838. if (!(e instanceof t))
  17839. throw new TypeError('Cannot call a class as a function');
  17840. }
  17841. function _defineProperties(e, t) {
  17842. for (var r = 0; r < t.length; r++) {
  17843. var i = t[r];
  17844. (i.enumerable = i.enumerable || !1),
  17845. (i.configurable = !0),
  17846. 'value' in i && (i.writable = !0),
  17847. Object.defineProperty(e, i.key, i);
  17848. }
  17849. }
  17850. function _createClass(e, t, r) {
  17851. return (
  17852. t && _defineProperties(e.prototype, t), r && _defineProperties(e, r), e
  17853. );
  17854. }
  17855. function _defineProperty(e, t, r) {
  17856. return (
  17857. t in e
  17858. ? Object.defineProperty(e, t, {
  17859. value: r,
  17860. enumerable: !0,
  17861. configurable: !0,
  17862. writable: !0
  17863. })
  17864. : (e[t] = r),
  17865. e
  17866. );
  17867. }
  17868. function ownKeys(e, t) {
  17869. var r = Object.keys(e);
  17870. if (Object.getOwnPropertySymbols) {
  17871. var i = Object.getOwnPropertySymbols(e);
  17872. t &&
  17873. (i = i.filter(function (s) {
  17874. return Object.getOwnPropertyDescriptor(e, s).enumerable;
  17875. })),
  17876. r.push.apply(r, i);
  17877. }
  17878. return r;
  17879. }
  17880. function _objectSpread2(e) {
  17881. for (var t = 1; t < arguments.length; t++) {
  17882. var r = arguments[t] != null ? arguments[t] : {};
  17883. t % 2
  17884. ? ownKeys(Object(r), !0).forEach(function (i) {
  17885. _defineProperty(e, i, r[i]);
  17886. })
  17887. : Object.getOwnPropertyDescriptors
  17888. ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r))
  17889. : ownKeys(Object(r)).forEach(function (i) {
  17890. Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(r, i));
  17891. });
  17892. }
  17893. return e;
  17894. }
  17895. var defaults$1 = { addCSS: !0, thumbWidth: 15, watch: !0 };
  17896. function matches$1(e, t) {
  17897. return function () {
  17898. return Array.from(document.querySelectorAll(t)).includes(this);
  17899. }.call(e, t);
  17900. }
  17901. function trigger(e, t) {
  17902. if (e && t) {
  17903. var r = new Event(t, { bubbles: !0 });
  17904. e.dispatchEvent(r);
  17905. }
  17906. }
  17907. var getConstructor$1 = function (e) {
  17908. return e != null ? e.constructor : null;
  17909. },
  17910. instanceOf$1 = function (e, t) {
  17911. return !!(e && t && e instanceof t);
  17912. },
  17913. isNullOrUndefined$1 = function (e) {
  17914. return e == null;
  17915. },
  17916. isObject$1 = function (e) {
  17917. return getConstructor$1(e) === Object;
  17918. },
  17919. isNumber$1 = function (e) {
  17920. return getConstructor$1(e) === Number && !Number.isNaN(e);
  17921. },
  17922. isString$1 = function (e) {
  17923. return getConstructor$1(e) === String;
  17924. },
  17925. isBoolean$1 = function (e) {
  17926. return getConstructor$1(e) === Boolean;
  17927. },
  17928. isFunction$1 = function (e) {
  17929. return getConstructor$1(e) === Function;
  17930. },
  17931. isArray$1 = function (e) {
  17932. return Array.isArray(e);
  17933. },
  17934. isNodeList$1 = function (e) {
  17935. return instanceOf$1(e, NodeList);
  17936. },
  17937. isElement$1 = function (e) {
  17938. return instanceOf$1(e, Element);
  17939. },
  17940. isEvent$1 = function (e) {
  17941. return instanceOf$1(e, Event);
  17942. },
  17943. isEmpty$1 = function (e) {
  17944. return (
  17945. isNullOrUndefined$1(e) ||
  17946. ((isString$1(e) || isArray$1(e) || isNodeList$1(e)) && !e.length) ||
  17947. (isObject$1(e) && !Object.keys(e).length)
  17948. );
  17949. },
  17950. is$1 = {
  17951. nullOrUndefined: isNullOrUndefined$1,
  17952. object: isObject$1,
  17953. number: isNumber$1,
  17954. string: isString$1,
  17955. boolean: isBoolean$1,
  17956. function: isFunction$1,
  17957. array: isArray$1,
  17958. nodeList: isNodeList$1,
  17959. element: isElement$1,
  17960. event: isEvent$1,
  17961. empty: isEmpty$1
  17962. };
  17963. function getDecimalPlaces(e) {
  17964. var t = ''.concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
  17965. return t ? Math.max(0, (t[1] ? t[1].length : 0) - (t[2] ? +t[2] : 0)) : 0;
  17966. }
  17967. function round(e, t) {
  17968. if (1 > t) {
  17969. var r = getDecimalPlaces(t);
  17970. return parseFloat(e.toFixed(r));
  17971. }
  17972. return Math.round(e / t) * t;
  17973. }
  17974. var RangeTouch = (function () {
  17975. function e(t, r) {
  17976. _classCallCheck(this, e),
  17977. is$1.element(t)
  17978. ? (this.element = t)
  17979. : is$1.string(t) && (this.element = document.querySelector(t)),
  17980. is$1.element(this.element) &&
  17981. is$1.empty(this.element.rangeTouch) &&
  17982. ((this.config = _objectSpread2({}, defaults$1, {}, r)), this.init());
  17983. }
  17984. return (
  17985. _createClass(
  17986. e,
  17987. [
  17988. {
  17989. key: 'init',
  17990. value: function () {
  17991. e.enabled &&
  17992. (this.config.addCSS &&
  17993. ((this.element.style.userSelect = 'none'),
  17994. (this.element.style.webKitUserSelect = 'none'),
  17995. (this.element.style.touchAction = 'manipulation')),
  17996. this.listeners(!0),
  17997. (this.element.rangeTouch = this));
  17998. }
  17999. },
  18000. {
  18001. key: 'destroy',
  18002. value: function () {
  18003. e.enabled &&
  18004. (this.config.addCSS &&
  18005. ((this.element.style.userSelect = ''),
  18006. (this.element.style.webKitUserSelect = ''),
  18007. (this.element.style.touchAction = '')),
  18008. this.listeners(!1),
  18009. (this.element.rangeTouch = null));
  18010. }
  18011. },
  18012. {
  18013. key: 'listeners',
  18014. value: function (t) {
  18015. var r = this,
  18016. i = t ? 'addEventListener' : 'removeEventListener';
  18017. ['touchstart', 'touchmove', 'touchend'].forEach(function (s) {
  18018. r.element[i](
  18019. s,
  18020. function (n) {
  18021. return r.set(n);
  18022. },
  18023. !1
  18024. );
  18025. });
  18026. }
  18027. },
  18028. {
  18029. key: 'get',
  18030. value: function (t) {
  18031. if (!e.enabled || !is$1.event(t)) return null;
  18032. var r,
  18033. i = t.target,
  18034. s = t.changedTouches[0],
  18035. n = parseFloat(i.getAttribute('min')) || 0,
  18036. a = parseFloat(i.getAttribute('max')) || 100,
  18037. o = parseFloat(i.getAttribute('step')) || 1,
  18038. l = i.getBoundingClientRect(),
  18039. c = ((100 / l.width) * (this.config.thumbWidth / 2)) / 100;
  18040. return (
  18041. 0 > (r = (100 / l.width) * (s.clientX - l.left))
  18042. ? (r = 0)
  18043. : 100 < r && (r = 100),
  18044. 50 > r
  18045. ? (r -= (100 - 2 * r) * c)
  18046. : 50 < r && (r += 2 * (r - 50) * c),
  18047. n + round((r / 100) * (a - n), o)
  18048. );
  18049. }
  18050. },
  18051. {
  18052. key: 'set',
  18053. value: function (t) {
  18054. e.enabled &&
  18055. is$1.event(t) &&
  18056. !t.target.disabled &&
  18057. (t.preventDefault(),
  18058. (t.target.value = this.get(t)),
  18059. trigger(t.target, t.type === 'touchend' ? 'change' : 'input'));
  18060. }
  18061. }
  18062. ],
  18063. [
  18064. {
  18065. key: 'setup',
  18066. value: function (t) {
  18067. var r =
  18068. 1 < arguments.length && arguments[1] !== void 0
  18069. ? arguments[1]
  18070. : {},
  18071. i = null;
  18072. if (
  18073. (is$1.empty(t) || is$1.string(t)
  18074. ? (i = Array.from(
  18075. document.querySelectorAll(
  18076. is$1.string(t) ? t : 'input[type="range"]'
  18077. )
  18078. ))
  18079. : is$1.element(t)
  18080. ? (i = [t])
  18081. : is$1.nodeList(t)
  18082. ? (i = Array.from(t))
  18083. : is$1.array(t) && (i = t.filter(is$1.element)),
  18084. is$1.empty(i))
  18085. )
  18086. return null;
  18087. var s = _objectSpread2({}, defaults$1, {}, r);
  18088. if (is$1.string(t) && s.watch) {
  18089. var n = new MutationObserver(function (a) {
  18090. Array.from(a).forEach(function (o) {
  18091. Array.from(o.addedNodes).forEach(function (l) {
  18092. is$1.element(l) && matches$1(l, t) && new e(l, s);
  18093. });
  18094. });
  18095. });
  18096. n.observe(document.body, { childList: !0, subtree: !0 });
  18097. }
  18098. return i.map(function (a) {
  18099. return new e(a, r);
  18100. });
  18101. }
  18102. },
  18103. {
  18104. key: 'enabled',
  18105. get: function () {
  18106. return 'ontouchstart' in document.documentElement;
  18107. }
  18108. }
  18109. ]
  18110. ),
  18111. e
  18112. );
  18113. })();
  18114. const getConstructor = e => (e != null ? e.constructor : null),
  18115. instanceOf = (e, t) => !!(e && t && e instanceof t),
  18116. isNullOrUndefined = e => e == null,
  18117. isObject = e => getConstructor(e) === Object,
  18118. isNumber = e => getConstructor(e) === Number && !Number.isNaN(e),
  18119. isString = e => getConstructor(e) === String,
  18120. isBoolean = e => getConstructor(e) === Boolean,
  18121. isFunction = e => typeof e == 'function',
  18122. isArray = e => Array.isArray(e),
  18123. isWeakMap = e => instanceOf(e, WeakMap),
  18124. isNodeList = e => instanceOf(e, NodeList),
  18125. isTextNode = e => getConstructor(e) === Text,
  18126. isEvent = e => instanceOf(e, Event),
  18127. isKeyboardEvent = e => instanceOf(e, KeyboardEvent),
  18128. isCue = e =>
  18129. instanceOf(e, window.TextTrackCue) || instanceOf(e, window.VTTCue),
  18130. isTrack = e =>
  18131. instanceOf(e, TextTrack) || (!isNullOrUndefined(e) && isString(e.kind)),
  18132. isPromise = e => instanceOf(e, Promise) && isFunction(e.then),
  18133. isElement = e =>
  18134. e !== null &&
  18135. typeof e == 'object' &&
  18136. e.nodeType === 1 &&
  18137. typeof e.style == 'object' &&
  18138. typeof e.ownerDocument == 'object',
  18139. isEmpty = e =>
  18140. isNullOrUndefined(e) ||
  18141. ((isString(e) || isArray(e) || isNodeList(e)) && !e.length) ||
  18142. (isObject(e) && !Object.keys(e).length),
  18143. isUrl = e => {
  18144. if (instanceOf(e, window.URL)) return !0;
  18145. if (!isString(e)) return !1;
  18146. let t = e;
  18147. (e.startsWith('http://') && e.startsWith('https://')) ||
  18148. (t = `http://${e}`);
  18149. try {
  18150. return !isEmpty(new URL(t).hostname);
  18151. } catch {
  18152. return !1;
  18153. }
  18154. };
  18155. var is = {
  18156. nullOrUndefined: isNullOrUndefined,
  18157. object: isObject,
  18158. number: isNumber,
  18159. string: isString,
  18160. boolean: isBoolean,
  18161. function: isFunction,
  18162. array: isArray,
  18163. weakMap: isWeakMap,
  18164. nodeList: isNodeList,
  18165. element: isElement,
  18166. textNode: isTextNode,
  18167. event: isEvent,
  18168. keyboardEvent: isKeyboardEvent,
  18169. cue: isCue,
  18170. track: isTrack,
  18171. promise: isPromise,
  18172. url: isUrl,
  18173. empty: isEmpty
  18174. };
  18175. const transitionEndEvent = (() => {
  18176. const e = document.createElement('span'),
  18177. t = {
  18178. WebkitTransition: 'webkitTransitionEnd',
  18179. MozTransition: 'transitionend',
  18180. OTransition: 'oTransitionEnd otransitionend',
  18181. transition: 'transitionend'
  18182. },
  18183. r = Object.keys(t).find(i => e.style[i] !== void 0);
  18184. return !!is.string(r) && t[r];
  18185. })();
  18186. function repaint(e, t) {
  18187. setTimeout(() => {
  18188. try {
  18189. (e.hidden = !0), e.offsetHeight, (e.hidden = !1);
  18190. } catch {}
  18191. }, t);
  18192. }
  18193. const isIE = !!window.document.documentMode,
  18194. isEdge = /Edge/g.test(navigator.userAgent),
  18195. isWebKit =
  18196. 'WebkitAppearance' in document.documentElement.style &&
  18197. !/Edge/g.test(navigator.userAgent),
  18198. isIPhone =
  18199. /iPhone|iPod/gi.test(navigator.userAgent) && navigator.maxTouchPoints > 1,
  18200. isIPadOS = navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1,
  18201. isIos =
  18202. /iPad|iPhone|iPod/gi.test(navigator.userAgent) &&
  18203. navigator.maxTouchPoints > 1;
  18204. var browser = { isIE, isEdge, isWebKit, isIPhone, isIPadOS, isIos };
  18205. function cloneDeep(e) {
  18206. return JSON.parse(JSON.stringify(e));
  18207. }
  18208. function getDeep(e, t) {
  18209. return t.split('.').reduce((r, i) => r && r[i], e);
  18210. }
  18211. function extend(e = {}, ...t) {
  18212. if (!t.length) return e;
  18213. const r = t.shift();
  18214. return is.object(r)
  18215. ? (Object.keys(r).forEach(i => {
  18216. is.object(r[i])
  18217. ? (Object.keys(e).includes(i) || Object.assign(e, { [i]: {} }),
  18218. extend(e[i], r[i]))
  18219. : Object.assign(e, { [i]: r[i] });
  18220. }),
  18221. extend(e, ...t))
  18222. : e;
  18223. }
  18224. function wrap(e, t) {
  18225. const r = e.length ? e : [e];
  18226. Array.from(r)
  18227. .reverse()
  18228. .forEach((i, s) => {
  18229. const n = s > 0 ? t.cloneNode(!0) : t,
  18230. a = i.parentNode,
  18231. o = i.nextSibling;
  18232. n.appendChild(i), o ? a.insertBefore(n, o) : a.appendChild(n);
  18233. });
  18234. }
  18235. function setAttributes(e, t) {
  18236. is.element(e) &&
  18237. !is.empty(t) &&
  18238. Object.entries(t)
  18239. .filter(([, r]) => !is.nullOrUndefined(r))
  18240. .forEach(([r, i]) => e.setAttribute(r, i));
  18241. }
  18242. function createElement(e, t, r) {
  18243. const i = document.createElement(e);
  18244. return (
  18245. is.object(t) && setAttributes(i, t), is.string(r) && (i.innerText = r), i
  18246. );
  18247. }
  18248. function insertAfter(e, t) {
  18249. is.element(e) && is.element(t) && t.parentNode.insertBefore(e, t.nextSibling);
  18250. }
  18251. function insertElement(e, t, r, i) {
  18252. is.element(t) && t.appendChild(createElement(e, r, i));
  18253. }
  18254. function removeElement(e) {
  18255. is.nodeList(e) || is.array(e)
  18256. ? Array.from(e).forEach(removeElement)
  18257. : is.element(e) && is.element(e.parentNode) && e.parentNode.removeChild(e);
  18258. }
  18259. function emptyElement(e) {
  18260. if (!is.element(e)) return;
  18261. let { length: t } = e.childNodes;
  18262. for (; t > 0; ) e.removeChild(e.lastChild), (t -= 1);
  18263. }
  18264. function replaceElement(e, t) {
  18265. return is.element(t) && is.element(t.parentNode) && is.element(e)
  18266. ? (t.parentNode.replaceChild(e, t), e)
  18267. : null;
  18268. }
  18269. function getAttributesFromSelector(e, t) {
  18270. if (!is.string(e) || is.empty(e)) return {};
  18271. const r = {},
  18272. i = extend({}, t);
  18273. return (
  18274. e.split(',').forEach(s => {
  18275. const n = s.trim(),
  18276. a = n.replace('.', ''),
  18277. o = n.replace(/[[\]]/g, '').split('='),
  18278. [l] = o,
  18279. c = o.length > 1 ? o[1].replace(/["']/g, '') : '';
  18280. switch (n.charAt(0)) {
  18281. case '.':
  18282. is.string(i.class) ? (r.class = `${i.class} ${a}`) : (r.class = a);
  18283. break;
  18284. case '#':
  18285. r.id = n.replace('#', '');
  18286. break;
  18287. case '[':
  18288. r[l] = c;
  18289. }
  18290. }),
  18291. extend(i, r)
  18292. );
  18293. }
  18294. function toggleHidden(e, t) {
  18295. if (!is.element(e)) return;
  18296. let r = t;
  18297. is.boolean(r) || (r = !e.hidden), (e.hidden = r);
  18298. }
  18299. function toggleClass(e, t, r) {
  18300. if (is.nodeList(e)) return Array.from(e).map(i => toggleClass(i, t, r));
  18301. if (is.element(e)) {
  18302. let i = 'toggle';
  18303. return (
  18304. r !== void 0 && (i = r ? 'add' : 'remove'),
  18305. e.classList[i](t),
  18306. e.classList.contains(t)
  18307. );
  18308. }
  18309. return !1;
  18310. }
  18311. function hasClass(e, t) {
  18312. return is.element(e) && e.classList.contains(t);
  18313. }
  18314. function matches(e, t) {
  18315. const { prototype: r } = Element;
  18316. return (
  18317. r.matches ||
  18318. r.webkitMatchesSelector ||
  18319. r.mozMatchesSelector ||
  18320. r.msMatchesSelector ||
  18321. function () {
  18322. return Array.from(document.querySelectorAll(t)).includes(this);
  18323. }
  18324. ).call(e, t);
  18325. }
  18326. function closest$1(e, t) {
  18327. const { prototype: r } = Element;
  18328. return (
  18329. r.closest ||
  18330. function () {
  18331. let i = this;
  18332. do {
  18333. if (matches.matches(i, t)) return i;
  18334. i = i.parentElement || i.parentNode;
  18335. } while (i !== null && i.nodeType === 1);
  18336. return null;
  18337. }
  18338. ).call(e, t);
  18339. }
  18340. function getElements(e) {
  18341. return this.elements.container.querySelectorAll(e);
  18342. }
  18343. function getElement(e) {
  18344. return this.elements.container.querySelector(e);
  18345. }
  18346. function setFocus(e = null, t = !1) {
  18347. is.element(e) && e.focus({ preventScroll: !0, focusVisible: t });
  18348. }
  18349. const defaultCodecs = {
  18350. 'audio/ogg': 'vorbis',
  18351. 'audio/wav': '1',
  18352. 'video/webm': 'vp8, vorbis',
  18353. 'video/mp4': 'avc1.42E01E, mp4a.40.2',
  18354. 'video/ogg': 'theora'
  18355. },
  18356. support = {
  18357. audio: 'canPlayType' in document.createElement('audio'),
  18358. video: 'canPlayType' in document.createElement('video'),
  18359. check(e, t) {
  18360. const r = support[e] || t !== 'html5';
  18361. return { api: r, ui: r && support.rangeInput };
  18362. },
  18363. pip: !(
  18364. browser.isIPhone ||
  18365. (!is.function(createElement('video').webkitSetPresentationMode) &&
  18366. (!document.pictureInPictureEnabled ||
  18367. createElement('video').disablePictureInPicture))
  18368. ),
  18369. airplay: is.function(window.WebKitPlaybackTargetAvailabilityEvent),
  18370. playsinline: 'playsInline' in document.createElement('video'),
  18371. mime(e) {
  18372. if (is.empty(e)) return !1;
  18373. const [t] = e.split('/');
  18374. let r = e;
  18375. if (!this.isHTML5 || t !== this.type) return !1;
  18376. Object.keys(defaultCodecs).includes(r) &&
  18377. (r += `; codecs="${defaultCodecs[e]}"`);
  18378. try {
  18379. return !!(r && this.media.canPlayType(r).replace(/no/, ''));
  18380. } catch {
  18381. return !1;
  18382. }
  18383. },
  18384. textTracks: 'textTracks' in document.createElement('video'),
  18385. rangeInput: (() => {
  18386. const e = document.createElement('input');
  18387. return (e.type = 'range'), e.type === 'range';
  18388. })(),
  18389. touch: 'ontouchstart' in document.documentElement,
  18390. transitions: transitionEndEvent !== !1,
  18391. reducedMotion:
  18392. 'matchMedia' in window &&
  18393. window.matchMedia('(prefers-reduced-motion)').matches
  18394. },
  18395. supportsPassiveListeners = (() => {
  18396. let e = !1;
  18397. try {
  18398. const t = Object.defineProperty({}, 'passive', {
  18399. get: () => ((e = !0), null)
  18400. });
  18401. window.addEventListener('test', null, t),
  18402. window.removeEventListener('test', null, t);
  18403. } catch {}
  18404. return e;
  18405. })();
  18406. function toggleListener(e, t, r, i = !1, s = !0, n = !1) {
  18407. if (!e || !('addEventListener' in e) || is.empty(t) || !is.function(r))
  18408. return;
  18409. const a = t.split(' ');
  18410. let o = n;
  18411. supportsPassiveListeners && (o = { passive: s, capture: n }),
  18412. a.forEach(l => {
  18413. this &&
  18414. this.eventListeners &&
  18415. i &&
  18416. this.eventListeners.push({
  18417. element: e,
  18418. type: l,
  18419. callback: r,
  18420. options: o
  18421. }),
  18422. e[i ? 'addEventListener' : 'removeEventListener'](l, r, o);
  18423. });
  18424. }
  18425. function on(e, t = '', r, i = !0, s = !1) {
  18426. toggleListener.call(this, e, t, r, !0, i, s);
  18427. }
  18428. function off(e, t = '', r, i = !0, s = !1) {
  18429. toggleListener.call(this, e, t, r, !1, i, s);
  18430. }
  18431. function once(e, t = '', r, i = !0, s = !1) {
  18432. const n = (...a) => {
  18433. off(e, t, n, i, s), r.apply(this, a);
  18434. };
  18435. toggleListener.call(this, e, t, n, !0, i, s);
  18436. }
  18437. function triggerEvent(e, t = '', r = !1, i = {}) {
  18438. if (!is.element(e) || is.empty(t)) return;
  18439. const s = new CustomEvent(t, { bubbles: r, detail: { ...i, plyr: this } });
  18440. e.dispatchEvent(s);
  18441. }
  18442. function unbindListeners() {
  18443. this &&
  18444. this.eventListeners &&
  18445. (this.eventListeners.forEach(e => {
  18446. const { element: t, type: r, callback: i, options: s } = e;
  18447. t.removeEventListener(r, i, s);
  18448. }),
  18449. (this.eventListeners = []));
  18450. }
  18451. function ready() {
  18452. return new Promise(e =>
  18453. this.ready
  18454. ? setTimeout(e, 0)
  18455. : on.call(this, this.elements.container, 'ready', e)
  18456. ).then(() => {});
  18457. }
  18458. function silencePromise(e) {
  18459. is.promise(e) && e.then(null, () => {});
  18460. }
  18461. function dedupe(e) {
  18462. return is.array(e) ? e.filter((t, r) => e.indexOf(t) === r) : e;
  18463. }
  18464. function closest(e, t) {
  18465. return is.array(e) && e.length
  18466. ? e.reduce((r, i) => (Math.abs(i - t) < Math.abs(r - t) ? i : r))
  18467. : null;
  18468. }
  18469. function supportsCSS(e) {
  18470. return !(!window || !window.CSS) && window.CSS.supports(e);
  18471. }
  18472. const standardRatios = [
  18473. [1, 1],
  18474. [4, 3],
  18475. [3, 4],
  18476. [5, 4],
  18477. [4, 5],
  18478. [3, 2],
  18479. [2, 3],
  18480. [16, 10],
  18481. [10, 16],
  18482. [16, 9],
  18483. [9, 16],
  18484. [21, 9],
  18485. [9, 21],
  18486. [32, 9],
  18487. [9, 32]
  18488. ].reduce((e, [t, r]) => ({ ...e, [t / r]: [t, r] }), {});
  18489. function validateAspectRatio(e) {
  18490. return is.array(e) || (is.string(e) && e.includes(':'))
  18491. ? (is.array(e) ? e : e.split(':')).map(Number).every(is.number)
  18492. : !1;
  18493. }
  18494. function reduceAspectRatio(e) {
  18495. if (!is.array(e) || !e.every(is.number)) return null;
  18496. const [t, r] = e,
  18497. i = (n, a) => (a === 0 ? n : i(a, n % a)),
  18498. s = i(t, r);
  18499. return [t / s, r / s];
  18500. }
  18501. function getAspectRatio(e) {
  18502. const t = i => (validateAspectRatio(i) ? i.split(':').map(Number) : null);
  18503. let r = t(e);
  18504. if (
  18505. (r === null && (r = t(this.config.ratio)),
  18506. r === null &&
  18507. !is.empty(this.embed) &&
  18508. is.array(this.embed.ratio) &&
  18509. ({ ratio: r } = this.embed),
  18510. r === null && this.isHTML5)
  18511. ) {
  18512. const { videoWidth: i, videoHeight: s } = this.media;
  18513. r = [i, s];
  18514. }
  18515. return reduceAspectRatio(r);
  18516. }
  18517. function setAspectRatio(e) {
  18518. if (!this.isVideo) return {};
  18519. const { wrapper: t } = this.elements,
  18520. r = getAspectRatio.call(this, e);
  18521. if (!is.array(r)) return {};
  18522. const [i, s] = reduceAspectRatio(r),
  18523. n = (100 / i) * s;
  18524. if (
  18525. (supportsCSS(`aspect-ratio: ${i}/${s}`)
  18526. ? (t.style.aspectRatio = `${i}/${s}`)
  18527. : (t.style.paddingBottom = `${n}%`),
  18528. this.isVimeo && !this.config.vimeo.premium && this.supported.ui)
  18529. ) {
  18530. const a =
  18531. (100 / this.media.offsetWidth) *
  18532. parseInt(window.getComputedStyle(this.media).paddingBottom, 10),
  18533. o = (a - n) / (a / 50);
  18534. this.fullscreen.active
  18535. ? (t.style.paddingBottom = null)
  18536. : (this.media.style.transform = `translateY(-${o}%)`);
  18537. } else
  18538. this.isHTML5 && t.classList.add(this.config.classNames.videoFixedRatio);
  18539. return { padding: n, ratio: r };
  18540. }
  18541. function roundAspectRatio(e, t, r = 0.05) {
  18542. const i = e / t,
  18543. s = closest(Object.keys(standardRatios), i);
  18544. return Math.abs(s - i) <= r ? standardRatios[s] : [e, t];
  18545. }
  18546. function getViewportSize() {
  18547. return [
  18548. Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),
  18549. Math.max(
  18550. document.documentElement.clientHeight || 0,
  18551. window.innerHeight || 0
  18552. )
  18553. ];
  18554. }
  18555. const html5 = {
  18556. getSources() {
  18557. return this.isHTML5
  18558. ? Array.from(this.media.querySelectorAll('source')).filter(e => {
  18559. const t = e.getAttribute('type');
  18560. return !!is.empty(t) || support.mime.call(this, t);
  18561. })
  18562. : [];
  18563. },
  18564. getQualityOptions() {
  18565. return this.config.quality.forced
  18566. ? this.config.quality.options
  18567. : html5.getSources
  18568. .call(this)
  18569. .map(e => Number(e.getAttribute('size')))
  18570. .filter(Boolean);
  18571. },
  18572. setup() {
  18573. if (!this.isHTML5) return;
  18574. const e = this;
  18575. (e.options.speed = e.config.speed.options),
  18576. is.empty(this.config.ratio) || setAspectRatio.call(e),
  18577. Object.defineProperty(e.media, 'quality', {
  18578. get() {
  18579. const t = html5.getSources
  18580. .call(e)
  18581. .find(r => r.getAttribute('src') === e.source);
  18582. return t && Number(t.getAttribute('size'));
  18583. },
  18584. set(t) {
  18585. if (e.quality !== t) {
  18586. if (
  18587. e.config.quality.forced &&
  18588. is.function(e.config.quality.onChange)
  18589. )
  18590. e.config.quality.onChange(t);
  18591. else {
  18592. const r = html5.getSources
  18593. .call(e)
  18594. .find(l => Number(l.getAttribute('size')) === t);
  18595. if (!r) return;
  18596. const {
  18597. currentTime: i,
  18598. paused: s,
  18599. preload: n,
  18600. readyState: a,
  18601. playbackRate: o
  18602. } = e.media;
  18603. (e.media.src = r.getAttribute('src')),
  18604. (n !== 'none' || a) &&
  18605. (e.once('loadedmetadata', () => {
  18606. (e.speed = o),
  18607. (e.currentTime = i),
  18608. s || silencePromise(e.play());
  18609. }),
  18610. e.media.load());
  18611. }
  18612. triggerEvent.call(e, e.media, 'qualitychange', !1, { quality: t });
  18613. }
  18614. }
  18615. });
  18616. },
  18617. cancelRequests() {
  18618. this.isHTML5 &&
  18619. (removeElement(html5.getSources.call(this)),
  18620. this.media.setAttribute('src', this.config.blankVideo),
  18621. this.media.load(),
  18622. this.debug.log('Cancelled network requests'));
  18623. }
  18624. };
  18625. function generateId(e) {
  18626. return `${e}-${Math.floor(1e4 * Math.random())}`;
  18627. }
  18628. function format(e, ...t) {
  18629. return is.empty(e)
  18630. ? e
  18631. : e.toString().replace(/{(\d+)}/g, (r, i) => t[i].toString());
  18632. }
  18633. function getPercentage(e, t) {
  18634. return e === 0 || t === 0 || Number.isNaN(e) || Number.isNaN(t)
  18635. ? 0
  18636. : ((e / t) * 100).toFixed(2);
  18637. }
  18638. const replaceAll = (e = '', t = '', r = '') =>
  18639. e.replace(
  18640. new RegExp(
  18641. t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g, '\\$1'),
  18642. 'g'
  18643. ),
  18644. r.toString()
  18645. ),
  18646. toTitleCase = (e = '') =>
  18647. e
  18648. .toString()
  18649. .replace(
  18650. /\w\S*/g,
  18651. t => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()
  18652. );
  18653. function toPascalCase(e = '') {
  18654. let t = e.toString();
  18655. return (
  18656. (t = replaceAll(t, '-', ' ')),
  18657. (t = replaceAll(t, '_', ' ')),
  18658. (t = toTitleCase(t)),
  18659. replaceAll(t, ' ', '')
  18660. );
  18661. }
  18662. function toCamelCase(e = '') {
  18663. let t = e.toString();
  18664. return (t = toPascalCase(t)), t.charAt(0).toLowerCase() + t.slice(1);
  18665. }
  18666. function stripHTML(e) {
  18667. const t = document.createDocumentFragment(),
  18668. r = document.createElement('div');
  18669. return t.appendChild(r), (r.innerHTML = e), t.firstChild.innerText;
  18670. }
  18671. function getHTML(e) {
  18672. const t = document.createElement('div');
  18673. return t.appendChild(e), t.innerHTML;
  18674. }
  18675. const resources = {
  18676. pip: 'PIP',
  18677. airplay: 'AirPlay',
  18678. html5: 'HTML5',
  18679. vimeo: 'Vimeo',
  18680. youtube: 'YouTube'
  18681. },
  18682. i18n = {
  18683. get(e = '', t = {}) {
  18684. if (is.empty(e) || is.empty(t)) return '';
  18685. let r = getDeep(t.i18n, e);
  18686. if (is.empty(r))
  18687. return Object.keys(resources).includes(e) ? resources[e] : '';
  18688. const i = { '{seektime}': t.seekTime, '{title}': t.title };
  18689. return (
  18690. Object.entries(i).forEach(([s, n]) => {
  18691. r = replaceAll(r, s, n);
  18692. }),
  18693. r
  18694. );
  18695. }
  18696. };
  18697. class Storage {
  18698. constructor(t) {
  18699. _defineProperty$1(this, 'get', r => {
  18700. if (!Storage.supported || !this.enabled) return null;
  18701. const i = window.localStorage.getItem(this.key);
  18702. if (is.empty(i)) return null;
  18703. const s = JSON.parse(i);
  18704. return is.string(r) && r.length ? s[r] : s;
  18705. }),
  18706. _defineProperty$1(this, 'set', r => {
  18707. if (!Storage.supported || !this.enabled || !is.object(r)) return;
  18708. let i = this.get();
  18709. is.empty(i) && (i = {}), extend(i, r);
  18710. try {
  18711. window.localStorage.setItem(this.key, JSON.stringify(i));
  18712. } catch {}
  18713. }),
  18714. (this.enabled = t.config.storage.enabled),
  18715. (this.key = t.config.storage.key);
  18716. }
  18717. static get supported() {
  18718. try {
  18719. if (!('localStorage' in window)) return !1;
  18720. const t = '___test';
  18721. return (
  18722. window.localStorage.setItem(t, t), window.localStorage.removeItem(t), !0
  18723. );
  18724. } catch {
  18725. return !1;
  18726. }
  18727. }
  18728. }
  18729. function fetch$1(e, t = 'text') {
  18730. return new Promise((r, i) => {
  18731. try {
  18732. const s = new XMLHttpRequest();
  18733. if (!('withCredentials' in s)) return;
  18734. s.addEventListener('load', () => {
  18735. if (t === 'text')
  18736. try {
  18737. r(JSON.parse(s.responseText));
  18738. } catch {
  18739. r(s.responseText);
  18740. }
  18741. else r(s.response);
  18742. }),
  18743. s.addEventListener('error', () => {
  18744. throw new Error(s.status);
  18745. }),
  18746. s.open('GET', e, !0),
  18747. (s.responseType = t),
  18748. s.send();
  18749. } catch (s) {
  18750. i(s);
  18751. }
  18752. });
  18753. }
  18754. function loadSprite(e, t) {
  18755. if (!is.string(e)) return;
  18756. const r = 'cache',
  18757. i = is.string(t);
  18758. let s = !1;
  18759. const n = () => document.getElementById(t) !== null,
  18760. a = (o, l) => {
  18761. (o.innerHTML = l),
  18762. (i && n()) || document.body.insertAdjacentElement('afterbegin', o);
  18763. };
  18764. if (!i || !n()) {
  18765. const o = Storage.supported,
  18766. l = document.createElement('div');
  18767. if ((l.setAttribute('hidden', ''), i && l.setAttribute('id', t), o)) {
  18768. const c = window.localStorage.getItem(`${r}-${t}`);
  18769. if (((s = c !== null), s)) {
  18770. const g = JSON.parse(c);
  18771. a(l, g.content);
  18772. }
  18773. }
  18774. fetch$1(e)
  18775. .then(c => {
  18776. if (!is.empty(c)) {
  18777. if (o)
  18778. try {
  18779. window.localStorage.setItem(
  18780. `${r}-${t}`,
  18781. JSON.stringify({ content: c })
  18782. );
  18783. } catch {}
  18784. a(l, c);
  18785. }
  18786. })
  18787. .catch(() => {});
  18788. }
  18789. }
  18790. const getHours = e => Math.trunc((e / 60 / 60) % 60, 10),
  18791. getMinutes = e => Math.trunc((e / 60) % 60, 10),
  18792. getSeconds = e => Math.trunc(e % 60, 10);
  18793. function formatTime(e = 0, t = !1, r = !1) {
  18794. if (!is.number(e)) return formatTime(void 0, t, r);
  18795. const i = o => `0${o}`.slice(-2);
  18796. let s = getHours(e);
  18797. const n = getMinutes(e),
  18798. a = getSeconds(e);
  18799. return (
  18800. (s = t || s > 0 ? `${s}:` : ''),
  18801. `${r && e > 0 ? '-' : ''}${s}${i(n)}:${i(a)}`
  18802. );
  18803. }
  18804. const controls$2 = {
  18805. getIconUrl() {
  18806. const e = new URL(this.config.iconUrl, window.location),
  18807. t = window.location.host
  18808. ? window.location.host
  18809. : window.top.location.host,
  18810. r = e.host !== t || (browser.isIE && !window.svg4everybody);
  18811. return { url: this.config.iconUrl, cors: r };
  18812. },
  18813. findElements() {
  18814. try {
  18815. return (
  18816. (this.elements.controls = getElement.call(
  18817. this,
  18818. this.config.selectors.controls.wrapper
  18819. )),
  18820. (this.elements.buttons = {
  18821. play: getElements.call(this, this.config.selectors.buttons.play),
  18822. pause: getElement.call(this, this.config.selectors.buttons.pause),
  18823. restart: getElement.call(this, this.config.selectors.buttons.restart),
  18824. rewind: getElement.call(this, this.config.selectors.buttons.rewind),
  18825. fastForward: getElement.call(
  18826. this,
  18827. this.config.selectors.buttons.fastForward
  18828. ),
  18829. mute: getElement.call(this, this.config.selectors.buttons.mute),
  18830. pip: getElement.call(this, this.config.selectors.buttons.pip),
  18831. airplay: getElement.call(this, this.config.selectors.buttons.airplay),
  18832. settings: getElement.call(
  18833. this,
  18834. this.config.selectors.buttons.settings
  18835. ),
  18836. captions: getElement.call(
  18837. this,
  18838. this.config.selectors.buttons.captions
  18839. ),
  18840. fullscreen: getElement.call(
  18841. this,
  18842. this.config.selectors.buttons.fullscreen
  18843. )
  18844. }),
  18845. (this.elements.progress = getElement.call(
  18846. this,
  18847. this.config.selectors.progress
  18848. )),
  18849. (this.elements.inputs = {
  18850. seek: getElement.call(this, this.config.selectors.inputs.seek),
  18851. volume: getElement.call(this, this.config.selectors.inputs.volume)
  18852. }),
  18853. (this.elements.display = {
  18854. buffer: getElement.call(this, this.config.selectors.display.buffer),
  18855. currentTime: getElement.call(
  18856. this,
  18857. this.config.selectors.display.currentTime
  18858. ),
  18859. duration: getElement.call(
  18860. this,
  18861. this.config.selectors.display.duration
  18862. )
  18863. }),
  18864. is.element(this.elements.progress) &&
  18865. (this.elements.display.seekTooltip =
  18866. this.elements.progress.querySelector(
  18867. `.${this.config.classNames.tooltip}`
  18868. )),
  18869. !0
  18870. );
  18871. } catch (e) {
  18872. return (
  18873. this.debug.warn(
  18874. 'It looks like there is a problem with your custom controls HTML',
  18875. e
  18876. ),
  18877. this.toggleNativeControls(!0),
  18878. !1
  18879. );
  18880. }
  18881. },
  18882. createIcon(e, t) {
  18883. const r = 'http://www.w3.org/2000/svg',
  18884. i = controls$2.getIconUrl.call(this),
  18885. s = `${i.cors ? '' : i.url}#${this.config.iconPrefix}`,
  18886. n = document.createElementNS(r, 'svg');
  18887. setAttributes(n, extend(t, { 'aria-hidden': 'true', focusable: 'false' }));
  18888. const a = document.createElementNS(r, 'use'),
  18889. o = `${s}-${e}`;
  18890. return (
  18891. 'href' in a &&
  18892. a.setAttributeNS('http://www.w3.org/1999/xlink', 'href', o),
  18893. a.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', o),
  18894. n.appendChild(a),
  18895. n
  18896. );
  18897. },
  18898. createLabel(e, t = {}) {
  18899. const r = i18n.get(e, this.config);
  18900. return createElement(
  18901. 'span',
  18902. {
  18903. ...t,
  18904. class: [t.class, this.config.classNames.hidden]
  18905. .filter(Boolean)
  18906. .join(' ')
  18907. },
  18908. r
  18909. );
  18910. },
  18911. createBadge(e) {
  18912. if (is.empty(e)) return null;
  18913. const t = createElement('span', {
  18914. class: this.config.classNames.menu.value
  18915. });
  18916. return (
  18917. t.appendChild(
  18918. createElement('span', { class: this.config.classNames.menu.badge }, e)
  18919. ),
  18920. t
  18921. );
  18922. },
  18923. createButton(e, t) {
  18924. const r = extend({}, t);
  18925. let i = toCamelCase(e);
  18926. const s = {
  18927. element: 'button',
  18928. toggle: !1,
  18929. label: null,
  18930. icon: null,
  18931. labelPressed: null,
  18932. iconPressed: null
  18933. };
  18934. switch (
  18935. (['element', 'icon', 'label'].forEach(a => {
  18936. Object.keys(r).includes(a) && ((s[a] = r[a]), delete r[a]);
  18937. }),
  18938. s.element !== 'button' ||
  18939. Object.keys(r).includes('type') ||
  18940. (r.type = 'button'),
  18941. Object.keys(r).includes('class')
  18942. ? r.class.split(' ').some(a => a === this.config.classNames.control) ||
  18943. extend(r, { class: `${r.class} ${this.config.classNames.control}` })
  18944. : (r.class = this.config.classNames.control),
  18945. e)
  18946. ) {
  18947. case 'play':
  18948. (s.toggle = !0),
  18949. (s.label = 'play'),
  18950. (s.labelPressed = 'pause'),
  18951. (s.icon = 'play'),
  18952. (s.iconPressed = 'pause');
  18953. break;
  18954. case 'mute':
  18955. (s.toggle = !0),
  18956. (s.label = 'mute'),
  18957. (s.labelPressed = 'unmute'),
  18958. (s.icon = 'volume'),
  18959. (s.iconPressed = 'muted');
  18960. break;
  18961. case 'captions':
  18962. (s.toggle = !0),
  18963. (s.label = 'enableCaptions'),
  18964. (s.labelPressed = 'disableCaptions'),
  18965. (s.icon = 'captions-off'),
  18966. (s.iconPressed = 'captions-on');
  18967. break;
  18968. case 'fullscreen':
  18969. (s.toggle = !0),
  18970. (s.label = 'enterFullscreen'),
  18971. (s.labelPressed = 'exitFullscreen'),
  18972. (s.icon = 'enter-fullscreen'),
  18973. (s.iconPressed = 'exit-fullscreen');
  18974. break;
  18975. case 'play-large':
  18976. (r.class += ` ${this.config.classNames.control}--overlaid`),
  18977. (i = 'play'),
  18978. (s.label = 'play'),
  18979. (s.icon = 'play');
  18980. break;
  18981. default:
  18982. is.empty(s.label) && (s.label = i), is.empty(s.icon) && (s.icon = e);
  18983. }
  18984. const n = createElement(s.element);
  18985. return (
  18986. s.toggle
  18987. ? (n.appendChild(
  18988. controls$2.createIcon.call(this, s.iconPressed, {
  18989. class: 'icon--pressed'
  18990. })
  18991. ),
  18992. n.appendChild(
  18993. controls$2.createIcon.call(this, s.icon, {
  18994. class: 'icon--not-pressed'
  18995. })
  18996. ),
  18997. n.appendChild(
  18998. controls$2.createLabel.call(this, s.labelPressed, {
  18999. class: 'label--pressed'
  19000. })
  19001. ),
  19002. n.appendChild(
  19003. controls$2.createLabel.call(this, s.label, {
  19004. class: 'label--not-pressed'
  19005. })
  19006. ))
  19007. : (n.appendChild(controls$2.createIcon.call(this, s.icon)),
  19008. n.appendChild(controls$2.createLabel.call(this, s.label))),
  19009. extend(r, getAttributesFromSelector(this.config.selectors.buttons[i], r)),
  19010. setAttributes(n, r),
  19011. i === 'play'
  19012. ? (is.array(this.elements.buttons[i]) ||
  19013. (this.elements.buttons[i] = []),
  19014. this.elements.buttons[i].push(n))
  19015. : (this.elements.buttons[i] = n),
  19016. n
  19017. );
  19018. },
  19019. createRange(e, t) {
  19020. const r = createElement(
  19021. 'input',
  19022. extend(
  19023. getAttributesFromSelector(this.config.selectors.inputs[e]),
  19024. {
  19025. type: 'range',
  19026. min: 0,
  19027. max: 100,
  19028. step: 0.01,
  19029. value: 0,
  19030. autocomplete: 'off',
  19031. role: 'slider',
  19032. 'aria-label': i18n.get(e, this.config),
  19033. 'aria-valuemin': 0,
  19034. 'aria-valuemax': 100,
  19035. 'aria-valuenow': 0
  19036. },
  19037. t
  19038. )
  19039. );
  19040. return (
  19041. (this.elements.inputs[e] = r),
  19042. controls$2.updateRangeFill.call(this, r),
  19043. RangeTouch.setup(r),
  19044. r
  19045. );
  19046. },
  19047. createProgress(e, t) {
  19048. const r = createElement(
  19049. 'progress',
  19050. extend(
  19051. getAttributesFromSelector(this.config.selectors.display[e]),
  19052. { min: 0, max: 100, value: 0, role: 'progressbar', 'aria-hidden': !0 },
  19053. t
  19054. )
  19055. );
  19056. if (e !== 'volume') {
  19057. r.appendChild(createElement('span', null, '0'));
  19058. const i = { played: 'played', buffer: 'buffered' }[e],
  19059. s = i ? i18n.get(i, this.config) : '';
  19060. r.innerText = `% ${s.toLowerCase()}`;
  19061. }
  19062. return (this.elements.display[e] = r), r;
  19063. },
  19064. createTime(e, t) {
  19065. const r = getAttributesFromSelector(this.config.selectors.display[e], t),
  19066. i = createElement(
  19067. 'div',
  19068. extend(r, {
  19069. class: `${r.class ? r.class : ''} ${
  19070. this.config.classNames.display.time
  19071. } `.trim(),
  19072. 'aria-label': i18n.get(e, this.config),
  19073. role: 'timer'
  19074. }),
  19075. '00:00'
  19076. );
  19077. return (this.elements.display[e] = i), i;
  19078. },
  19079. bindMenuItemShortcuts(e, t) {
  19080. on.call(
  19081. this,
  19082. e,
  19083. 'keydown keyup',
  19084. r => {
  19085. if (
  19086. ![' ', 'ArrowUp', 'ArrowDown', 'ArrowRight'].includes(r.key) ||
  19087. (r.preventDefault(), r.stopPropagation(), r.type === 'keydown')
  19088. )
  19089. return;
  19090. const i = matches(e, '[role="menuitemradio"]');
  19091. if (!i && [' ', 'ArrowRight'].includes(r.key))
  19092. controls$2.showMenuPanel.call(this, t, !0);
  19093. else {
  19094. let s;
  19095. r.key !== ' ' &&
  19096. (r.key === 'ArrowDown' || (i && r.key === 'ArrowRight')
  19097. ? ((s = e.nextElementSibling),
  19098. is.element(s) || (s = e.parentNode.firstElementChild))
  19099. : ((s = e.previousElementSibling),
  19100. is.element(s) || (s = e.parentNode.lastElementChild)),
  19101. setFocus.call(this, s, !0));
  19102. }
  19103. },
  19104. !1
  19105. ),
  19106. on.call(this, e, 'keyup', r => {
  19107. r.key === 'Return' &&
  19108. controls$2.focusFirstMenuItem.call(this, null, !0);
  19109. });
  19110. },
  19111. createMenuItem({
  19112. value: e,
  19113. list: t,
  19114. type: r,
  19115. title: i,
  19116. badge: s = null,
  19117. checked: n = !1
  19118. }) {
  19119. const a = getAttributesFromSelector(this.config.selectors.inputs[r]),
  19120. o = createElement(
  19121. 'button',
  19122. extend(a, {
  19123. type: 'button',
  19124. role: 'menuitemradio',
  19125. class: `${this.config.classNames.control} ${
  19126. a.class ? a.class : ''
  19127. }`.trim(),
  19128. 'aria-checked': n,
  19129. value: e
  19130. })
  19131. ),
  19132. l = createElement('span');
  19133. (l.innerHTML = i),
  19134. is.element(s) && l.appendChild(s),
  19135. o.appendChild(l),
  19136. Object.defineProperty(o, 'checked', {
  19137. enumerable: !0,
  19138. get: () => o.getAttribute('aria-checked') === 'true',
  19139. set(c) {
  19140. c &&
  19141. Array.from(o.parentNode.children)
  19142. .filter(g => matches(g, '[role="menuitemradio"]'))
  19143. .forEach(g => g.setAttribute('aria-checked', 'false')),
  19144. o.setAttribute('aria-checked', c ? 'true' : 'false');
  19145. }
  19146. }),
  19147. this.listeners.bind(
  19148. o,
  19149. 'click keyup',
  19150. c => {
  19151. if (!is.keyboardEvent(c) || c.key === ' ') {
  19152. switch (
  19153. (c.preventDefault(), c.stopPropagation(), (o.checked = !0), r)
  19154. ) {
  19155. case 'language':
  19156. this.currentTrack = Number(e);
  19157. break;
  19158. case 'quality':
  19159. this.quality = e;
  19160. break;
  19161. case 'speed':
  19162. this.speed = parseFloat(e);
  19163. }
  19164. controls$2.showMenuPanel.call(this, 'home', is.keyboardEvent(c));
  19165. }
  19166. },
  19167. r,
  19168. !1
  19169. ),
  19170. controls$2.bindMenuItemShortcuts.call(this, o, r),
  19171. t.appendChild(o);
  19172. },
  19173. formatTime(e = 0, t = !1) {
  19174. return is.number(e) ? formatTime(e, getHours(this.duration) > 0, t) : e;
  19175. },
  19176. updateTimeDisplay(e = null, t = 0, r = !1) {
  19177. is.element(e) &&
  19178. is.number(t) &&
  19179. (e.innerText = controls$2.formatTime(t, r));
  19180. },
  19181. updateVolume() {
  19182. this.supported.ui &&
  19183. (is.element(this.elements.inputs.volume) &&
  19184. controls$2.setRange.call(
  19185. this,
  19186. this.elements.inputs.volume,
  19187. this.muted ? 0 : this.volume
  19188. ),
  19189. is.element(this.elements.buttons.mute) &&
  19190. (this.elements.buttons.mute.pressed = this.muted || this.volume === 0));
  19191. },
  19192. setRange(e, t = 0) {
  19193. is.element(e) && ((e.value = t), controls$2.updateRangeFill.call(this, e));
  19194. },
  19195. updateProgress(e) {
  19196. if (!this.supported.ui || !is.event(e)) return;
  19197. let t = 0;
  19198. const r = (i, s) => {
  19199. const n = is.number(s) ? s : 0,
  19200. a = is.element(i) ? i : this.elements.display.buffer;
  19201. if (is.element(a)) {
  19202. a.value = n;
  19203. const o = a.getElementsByTagName('span')[0];
  19204. is.element(o) && (o.childNodes[0].nodeValue = n);
  19205. }
  19206. };
  19207. if (e)
  19208. switch (e.type) {
  19209. case 'timeupdate':
  19210. case 'seeking':
  19211. case 'seeked':
  19212. (t = getPercentage(this.currentTime, this.duration)),
  19213. e.type === 'timeupdate' &&
  19214. controls$2.setRange.call(this, this.elements.inputs.seek, t);
  19215. break;
  19216. case 'playing':
  19217. case 'progress':
  19218. r(this.elements.display.buffer, 100 * this.buffered);
  19219. }
  19220. },
  19221. updateRangeFill(e) {
  19222. const t = is.event(e) ? e.target : e;
  19223. if (is.element(t) && t.getAttribute('type') === 'range') {
  19224. if (matches(t, this.config.selectors.inputs.seek)) {
  19225. t.setAttribute('aria-valuenow', this.currentTime);
  19226. const r = controls$2.formatTime(this.currentTime),
  19227. i = controls$2.formatTime(this.duration),
  19228. s = i18n.get('seekLabel', this.config);
  19229. t.setAttribute(
  19230. 'aria-valuetext',
  19231. s.replace('{currentTime}', r).replace('{duration}', i)
  19232. );
  19233. } else if (matches(t, this.config.selectors.inputs.volume)) {
  19234. const r = 100 * t.value;
  19235. t.setAttribute('aria-valuenow', r),
  19236. t.setAttribute('aria-valuetext', `${r.toFixed(1)}%`);
  19237. } else t.setAttribute('aria-valuenow', t.value);
  19238. (browser.isWebKit || browser.isIPadOS) &&
  19239. t.style.setProperty('--value', (t.value / t.max) * 100 + '%');
  19240. }
  19241. },
  19242. updateSeekTooltip(e) {
  19243. var t, r;
  19244. if (
  19245. !this.config.tooltips.seek ||
  19246. !is.element(this.elements.inputs.seek) ||
  19247. !is.element(this.elements.display.seekTooltip) ||
  19248. this.duration === 0
  19249. )
  19250. return;
  19251. const i = this.elements.display.seekTooltip,
  19252. s = `${this.config.classNames.tooltip}--visible`,
  19253. n = g => toggleClass(i, s, g);
  19254. if (this.touch) return void n(!1);
  19255. let a = 0;
  19256. const o = this.elements.progress.getBoundingClientRect();
  19257. if (is.event(e)) a = (100 / o.width) * (e.pageX - o.left);
  19258. else {
  19259. if (!hasClass(i, s)) return;
  19260. a = parseFloat(i.style.left, 10);
  19261. }
  19262. a < 0 ? (a = 0) : a > 100 && (a = 100);
  19263. const l = (this.duration / 100) * a;
  19264. i.innerText = controls$2.formatTime(l);
  19265. const c =
  19266. (t = this.config.markers) === null ||
  19267. t === void 0 ||
  19268. (r = t.points) === null ||
  19269. r === void 0
  19270. ? void 0
  19271. : r.find(({ time: g }) => g === Math.round(l));
  19272. c && i.insertAdjacentHTML('afterbegin', `${c.label}<br>`),
  19273. (i.style.left = `${a}%`),
  19274. is.event(e) &&
  19275. ['mouseenter', 'mouseleave'].includes(e.type) &&
  19276. n(e.type === 'mouseenter');
  19277. },
  19278. timeUpdate(e) {
  19279. const t =
  19280. !is.element(this.elements.display.duration) && this.config.invertTime;
  19281. controls$2.updateTimeDisplay.call(
  19282. this,
  19283. this.elements.display.currentTime,
  19284. t ? this.duration - this.currentTime : this.currentTime,
  19285. t
  19286. ),
  19287. (e && e.type === 'timeupdate' && this.media.seeking) ||
  19288. controls$2.updateProgress.call(this, e);
  19289. },
  19290. durationUpdate() {
  19291. if (!this.supported.ui || (!this.config.invertTime && this.currentTime))
  19292. return;
  19293. if (this.duration >= 2 ** 32)
  19294. return (
  19295. toggleHidden(this.elements.display.currentTime, !0),
  19296. void toggleHidden(this.elements.progress, !0)
  19297. );
  19298. is.element(this.elements.inputs.seek) &&
  19299. this.elements.inputs.seek.setAttribute('aria-valuemax', this.duration);
  19300. const e = is.element(this.elements.display.duration);
  19301. !e &&
  19302. this.config.displayDuration &&
  19303. this.paused &&
  19304. controls$2.updateTimeDisplay.call(
  19305. this,
  19306. this.elements.display.currentTime,
  19307. this.duration
  19308. ),
  19309. e &&
  19310. controls$2.updateTimeDisplay.call(
  19311. this,
  19312. this.elements.display.duration,
  19313. this.duration
  19314. ),
  19315. this.config.markers.enabled && controls$2.setMarkers.call(this),
  19316. controls$2.updateSeekTooltip.call(this);
  19317. },
  19318. toggleMenuButton(e, t) {
  19319. toggleHidden(this.elements.settings.buttons[e], !t);
  19320. },
  19321. updateSetting(e, t, r) {
  19322. const i = this.elements.settings.panels[e];
  19323. let s = null,
  19324. n = t;
  19325. if (e === 'captions') s = this.currentTrack;
  19326. else {
  19327. if (
  19328. ((s = is.empty(r) ? this[e] : r),
  19329. is.empty(s) && (s = this.config[e].default),
  19330. !is.empty(this.options[e]) && !this.options[e].includes(s))
  19331. )
  19332. return void this.debug.warn(`Unsupported value of '${s}' for ${e}`);
  19333. if (!this.config[e].options.includes(s))
  19334. return void this.debug.warn(`Disabled value of '${s}' for ${e}`);
  19335. }
  19336. if (
  19337. (is.element(n) || (n = i && i.querySelector('[role="menu"]')),
  19338. !is.element(n))
  19339. )
  19340. return;
  19341. this.elements.settings.buttons[e].querySelector(
  19342. `.${this.config.classNames.menu.value}`
  19343. ).innerHTML = controls$2.getLabel.call(this, e, s);
  19344. const a = n && n.querySelector(`[value="${s}"]`);
  19345. is.element(a) && (a.checked = !0);
  19346. },
  19347. getLabel(e, t) {
  19348. switch (e) {
  19349. case 'speed':
  19350. return t === 1 ? i18n.get('normal', this.config) : `${t}&times;`;
  19351. case 'quality':
  19352. if (is.number(t)) {
  19353. const r = i18n.get(`qualityLabel.${t}`, this.config);
  19354. return r.length ? r : `${t}p`;
  19355. }
  19356. return toTitleCase(t);
  19357. case 'captions':
  19358. return captions.getLabel.call(this);
  19359. default:
  19360. return null;
  19361. }
  19362. },
  19363. setQualityMenu(e) {
  19364. if (!is.element(this.elements.settings.panels.quality)) return;
  19365. const t = 'quality',
  19366. r = this.elements.settings.panels.quality.querySelector('[role="menu"]');
  19367. is.array(e) &&
  19368. (this.options.quality = dedupe(e).filter(n =>
  19369. this.config.quality.options.includes(n)
  19370. ));
  19371. const i =
  19372. !is.empty(this.options.quality) && this.options.quality.length > 1;
  19373. if (
  19374. (controls$2.toggleMenuButton.call(this, t, i),
  19375. emptyElement(r),
  19376. controls$2.checkMenu.call(this),
  19377. !i)
  19378. )
  19379. return;
  19380. const s = n => {
  19381. const a = i18n.get(`qualityBadge.${n}`, this.config);
  19382. return a.length ? controls$2.createBadge.call(this, a) : null;
  19383. };
  19384. this.options.quality
  19385. .sort((n, a) => {
  19386. const o = this.config.quality.options;
  19387. return o.indexOf(n) > o.indexOf(a) ? 1 : -1;
  19388. })
  19389. .forEach(n => {
  19390. controls$2.createMenuItem.call(this, {
  19391. value: n,
  19392. list: r,
  19393. type: t,
  19394. title: controls$2.getLabel.call(this, 'quality', n),
  19395. badge: s(n)
  19396. });
  19397. }),
  19398. controls$2.updateSetting.call(this, t, r);
  19399. },
  19400. setCaptionsMenu() {
  19401. if (!is.element(this.elements.settings.panels.captions)) return;
  19402. const e = 'captions',
  19403. t = this.elements.settings.panels.captions.querySelector('[role="menu"]'),
  19404. r = captions.getTracks.call(this),
  19405. i = !!r.length;
  19406. if (
  19407. (controls$2.toggleMenuButton.call(this, e, i),
  19408. emptyElement(t),
  19409. controls$2.checkMenu.call(this),
  19410. !i)
  19411. )
  19412. return;
  19413. const s = r.map((n, a) => ({
  19414. value: a,
  19415. checked: this.captions.toggled && this.currentTrack === a,
  19416. title: captions.getLabel.call(this, n),
  19417. badge:
  19418. n.language &&
  19419. controls$2.createBadge.call(this, n.language.toUpperCase()),
  19420. list: t,
  19421. type: 'language'
  19422. }));
  19423. s.unshift({
  19424. value: -1,
  19425. checked: !this.captions.toggled,
  19426. title: i18n.get('disabled', this.config),
  19427. list: t,
  19428. type: 'language'
  19429. }),
  19430. s.forEach(controls$2.createMenuItem.bind(this)),
  19431. controls$2.updateSetting.call(this, e, t);
  19432. },
  19433. setSpeedMenu() {
  19434. if (!is.element(this.elements.settings.panels.speed)) return;
  19435. const e = 'speed',
  19436. t = this.elements.settings.panels.speed.querySelector('[role="menu"]');
  19437. this.options.speed = this.options.speed.filter(
  19438. i => i >= this.minimumSpeed && i <= this.maximumSpeed
  19439. );
  19440. const r = !is.empty(this.options.speed) && this.options.speed.length > 1;
  19441. controls$2.toggleMenuButton.call(this, e, r),
  19442. emptyElement(t),
  19443. controls$2.checkMenu.call(this),
  19444. r &&
  19445. (this.options.speed.forEach(i => {
  19446. controls$2.createMenuItem.call(this, {
  19447. value: i,
  19448. list: t,
  19449. type: e,
  19450. title: controls$2.getLabel.call(this, 'speed', i)
  19451. });
  19452. }),
  19453. controls$2.updateSetting.call(this, e, t));
  19454. },
  19455. checkMenu() {
  19456. const { buttons: e } = this.elements.settings,
  19457. t = !is.empty(e) && Object.values(e).some(r => !r.hidden);
  19458. toggleHidden(this.elements.settings.menu, !t);
  19459. },
  19460. focusFirstMenuItem(e, t = !1) {
  19461. if (this.elements.settings.popup.hidden) return;
  19462. let r = e;
  19463. is.element(r) ||
  19464. (r = Object.values(this.elements.settings.panels).find(s => !s.hidden));
  19465. const i = r.querySelector('[role^="menuitem"]');
  19466. setFocus.call(this, i, t);
  19467. },
  19468. toggleMenu(e) {
  19469. const { popup: t } = this.elements.settings,
  19470. r = this.elements.buttons.settings;
  19471. if (!is.element(t) || !is.element(r)) return;
  19472. const { hidden: i } = t;
  19473. let s = i;
  19474. if (is.boolean(e)) s = e;
  19475. else if (is.keyboardEvent(e) && e.key === 'Escape') s = !1;
  19476. else if (is.event(e)) {
  19477. const n = is.function(e.composedPath) ? e.composedPath()[0] : e.target,
  19478. a = t.contains(n);
  19479. if (a || (!a && e.target !== r && s)) return;
  19480. }
  19481. r.setAttribute('aria-expanded', s),
  19482. toggleHidden(t, !s),
  19483. toggleClass(this.elements.container, this.config.classNames.menu.open, s),
  19484. s && is.keyboardEvent(e)
  19485. ? controls$2.focusFirstMenuItem.call(this, null, !0)
  19486. : s || i || setFocus.call(this, r, is.keyboardEvent(e));
  19487. },
  19488. getMenuSize(e) {
  19489. const t = e.cloneNode(!0);
  19490. (t.style.position = 'absolute'),
  19491. (t.style.opacity = 0),
  19492. t.removeAttribute('hidden'),
  19493. e.parentNode.appendChild(t);
  19494. const r = t.scrollWidth,
  19495. i = t.scrollHeight;
  19496. return removeElement(t), { width: r, height: i };
  19497. },
  19498. showMenuPanel(e = '', t = !1) {
  19499. const r = this.elements.container.querySelector(
  19500. `#plyr-settings-${this.id}-${e}`
  19501. );
  19502. if (!is.element(r)) return;
  19503. const i = r.parentNode,
  19504. s = Array.from(i.children).find(n => !n.hidden);
  19505. if (support.transitions && !support.reducedMotion) {
  19506. (i.style.width = `${s.scrollWidth}px`),
  19507. (i.style.height = `${s.scrollHeight}px`);
  19508. const n = controls$2.getMenuSize.call(this, r),
  19509. a = o => {
  19510. o.target === i &&
  19511. ['width', 'height'].includes(o.propertyName) &&
  19512. ((i.style.width = ''),
  19513. (i.style.height = ''),
  19514. off.call(this, i, transitionEndEvent, a));
  19515. };
  19516. on.call(this, i, transitionEndEvent, a),
  19517. (i.style.width = `${n.width}px`),
  19518. (i.style.height = `${n.height}px`);
  19519. }
  19520. toggleHidden(s, !0),
  19521. toggleHidden(r, !1),
  19522. controls$2.focusFirstMenuItem.call(this, r, t);
  19523. },
  19524. setDownloadUrl() {
  19525. const e = this.elements.buttons.download;
  19526. is.element(e) && e.setAttribute('href', this.download);
  19527. },
  19528. create(e) {
  19529. const {
  19530. bindMenuItemShortcuts: t,
  19531. createButton: r,
  19532. createProgress: i,
  19533. createRange: s,
  19534. createTime: n,
  19535. setQualityMenu: a,
  19536. setSpeedMenu: o,
  19537. showMenuPanel: l
  19538. } = controls$2;
  19539. (this.elements.controls = null),
  19540. is.array(this.config.controls) &&
  19541. this.config.controls.includes('play-large') &&
  19542. this.elements.container.appendChild(r.call(this, 'play-large'));
  19543. const c = createElement(
  19544. 'div',
  19545. getAttributesFromSelector(this.config.selectors.controls.wrapper)
  19546. );
  19547. this.elements.controls = c;
  19548. const g = { class: 'plyr__controls__item' };
  19549. return (
  19550. dedupe(
  19551. is.array(this.config.controls) ? this.config.controls : []
  19552. ).forEach(S => {
  19553. if (
  19554. (S === 'restart' && c.appendChild(r.call(this, 'restart', g)),
  19555. S === 'rewind' && c.appendChild(r.call(this, 'rewind', g)),
  19556. S === 'play' && c.appendChild(r.call(this, 'play', g)),
  19557. S === 'fast-forward' &&
  19558. c.appendChild(r.call(this, 'fast-forward', g)),
  19559. S === 'progress')
  19560. ) {
  19561. const p = createElement('div', {
  19562. class: `${g.class} plyr__progress__container`
  19563. }),
  19564. P = createElement(
  19565. 'div',
  19566. getAttributesFromSelector(this.config.selectors.progress)
  19567. );
  19568. if (
  19569. (P.appendChild(s.call(this, 'seek', { id: `plyr-seek-${e.id}` })),
  19570. P.appendChild(i.call(this, 'buffer')),
  19571. this.config.tooltips.seek)
  19572. ) {
  19573. const b = createElement(
  19574. 'span',
  19575. { class: this.config.classNames.tooltip },
  19576. '00:00'
  19577. );
  19578. P.appendChild(b), (this.elements.display.seekTooltip = b);
  19579. }
  19580. (this.elements.progress = P),
  19581. p.appendChild(this.elements.progress),
  19582. c.appendChild(p);
  19583. }
  19584. if (
  19585. (S === 'current-time' &&
  19586. c.appendChild(n.call(this, 'currentTime', g)),
  19587. S === 'duration' && c.appendChild(n.call(this, 'duration', g)),
  19588. S === 'mute' || S === 'volume')
  19589. ) {
  19590. let { volume: p } = this.elements;
  19591. if (
  19592. ((is.element(p) && c.contains(p)) ||
  19593. ((p = createElement(
  19594. 'div',
  19595. extend({}, g, { class: `${g.class} plyr__volume`.trim() })
  19596. )),
  19597. (this.elements.volume = p),
  19598. c.appendChild(p)),
  19599. S === 'mute' && p.appendChild(r.call(this, 'mute')),
  19600. S === 'volume' && !browser.isIos && !browser.isIPadOS)
  19601. ) {
  19602. const P = { max: 1, step: 0.05, value: this.config.volume };
  19603. p.appendChild(
  19604. s.call(this, 'volume', extend(P, { id: `plyr-volume-${e.id}` }))
  19605. );
  19606. }
  19607. }
  19608. if (
  19609. (S === 'captions' && c.appendChild(r.call(this, 'captions', g)),
  19610. S === 'settings' && !is.empty(this.config.settings))
  19611. ) {
  19612. const p = createElement(
  19613. 'div',
  19614. extend({}, g, { class: `${g.class} plyr__menu`.trim(), hidden: '' })
  19615. );
  19616. p.appendChild(
  19617. r.call(this, 'settings', {
  19618. 'aria-haspopup': !0,
  19619. 'aria-controls': `plyr-settings-${e.id}`,
  19620. 'aria-expanded': !1
  19621. })
  19622. );
  19623. const P = createElement('div', {
  19624. class: 'plyr__menu__container',
  19625. id: `plyr-settings-${e.id}`,
  19626. hidden: ''
  19627. }),
  19628. b = createElement('div'),
  19629. y = createElement('div', { id: `plyr-settings-${e.id}-home` }),
  19630. A = createElement('div', { role: 'menu' });
  19631. y.appendChild(A),
  19632. b.appendChild(y),
  19633. (this.elements.settings.panels.home = y),
  19634. this.config.settings.forEach(u => {
  19635. const f = createElement(
  19636. 'button',
  19637. extend(
  19638. getAttributesFromSelector(
  19639. this.config.selectors.buttons.settings
  19640. ),
  19641. {
  19642. type: 'button',
  19643. class: `${this.config.classNames.control} ${this.config.classNames.control}--forward`,
  19644. role: 'menuitem',
  19645. 'aria-haspopup': !0,
  19646. hidden: ''
  19647. }
  19648. )
  19649. );
  19650. t.call(this, f, u),
  19651. on.call(this, f, 'click', () => {
  19652. l.call(this, u, !1);
  19653. });
  19654. const m = createElement('span', null, i18n.get(u, this.config)),
  19655. d = createElement('span', {
  19656. class: this.config.classNames.menu.value
  19657. });
  19658. (d.innerHTML = e[u]),
  19659. m.appendChild(d),
  19660. f.appendChild(m),
  19661. A.appendChild(f);
  19662. const E = createElement('div', {
  19663. id: `plyr-settings-${e.id}-${u}`,
  19664. hidden: ''
  19665. }),
  19666. T = createElement('button', {
  19667. type: 'button',
  19668. class: `${this.config.classNames.control} ${this.config.classNames.control}--back`
  19669. });
  19670. T.appendChild(
  19671. createElement(
  19672. 'span',
  19673. { 'aria-hidden': !0 },
  19674. i18n.get(u, this.config)
  19675. )
  19676. ),
  19677. T.appendChild(
  19678. createElement(
  19679. 'span',
  19680. { class: this.config.classNames.hidden },
  19681. i18n.get('menuBack', this.config)
  19682. )
  19683. ),
  19684. on.call(
  19685. this,
  19686. E,
  19687. 'keydown',
  19688. x => {
  19689. x.key === 'ArrowLeft' &&
  19690. (x.preventDefault(),
  19691. x.stopPropagation(),
  19692. l.call(this, 'home', !0));
  19693. },
  19694. !1
  19695. ),
  19696. on.call(this, T, 'click', () => {
  19697. l.call(this, 'home', !1);
  19698. }),
  19699. E.appendChild(T),
  19700. E.appendChild(createElement('div', { role: 'menu' })),
  19701. b.appendChild(E),
  19702. (this.elements.settings.buttons[u] = f),
  19703. (this.elements.settings.panels[u] = E);
  19704. }),
  19705. P.appendChild(b),
  19706. p.appendChild(P),
  19707. c.appendChild(p),
  19708. (this.elements.settings.popup = P),
  19709. (this.elements.settings.menu = p);
  19710. }
  19711. if (
  19712. (S === 'pip' && support.pip && c.appendChild(r.call(this, 'pip', g)),
  19713. S === 'airplay' &&
  19714. support.airplay &&
  19715. c.appendChild(r.call(this, 'airplay', g)),
  19716. S === 'download')
  19717. ) {
  19718. const p = extend({}, g, {
  19719. element: 'a',
  19720. href: this.download,
  19721. target: '_blank'
  19722. });
  19723. this.isHTML5 && (p.download = '');
  19724. const { download: P } = this.config.urls;
  19725. !is.url(P) &&
  19726. this.isEmbed &&
  19727. extend(p, { icon: `logo-${this.provider}`, label: this.provider }),
  19728. c.appendChild(r.call(this, 'download', p));
  19729. }
  19730. S === 'fullscreen' && c.appendChild(r.call(this, 'fullscreen', g));
  19731. }),
  19732. this.isHTML5 && a.call(this, html5.getQualityOptions.call(this)),
  19733. o.call(this),
  19734. c
  19735. );
  19736. },
  19737. inject() {
  19738. if (this.config.loadSprite) {
  19739. const s = controls$2.getIconUrl.call(this);
  19740. s.cors && loadSprite(s.url, 'sprite-plyr');
  19741. }
  19742. this.id = Math.floor(1e4 * Math.random());
  19743. let e = null;
  19744. this.elements.controls = null;
  19745. const t = {
  19746. id: this.id,
  19747. seektime: this.config.seekTime,
  19748. title: this.config.title
  19749. };
  19750. let r = !0;
  19751. is.function(this.config.controls) &&
  19752. (this.config.controls = this.config.controls.call(this, t)),
  19753. this.config.controls || (this.config.controls = []),
  19754. is.element(this.config.controls) || is.string(this.config.controls)
  19755. ? (e = this.config.controls)
  19756. : ((e = controls$2.create.call(this, {
  19757. id: this.id,
  19758. seektime: this.config.seekTime,
  19759. speed: this.speed,
  19760. quality: this.quality,
  19761. captions: captions.getLabel.call(this)
  19762. })),
  19763. (r = !1));
  19764. let i;
  19765. if (
  19766. (r &&
  19767. is.string(this.config.controls) &&
  19768. (e = (s => {
  19769. let n = s;
  19770. return (
  19771. Object.entries(t).forEach(([a, o]) => {
  19772. n = replaceAll(n, `{${a}}`, o);
  19773. }),
  19774. n
  19775. );
  19776. })(e)),
  19777. is.string(this.config.selectors.controls.container) &&
  19778. (i = document.querySelector(this.config.selectors.controls.container)),
  19779. is.element(i) || (i = this.elements.container),
  19780. i[is.element(e) ? 'insertAdjacentElement' : 'insertAdjacentHTML'](
  19781. 'afterbegin',
  19782. e
  19783. ),
  19784. is.element(this.elements.controls) || controls$2.findElements.call(this),
  19785. !is.empty(this.elements.buttons))
  19786. ) {
  19787. const s = n => {
  19788. const a = this.config.classNames.controlPressed;
  19789. n.setAttribute('aria-pressed', 'false'),
  19790. Object.defineProperty(n, 'pressed', {
  19791. configurable: !0,
  19792. enumerable: !0,
  19793. get: () => hasClass(n, a),
  19794. set(o = !1) {
  19795. toggleClass(n, a, o),
  19796. n.setAttribute('aria-pressed', o ? 'true' : 'false');
  19797. }
  19798. });
  19799. };
  19800. Object.values(this.elements.buttons)
  19801. .filter(Boolean)
  19802. .forEach(n => {
  19803. is.array(n) || is.nodeList(n)
  19804. ? Array.from(n).filter(Boolean).forEach(s)
  19805. : s(n);
  19806. });
  19807. }
  19808. if ((browser.isEdge && repaint(i), this.config.tooltips.controls)) {
  19809. const { classNames: s, selectors: n } = this.config,
  19810. a = `${n.controls.wrapper} ${n.labels} .${s.hidden}`,
  19811. o = getElements.call(this, a);
  19812. Array.from(o).forEach(l => {
  19813. toggleClass(l, this.config.classNames.hidden, !1),
  19814. toggleClass(l, this.config.classNames.tooltip, !0);
  19815. });
  19816. }
  19817. },
  19818. setMediaMetadata() {
  19819. try {
  19820. 'mediaSession' in navigator &&
  19821. (navigator.mediaSession.metadata = new window.MediaMetadata({
  19822. title: this.config.mediaMetadata.title,
  19823. artist: this.config.mediaMetadata.artist,
  19824. album: this.config.mediaMetadata.album,
  19825. artwork: this.config.mediaMetadata.artwork
  19826. }));
  19827. } catch {}
  19828. },
  19829. setMarkers() {
  19830. var e, t;
  19831. if (!this.duration || this.elements.markers) return;
  19832. const r =
  19833. (e = this.config.markers) === null ||
  19834. e === void 0 ||
  19835. (t = e.points) === null ||
  19836. t === void 0
  19837. ? void 0
  19838. : t.filter(({ time: l }) => l > 0 && l < this.duration);
  19839. if (r == null || !r.length) return;
  19840. const i = document.createDocumentFragment(),
  19841. s = document.createDocumentFragment();
  19842. let n = null;
  19843. const a = `${this.config.classNames.tooltip}--visible`,
  19844. o = l => toggleClass(n, a, l);
  19845. r.forEach(l => {
  19846. const c = createElement(
  19847. 'span',
  19848. { class: this.config.classNames.marker },
  19849. ''
  19850. ),
  19851. g = (l.time / this.duration) * 100 + '%';
  19852. n &&
  19853. (c.addEventListener('mouseenter', () => {
  19854. l.label || ((n.style.left = g), (n.innerHTML = l.label), o(!0));
  19855. }),
  19856. c.addEventListener('mouseleave', () => {
  19857. o(!1);
  19858. })),
  19859. c.addEventListener('click', () => {
  19860. this.currentTime = l.time;
  19861. }),
  19862. (c.style.left = g),
  19863. s.appendChild(c);
  19864. }),
  19865. i.appendChild(s),
  19866. this.config.tooltips.seek ||
  19867. ((n = createElement(
  19868. 'span',
  19869. { class: this.config.classNames.tooltip },
  19870. ''
  19871. )),
  19872. i.appendChild(n)),
  19873. (this.elements.markers = { points: s, tip: n }),
  19874. this.elements.progress.appendChild(i);
  19875. }
  19876. };
  19877. function parseUrl(e, t = !0) {
  19878. let r = e;
  19879. if (t) {
  19880. const i = document.createElement('a');
  19881. (i.href = r), (r = i.href);
  19882. }
  19883. try {
  19884. return new URL(r);
  19885. } catch {
  19886. return null;
  19887. }
  19888. }
  19889. function buildUrlParams(e) {
  19890. const t = new URLSearchParams();
  19891. return (
  19892. is.object(e) &&
  19893. Object.entries(e).forEach(([r, i]) => {
  19894. t.set(r, i);
  19895. }),
  19896. t
  19897. );
  19898. }
  19899. const captions = {
  19900. setup() {
  19901. if (!this.supported.ui) return;
  19902. if (
  19903. !this.isVideo ||
  19904. this.isYouTube ||
  19905. (this.isHTML5 && !support.textTracks)
  19906. )
  19907. return void (
  19908. is.array(this.config.controls) &&
  19909. this.config.controls.includes('settings') &&
  19910. this.config.settings.includes('captions') &&
  19911. controls$2.setCaptionsMenu.call(this)
  19912. );
  19913. if (
  19914. (is.element(this.elements.captions) ||
  19915. ((this.elements.captions = createElement(
  19916. 'div',
  19917. getAttributesFromSelector(this.config.selectors.captions)
  19918. )),
  19919. this.elements.captions.setAttribute('dir', 'auto'),
  19920. insertAfter(this.elements.captions, this.elements.wrapper)),
  19921. browser.isIE && window.URL)
  19922. ) {
  19923. const i = this.media.querySelectorAll('track');
  19924. Array.from(i).forEach(s => {
  19925. const n = s.getAttribute('src'),
  19926. a = parseUrl(n);
  19927. a !== null &&
  19928. a.hostname !== window.location.href.hostname &&
  19929. ['http:', 'https:'].includes(a.protocol) &&
  19930. fetch$1(n, 'blob')
  19931. .then(o => {
  19932. s.setAttribute('src', window.URL.createObjectURL(o));
  19933. })
  19934. .catch(() => {
  19935. removeElement(s);
  19936. });
  19937. });
  19938. }
  19939. const e = dedupe(
  19940. (
  19941. navigator.languages || [
  19942. navigator.language || navigator.userLanguage || 'en'
  19943. ]
  19944. ).map(i => i.split('-')[0])
  19945. );
  19946. let t = (
  19947. this.storage.get('language') ||
  19948. this.config.captions.language ||
  19949. 'auto'
  19950. ).toLowerCase();
  19951. t === 'auto' && ([t] = e);
  19952. let r = this.storage.get('captions');
  19953. if (
  19954. (is.boolean(r) || ({ active: r } = this.config.captions),
  19955. Object.assign(this.captions, {
  19956. toggled: !1,
  19957. active: r,
  19958. language: t,
  19959. languages: e
  19960. }),
  19961. this.isHTML5)
  19962. ) {
  19963. const i = this.config.captions.update
  19964. ? 'addtrack removetrack'
  19965. : 'removetrack';
  19966. on.call(this, this.media.textTracks, i, captions.update.bind(this));
  19967. }
  19968. setTimeout(captions.update.bind(this), 0);
  19969. },
  19970. update() {
  19971. const e = captions.getTracks.call(this, !0),
  19972. {
  19973. active: t,
  19974. language: r,
  19975. meta: i,
  19976. currentTrackNode: s
  19977. } = this.captions,
  19978. n = !!e.find(a => a.language === r);
  19979. this.isHTML5 &&
  19980. this.isVideo &&
  19981. e
  19982. .filter(a => !i.get(a))
  19983. .forEach(a => {
  19984. this.debug.log('Track added', a),
  19985. i.set(a, { default: a.mode === 'showing' }),
  19986. a.mode === 'showing' && (a.mode = 'hidden'),
  19987. on.call(this, a, 'cuechange', () =>
  19988. captions.updateCues.call(this)
  19989. );
  19990. }),
  19991. ((n && this.language !== r) || !e.includes(s)) &&
  19992. (captions.setLanguage.call(this, r),
  19993. captions.toggle.call(this, t && n)),
  19994. this.elements &&
  19995. toggleClass(
  19996. this.elements.container,
  19997. this.config.classNames.captions.enabled,
  19998. !is.empty(e)
  19999. ),
  20000. is.array(this.config.controls) &&
  20001. this.config.controls.includes('settings') &&
  20002. this.config.settings.includes('captions') &&
  20003. controls$2.setCaptionsMenu.call(this);
  20004. },
  20005. toggle(e, t = !0) {
  20006. if (!this.supported.ui) return;
  20007. const { toggled: r } = this.captions,
  20008. i = this.config.classNames.captions.active,
  20009. s = is.nullOrUndefined(e) ? !r : e;
  20010. if (s !== r) {
  20011. if (
  20012. (t || ((this.captions.active = s), this.storage.set({ captions: s })),
  20013. !this.language && s && !t)
  20014. ) {
  20015. const n = captions.getTracks.call(this),
  20016. a = captions.findTrack.call(
  20017. this,
  20018. [this.captions.language, ...this.captions.languages],
  20019. !0
  20020. );
  20021. return (
  20022. (this.captions.language = a.language),
  20023. void captions.set.call(this, n.indexOf(a))
  20024. );
  20025. }
  20026. this.elements.buttons.captions &&
  20027. (this.elements.buttons.captions.pressed = s),
  20028. toggleClass(this.elements.container, i, s),
  20029. (this.captions.toggled = s),
  20030. controls$2.updateSetting.call(this, 'captions'),
  20031. triggerEvent.call(
  20032. this,
  20033. this.media,
  20034. s ? 'captionsenabled' : 'captionsdisabled'
  20035. );
  20036. }
  20037. setTimeout(() => {
  20038. s &&
  20039. this.captions.toggled &&
  20040. (this.captions.currentTrackNode.mode = 'hidden');
  20041. });
  20042. },
  20043. set(e, t = !0) {
  20044. const r = captions.getTracks.call(this);
  20045. if (e !== -1)
  20046. if (is.number(e))
  20047. if (e in r) {
  20048. if (this.captions.currentTrack !== e) {
  20049. this.captions.currentTrack = e;
  20050. const i = r[e],
  20051. { language: s } = i || {};
  20052. (this.captions.currentTrackNode = i),
  20053. controls$2.updateSetting.call(this, 'captions'),
  20054. t ||
  20055. ((this.captions.language = s),
  20056. this.storage.set({ language: s })),
  20057. this.isVimeo && this.embed.enableTextTrack(s),
  20058. triggerEvent.call(this, this.media, 'languagechange');
  20059. }
  20060. captions.toggle.call(this, !0, t),
  20061. this.isHTML5 && this.isVideo && captions.updateCues.call(this);
  20062. } else this.debug.warn('Track not found', e);
  20063. else this.debug.warn('Invalid caption argument', e);
  20064. else captions.toggle.call(this, !1, t);
  20065. },
  20066. setLanguage(e, t = !0) {
  20067. if (!is.string(e))
  20068. return void this.debug.warn('Invalid language argument', e);
  20069. const r = e.toLowerCase();
  20070. this.captions.language = r;
  20071. const i = captions.getTracks.call(this),
  20072. s = captions.findTrack.call(this, [r]);
  20073. captions.set.call(this, i.indexOf(s), t);
  20074. },
  20075. getTracks(e = !1) {
  20076. return Array.from((this.media || {}).textTracks || [])
  20077. .filter(t => !this.isHTML5 || e || this.captions.meta.has(t))
  20078. .filter(t => ['captions', 'subtitles'].includes(t.kind));
  20079. },
  20080. findTrack(e, t = !1) {
  20081. const r = captions.getTracks.call(this),
  20082. i = a => Number((this.captions.meta.get(a) || {}).default),
  20083. s = Array.from(r).sort((a, o) => i(o) - i(a));
  20084. let n;
  20085. return (
  20086. e.every(a => ((n = s.find(o => o.language === a)), !n)),
  20087. n || (t ? s[0] : void 0)
  20088. );
  20089. },
  20090. getCurrentTrack() {
  20091. return captions.getTracks.call(this)[this.currentTrack];
  20092. },
  20093. getLabel(e) {
  20094. let t = e;
  20095. return (
  20096. !is.track(t) &&
  20097. support.textTracks &&
  20098. this.captions.toggled &&
  20099. (t = captions.getCurrentTrack.call(this)),
  20100. is.track(t)
  20101. ? is.empty(t.label)
  20102. ? is.empty(t.language)
  20103. ? i18n.get('enabled', this.config)
  20104. : e.language.toUpperCase()
  20105. : t.label
  20106. : i18n.get('disabled', this.config)
  20107. );
  20108. },
  20109. updateCues(e) {
  20110. if (!this.supported.ui) return;
  20111. if (!is.element(this.elements.captions))
  20112. return void this.debug.warn('No captions element to render to');
  20113. if (!is.nullOrUndefined(e) && !Array.isArray(e))
  20114. return void this.debug.warn('updateCues: Invalid input', e);
  20115. let t = e;
  20116. if (!t) {
  20117. const i = captions.getCurrentTrack.call(this);
  20118. t = Array.from((i || {}).activeCues || [])
  20119. .map(s => s.getCueAsHTML())
  20120. .map(getHTML);
  20121. }
  20122. const r = t.map(i => i.trim()).join(`
  20123. `);
  20124. if (r !== this.elements.captions.innerHTML) {
  20125. emptyElement(this.elements.captions);
  20126. const i = createElement(
  20127. 'span',
  20128. getAttributesFromSelector(this.config.selectors.caption)
  20129. );
  20130. (i.innerHTML = r),
  20131. this.elements.captions.appendChild(i),
  20132. triggerEvent.call(this, this.media, 'cuechange');
  20133. }
  20134. }
  20135. },
  20136. defaults = {
  20137. enabled: !0,
  20138. title: '',
  20139. debug: !1,
  20140. autoplay: !1,
  20141. autopause: !0,
  20142. playsinline: !0,
  20143. seekTime: 10,
  20144. volume: 1,
  20145. muted: !1,
  20146. duration: null,
  20147. displayDuration: !0,
  20148. invertTime: !0,
  20149. toggleInvert: !0,
  20150. ratio: null,
  20151. clickToPlay: !0,
  20152. hideControls: !0,
  20153. resetOnEnd: !1,
  20154. disableContextMenu: !0,
  20155. loadSprite: !0,
  20156. iconPrefix: 'plyr',
  20157. iconUrl: 'https://cdn.plyr.io/3.7.8/plyr.svg',
  20158. blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
  20159. quality: {
  20160. default: 576,
  20161. options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240],
  20162. forced: !1,
  20163. onChange: null
  20164. },
  20165. loop: { active: !1 },
  20166. speed: { selected: 1, options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 4] },
  20167. keyboard: { focused: !0, global: !1 },
  20168. tooltips: { controls: !1, seek: !0 },
  20169. captions: { active: !1, language: 'auto', update: !1 },
  20170. fullscreen: { enabled: !0, fallback: !0, iosNative: !1 },
  20171. storage: { enabled: !0, key: 'plyr' },
  20172. controls: [
  20173. 'play-large',
  20174. 'play',
  20175. 'progress',
  20176. 'current-time',
  20177. 'mute',
  20178. 'volume',
  20179. 'captions',
  20180. 'settings',
  20181. 'pip',
  20182. 'airplay',
  20183. 'fullscreen'
  20184. ],
  20185. settings: ['captions', 'quality', 'speed'],
  20186. i18n: {
  20187. restart: 'Restart',
  20188. rewind: 'Rewind {seektime}s',
  20189. play: 'Play',
  20190. pause: 'Pause',
  20191. fastForward: 'Forward {seektime}s',
  20192. seek: 'Seek',
  20193. seekLabel: '{currentTime} of {duration}',
  20194. played: 'Played',
  20195. buffered: 'Buffered',
  20196. currentTime: 'Current time',
  20197. duration: 'Duration',
  20198. volume: 'Volume',
  20199. mute: 'Mute',
  20200. unmute: 'Unmute',
  20201. enableCaptions: 'Enable captions',
  20202. disableCaptions: 'Disable captions',
  20203. download: 'Download',
  20204. enterFullscreen: 'Enter fullscreen',
  20205. exitFullscreen: 'Exit fullscreen',
  20206. frameTitle: 'Player for {title}',
  20207. captions: 'Captions',
  20208. settings: 'Settings',
  20209. pip: 'PIP',
  20210. menuBack: 'Go back to previous menu',
  20211. speed: 'Speed',
  20212. normal: 'Normal',
  20213. quality: 'Quality',
  20214. loop: 'Loop',
  20215. start: 'Start',
  20216. end: 'End',
  20217. all: 'All',
  20218. reset: 'Reset',
  20219. disabled: 'Disabled',
  20220. enabled: 'Enabled',
  20221. advertisement: 'Ad',
  20222. qualityBadge: {
  20223. 2160: '4K',
  20224. 1440: 'HD',
  20225. 1080: 'HD',
  20226. 720: 'HD',
  20227. 576: 'SD',
  20228. 480: 'SD'
  20229. }
  20230. },
  20231. urls: {
  20232. download: null,
  20233. vimeo: {
  20234. sdk: 'https://player.vimeo.com/api/player.js',
  20235. iframe: 'https://player.vimeo.com/video/{0}?{1}',
  20236. api: 'https://vimeo.com/api/oembed.json?url={0}'
  20237. },
  20238. youtube: {
  20239. sdk: 'https://www.youtube.com/iframe_api',
  20240. api: 'https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}'
  20241. },
  20242. googleIMA: { sdk: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js' }
  20243. },
  20244. listeners: {
  20245. seek: null,
  20246. play: null,
  20247. pause: null,
  20248. restart: null,
  20249. rewind: null,
  20250. fastForward: null,
  20251. mute: null,
  20252. volume: null,
  20253. captions: null,
  20254. download: null,
  20255. fullscreen: null,
  20256. pip: null,
  20257. airplay: null,
  20258. speed: null,
  20259. quality: null,
  20260. loop: null,
  20261. language: null
  20262. },
  20263. events: [
  20264. 'ended',
  20265. 'progress',
  20266. 'stalled',
  20267. 'playing',
  20268. 'waiting',
  20269. 'canplay',
  20270. 'canplaythrough',
  20271. 'loadstart',
  20272. 'loadeddata',
  20273. 'loadedmetadata',
  20274. 'timeupdate',
  20275. 'volumechange',
  20276. 'play',
  20277. 'pause',
  20278. 'error',
  20279. 'seeking',
  20280. 'seeked',
  20281. 'emptied',
  20282. 'ratechange',
  20283. 'cuechange',
  20284. 'download',
  20285. 'enterfullscreen',
  20286. 'exitfullscreen',
  20287. 'captionsenabled',
  20288. 'captionsdisabled',
  20289. 'languagechange',
  20290. 'controlshidden',
  20291. 'controlsshown',
  20292. 'ready',
  20293. 'statechange',
  20294. 'qualitychange',
  20295. 'adsloaded',
  20296. 'adscontentpause',
  20297. 'adscontentresume',
  20298. 'adstarted',
  20299. 'adsmidpoint',
  20300. 'adscomplete',
  20301. 'adsallcomplete',
  20302. 'adsimpression',
  20303. 'adsclick'
  20304. ],
  20305. selectors: {
  20306. editable: 'input, textarea, select, [contenteditable]',
  20307. container: '.plyr',
  20308. controls: { container: null, wrapper: '.plyr__controls' },
  20309. labels: '[data-plyr]',
  20310. buttons: {
  20311. play: '[data-plyr="play"]',
  20312. pause: '[data-plyr="pause"]',
  20313. restart: '[data-plyr="restart"]',
  20314. rewind: '[data-plyr="rewind"]',
  20315. fastForward: '[data-plyr="fast-forward"]',
  20316. mute: '[data-plyr="mute"]',
  20317. captions: '[data-plyr="captions"]',
  20318. download: '[data-plyr="download"]',
  20319. fullscreen: '[data-plyr="fullscreen"]',
  20320. pip: '[data-plyr="pip"]',
  20321. airplay: '[data-plyr="airplay"]',
  20322. settings: '[data-plyr="settings"]',
  20323. loop: '[data-plyr="loop"]'
  20324. },
  20325. inputs: {
  20326. seek: '[data-plyr="seek"]',
  20327. volume: '[data-plyr="volume"]',
  20328. speed: '[data-plyr="speed"]',
  20329. language: '[data-plyr="language"]',
  20330. quality: '[data-plyr="quality"]'
  20331. },
  20332. display: {
  20333. currentTime: '.plyr__time--current',
  20334. duration: '.plyr__time--duration',
  20335. buffer: '.plyr__progress__buffer',
  20336. loop: '.plyr__progress__loop',
  20337. volume: '.plyr__volume--display'
  20338. },
  20339. progress: '.plyr__progress',
  20340. captions: '.plyr__captions',
  20341. caption: '.plyr__caption'
  20342. },
  20343. classNames: {
  20344. type: 'plyr--{0}',
  20345. provider: 'plyr--{0}',
  20346. video: 'plyr__video-wrapper',
  20347. embed: 'plyr__video-embed',
  20348. videoFixedRatio: 'plyr__video-wrapper--fixed-ratio',
  20349. embedContainer: 'plyr__video-embed__container',
  20350. poster: 'plyr__poster',
  20351. posterEnabled: 'plyr__poster-enabled',
  20352. ads: 'plyr__ads',
  20353. control: 'plyr__control',
  20354. controlPressed: 'plyr__control--pressed',
  20355. playing: 'plyr--playing',
  20356. paused: 'plyr--paused',
  20357. stopped: 'plyr--stopped',
  20358. loading: 'plyr--loading',
  20359. hover: 'plyr--hover',
  20360. tooltip: 'plyr__tooltip',
  20361. cues: 'plyr__cues',
  20362. marker: 'plyr__progress__marker',
  20363. hidden: 'plyr__sr-only',
  20364. hideControls: 'plyr--hide-controls',
  20365. isTouch: 'plyr--is-touch',
  20366. uiSupported: 'plyr--full-ui',
  20367. noTransition: 'plyr--no-transition',
  20368. display: { time: 'plyr__time' },
  20369. menu: {
  20370. value: 'plyr__menu__value',
  20371. badge: 'plyr__badge',
  20372. open: 'plyr--menu-open'
  20373. },
  20374. captions: {
  20375. enabled: 'plyr--captions-enabled',
  20376. active: 'plyr--captions-active'
  20377. },
  20378. fullscreen: {
  20379. enabled: 'plyr--fullscreen-enabled',
  20380. fallback: 'plyr--fullscreen-fallback'
  20381. },
  20382. pip: { supported: 'plyr--pip-supported', active: 'plyr--pip-active' },
  20383. airplay: {
  20384. supported: 'plyr--airplay-supported',
  20385. active: 'plyr--airplay-active'
  20386. },
  20387. previewThumbnails: {
  20388. thumbContainer: 'plyr__preview-thumb',
  20389. thumbContainerShown: 'plyr__preview-thumb--is-shown',
  20390. imageContainer: 'plyr__preview-thumb__image-container',
  20391. timeContainer: 'plyr__preview-thumb__time-container',
  20392. scrubbingContainer: 'plyr__preview-scrubbing',
  20393. scrubbingContainerShown: 'plyr__preview-scrubbing--is-shown'
  20394. }
  20395. },
  20396. attributes: {
  20397. embed: {
  20398. provider: 'data-plyr-provider',
  20399. id: 'data-plyr-embed-id',
  20400. hash: 'data-plyr-embed-hash'
  20401. }
  20402. },
  20403. ads: { enabled: !1, publisherId: '', tagUrl: '' },
  20404. previewThumbnails: { enabled: !1, src: '' },
  20405. vimeo: {
  20406. byline: !1,
  20407. portrait: !1,
  20408. title: !1,
  20409. speed: !0,
  20410. transparent: !1,
  20411. customControls: !0,
  20412. referrerPolicy: null,
  20413. premium: !1
  20414. },
  20415. youtube: {
  20416. rel: 0,
  20417. showinfo: 0,
  20418. iv_load_policy: 3,
  20419. modestbranding: 1,
  20420. customControls: !0,
  20421. noCookie: !1
  20422. },
  20423. mediaMetadata: { title: '', artist: '', album: '', artwork: [] },
  20424. markers: { enabled: !1, points: [] }
  20425. },
  20426. pip = { active: 'picture-in-picture', inactive: 'inline' },
  20427. providers = { html5: 'html5', youtube: 'youtube', vimeo: 'vimeo' },
  20428. types = { audio: 'audio', video: 'video' };
  20429. function getProviderByUrl(e) {
  20430. return /^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(
  20431. e
  20432. )
  20433. ? providers.youtube
  20434. : /^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)
  20435. ? providers.vimeo
  20436. : null;
  20437. }
  20438. const noop = () => {};
  20439. class Console {
  20440. constructor(t = !1) {
  20441. (this.enabled = window.console && t),
  20442. this.enabled && this.log('Debugging enabled');
  20443. }
  20444. get log() {
  20445. return this.enabled
  20446. ? Function.prototype.bind.call(console.log, console)
  20447. : noop;
  20448. }
  20449. get warn() {
  20450. return this.enabled
  20451. ? Function.prototype.bind.call(console.warn, console)
  20452. : noop;
  20453. }
  20454. get error() {
  20455. return this.enabled
  20456. ? Function.prototype.bind.call(console.error, console)
  20457. : noop;
  20458. }
  20459. }
  20460. class Fullscreen {
  20461. constructor(t) {
  20462. _defineProperty$1(this, 'onChange', () => {
  20463. if (!this.supported) return;
  20464. const r = this.player.elements.buttons.fullscreen;
  20465. is.element(r) && (r.pressed = this.active);
  20466. const i =
  20467. this.target === this.player.media
  20468. ? this.target
  20469. : this.player.elements.container;
  20470. triggerEvent.call(
  20471. this.player,
  20472. i,
  20473. this.active ? 'enterfullscreen' : 'exitfullscreen',
  20474. !0
  20475. );
  20476. }),
  20477. _defineProperty$1(this, 'toggleFallback', (r = !1) => {
  20478. if (
  20479. (r
  20480. ? (this.scrollPosition = {
  20481. x: window.scrollX ?? 0,
  20482. y: window.scrollY ?? 0
  20483. })
  20484. : window.scrollTo(this.scrollPosition.x, this.scrollPosition.y),
  20485. (document.body.style.overflow = r ? 'hidden' : ''),
  20486. toggleClass(
  20487. this.target,
  20488. this.player.config.classNames.fullscreen.fallback,
  20489. r
  20490. ),
  20491. browser.isIos)
  20492. ) {
  20493. let i = document.head.querySelector('meta[name="viewport"]');
  20494. const s = 'viewport-fit=cover';
  20495. i ||
  20496. ((i = document.createElement('meta')),
  20497. i.setAttribute('name', 'viewport'));
  20498. const n = is.string(i.content) && i.content.includes(s);
  20499. r
  20500. ? ((this.cleanupViewport = !n), n || (i.content += `,${s}`))
  20501. : this.cleanupViewport &&
  20502. (i.content = i.content
  20503. .split(',')
  20504. .filter(a => a.trim() !== s)
  20505. .join(','));
  20506. }
  20507. this.onChange();
  20508. }),
  20509. _defineProperty$1(this, 'trapFocus', r => {
  20510. if (
  20511. browser.isIos ||
  20512. browser.isIPadOS ||
  20513. !this.active ||
  20514. r.key !== 'Tab'
  20515. )
  20516. return;
  20517. const i = document.activeElement,
  20518. s = getElements.call(
  20519. this.player,
  20520. 'a[href], button:not(:disabled), input:not(:disabled), [tabindex]'
  20521. ),
  20522. [n] = s,
  20523. a = s[s.length - 1];
  20524. i !== a || r.shiftKey
  20525. ? i === n && r.shiftKey && (a.focus(), r.preventDefault())
  20526. : (n.focus(), r.preventDefault());
  20527. }),
  20528. _defineProperty$1(this, 'update', () => {
  20529. if (this.supported) {
  20530. let r;
  20531. (r = this.forceFallback
  20532. ? 'Fallback (forced)'
  20533. : Fullscreen.nativeSupported
  20534. ? 'Native'
  20535. : 'Fallback'),
  20536. this.player.debug.log(`${r} fullscreen enabled`);
  20537. } else
  20538. this.player.debug.log(
  20539. 'Fullscreen not supported and fallback disabled'
  20540. );
  20541. toggleClass(
  20542. this.player.elements.container,
  20543. this.player.config.classNames.fullscreen.enabled,
  20544. this.supported
  20545. );
  20546. }),
  20547. _defineProperty$1(this, 'enter', () => {
  20548. this.supported &&
  20549. (browser.isIos && this.player.config.fullscreen.iosNative
  20550. ? this.player.isVimeo
  20551. ? this.player.embed.requestFullscreen()
  20552. : this.target.webkitEnterFullscreen()
  20553. : !Fullscreen.nativeSupported || this.forceFallback
  20554. ? this.toggleFallback(!0)
  20555. : this.prefix
  20556. ? is.empty(this.prefix) ||
  20557. this.target[`${this.prefix}Request${this.property}`]()
  20558. : this.target.requestFullscreen({ navigationUI: 'hide' }));
  20559. }),
  20560. _defineProperty$1(this, 'exit', () => {
  20561. if (this.supported)
  20562. if (browser.isIos && this.player.config.fullscreen.iosNative)
  20563. this.player.isVimeo
  20564. ? this.player.embed.exitFullscreen()
  20565. : this.target.webkitEnterFullscreen(),
  20566. silencePromise(this.player.play());
  20567. else if (!Fullscreen.nativeSupported || this.forceFallback)
  20568. this.toggleFallback(!1);
  20569. else if (this.prefix) {
  20570. if (!is.empty(this.prefix)) {
  20571. const r = this.prefix === 'moz' ? 'Cancel' : 'Exit';
  20572. document[`${this.prefix}${r}${this.property}`]();
  20573. }
  20574. } else
  20575. (document.cancelFullScreen || document.exitFullscreen).call(
  20576. document
  20577. );
  20578. }),
  20579. _defineProperty$1(this, 'toggle', () => {
  20580. this.active ? this.exit() : this.enter();
  20581. }),
  20582. (this.player = t),
  20583. (this.prefix = Fullscreen.prefix),
  20584. (this.property = Fullscreen.property),
  20585. (this.scrollPosition = { x: 0, y: 0 }),
  20586. (this.forceFallback = t.config.fullscreen.fallback === 'force'),
  20587. (this.player.elements.fullscreen =
  20588. t.config.fullscreen.container &&
  20589. closest$1(
  20590. this.player.elements.container,
  20591. t.config.fullscreen.container
  20592. )),
  20593. on.call(
  20594. this.player,
  20595. document,
  20596. this.prefix === 'ms'
  20597. ? 'MSFullscreenChange'
  20598. : `${this.prefix}fullscreenchange`,
  20599. () => {
  20600. this.onChange();
  20601. }
  20602. ),
  20603. on.call(this.player, this.player.elements.container, 'dblclick', r => {
  20604. (is.element(this.player.elements.controls) &&
  20605. this.player.elements.controls.contains(r.target)) ||
  20606. this.player.listeners.proxy(r, this.toggle, 'fullscreen');
  20607. }),
  20608. on.call(this, this.player.elements.container, 'keydown', r =>
  20609. this.trapFocus(r)
  20610. ),
  20611. this.update();
  20612. }
  20613. static get nativeSupported() {
  20614. return !!(
  20615. document.fullscreenEnabled ||
  20616. document.webkitFullscreenEnabled ||
  20617. document.mozFullScreenEnabled ||
  20618. document.msFullscreenEnabled
  20619. );
  20620. }
  20621. get useNative() {
  20622. return Fullscreen.nativeSupported && !this.forceFallback;
  20623. }
  20624. static get prefix() {
  20625. if (is.function(document.exitFullscreen)) return '';
  20626. let t = '';
  20627. return (
  20628. ['webkit', 'moz', 'ms'].some(
  20629. r =>
  20630. !(
  20631. !is.function(document[`${r}ExitFullscreen`]) &&
  20632. !is.function(document[`${r}CancelFullScreen`])
  20633. ) && ((t = r), !0)
  20634. ),
  20635. t
  20636. );
  20637. }
  20638. static get property() {
  20639. return this.prefix === 'moz' ? 'FullScreen' : 'Fullscreen';
  20640. }
  20641. get supported() {
  20642. return [
  20643. this.player.config.fullscreen.enabled,
  20644. this.player.isVideo,
  20645. Fullscreen.nativeSupported || this.player.config.fullscreen.fallback,
  20646. !this.player.isYouTube ||
  20647. Fullscreen.nativeSupported ||
  20648. !browser.isIos ||
  20649. (this.player.config.playsinline &&
  20650. !this.player.config.fullscreen.iosNative)
  20651. ].every(Boolean);
  20652. }
  20653. get active() {
  20654. if (!this.supported) return !1;
  20655. if (!Fullscreen.nativeSupported || this.forceFallback)
  20656. return hasClass(
  20657. this.target,
  20658. this.player.config.classNames.fullscreen.fallback
  20659. );
  20660. const t = this.prefix
  20661. ? this.target.getRootNode()[`${this.prefix}${this.property}Element`]
  20662. : this.target.getRootNode().fullscreenElement;
  20663. return t && t.shadowRoot
  20664. ? t === this.target.getRootNode().host
  20665. : t === this.target;
  20666. }
  20667. get target() {
  20668. return browser.isIos && this.player.config.fullscreen.iosNative
  20669. ? this.player.media
  20670. : this.player.elements.fullscreen ?? this.player.elements.container;
  20671. }
  20672. }
  20673. function loadImage(e, t = 1) {
  20674. return new Promise((r, i) => {
  20675. const s = new Image(),
  20676. n = () => {
  20677. delete s.onload, delete s.onerror, (s.naturalWidth >= t ? r : i)(s);
  20678. };
  20679. Object.assign(s, { onload: n, onerror: n, src: e });
  20680. });
  20681. }
  20682. const ui = {
  20683. addStyleHook() {
  20684. toggleClass(
  20685. this.elements.container,
  20686. this.config.selectors.container.replace('.', ''),
  20687. !0
  20688. ),
  20689. toggleClass(
  20690. this.elements.container,
  20691. this.config.classNames.uiSupported,
  20692. this.supported.ui
  20693. );
  20694. },
  20695. toggleNativeControls(e = !1) {
  20696. e && this.isHTML5
  20697. ? this.media.setAttribute('controls', '')
  20698. : this.media.removeAttribute('controls');
  20699. },
  20700. build() {
  20701. if ((this.listeners.media(), !this.supported.ui))
  20702. return (
  20703. this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),
  20704. void ui.toggleNativeControls.call(this, !0)
  20705. );
  20706. is.element(this.elements.controls) ||
  20707. (controls$2.inject.call(this), this.listeners.controls()),
  20708. ui.toggleNativeControls.call(this),
  20709. this.isHTML5 && captions.setup.call(this),
  20710. (this.volume = null),
  20711. (this.muted = null),
  20712. (this.loop = null),
  20713. (this.quality = null),
  20714. (this.speed = null),
  20715. controls$2.updateVolume.call(this),
  20716. controls$2.timeUpdate.call(this),
  20717. controls$2.durationUpdate.call(this),
  20718. ui.checkPlaying.call(this),
  20719. toggleClass(
  20720. this.elements.container,
  20721. this.config.classNames.pip.supported,
  20722. support.pip && this.isHTML5 && this.isVideo
  20723. ),
  20724. toggleClass(
  20725. this.elements.container,
  20726. this.config.classNames.airplay.supported,
  20727. support.airplay && this.isHTML5
  20728. ),
  20729. toggleClass(
  20730. this.elements.container,
  20731. this.config.classNames.isTouch,
  20732. this.touch
  20733. ),
  20734. (this.ready = !0),
  20735. setTimeout(() => {
  20736. triggerEvent.call(this, this.media, 'ready');
  20737. }, 0),
  20738. ui.setTitle.call(this),
  20739. this.poster && ui.setPoster.call(this, this.poster, !1).catch(() => {}),
  20740. this.config.duration && controls$2.durationUpdate.call(this),
  20741. this.config.mediaMetadata && controls$2.setMediaMetadata.call(this);
  20742. },
  20743. setTitle() {
  20744. let e = i18n.get('play', this.config);
  20745. if (
  20746. (is.string(this.config.title) &&
  20747. !is.empty(this.config.title) &&
  20748. (e += `, ${this.config.title}`),
  20749. Array.from(this.elements.buttons.play || []).forEach(t => {
  20750. t.setAttribute('aria-label', e);
  20751. }),
  20752. this.isEmbed)
  20753. ) {
  20754. const t = getElement.call(this, 'iframe');
  20755. if (!is.element(t)) return;
  20756. const r = is.empty(this.config.title) ? 'video' : this.config.title,
  20757. i = i18n.get('frameTitle', this.config);
  20758. t.setAttribute('title', i.replace('{title}', r));
  20759. }
  20760. },
  20761. togglePoster(e) {
  20762. toggleClass(
  20763. this.elements.container,
  20764. this.config.classNames.posterEnabled,
  20765. e
  20766. );
  20767. },
  20768. setPoster(e, t = !0) {
  20769. return t && this.poster
  20770. ? Promise.reject(new Error('Poster already set'))
  20771. : (this.media.setAttribute('data-poster', e),
  20772. this.elements.poster.removeAttribute('hidden'),
  20773. ready
  20774. .call(this)
  20775. .then(() => loadImage(e))
  20776. .catch(r => {
  20777. throw (e === this.poster && ui.togglePoster.call(this, !1), r);
  20778. })
  20779. .then(() => {
  20780. if (e !== this.poster)
  20781. throw new Error('setPoster cancelled by later call to setPoster');
  20782. })
  20783. .then(
  20784. () => (
  20785. Object.assign(this.elements.poster.style, {
  20786. backgroundImage: `url('${e}')`,
  20787. backgroundSize: ''
  20788. }),
  20789. ui.togglePoster.call(this, !0),
  20790. e
  20791. )
  20792. ));
  20793. },
  20794. checkPlaying(e) {
  20795. toggleClass(
  20796. this.elements.container,
  20797. this.config.classNames.playing,
  20798. this.playing
  20799. ),
  20800. toggleClass(
  20801. this.elements.container,
  20802. this.config.classNames.paused,
  20803. this.paused
  20804. ),
  20805. toggleClass(
  20806. this.elements.container,
  20807. this.config.classNames.stopped,
  20808. this.stopped
  20809. ),
  20810. Array.from(this.elements.buttons.play || []).forEach(t => {
  20811. Object.assign(t, { pressed: this.playing }),
  20812. t.setAttribute(
  20813. 'aria-label',
  20814. i18n.get(this.playing ? 'pause' : 'play', this.config)
  20815. );
  20816. }),
  20817. (is.event(e) && e.type === 'timeupdate') || ui.toggleControls.call(this);
  20818. },
  20819. checkLoading(e) {
  20820. (this.loading = ['stalled', 'waiting'].includes(e.type)),
  20821. clearTimeout(this.timers.loading),
  20822. (this.timers.loading = setTimeout(
  20823. () => {
  20824. toggleClass(
  20825. this.elements.container,
  20826. this.config.classNames.loading,
  20827. this.loading
  20828. ),
  20829. ui.toggleControls.call(this);
  20830. },
  20831. this.loading ? 250 : 0
  20832. ));
  20833. },
  20834. toggleControls(e) {
  20835. const { controls: t } = this.elements;
  20836. if (t && this.config.hideControls) {
  20837. const r = this.touch && this.lastSeekTime + 2e3 > Date.now();
  20838. this.toggleControls(
  20839. !!(e || this.loading || this.paused || t.pressed || t.hover || r)
  20840. );
  20841. }
  20842. },
  20843. migrateStyles() {
  20844. Object.values({ ...this.media.style })
  20845. .filter(e => !is.empty(e) && is.string(e) && e.startsWith('--plyr'))
  20846. .forEach(e => {
  20847. this.elements.container.style.setProperty(
  20848. e,
  20849. this.media.style.getPropertyValue(e)
  20850. ),
  20851. this.media.style.removeProperty(e);
  20852. }),
  20853. is.empty(this.media.style) && this.media.removeAttribute('style');
  20854. }
  20855. };
  20856. class Listeners {
  20857. constructor(t) {
  20858. _defineProperty$1(this, 'firstTouch', () => {
  20859. const { player: r } = this,
  20860. { elements: i } = r;
  20861. (r.touch = !0), toggleClass(i.container, r.config.classNames.isTouch, !0);
  20862. }),
  20863. _defineProperty$1(this, 'global', (r = !0) => {
  20864. const { player: i } = this;
  20865. i.config.keyboard.global &&
  20866. toggleListener.call(
  20867. i,
  20868. window,
  20869. 'keydown keyup',
  20870. this.handleKey,
  20871. r,
  20872. !1
  20873. ),
  20874. toggleListener.call(i, document.body, 'click', this.toggleMenu, r),
  20875. once.call(i, document.body, 'touchstart', this.firstTouch);
  20876. }),
  20877. _defineProperty$1(this, 'container', () => {
  20878. const { player: r } = this,
  20879. { config: i, elements: s, timers: n } = r;
  20880. !i.keyboard.global &&
  20881. i.keyboard.focused &&
  20882. on.call(r, s.container, 'keydown keyup', this.handleKey, !1),
  20883. on.call(
  20884. r,
  20885. s.container,
  20886. 'mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen',
  20887. l => {
  20888. const { controls: c } = s;
  20889. c &&
  20890. l.type === 'enterfullscreen' &&
  20891. ((c.pressed = !1), (c.hover = !1));
  20892. let g = 0;
  20893. ['touchstart', 'touchmove', 'mousemove'].includes(l.type) &&
  20894. (ui.toggleControls.call(r, !0), (g = r.touch ? 3e3 : 2e3)),
  20895. clearTimeout(n.controls),
  20896. (n.controls = setTimeout(
  20897. () => ui.toggleControls.call(r, !1),
  20898. g
  20899. ));
  20900. }
  20901. );
  20902. const a = () => {
  20903. if (!r.isVimeo || r.config.vimeo.premium) return;
  20904. const l = s.wrapper,
  20905. { active: c } = r.fullscreen,
  20906. [g, S] = getAspectRatio.call(r),
  20907. p = supportsCSS(`aspect-ratio: ${g} / ${S}`);
  20908. if (!c)
  20909. return void (p
  20910. ? ((l.style.width = null), (l.style.height = null))
  20911. : ((l.style.maxWidth = null), (l.style.margin = null)));
  20912. const [P, b] = getViewportSize(),
  20913. y = P / b > g / S;
  20914. p
  20915. ? ((l.style.width = y ? 'auto' : '100%'),
  20916. (l.style.height = y ? '100%' : 'auto'))
  20917. : ((l.style.maxWidth = y ? (b / S) * g + 'px' : null),
  20918. (l.style.margin = y ? '0 auto' : null));
  20919. },
  20920. o = () => {
  20921. clearTimeout(n.resized), (n.resized = setTimeout(a, 50));
  20922. };
  20923. on.call(r, s.container, 'enterfullscreen exitfullscreen', l => {
  20924. const { target: c } = r.fullscreen;
  20925. c === s.container &&
  20926. ((!r.isEmbed && is.empty(r.config.ratio)) ||
  20927. (a(),
  20928. (l.type === 'enterfullscreen' ? on : off).call(
  20929. r,
  20930. window,
  20931. 'resize',
  20932. o
  20933. )));
  20934. });
  20935. }),
  20936. _defineProperty$1(this, 'media', () => {
  20937. const { player: r } = this,
  20938. { elements: i } = r;
  20939. if (
  20940. (on.call(r, r.media, 'timeupdate seeking seeked', n =>
  20941. controls$2.timeUpdate.call(r, n)
  20942. ),
  20943. on.call(r, r.media, 'durationchange loadeddata loadedmetadata', n =>
  20944. controls$2.durationUpdate.call(r, n)
  20945. ),
  20946. on.call(r, r.media, 'ended', () => {
  20947. r.isHTML5 &&
  20948. r.isVideo &&
  20949. r.config.resetOnEnd &&
  20950. (r.restart(), r.pause());
  20951. }),
  20952. on.call(r, r.media, 'progress playing seeking seeked', n =>
  20953. controls$2.updateProgress.call(r, n)
  20954. ),
  20955. on.call(r, r.media, 'volumechange', n =>
  20956. controls$2.updateVolume.call(r, n)
  20957. ),
  20958. on.call(
  20959. r,
  20960. r.media,
  20961. 'playing play pause ended emptied timeupdate',
  20962. n => ui.checkPlaying.call(r, n)
  20963. ),
  20964. on.call(r, r.media, 'waiting canplay seeked playing', n =>
  20965. ui.checkLoading.call(r, n)
  20966. ),
  20967. r.supported.ui && r.config.clickToPlay && !r.isAudio)
  20968. ) {
  20969. const n = getElement.call(r, `.${r.config.classNames.video}`);
  20970. if (!is.element(n)) return;
  20971. on.call(r, i.container, 'click', a => {
  20972. ([i.container, n].includes(a.target) || n.contains(a.target)) &&
  20973. ((r.touch && r.config.hideControls) ||
  20974. (r.ended
  20975. ? (this.proxy(a, r.restart, 'restart'),
  20976. this.proxy(
  20977. a,
  20978. () => {
  20979. silencePromise(r.play());
  20980. },
  20981. 'play'
  20982. ))
  20983. : this.proxy(
  20984. a,
  20985. () => {
  20986. silencePromise(r.togglePlay());
  20987. },
  20988. 'play'
  20989. )));
  20990. });
  20991. }
  20992. r.supported.ui &&
  20993. r.config.disableContextMenu &&
  20994. on.call(
  20995. r,
  20996. i.wrapper,
  20997. 'contextmenu',
  20998. n => {
  20999. n.preventDefault();
  21000. },
  21001. !1
  21002. ),
  21003. on.call(r, r.media, 'volumechange', () => {
  21004. r.storage.set({ volume: r.volume, muted: r.muted });
  21005. }),
  21006. on.call(r, r.media, 'ratechange', () => {
  21007. controls$2.updateSetting.call(r, 'speed'),
  21008. r.storage.set({ speed: r.speed });
  21009. }),
  21010. on.call(r, r.media, 'qualitychange', n => {
  21011. controls$2.updateSetting.call(r, 'quality', null, n.detail.quality);
  21012. }),
  21013. on.call(r, r.media, 'ready qualitychange', () => {
  21014. controls$2.setDownloadUrl.call(r);
  21015. });
  21016. const s = r.config.events.concat(['keyup', 'keydown']).join(' ');
  21017. on.call(r, r.media, s, n => {
  21018. let { detail: a = {} } = n;
  21019. n.type === 'error' && (a = r.media.error),
  21020. triggerEvent.call(r, i.container, n.type, !0, a);
  21021. });
  21022. }),
  21023. _defineProperty$1(this, 'proxy', (r, i, s) => {
  21024. const { player: n } = this,
  21025. a = n.config.listeners[s];
  21026. let o = !0;
  21027. is.function(a) && (o = a.call(n, r)),
  21028. o !== !1 && is.function(i) && i.call(n, r);
  21029. }),
  21030. _defineProperty$1(this, 'bind', (r, i, s, n, a = !0) => {
  21031. const { player: o } = this,
  21032. l = o.config.listeners[n],
  21033. c = is.function(l);
  21034. on.call(o, r, i, g => this.proxy(g, s, n), a && !c);
  21035. }),
  21036. _defineProperty$1(this, 'controls', () => {
  21037. const { player: r } = this,
  21038. { elements: i } = r,
  21039. s = browser.isIE ? 'change' : 'input';
  21040. if (
  21041. (i.buttons.play &&
  21042. Array.from(i.buttons.play).forEach(n => {
  21043. this.bind(
  21044. n,
  21045. 'click',
  21046. () => {
  21047. silencePromise(r.togglePlay());
  21048. },
  21049. 'play'
  21050. );
  21051. }),
  21052. this.bind(i.buttons.restart, 'click', r.restart, 'restart'),
  21053. this.bind(
  21054. i.buttons.rewind,
  21055. 'click',
  21056. () => {
  21057. (r.lastSeekTime = Date.now()), r.rewind();
  21058. },
  21059. 'rewind'
  21060. ),
  21061. this.bind(
  21062. i.buttons.fastForward,
  21063. 'click',
  21064. () => {
  21065. (r.lastSeekTime = Date.now()), r.forward();
  21066. },
  21067. 'fastForward'
  21068. ),
  21069. this.bind(
  21070. i.buttons.mute,
  21071. 'click',
  21072. () => {
  21073. r.muted = !r.muted;
  21074. },
  21075. 'mute'
  21076. ),
  21077. this.bind(i.buttons.captions, 'click', () => r.toggleCaptions()),
  21078. this.bind(
  21079. i.buttons.download,
  21080. 'click',
  21081. () => {
  21082. triggerEvent.call(r, r.media, 'download');
  21083. },
  21084. 'download'
  21085. ),
  21086. this.bind(
  21087. i.buttons.fullscreen,
  21088. 'click',
  21089. () => {
  21090. r.fullscreen.toggle();
  21091. },
  21092. 'fullscreen'
  21093. ),
  21094. this.bind(
  21095. i.buttons.pip,
  21096. 'click',
  21097. () => {
  21098. r.pip = 'toggle';
  21099. },
  21100. 'pip'
  21101. ),
  21102. this.bind(i.buttons.airplay, 'click', r.airplay, 'airplay'),
  21103. this.bind(
  21104. i.buttons.settings,
  21105. 'click',
  21106. n => {
  21107. n.stopPropagation(),
  21108. n.preventDefault(),
  21109. controls$2.toggleMenu.call(r, n);
  21110. },
  21111. null,
  21112. !1
  21113. ),
  21114. this.bind(
  21115. i.buttons.settings,
  21116. 'keyup',
  21117. n => {
  21118. [' ', 'Enter'].includes(n.key) &&
  21119. (n.key !== 'Enter'
  21120. ? (n.preventDefault(),
  21121. n.stopPropagation(),
  21122. controls$2.toggleMenu.call(r, n))
  21123. : controls$2.focusFirstMenuItem.call(r, null, !0));
  21124. },
  21125. null,
  21126. !1
  21127. ),
  21128. this.bind(i.settings.menu, 'keydown', n => {
  21129. n.key === 'Escape' && controls$2.toggleMenu.call(r, n);
  21130. }),
  21131. this.bind(i.inputs.seek, 'mousedown mousemove', n => {
  21132. const a = i.progress.getBoundingClientRect(),
  21133. o = (100 / a.width) * (n.pageX - a.left);
  21134. n.currentTarget.setAttribute('seek-value', o);
  21135. }),
  21136. this.bind(
  21137. i.inputs.seek,
  21138. 'mousedown mouseup keydown keyup touchstart touchend',
  21139. n => {
  21140. const a = n.currentTarget,
  21141. o = 'play-on-seeked';
  21142. if (
  21143. is.keyboardEvent(n) &&
  21144. !['ArrowLeft', 'ArrowRight'].includes(n.key)
  21145. )
  21146. return;
  21147. r.lastSeekTime = Date.now();
  21148. const l = a.hasAttribute(o),
  21149. c = ['mouseup', 'touchend', 'keyup'].includes(n.type);
  21150. l && c
  21151. ? (a.removeAttribute(o), silencePromise(r.play()))
  21152. : !c && r.playing && (a.setAttribute(o, ''), r.pause());
  21153. }
  21154. ),
  21155. browser.isIos)
  21156. ) {
  21157. const n = getElements.call(r, 'input[type="range"]');
  21158. Array.from(n).forEach(a => this.bind(a, s, o => repaint(o.target)));
  21159. }
  21160. this.bind(
  21161. i.inputs.seek,
  21162. s,
  21163. n => {
  21164. const a = n.currentTarget;
  21165. let o = a.getAttribute('seek-value');
  21166. is.empty(o) && (o = a.value),
  21167. a.removeAttribute('seek-value'),
  21168. (r.currentTime = (o / a.max) * r.duration);
  21169. },
  21170. 'seek'
  21171. ),
  21172. this.bind(i.progress, 'mouseenter mouseleave mousemove', n =>
  21173. controls$2.updateSeekTooltip.call(r, n)
  21174. ),
  21175. this.bind(i.progress, 'mousemove touchmove', n => {
  21176. const { previewThumbnails: a } = r;
  21177. a && a.loaded && a.startMove(n);
  21178. }),
  21179. this.bind(i.progress, 'mouseleave touchend click', () => {
  21180. const { previewThumbnails: n } = r;
  21181. n && n.loaded && n.endMove(!1, !0);
  21182. }),
  21183. this.bind(i.progress, 'mousedown touchstart', n => {
  21184. const { previewThumbnails: a } = r;
  21185. a && a.loaded && a.startScrubbing(n);
  21186. }),
  21187. this.bind(i.progress, 'mouseup touchend', n => {
  21188. const { previewThumbnails: a } = r;
  21189. a && a.loaded && a.endScrubbing(n);
  21190. }),
  21191. browser.isWebKit &&
  21192. Array.from(getElements.call(r, 'input[type="range"]')).forEach(
  21193. n => {
  21194. this.bind(n, 'input', a =>
  21195. controls$2.updateRangeFill.call(r, a.target)
  21196. );
  21197. }
  21198. ),
  21199. r.config.toggleInvert &&
  21200. !is.element(i.display.duration) &&
  21201. this.bind(i.display.currentTime, 'click', () => {
  21202. r.currentTime !== 0 &&
  21203. ((r.config.invertTime = !r.config.invertTime),
  21204. controls$2.timeUpdate.call(r));
  21205. }),
  21206. this.bind(
  21207. i.inputs.volume,
  21208. s,
  21209. n => {
  21210. r.volume = n.target.value;
  21211. },
  21212. 'volume'
  21213. ),
  21214. this.bind(i.controls, 'mouseenter mouseleave', n => {
  21215. i.controls.hover = !r.touch && n.type === 'mouseenter';
  21216. }),
  21217. i.fullscreen &&
  21218. Array.from(i.fullscreen.children)
  21219. .filter(n => !n.contains(i.container))
  21220. .forEach(n => {
  21221. this.bind(n, 'mouseenter mouseleave', a => {
  21222. i.controls &&
  21223. (i.controls.hover = !r.touch && a.type === 'mouseenter');
  21224. });
  21225. }),
  21226. this.bind(
  21227. i.controls,
  21228. 'mousedown mouseup touchstart touchend touchcancel',
  21229. n => {
  21230. i.controls.pressed = ['mousedown', 'touchstart'].includes(n.type);
  21231. }
  21232. ),
  21233. this.bind(i.controls, 'focusin', () => {
  21234. const { config: n, timers: a } = r;
  21235. toggleClass(i.controls, n.classNames.noTransition, !0),
  21236. ui.toggleControls.call(r, !0),
  21237. setTimeout(() => {
  21238. toggleClass(i.controls, n.classNames.noTransition, !1);
  21239. }, 0);
  21240. const o = this.touch ? 3e3 : 4e3;
  21241. clearTimeout(a.controls),
  21242. (a.controls = setTimeout(() => ui.toggleControls.call(r, !1), o));
  21243. }),
  21244. this.bind(
  21245. i.inputs.volume,
  21246. 'wheel',
  21247. n => {
  21248. const a = n.webkitDirectionInvertedFromDevice,
  21249. [o, l] = [n.deltaX, -n.deltaY].map(S => (a ? -S : S)),
  21250. c = Math.sign(Math.abs(o) > Math.abs(l) ? o : l);
  21251. r.increaseVolume(c / 50);
  21252. const { volume: g } = r.media;
  21253. ((c === 1 && g < 1) || (c === -1 && g > 0)) && n.preventDefault();
  21254. },
  21255. 'volume',
  21256. !1
  21257. );
  21258. }),
  21259. (this.player = t),
  21260. (this.lastKey = null),
  21261. (this.focusTimer = null),
  21262. (this.lastKeyDown = null),
  21263. (this.handleKey = this.handleKey.bind(this)),
  21264. (this.toggleMenu = this.toggleMenu.bind(this)),
  21265. (this.firstTouch = this.firstTouch.bind(this));
  21266. }
  21267. handleKey(t) {
  21268. const { player: r } = this,
  21269. { elements: i } = r,
  21270. { key: s, type: n, altKey: a, ctrlKey: o, metaKey: l, shiftKey: c } = t,
  21271. g = n === 'keydown',
  21272. S = g && s === this.lastKey;
  21273. if (!(a || o || l || c) && s) {
  21274. if (g) {
  21275. const P = document.activeElement;
  21276. if (is.element(P)) {
  21277. const { editable: b } = r.config.selectors,
  21278. { seek: y } = i.inputs;
  21279. if (
  21280. (P !== y && matches(P, b)) ||
  21281. (t.key === ' ' && matches(P, 'button, [role^="menuitem"]'))
  21282. )
  21283. return;
  21284. }
  21285. switch (
  21286. ([
  21287. ' ',
  21288. 'ArrowLeft',
  21289. 'ArrowUp',
  21290. 'ArrowRight',
  21291. 'ArrowDown',
  21292. '0',
  21293. '1',
  21294. '2',
  21295. '3',
  21296. '4',
  21297. '5',
  21298. '6',
  21299. '7',
  21300. '8',
  21301. '9',
  21302. 'c',
  21303. 'f',
  21304. 'k',
  21305. 'l',
  21306. 'm'
  21307. ].includes(s) && (t.preventDefault(), t.stopPropagation()),
  21308. s)
  21309. ) {
  21310. case '0':
  21311. case '1':
  21312. case '2':
  21313. case '3':
  21314. case '4':
  21315. case '5':
  21316. case '6':
  21317. case '7':
  21318. case '8':
  21319. case '9':
  21320. S ||
  21321. ((p = parseInt(s, 10)), (r.currentTime = (r.duration / 10) * p));
  21322. break;
  21323. case ' ':
  21324. case 'k':
  21325. S || silencePromise(r.togglePlay());
  21326. break;
  21327. case 'ArrowUp':
  21328. r.increaseVolume(0.1);
  21329. break;
  21330. case 'ArrowDown':
  21331. r.decreaseVolume(0.1);
  21332. break;
  21333. case 'm':
  21334. S || (r.muted = !r.muted);
  21335. break;
  21336. case 'ArrowRight':
  21337. r.forward();
  21338. break;
  21339. case 'ArrowLeft':
  21340. r.rewind();
  21341. break;
  21342. case 'f':
  21343. r.fullscreen.toggle();
  21344. break;
  21345. case 'c':
  21346. S || r.toggleCaptions();
  21347. break;
  21348. case 'l':
  21349. r.loop = !r.loop;
  21350. }
  21351. s === 'Escape' &&
  21352. !r.fullscreen.usingNative &&
  21353. r.fullscreen.active &&
  21354. r.fullscreen.toggle(),
  21355. (this.lastKey = s);
  21356. } else this.lastKey = null;
  21357. var p;
  21358. }
  21359. }
  21360. toggleMenu(t) {
  21361. controls$2.toggleMenu.call(this.player, t);
  21362. }
  21363. }
  21364. function createCommonjsModule(e, t) {
  21365. return e((t = { exports: {} }), t.exports), t.exports;
  21366. }
  21367. var loadjs_umd = createCommonjsModule(function (e, t) {
  21368. e.exports = (function () {
  21369. var r = function () {},
  21370. i = {},
  21371. s = {},
  21372. n = {};
  21373. function a(p, P) {
  21374. p = p.push ? p : [p];
  21375. var b,
  21376. y,
  21377. A,
  21378. u = [],
  21379. f = p.length,
  21380. m = f;
  21381. for (
  21382. b = function (d, E) {
  21383. E.length && u.push(d), --m || P(u);
  21384. };
  21385. f--;
  21386. )
  21387. (y = p[f]), (A = s[y]) ? b(y, A) : (n[y] = n[y] || []).push(b);
  21388. }
  21389. function o(p, P) {
  21390. if (p) {
  21391. var b = n[p];
  21392. if (((s[p] = P), b)) for (; b.length; ) b[0](p, P), b.splice(0, 1);
  21393. }
  21394. }
  21395. function l(p, P) {
  21396. p.call && (p = { success: p }),
  21397. P.length ? (p.error || r)(P) : (p.success || r)(p);
  21398. }
  21399. function c(p, P, b, y) {
  21400. var A,
  21401. u,
  21402. f = document,
  21403. m = b.async,
  21404. d = (b.numRetries || 0) + 1,
  21405. E = b.before || r,
  21406. T = p.replace(/[\?|#].*$/, ''),
  21407. x = p.replace(/^(css|img)!/, '');
  21408. (y = y || 0),
  21409. /(^css!|\.css$)/.test(T)
  21410. ? (((u = f.createElement('link')).rel = 'stylesheet'),
  21411. (u.href = x),
  21412. (A = 'hideFocus' in u) &&
  21413. u.relList &&
  21414. ((A = 0), (u.rel = 'preload'), (u.as = 'style')))
  21415. : /(^img!|\.(png|gif|jpg|svg|webp)$)/.test(T)
  21416. ? ((u = f.createElement('img')).src = x)
  21417. : (((u = f.createElement('script')).src = p),
  21418. (u.async = m === void 0 || m)),
  21419. (u.onload =
  21420. u.onerror =
  21421. u.onbeforeload =
  21422. function (_) {
  21423. var I = _.type[0];
  21424. if (A)
  21425. try {
  21426. u.sheet.cssText.length || (I = 'e');
  21427. } catch (V) {
  21428. V.code != 18 && (I = 'e');
  21429. }
  21430. if (I == 'e') {
  21431. if ((y += 1) < d) return c(p, P, b, y);
  21432. } else if (u.rel == 'preload' && u.as == 'style')
  21433. return (u.rel = 'stylesheet');
  21434. P(p, I, _.defaultPrevented);
  21435. }),
  21436. E(p, u) !== !1 && f.head.appendChild(u);
  21437. }
  21438. function g(p, P, b) {
  21439. var y,
  21440. A,
  21441. u = (p = p.push ? p : [p]).length,
  21442. f = u,
  21443. m = [];
  21444. for (
  21445. y = function (d, E, T) {
  21446. if ((E == 'e' && m.push(d), E == 'b')) {
  21447. if (!T) return;
  21448. m.push(d);
  21449. }
  21450. --u || P(m);
  21451. },
  21452. A = 0;
  21453. A < f;
  21454. A++
  21455. )
  21456. c(p[A], y, b);
  21457. }
  21458. function S(p, P, b) {
  21459. var y, A;
  21460. if ((P && P.trim && (y = P), (A = (y ? b : P) || {}), y)) {
  21461. if (y in i) throw 'LoadJS';
  21462. i[y] = !0;
  21463. }
  21464. function u(f, m) {
  21465. g(
  21466. p,
  21467. function (d) {
  21468. l(A, d), f && l({ success: f, error: m }, d), o(y, d);
  21469. },
  21470. A
  21471. );
  21472. }
  21473. if (A.returnPromise) return new Promise(u);
  21474. u();
  21475. }
  21476. return (
  21477. (S.ready = function (p, P) {
  21478. return (
  21479. a(p, function (b) {
  21480. l(P, b);
  21481. }),
  21482. S
  21483. );
  21484. }),
  21485. (S.done = function (p) {
  21486. o(p, []);
  21487. }),
  21488. (S.reset = function () {
  21489. (i = {}), (s = {}), (n = {});
  21490. }),
  21491. (S.isDefined = function (p) {
  21492. return p in i;
  21493. }),
  21494. S
  21495. );
  21496. })();
  21497. });
  21498. function loadScript(e) {
  21499. return new Promise((t, r) => {
  21500. loadjs_umd(e, { success: t, error: r });
  21501. });
  21502. }
  21503. function parseId$1(e) {
  21504. return is.empty(e)
  21505. ? null
  21506. : is.number(Number(e))
  21507. ? e
  21508. : e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)
  21509. ? RegExp.$2
  21510. : e;
  21511. }
  21512. function parseHash(e) {
  21513. const t = e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);
  21514. return t && t.length === 5 ? t[4] : null;
  21515. }
  21516. function assurePlaybackState$1(e) {
  21517. e && !this.embed.hasPlayed && (this.embed.hasPlayed = !0),
  21518. this.media.paused === e &&
  21519. ((this.media.paused = !e),
  21520. triggerEvent.call(this, this.media, e ? 'play' : 'pause'));
  21521. }
  21522. const vimeo = {
  21523. setup() {
  21524. const e = this;
  21525. toggleClass(e.elements.wrapper, e.config.classNames.embed, !0),
  21526. (e.options.speed = e.config.speed.options),
  21527. setAspectRatio.call(e),
  21528. is.object(window.Vimeo)
  21529. ? vimeo.ready.call(e)
  21530. : loadScript(e.config.urls.vimeo.sdk)
  21531. .then(() => {
  21532. vimeo.ready.call(e);
  21533. })
  21534. .catch(t => {
  21535. e.debug.warn('Vimeo SDK (player.js) failed to load', t);
  21536. });
  21537. },
  21538. ready() {
  21539. const e = this,
  21540. t = e.config.vimeo,
  21541. { premium: r, referrerPolicy: i, ...s } = t;
  21542. let n = e.media.getAttribute('src'),
  21543. a = '';
  21544. is.empty(n)
  21545. ? ((n = e.media.getAttribute(e.config.attributes.embed.id)),
  21546. (a = e.media.getAttribute(e.config.attributes.embed.hash)))
  21547. : (a = parseHash(n));
  21548. const o = a ? { h: a } : {};
  21549. r && Object.assign(s, { controls: !1, sidedock: !1 });
  21550. const l = buildUrlParams({
  21551. loop: e.config.loop.active,
  21552. autoplay: e.autoplay,
  21553. muted: e.muted,
  21554. gesture: 'media',
  21555. playsinline: e.config.playsinline,
  21556. ...o,
  21557. ...s
  21558. }),
  21559. c = parseId$1(n),
  21560. g = createElement('iframe'),
  21561. S = format(e.config.urls.vimeo.iframe, c, l);
  21562. if (
  21563. (g.setAttribute('src', S),
  21564. g.setAttribute('allowfullscreen', ''),
  21565. g.setAttribute(
  21566. 'allow',
  21567. [
  21568. 'autoplay',
  21569. 'fullscreen',
  21570. 'picture-in-picture',
  21571. 'encrypted-media',
  21572. 'accelerometer',
  21573. 'gyroscope'
  21574. ].join('; ')
  21575. ),
  21576. is.empty(i) || g.setAttribute('referrerPolicy', i),
  21577. r || !t.customControls)
  21578. )
  21579. g.setAttribute('data-poster', e.poster),
  21580. (e.media = replaceElement(g, e.media));
  21581. else {
  21582. const f = createElement('div', {
  21583. class: e.config.classNames.embedContainer,
  21584. 'data-poster': e.poster
  21585. });
  21586. f.appendChild(g), (e.media = replaceElement(f, e.media));
  21587. }
  21588. t.customControls ||
  21589. fetch$1(format(e.config.urls.vimeo.api, S)).then(f => {
  21590. !is.empty(f) &&
  21591. f.thumbnail_url &&
  21592. ui.setPoster.call(e, f.thumbnail_url).catch(() => {});
  21593. }),
  21594. (e.embed = new window.Vimeo.Player(g, {
  21595. autopause: e.config.autopause,
  21596. muted: e.muted
  21597. })),
  21598. (e.media.paused = !0),
  21599. (e.media.currentTime = 0),
  21600. e.supported.ui && e.embed.disableTextTrack(),
  21601. (e.media.play = () => (
  21602. assurePlaybackState$1.call(e, !0), e.embed.play()
  21603. )),
  21604. (e.media.pause = () => (
  21605. assurePlaybackState$1.call(e, !1), e.embed.pause()
  21606. )),
  21607. (e.media.stop = () => {
  21608. e.pause(), (e.currentTime = 0);
  21609. });
  21610. let { currentTime: p } = e.media;
  21611. Object.defineProperty(e.media, 'currentTime', {
  21612. get: () => p,
  21613. set(f) {
  21614. const { embed: m, media: d, paused: E, volume: T } = e,
  21615. x = E && !m.hasPlayed;
  21616. (d.seeking = !0),
  21617. triggerEvent.call(e, d, 'seeking'),
  21618. Promise.resolve(x && m.setVolume(0))
  21619. .then(() => m.setCurrentTime(f))
  21620. .then(() => x && m.pause())
  21621. .then(() => x && m.setVolume(T))
  21622. .catch(() => {});
  21623. }
  21624. });
  21625. let P = e.config.speed.selected;
  21626. Object.defineProperty(e.media, 'playbackRate', {
  21627. get: () => P,
  21628. set(f) {
  21629. e.embed
  21630. .setPlaybackRate(f)
  21631. .then(() => {
  21632. (P = f), triggerEvent.call(e, e.media, 'ratechange');
  21633. })
  21634. .catch(() => {
  21635. e.options.speed = [1];
  21636. });
  21637. }
  21638. });
  21639. let { volume: b } = e.config;
  21640. Object.defineProperty(e.media, 'volume', {
  21641. get: () => b,
  21642. set(f) {
  21643. e.embed.setVolume(f).then(() => {
  21644. (b = f), triggerEvent.call(e, e.media, 'volumechange');
  21645. });
  21646. }
  21647. });
  21648. let { muted: y } = e.config;
  21649. Object.defineProperty(e.media, 'muted', {
  21650. get: () => y,
  21651. set(f) {
  21652. const m = !!is.boolean(f) && f;
  21653. e.embed.setMuted(!!m || e.config.muted).then(() => {
  21654. (y = m), triggerEvent.call(e, e.media, 'volumechange');
  21655. });
  21656. }
  21657. });
  21658. let A,
  21659. { loop: u } = e.config;
  21660. Object.defineProperty(e.media, 'loop', {
  21661. get: () => u,
  21662. set(f) {
  21663. const m = is.boolean(f) ? f : e.config.loop.active;
  21664. e.embed.setLoop(m).then(() => {
  21665. u = m;
  21666. });
  21667. }
  21668. }),
  21669. e.embed
  21670. .getVideoUrl()
  21671. .then(f => {
  21672. (A = f), controls$2.setDownloadUrl.call(e);
  21673. })
  21674. .catch(f => {
  21675. this.debug.warn(f);
  21676. }),
  21677. Object.defineProperty(e.media, 'currentSrc', { get: () => A }),
  21678. Object.defineProperty(e.media, 'ended', {
  21679. get: () => e.currentTime === e.duration
  21680. }),
  21681. Promise.all([e.embed.getVideoWidth(), e.embed.getVideoHeight()]).then(
  21682. f => {
  21683. const [m, d] = f;
  21684. (e.embed.ratio = roundAspectRatio(m, d)), setAspectRatio.call(this);
  21685. }
  21686. ),
  21687. e.embed.setAutopause(e.config.autopause).then(f => {
  21688. e.config.autopause = f;
  21689. }),
  21690. e.embed.getVideoTitle().then(f => {
  21691. (e.config.title = f), ui.setTitle.call(this);
  21692. }),
  21693. e.embed.getCurrentTime().then(f => {
  21694. (p = f), triggerEvent.call(e, e.media, 'timeupdate');
  21695. }),
  21696. e.embed.getDuration().then(f => {
  21697. (e.media.duration = f), triggerEvent.call(e, e.media, 'durationchange');
  21698. }),
  21699. e.embed.getTextTracks().then(f => {
  21700. (e.media.textTracks = f), captions.setup.call(e);
  21701. }),
  21702. e.embed.on('cuechange', ({ cues: f = [] }) => {
  21703. const m = f.map(d => stripHTML(d.text));
  21704. captions.updateCues.call(e, m);
  21705. }),
  21706. e.embed.on('loaded', () => {
  21707. e.embed.getPaused().then(f => {
  21708. assurePlaybackState$1.call(e, !f),
  21709. f || triggerEvent.call(e, e.media, 'playing');
  21710. }),
  21711. is.element(e.embed.element) &&
  21712. e.supported.ui &&
  21713. e.embed.element.setAttribute('tabindex', -1);
  21714. }),
  21715. e.embed.on('bufferstart', () => {
  21716. triggerEvent.call(e, e.media, 'waiting');
  21717. }),
  21718. e.embed.on('bufferend', () => {
  21719. triggerEvent.call(e, e.media, 'playing');
  21720. }),
  21721. e.embed.on('play', () => {
  21722. assurePlaybackState$1.call(e, !0),
  21723. triggerEvent.call(e, e.media, 'playing');
  21724. }),
  21725. e.embed.on('pause', () => {
  21726. assurePlaybackState$1.call(e, !1);
  21727. }),
  21728. e.embed.on('timeupdate', f => {
  21729. (e.media.seeking = !1),
  21730. (p = f.seconds),
  21731. triggerEvent.call(e, e.media, 'timeupdate');
  21732. }),
  21733. e.embed.on('progress', f => {
  21734. (e.media.buffered = f.percent),
  21735. triggerEvent.call(e, e.media, 'progress'),
  21736. parseInt(f.percent, 10) === 1 &&
  21737. triggerEvent.call(e, e.media, 'canplaythrough'),
  21738. e.embed.getDuration().then(m => {
  21739. m !== e.media.duration &&
  21740. ((e.media.duration = m),
  21741. triggerEvent.call(e, e.media, 'durationchange'));
  21742. });
  21743. }),
  21744. e.embed.on('seeked', () => {
  21745. (e.media.seeking = !1), triggerEvent.call(e, e.media, 'seeked');
  21746. }),
  21747. e.embed.on('ended', () => {
  21748. (e.media.paused = !0), triggerEvent.call(e, e.media, 'ended');
  21749. }),
  21750. e.embed.on('error', f => {
  21751. (e.media.error = f), triggerEvent.call(e, e.media, 'error');
  21752. }),
  21753. t.customControls && setTimeout(() => ui.build.call(e), 0);
  21754. }
  21755. };
  21756. function parseId(e) {
  21757. return is.empty(e)
  21758. ? null
  21759. : e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)
  21760. ? RegExp.$2
  21761. : e;
  21762. }
  21763. function assurePlaybackState(e) {
  21764. e && !this.embed.hasPlayed && (this.embed.hasPlayed = !0),
  21765. this.media.paused === e &&
  21766. ((this.media.paused = !e),
  21767. triggerEvent.call(this, this.media, e ? 'play' : 'pause'));
  21768. }
  21769. function getHost(e) {
  21770. return e.noCookie
  21771. ? 'https://www.youtube-nocookie.com'
  21772. : window.location.protocol === 'http:'
  21773. ? 'http://www.youtube.com'
  21774. : void 0;
  21775. }
  21776. const youtube = {
  21777. setup() {
  21778. if (
  21779. (toggleClass(this.elements.wrapper, this.config.classNames.embed, !0),
  21780. is.object(window.YT) && is.function(window.YT.Player))
  21781. )
  21782. youtube.ready.call(this);
  21783. else {
  21784. const e = window.onYouTubeIframeAPIReady;
  21785. (window.onYouTubeIframeAPIReady = () => {
  21786. is.function(e) && e(), youtube.ready.call(this);
  21787. }),
  21788. loadScript(this.config.urls.youtube.sdk).catch(t => {
  21789. this.debug.warn('YouTube API failed to load', t);
  21790. });
  21791. }
  21792. },
  21793. getTitle(e) {
  21794. fetch$1(format(this.config.urls.youtube.api, e))
  21795. .then(t => {
  21796. if (is.object(t)) {
  21797. const { title: r, height: i, width: s } = t;
  21798. (this.config.title = r),
  21799. ui.setTitle.call(this),
  21800. (this.embed.ratio = roundAspectRatio(s, i));
  21801. }
  21802. setAspectRatio.call(this);
  21803. })
  21804. .catch(() => {
  21805. setAspectRatio.call(this);
  21806. });
  21807. },
  21808. ready() {
  21809. const e = this,
  21810. t = e.config.youtube,
  21811. r = e.media && e.media.getAttribute('id');
  21812. if (!is.empty(r) && r.startsWith('youtube-')) return;
  21813. let i = e.media.getAttribute('src');
  21814. is.empty(i) &&
  21815. (i = e.media.getAttribute(this.config.attributes.embed.id));
  21816. const s = parseId(i),
  21817. n = createElement('div', {
  21818. id: generateId(e.provider),
  21819. 'data-poster': t.customControls ? e.poster : void 0
  21820. });
  21821. if (((e.media = replaceElement(n, e.media)), t.customControls)) {
  21822. const a = o => `https://i.ytimg.com/vi/${s}/${o}default.jpg`;
  21823. loadImage(a('maxres'), 121)
  21824. .catch(() => loadImage(a('sd'), 121))
  21825. .catch(() => loadImage(a('hq')))
  21826. .then(o => ui.setPoster.call(e, o.src))
  21827. .then(o => {
  21828. o.includes('maxres') ||
  21829. (e.elements.poster.style.backgroundSize = 'cover');
  21830. })
  21831. .catch(() => {});
  21832. }
  21833. e.embed = new window.YT.Player(e.media, {
  21834. videoId: s,
  21835. host: getHost(t),
  21836. playerVars: extend(
  21837. {},
  21838. {
  21839. autoplay: e.config.autoplay ? 1 : 0,
  21840. hl: e.config.hl,
  21841. controls: e.supported.ui && t.customControls ? 0 : 1,
  21842. disablekb: 1,
  21843. playsinline:
  21844. e.config.playsinline && !e.config.fullscreen.iosNative ? 1 : 0,
  21845. cc_load_policy: e.captions.active ? 1 : 0,
  21846. cc_lang_pref: e.config.captions.language,
  21847. widget_referrer: window ? window.location.href : null
  21848. },
  21849. t
  21850. ),
  21851. events: {
  21852. onError(a) {
  21853. if (!e.media.error) {
  21854. const o = a.data,
  21855. l =
  21856. {
  21857. 2: 'The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.',
  21858. 5: 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.',
  21859. 100: 'The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.',
  21860. 101: 'The owner of the requested video does not allow it to be played in embedded players.',
  21861. 150: 'The owner of the requested video does not allow it to be played in embedded players.'
  21862. }[o] || 'An unknown error occurred';
  21863. (e.media.error = { code: o, message: l }),
  21864. triggerEvent.call(e, e.media, 'error');
  21865. }
  21866. },
  21867. onPlaybackRateChange(a) {
  21868. const o = a.target;
  21869. (e.media.playbackRate = o.getPlaybackRate()),
  21870. triggerEvent.call(e, e.media, 'ratechange');
  21871. },
  21872. onReady(a) {
  21873. if (is.function(e.media.play)) return;
  21874. const o = a.target;
  21875. youtube.getTitle.call(e, s),
  21876. (e.media.play = () => {
  21877. assurePlaybackState.call(e, !0), o.playVideo();
  21878. }),
  21879. (e.media.pause = () => {
  21880. assurePlaybackState.call(e, !1), o.pauseVideo();
  21881. }),
  21882. (e.media.stop = () => {
  21883. o.stopVideo();
  21884. }),
  21885. (e.media.duration = o.getDuration()),
  21886. (e.media.paused = !0),
  21887. (e.media.currentTime = 0),
  21888. Object.defineProperty(e.media, 'currentTime', {
  21889. get: () => Number(o.getCurrentTime()),
  21890. set(S) {
  21891. e.paused && !e.embed.hasPlayed && e.embed.mute(),
  21892. (e.media.seeking = !0),
  21893. triggerEvent.call(e, e.media, 'seeking'),
  21894. o.seekTo(S);
  21895. }
  21896. }),
  21897. Object.defineProperty(e.media, 'playbackRate', {
  21898. get: () => o.getPlaybackRate(),
  21899. set(S) {
  21900. o.setPlaybackRate(S);
  21901. }
  21902. });
  21903. let { volume: l } = e.config;
  21904. Object.defineProperty(e.media, 'volume', {
  21905. get: () => l,
  21906. set(S) {
  21907. (l = S),
  21908. o.setVolume(100 * l),
  21909. triggerEvent.call(e, e.media, 'volumechange');
  21910. }
  21911. });
  21912. let { muted: c } = e.config;
  21913. Object.defineProperty(e.media, 'muted', {
  21914. get: () => c,
  21915. set(S) {
  21916. const p = is.boolean(S) ? S : c;
  21917. (c = p),
  21918. o[p ? 'mute' : 'unMute'](),
  21919. o.setVolume(100 * l),
  21920. triggerEvent.call(e, e.media, 'volumechange');
  21921. }
  21922. }),
  21923. Object.defineProperty(e.media, 'currentSrc', {
  21924. get: () => o.getVideoUrl()
  21925. }),
  21926. Object.defineProperty(e.media, 'ended', {
  21927. get: () => e.currentTime === e.duration
  21928. });
  21929. const g = o.getAvailablePlaybackRates();
  21930. (e.options.speed = g.filter(S =>
  21931. e.config.speed.options.includes(S)
  21932. )),
  21933. e.supported.ui &&
  21934. t.customControls &&
  21935. e.media.setAttribute('tabindex', -1),
  21936. triggerEvent.call(e, e.media, 'timeupdate'),
  21937. triggerEvent.call(e, e.media, 'durationchange'),
  21938. clearInterval(e.timers.buffering),
  21939. (e.timers.buffering = setInterval(() => {
  21940. (e.media.buffered = o.getVideoLoadedFraction()),
  21941. (e.media.lastBuffered === null ||
  21942. e.media.lastBuffered < e.media.buffered) &&
  21943. triggerEvent.call(e, e.media, 'progress'),
  21944. (e.media.lastBuffered = e.media.buffered),
  21945. e.media.buffered === 1 &&
  21946. (clearInterval(e.timers.buffering),
  21947. triggerEvent.call(e, e.media, 'canplaythrough'));
  21948. }, 200)),
  21949. t.customControls && setTimeout(() => ui.build.call(e), 50);
  21950. },
  21951. onStateChange(a) {
  21952. const o = a.target;
  21953. switch (
  21954. (clearInterval(e.timers.playing),
  21955. e.media.seeking &&
  21956. [1, 2].includes(a.data) &&
  21957. ((e.media.seeking = !1),
  21958. triggerEvent.call(e, e.media, 'seeked')),
  21959. a.data)
  21960. ) {
  21961. case -1:
  21962. triggerEvent.call(e, e.media, 'timeupdate'),
  21963. (e.media.buffered = o.getVideoLoadedFraction()),
  21964. triggerEvent.call(e, e.media, 'progress');
  21965. break;
  21966. case 0:
  21967. assurePlaybackState.call(e, !1),
  21968. e.media.loop
  21969. ? (o.stopVideo(), o.playVideo())
  21970. : triggerEvent.call(e, e.media, 'ended');
  21971. break;
  21972. case 1:
  21973. t.customControls &&
  21974. !e.config.autoplay &&
  21975. e.media.paused &&
  21976. !e.embed.hasPlayed
  21977. ? e.media.pause()
  21978. : (assurePlaybackState.call(e, !0),
  21979. triggerEvent.call(e, e.media, 'playing'),
  21980. (e.timers.playing = setInterval(() => {
  21981. triggerEvent.call(e, e.media, 'timeupdate');
  21982. }, 50)),
  21983. e.media.duration !== o.getDuration() &&
  21984. ((e.media.duration = o.getDuration()),
  21985. triggerEvent.call(e, e.media, 'durationchange')));
  21986. break;
  21987. case 2:
  21988. e.muted || e.embed.unMute(), assurePlaybackState.call(e, !1);
  21989. break;
  21990. case 3:
  21991. triggerEvent.call(e, e.media, 'waiting');
  21992. }
  21993. triggerEvent.call(e, e.elements.container, 'statechange', !1, {
  21994. code: a.data
  21995. });
  21996. }
  21997. }
  21998. });
  21999. }
  22000. },
  22001. media = {
  22002. setup() {
  22003. this.media
  22004. ? (toggleClass(
  22005. this.elements.container,
  22006. this.config.classNames.type.replace('{0}', this.type),
  22007. !0
  22008. ),
  22009. toggleClass(
  22010. this.elements.container,
  22011. this.config.classNames.provider.replace('{0}', this.provider),
  22012. !0
  22013. ),
  22014. this.isEmbed &&
  22015. toggleClass(
  22016. this.elements.container,
  22017. this.config.classNames.type.replace('{0}', 'video'),
  22018. !0
  22019. ),
  22020. this.isVideo &&
  22021. ((this.elements.wrapper = createElement('div', {
  22022. class: this.config.classNames.video
  22023. })),
  22024. wrap(this.media, this.elements.wrapper),
  22025. (this.elements.poster = createElement('div', {
  22026. class: this.config.classNames.poster
  22027. })),
  22028. this.elements.wrapper.appendChild(this.elements.poster)),
  22029. this.isHTML5
  22030. ? html5.setup.call(this)
  22031. : this.isYouTube
  22032. ? youtube.setup.call(this)
  22033. : this.isVimeo && vimeo.setup.call(this))
  22034. : this.debug.warn('No media element found!');
  22035. }
  22036. };
  22037. class Ads {
  22038. constructor(t) {
  22039. _defineProperty$1(this, 'load', () => {
  22040. this.enabled &&
  22041. (is.object(window.google) && is.object(window.google.ima)
  22042. ? this.ready()
  22043. : loadScript(this.player.config.urls.googleIMA.sdk)
  22044. .then(() => {
  22045. this.ready();
  22046. })
  22047. .catch(() => {
  22048. this.trigger(
  22049. 'error',
  22050. new Error('Google IMA SDK failed to load')
  22051. );
  22052. }));
  22053. }),
  22054. _defineProperty$1(this, 'ready', () => {
  22055. var r;
  22056. this.enabled ||
  22057. ((r = this).manager && r.manager.destroy(),
  22058. r.elements.displayContainer && r.elements.displayContainer.destroy(),
  22059. r.elements.container.remove()),
  22060. this.startSafetyTimer(12e3, 'ready()'),
  22061. this.managerPromise.then(() => {
  22062. this.clearSafetyTimer('onAdsManagerLoaded()');
  22063. }),
  22064. this.listeners(),
  22065. this.setupIMA();
  22066. }),
  22067. _defineProperty$1(this, 'setupIMA', () => {
  22068. (this.elements.container = createElement('div', {
  22069. class: this.player.config.classNames.ads
  22070. })),
  22071. this.player.elements.container.appendChild(this.elements.container),
  22072. google.ima.settings.setVpaidMode(
  22073. google.ima.ImaSdkSettings.VpaidMode.ENABLED
  22074. ),
  22075. google.ima.settings.setLocale(this.player.config.ads.language),
  22076. google.ima.settings.setDisableCustomPlaybackForIOS10Plus(
  22077. this.player.config.playsinline
  22078. ),
  22079. (this.elements.displayContainer = new google.ima.AdDisplayContainer(
  22080. this.elements.container,
  22081. this.player.media
  22082. )),
  22083. (this.loader = new google.ima.AdsLoader(
  22084. this.elements.displayContainer
  22085. )),
  22086. this.loader.addEventListener(
  22087. google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
  22088. r => this.onAdsManagerLoaded(r),
  22089. !1
  22090. ),
  22091. this.loader.addEventListener(
  22092. google.ima.AdErrorEvent.Type.AD_ERROR,
  22093. r => this.onAdError(r),
  22094. !1
  22095. ),
  22096. this.requestAds();
  22097. }),
  22098. _defineProperty$1(this, 'requestAds', () => {
  22099. const { container: r } = this.player.elements;
  22100. try {
  22101. const i = new google.ima.AdsRequest();
  22102. (i.adTagUrl = this.tagUrl),
  22103. (i.linearAdSlotWidth = r.offsetWidth),
  22104. (i.linearAdSlotHeight = r.offsetHeight),
  22105. (i.nonLinearAdSlotWidth = r.offsetWidth),
  22106. (i.nonLinearAdSlotHeight = r.offsetHeight),
  22107. (i.forceNonLinearFullSlot = !1),
  22108. i.setAdWillPlayMuted(!this.player.muted),
  22109. this.loader.requestAds(i);
  22110. } catch (i) {
  22111. this.onAdError(i);
  22112. }
  22113. }),
  22114. _defineProperty$1(this, 'pollCountdown', (r = !1) => {
  22115. if (!r)
  22116. return (
  22117. clearInterval(this.countdownTimer),
  22118. void this.elements.container.removeAttribute('data-badge-text')
  22119. );
  22120. this.countdownTimer = setInterval(() => {
  22121. const i = formatTime(Math.max(this.manager.getRemainingTime(), 0)),
  22122. s = `${i18n.get('advertisement', this.player.config)} - ${i}`;
  22123. this.elements.container.setAttribute('data-badge-text', s);
  22124. }, 100);
  22125. }),
  22126. _defineProperty$1(this, 'onAdsManagerLoaded', r => {
  22127. if (!this.enabled) return;
  22128. const i = new google.ima.AdsRenderingSettings();
  22129. (i.restoreCustomPlaybackStateOnAdBreakComplete = !0),
  22130. (i.enablePreloading = !0),
  22131. (this.manager = r.getAdsManager(this.player, i)),
  22132. (this.cuePoints = this.manager.getCuePoints()),
  22133. this.manager.addEventListener(
  22134. google.ima.AdErrorEvent.Type.AD_ERROR,
  22135. s => this.onAdError(s)
  22136. ),
  22137. Object.keys(google.ima.AdEvent.Type).forEach(s => {
  22138. this.manager.addEventListener(google.ima.AdEvent.Type[s], n =>
  22139. this.onAdEvent(n)
  22140. );
  22141. }),
  22142. this.trigger('loaded');
  22143. }),
  22144. _defineProperty$1(this, 'addCuePoints', () => {
  22145. is.empty(this.cuePoints) ||
  22146. this.cuePoints.forEach(r => {
  22147. if (r !== 0 && r !== -1 && r < this.player.duration) {
  22148. const i = this.player.elements.progress;
  22149. if (is.element(i)) {
  22150. const s = (100 / this.player.duration) * r,
  22151. n = createElement('span', {
  22152. class: this.player.config.classNames.cues
  22153. });
  22154. (n.style.left = `${s.toString()}%`), i.appendChild(n);
  22155. }
  22156. }
  22157. });
  22158. }),
  22159. _defineProperty$1(this, 'onAdEvent', r => {
  22160. const { container: i } = this.player.elements,
  22161. s = r.getAd(),
  22162. n = r.getAdData();
  22163. switch (
  22164. ((a => {
  22165. triggerEvent.call(
  22166. this.player,
  22167. this.player.media,
  22168. `ads${a.replace(/_/g, '').toLowerCase()}`
  22169. );
  22170. })(r.type),
  22171. r.type)
  22172. ) {
  22173. case google.ima.AdEvent.Type.LOADED:
  22174. this.trigger('loaded'),
  22175. this.pollCountdown(!0),
  22176. s.isLinear() ||
  22177. ((s.width = i.offsetWidth), (s.height = i.offsetHeight));
  22178. break;
  22179. case google.ima.AdEvent.Type.STARTED:
  22180. this.manager.setVolume(this.player.volume);
  22181. break;
  22182. case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:
  22183. this.player.ended ? this.loadAds() : this.loader.contentComplete();
  22184. break;
  22185. case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:
  22186. this.pauseContent();
  22187. break;
  22188. case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:
  22189. this.pollCountdown(), this.resumeContent();
  22190. break;
  22191. case google.ima.AdEvent.Type.LOG:
  22192. n.adError &&
  22193. this.player.debug.warn(
  22194. `Non-fatal ad error: ${n.adError.getMessage()}`
  22195. );
  22196. }
  22197. }),
  22198. _defineProperty$1(this, 'onAdError', r => {
  22199. this.cancel(), this.player.debug.warn('Ads error', r);
  22200. }),
  22201. _defineProperty$1(this, 'listeners', () => {
  22202. const { container: r } = this.player.elements;
  22203. let i;
  22204. this.player.on('canplay', () => {
  22205. this.addCuePoints();
  22206. }),
  22207. this.player.on('ended', () => {
  22208. this.loader.contentComplete();
  22209. }),
  22210. this.player.on('timeupdate', () => {
  22211. i = this.player.currentTime;
  22212. }),
  22213. this.player.on('seeked', () => {
  22214. const s = this.player.currentTime;
  22215. is.empty(this.cuePoints) ||
  22216. this.cuePoints.forEach((n, a) => {
  22217. i < n &&
  22218. n < s &&
  22219. (this.manager.discardAdBreak(), this.cuePoints.splice(a, 1));
  22220. });
  22221. }),
  22222. window.addEventListener('resize', () => {
  22223. this.manager &&
  22224. this.manager.resize(
  22225. r.offsetWidth,
  22226. r.offsetHeight,
  22227. google.ima.ViewMode.NORMAL
  22228. );
  22229. });
  22230. }),
  22231. _defineProperty$1(this, 'play', () => {
  22232. const { container: r } = this.player.elements;
  22233. this.managerPromise || this.resumeContent(),
  22234. this.managerPromise
  22235. .then(() => {
  22236. this.manager.setVolume(this.player.volume),
  22237. this.elements.displayContainer.initialize();
  22238. try {
  22239. this.initialized ||
  22240. (this.manager.init(
  22241. r.offsetWidth,
  22242. r.offsetHeight,
  22243. google.ima.ViewMode.NORMAL
  22244. ),
  22245. this.manager.start()),
  22246. (this.initialized = !0);
  22247. } catch (i) {
  22248. this.onAdError(i);
  22249. }
  22250. })
  22251. .catch(() => {});
  22252. }),
  22253. _defineProperty$1(this, 'resumeContent', () => {
  22254. (this.elements.container.style.zIndex = ''),
  22255. (this.playing = !1),
  22256. silencePromise(this.player.media.play());
  22257. }),
  22258. _defineProperty$1(this, 'pauseContent', () => {
  22259. (this.elements.container.style.zIndex = 3),
  22260. (this.playing = !0),
  22261. this.player.media.pause();
  22262. }),
  22263. _defineProperty$1(this, 'cancel', () => {
  22264. this.initialized && this.resumeContent(),
  22265. this.trigger('error'),
  22266. this.loadAds();
  22267. }),
  22268. _defineProperty$1(this, 'loadAds', () => {
  22269. this.managerPromise
  22270. .then(() => {
  22271. this.manager && this.manager.destroy(),
  22272. (this.managerPromise = new Promise(r => {
  22273. this.on('loaded', r), this.player.debug.log(this.manager);
  22274. })),
  22275. (this.initialized = !1),
  22276. this.requestAds();
  22277. })
  22278. .catch(() => {});
  22279. }),
  22280. _defineProperty$1(this, 'trigger', (r, ...i) => {
  22281. const s = this.events[r];
  22282. is.array(s) &&
  22283. s.forEach(n => {
  22284. is.function(n) && n.apply(this, i);
  22285. });
  22286. }),
  22287. _defineProperty$1(
  22288. this,
  22289. 'on',
  22290. (r, i) => (
  22291. is.array(this.events[r]) || (this.events[r] = []),
  22292. this.events[r].push(i),
  22293. this
  22294. )
  22295. ),
  22296. _defineProperty$1(this, 'startSafetyTimer', (r, i) => {
  22297. this.player.debug.log(`Safety timer invoked from: ${i}`),
  22298. (this.safetyTimer = setTimeout(() => {
  22299. this.cancel(), this.clearSafetyTimer('startSafetyTimer()');
  22300. }, r));
  22301. }),
  22302. _defineProperty$1(this, 'clearSafetyTimer', r => {
  22303. is.nullOrUndefined(this.safetyTimer) ||
  22304. (this.player.debug.log(`Safety timer cleared from: ${r}`),
  22305. clearTimeout(this.safetyTimer),
  22306. (this.safetyTimer = null));
  22307. }),
  22308. (this.player = t),
  22309. (this.config = t.config.ads),
  22310. (this.playing = !1),
  22311. (this.initialized = !1),
  22312. (this.elements = { container: null, displayContainer: null }),
  22313. (this.manager = null),
  22314. (this.loader = null),
  22315. (this.cuePoints = null),
  22316. (this.events = {}),
  22317. (this.safetyTimer = null),
  22318. (this.countdownTimer = null),
  22319. (this.managerPromise = new Promise((r, i) => {
  22320. this.on('loaded', r), this.on('error', i);
  22321. })),
  22322. this.load();
  22323. }
  22324. get enabled() {
  22325. const { config: t } = this;
  22326. return (
  22327. this.player.isHTML5 &&
  22328. this.player.isVideo &&
  22329. t.enabled &&
  22330. (!is.empty(t.publisherId) || is.url(t.tagUrl))
  22331. );
  22332. }
  22333. get tagUrl() {
  22334. const { config: t } = this;
  22335. return is.url(t.tagUrl)
  22336. ? t.tagUrl
  22337. : `https://go.aniview.com/api/adserver6/vast/?${buildUrlParams({
  22338. AV_PUBLISHERID: '58c25bb0073ef448b1087ad6',
  22339. AV_CHANNELID: '5a0458dc28a06145e4519d21',
  22340. AV_URL: window.location.hostname,
  22341. cb: Date.now(),
  22342. AV_WIDTH: 640,
  22343. AV_HEIGHT: 480,
  22344. AV_CDIM2: t.publisherId
  22345. })}`;
  22346. }
  22347. }
  22348. function clamp(e = 0, t = 0, r = 255) {
  22349. return Math.min(Math.max(e, t), r);
  22350. }
  22351. const parseVtt = e => {
  22352. const t = [];
  22353. return (
  22354. e.split(/\r\n\r\n|\n\n|\r\r/).forEach(r => {
  22355. const i = {};
  22356. r.split(/\r\n|\n|\r/).forEach(s => {
  22357. if (is.number(i.startTime)) {
  22358. if (!is.empty(s.trim()) && is.empty(i.text)) {
  22359. const n = s.trim().split('#xywh=');
  22360. ([i.text] = n), n[1] && ([i.x, i.y, i.w, i.h] = n[1].split(','));
  22361. }
  22362. } else {
  22363. const n = s.match(
  22364. /([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/
  22365. );
  22366. n &&
  22367. ((i.startTime =
  22368. 60 * Number(n[1] || 0) * 60 +
  22369. 60 * Number(n[2]) +
  22370. Number(n[3]) +
  22371. +`0.${n[4]}`),
  22372. (i.endTime =
  22373. 60 * Number(n[6] || 0) * 60 +
  22374. 60 * Number(n[7]) +
  22375. Number(n[8]) +
  22376. +`0.${n[9]}`));
  22377. }
  22378. }),
  22379. i.text && t.push(i);
  22380. }),
  22381. t
  22382. );
  22383. },
  22384. fitRatio = (e, t) => {
  22385. const r = {};
  22386. return (
  22387. e > t.width / t.height
  22388. ? ((r.width = t.width), (r.height = (1 / e) * t.width))
  22389. : ((r.height = t.height), (r.width = e * t.height)),
  22390. r
  22391. );
  22392. };
  22393. class PreviewThumbnails {
  22394. constructor(t) {
  22395. _defineProperty$1(this, 'load', () => {
  22396. this.player.elements.display.seekTooltip &&
  22397. (this.player.elements.display.seekTooltip.hidden = this.enabled),
  22398. this.enabled &&
  22399. this.getThumbnails().then(() => {
  22400. this.enabled &&
  22401. (this.render(),
  22402. this.determineContainerAutoSizing(),
  22403. this.listeners(),
  22404. (this.loaded = !0));
  22405. });
  22406. }),
  22407. _defineProperty$1(
  22408. this,
  22409. 'getThumbnails',
  22410. () =>
  22411. new Promise(r => {
  22412. const { src: i } = this.player.config.previewThumbnails;
  22413. if (is.empty(i))
  22414. throw new Error('Missing previewThumbnails.src config attribute');
  22415. const s = () => {
  22416. this.thumbnails.sort((n, a) => n.height - a.height),
  22417. this.player.debug.log('Preview thumbnails', this.thumbnails),
  22418. r();
  22419. };
  22420. if (is.function(i))
  22421. i(n => {
  22422. (this.thumbnails = n), s();
  22423. });
  22424. else {
  22425. const n = (is.string(i) ? [i] : i).map(a => this.getThumbnail(a));
  22426. Promise.all(n).then(s);
  22427. }
  22428. })
  22429. ),
  22430. _defineProperty$1(
  22431. this,
  22432. 'getThumbnail',
  22433. r =>
  22434. new Promise(i => {
  22435. fetch$1(r).then(s => {
  22436. const n = { frames: parseVtt(s), height: null, urlPrefix: '' };
  22437. n.frames[0].text.startsWith('/') ||
  22438. n.frames[0].text.startsWith('http://') ||
  22439. n.frames[0].text.startsWith('https://') ||
  22440. (n.urlPrefix = r.substring(0, r.lastIndexOf('/') + 1));
  22441. const a = new Image();
  22442. (a.onload = () => {
  22443. (n.height = a.naturalHeight),
  22444. (n.width = a.naturalWidth),
  22445. this.thumbnails.push(n),
  22446. i();
  22447. }),
  22448. (a.src = n.urlPrefix + n.frames[0].text);
  22449. });
  22450. })
  22451. ),
  22452. _defineProperty$1(this, 'startMove', r => {
  22453. if (
  22454. this.loaded &&
  22455. is.event(r) &&
  22456. ['touchmove', 'mousemove'].includes(r.type) &&
  22457. this.player.media.duration
  22458. ) {
  22459. if (r.type === 'touchmove')
  22460. this.seekTime =
  22461. this.player.media.duration *
  22462. (this.player.elements.inputs.seek.value / 100);
  22463. else {
  22464. var i, s;
  22465. const n = this.player.elements.progress.getBoundingClientRect(),
  22466. a = (100 / n.width) * (r.pageX - n.left);
  22467. (this.seekTime = this.player.media.duration * (a / 100)),
  22468. this.seekTime < 0 && (this.seekTime = 0),
  22469. this.seekTime > this.player.media.duration - 1 &&
  22470. (this.seekTime = this.player.media.duration - 1),
  22471. (this.mousePosX = r.pageX),
  22472. (this.elements.thumb.time.innerText = formatTime(this.seekTime));
  22473. const o =
  22474. (i = this.player.config.markers) === null ||
  22475. i === void 0 ||
  22476. (s = i.points) === null ||
  22477. s === void 0
  22478. ? void 0
  22479. : s.find(({ time: l }) => l === Math.round(this.seekTime));
  22480. o &&
  22481. this.elements.thumb.time.insertAdjacentHTML(
  22482. 'afterbegin',
  22483. `${o.label}<br>`
  22484. );
  22485. }
  22486. this.showImageAtCurrentTime();
  22487. }
  22488. }),
  22489. _defineProperty$1(this, 'endMove', () => {
  22490. this.toggleThumbContainer(!1, !0);
  22491. }),
  22492. _defineProperty$1(this, 'startScrubbing', r => {
  22493. (is.nullOrUndefined(r.button) || r.button === !1 || r.button === 0) &&
  22494. ((this.mouseDown = !0),
  22495. this.player.media.duration &&
  22496. (this.toggleScrubbingContainer(!0),
  22497. this.toggleThumbContainer(!1, !0),
  22498. this.showImageAtCurrentTime()));
  22499. }),
  22500. _defineProperty$1(this, 'endScrubbing', () => {
  22501. (this.mouseDown = !1),
  22502. Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime)
  22503. ? this.toggleScrubbingContainer(!1)
  22504. : once.call(this.player, this.player.media, 'timeupdate', () => {
  22505. this.mouseDown || this.toggleScrubbingContainer(!1);
  22506. });
  22507. }),
  22508. _defineProperty$1(this, 'listeners', () => {
  22509. this.player.on('play', () => {
  22510. this.toggleThumbContainer(!1, !0);
  22511. }),
  22512. this.player.on('seeked', () => {
  22513. this.toggleThumbContainer(!1);
  22514. }),
  22515. this.player.on('timeupdate', () => {
  22516. this.lastTime = this.player.media.currentTime;
  22517. });
  22518. }),
  22519. _defineProperty$1(this, 'render', () => {
  22520. (this.elements.thumb.container = createElement('div', {
  22521. class: this.player.config.classNames.previewThumbnails.thumbContainer
  22522. })),
  22523. (this.elements.thumb.imageContainer = createElement('div', {
  22524. class:
  22525. this.player.config.classNames.previewThumbnails.imageContainer
  22526. })),
  22527. this.elements.thumb.container.appendChild(
  22528. this.elements.thumb.imageContainer
  22529. );
  22530. const r = createElement('div', {
  22531. class: this.player.config.classNames.previewThumbnails.timeContainer
  22532. });
  22533. (this.elements.thumb.time = createElement('span', {}, '00:00')),
  22534. r.appendChild(this.elements.thumb.time),
  22535. this.elements.thumb.imageContainer.appendChild(r),
  22536. is.element(this.player.elements.progress) &&
  22537. this.player.elements.progress.appendChild(
  22538. this.elements.thumb.container
  22539. ),
  22540. (this.elements.scrubbing.container = createElement('div', {
  22541. class:
  22542. this.player.config.classNames.previewThumbnails.scrubbingContainer
  22543. })),
  22544. this.player.elements.wrapper.appendChild(
  22545. this.elements.scrubbing.container
  22546. );
  22547. }),
  22548. _defineProperty$1(this, 'destroy', () => {
  22549. this.elements.thumb.container && this.elements.thumb.container.remove(),
  22550. this.elements.scrubbing.container &&
  22551. this.elements.scrubbing.container.remove();
  22552. }),
  22553. _defineProperty$1(this, 'showImageAtCurrentTime', () => {
  22554. this.mouseDown
  22555. ? this.setScrubbingContainerSize()
  22556. : this.setThumbContainerSizeAndPos();
  22557. const r = this.thumbnails[0].frames.findIndex(
  22558. n => this.seekTime >= n.startTime && this.seekTime <= n.endTime
  22559. ),
  22560. i = r >= 0;
  22561. let s = 0;
  22562. this.mouseDown || this.toggleThumbContainer(i),
  22563. i &&
  22564. (this.thumbnails.forEach((n, a) => {
  22565. this.loadedImages.includes(n.frames[r].text) && (s = a);
  22566. }),
  22567. r !== this.showingThumb &&
  22568. ((this.showingThumb = r), this.loadImage(s)));
  22569. }),
  22570. _defineProperty$1(this, 'loadImage', (r = 0) => {
  22571. const i = this.showingThumb,
  22572. s = this.thumbnails[r],
  22573. { urlPrefix: n } = s,
  22574. a = s.frames[i],
  22575. o = s.frames[i].text,
  22576. l = n + o;
  22577. if (
  22578. this.currentImageElement &&
  22579. this.currentImageElement.dataset.filename === o
  22580. )
  22581. this.showImage(this.currentImageElement, a, r, i, o, !1),
  22582. (this.currentImageElement.dataset.index = i),
  22583. this.removeOldImages(this.currentImageElement);
  22584. else {
  22585. this.loadingImage &&
  22586. this.usingSprites &&
  22587. (this.loadingImage.onload = null);
  22588. const c = new Image();
  22589. (c.src = l),
  22590. (c.dataset.index = i),
  22591. (c.dataset.filename = o),
  22592. (this.showingThumbFilename = o),
  22593. this.player.debug.log(`Loading image: ${l}`),
  22594. (c.onload = () => this.showImage(c, a, r, i, o, !0)),
  22595. (this.loadingImage = c),
  22596. this.removeOldImages(c);
  22597. }
  22598. }),
  22599. _defineProperty$1(this, 'showImage', (r, i, s, n, a, o = !0) => {
  22600. this.player.debug.log(
  22601. `Showing thumb: ${a}. num: ${n}. qual: ${s}. newimg: ${o}`
  22602. ),
  22603. this.setImageSizeAndOffset(r, i),
  22604. o &&
  22605. (this.currentImageContainer.appendChild(r),
  22606. (this.currentImageElement = r),
  22607. this.loadedImages.includes(a) || this.loadedImages.push(a)),
  22608. this.preloadNearby(n, !0)
  22609. .then(this.preloadNearby(n, !1))
  22610. .then(this.getHigherQuality(s, r, i, a));
  22611. }),
  22612. _defineProperty$1(this, 'removeOldImages', r => {
  22613. Array.from(this.currentImageContainer.children).forEach(i => {
  22614. if (i.tagName.toLowerCase() !== 'img') return;
  22615. const s = this.usingSprites ? 500 : 1e3;
  22616. if (i.dataset.index !== r.dataset.index && !i.dataset.deleting) {
  22617. i.dataset.deleting = !0;
  22618. const { currentImageContainer: n } = this;
  22619. setTimeout(() => {
  22620. n.removeChild(i),
  22621. this.player.debug.log(`Removing thumb: ${i.dataset.filename}`);
  22622. }, s);
  22623. }
  22624. });
  22625. }),
  22626. _defineProperty$1(
  22627. this,
  22628. 'preloadNearby',
  22629. (r, i = !0) =>
  22630. new Promise(s => {
  22631. setTimeout(() => {
  22632. const n = this.thumbnails[0].frames[r].text;
  22633. if (this.showingThumbFilename === n) {
  22634. let a;
  22635. a = i
  22636. ? this.thumbnails[0].frames.slice(r)
  22637. : this.thumbnails[0].frames.slice(0, r).reverse();
  22638. let o = !1;
  22639. a.forEach(l => {
  22640. const c = l.text;
  22641. if (c !== n && !this.loadedImages.includes(c)) {
  22642. (o = !0),
  22643. this.player.debug.log(`Preloading thumb filename: ${c}`);
  22644. const { urlPrefix: g } = this.thumbnails[0],
  22645. S = g + c,
  22646. p = new Image();
  22647. (p.src = S),
  22648. (p.onload = () => {
  22649. this.player.debug.log(`Preloaded thumb filename: ${c}`),
  22650. this.loadedImages.includes(c) ||
  22651. this.loadedImages.push(c),
  22652. s();
  22653. });
  22654. }
  22655. }),
  22656. o || s();
  22657. }
  22658. }, 300);
  22659. })
  22660. ),
  22661. _defineProperty$1(this, 'getHigherQuality', (r, i, s, n) => {
  22662. if (r < this.thumbnails.length - 1) {
  22663. let a = i.naturalHeight;
  22664. this.usingSprites && (a = s.h),
  22665. a < this.thumbContainerHeight &&
  22666. setTimeout(() => {
  22667. this.showingThumbFilename === n &&
  22668. (this.player.debug.log(
  22669. `Showing higher quality thumb for: ${n}`
  22670. ),
  22671. this.loadImage(r + 1));
  22672. }, 300);
  22673. }
  22674. }),
  22675. _defineProperty$1(this, 'toggleThumbContainer', (r = !1, i = !1) => {
  22676. const s =
  22677. this.player.config.classNames.previewThumbnails.thumbContainerShown;
  22678. this.elements.thumb.container.classList.toggle(s, r),
  22679. !r &&
  22680. i &&
  22681. ((this.showingThumb = null), (this.showingThumbFilename = null));
  22682. }),
  22683. _defineProperty$1(this, 'toggleScrubbingContainer', (r = !1) => {
  22684. const i =
  22685. this.player.config.classNames.previewThumbnails
  22686. .scrubbingContainerShown;
  22687. this.elements.scrubbing.container.classList.toggle(i, r),
  22688. r || ((this.showingThumb = null), (this.showingThumbFilename = null));
  22689. }),
  22690. _defineProperty$1(this, 'determineContainerAutoSizing', () => {
  22691. (this.elements.thumb.imageContainer.clientHeight > 20 ||
  22692. this.elements.thumb.imageContainer.clientWidth > 20) &&
  22693. (this.sizeSpecifiedInCSS = !0);
  22694. }),
  22695. _defineProperty$1(this, 'setThumbContainerSizeAndPos', () => {
  22696. const { imageContainer: r } = this.elements.thumb;
  22697. if (this.sizeSpecifiedInCSS) {
  22698. if (r.clientHeight > 20 && r.clientWidth < 20) {
  22699. const i = Math.floor(r.clientHeight * this.thumbAspectRatio);
  22700. r.style.width = `${i}px`;
  22701. } else if (r.clientHeight < 20 && r.clientWidth > 20) {
  22702. const i = Math.floor(r.clientWidth / this.thumbAspectRatio);
  22703. r.style.height = `${i}px`;
  22704. }
  22705. } else {
  22706. const i = Math.floor(
  22707. this.thumbContainerHeight * this.thumbAspectRatio
  22708. );
  22709. (r.style.height = `${this.thumbContainerHeight}px`),
  22710. (r.style.width = `${i}px`);
  22711. }
  22712. this.setThumbContainerPos();
  22713. }),
  22714. _defineProperty$1(this, 'setThumbContainerPos', () => {
  22715. const r = this.player.elements.progress.getBoundingClientRect(),
  22716. i = this.player.elements.container.getBoundingClientRect(),
  22717. { container: s } = this.elements.thumb,
  22718. n = i.left - r.left + 10,
  22719. a = i.right - r.left - s.clientWidth - 10,
  22720. o = this.mousePosX - r.left - s.clientWidth / 2,
  22721. l = clamp(o, n, a);
  22722. (s.style.left = `${l}px`),
  22723. s.style.setProperty('--preview-arrow-offset', o - l + 'px');
  22724. }),
  22725. _defineProperty$1(this, 'setScrubbingContainerSize', () => {
  22726. const { width: r, height: i } = fitRatio(this.thumbAspectRatio, {
  22727. width: this.player.media.clientWidth,
  22728. height: this.player.media.clientHeight
  22729. });
  22730. (this.elements.scrubbing.container.style.width = `${r}px`),
  22731. (this.elements.scrubbing.container.style.height = `${i}px`);
  22732. }),
  22733. _defineProperty$1(this, 'setImageSizeAndOffset', (r, i) => {
  22734. if (!this.usingSprites) return;
  22735. const s = this.thumbContainerHeight / i.h;
  22736. (r.style.height = r.naturalHeight * s + 'px'),
  22737. (r.style.width = r.naturalWidth * s + 'px'),
  22738. (r.style.left = `-${i.x * s}px`),
  22739. (r.style.top = `-${i.y * s}px`);
  22740. }),
  22741. (this.player = t),
  22742. (this.thumbnails = []),
  22743. (this.loaded = !1),
  22744. (this.lastMouseMoveTime = Date.now()),
  22745. (this.mouseDown = !1),
  22746. (this.loadedImages = []),
  22747. (this.elements = { thumb: {}, scrubbing: {} }),
  22748. this.load();
  22749. }
  22750. get enabled() {
  22751. return (
  22752. this.player.isHTML5 &&
  22753. this.player.isVideo &&
  22754. this.player.config.previewThumbnails.enabled
  22755. );
  22756. }
  22757. get currentImageContainer() {
  22758. return this.mouseDown
  22759. ? this.elements.scrubbing.container
  22760. : this.elements.thumb.imageContainer;
  22761. }
  22762. get usingSprites() {
  22763. return Object.keys(this.thumbnails[0].frames[0]).includes('w');
  22764. }
  22765. get thumbAspectRatio() {
  22766. return this.usingSprites
  22767. ? this.thumbnails[0].frames[0].w / this.thumbnails[0].frames[0].h
  22768. : this.thumbnails[0].width / this.thumbnails[0].height;
  22769. }
  22770. get thumbContainerHeight() {
  22771. if (this.mouseDown) {
  22772. const { height: t } = fitRatio(this.thumbAspectRatio, {
  22773. width: this.player.media.clientWidth,
  22774. height: this.player.media.clientHeight
  22775. });
  22776. return t;
  22777. }
  22778. return this.sizeSpecifiedInCSS
  22779. ? this.elements.thumb.imageContainer.clientHeight
  22780. : Math.floor(this.player.media.clientWidth / this.thumbAspectRatio / 4);
  22781. }
  22782. get currentImageElement() {
  22783. return this.mouseDown
  22784. ? this.currentScrubbingImageElement
  22785. : this.currentThumbnailImageElement;
  22786. }
  22787. set currentImageElement(t) {
  22788. this.mouseDown
  22789. ? (this.currentScrubbingImageElement = t)
  22790. : (this.currentThumbnailImageElement = t);
  22791. }
  22792. }
  22793. const source = {
  22794. insertElements(e, t) {
  22795. is.string(t)
  22796. ? insertElement(e, this.media, { src: t })
  22797. : is.array(t) &&
  22798. t.forEach(r => {
  22799. insertElement(e, this.media, r);
  22800. });
  22801. },
  22802. change(e) {
  22803. getDeep(e, 'sources.length')
  22804. ? (html5.cancelRequests.call(this),
  22805. this.destroy.call(
  22806. this,
  22807. () => {
  22808. (this.options.quality = []),
  22809. removeElement(this.media),
  22810. (this.media = null),
  22811. is.element(this.elements.container) &&
  22812. this.elements.container.removeAttribute('class');
  22813. const { sources: t, type: r } = e,
  22814. [{ provider: i = providers.html5, src: s }] = t,
  22815. n = i === 'html5' ? r : 'div',
  22816. a = i === 'html5' ? {} : { src: s };
  22817. Object.assign(this, {
  22818. provider: i,
  22819. type: r,
  22820. supported: support.check(r, i, this.config.playsinline),
  22821. media: createElement(n, a)
  22822. }),
  22823. this.elements.container.appendChild(this.media),
  22824. is.boolean(e.autoplay) && (this.config.autoplay = e.autoplay),
  22825. this.isHTML5 &&
  22826. (this.config.crossorigin &&
  22827. this.media.setAttribute('crossorigin', ''),
  22828. this.config.autoplay && this.media.setAttribute('autoplay', ''),
  22829. is.empty(e.poster) || (this.poster = e.poster),
  22830. this.config.loop.active && this.media.setAttribute('loop', ''),
  22831. this.config.muted && this.media.setAttribute('muted', ''),
  22832. this.config.playsinline &&
  22833. this.media.setAttribute('playsinline', '')),
  22834. ui.addStyleHook.call(this),
  22835. this.isHTML5 && source.insertElements.call(this, 'source', t),
  22836. (this.config.title = e.title),
  22837. media.setup.call(this),
  22838. this.isHTML5 &&
  22839. Object.keys(e).includes('tracks') &&
  22840. source.insertElements.call(this, 'track', e.tracks),
  22841. (this.isHTML5 || (this.isEmbed && !this.supported.ui)) &&
  22842. ui.build.call(this),
  22843. this.isHTML5 && this.media.load(),
  22844. is.empty(e.previewThumbnails) ||
  22845. (Object.assign(
  22846. this.config.previewThumbnails,
  22847. e.previewThumbnails
  22848. ),
  22849. this.previewThumbnails &&
  22850. this.previewThumbnails.loaded &&
  22851. (this.previewThumbnails.destroy(),
  22852. (this.previewThumbnails = null)),
  22853. this.config.previewThumbnails.enabled &&
  22854. (this.previewThumbnails = new PreviewThumbnails(this))),
  22855. this.fullscreen.update();
  22856. },
  22857. !0
  22858. ))
  22859. : this.debug.warn('Invalid source format');
  22860. }
  22861. };
  22862. class Plyr {
  22863. constructor(t, r) {
  22864. if (
  22865. (_defineProperty$1(this, 'play', () =>
  22866. is.function(this.media.play)
  22867. ? (this.ads &&
  22868. this.ads.enabled &&
  22869. this.ads.managerPromise
  22870. .then(() => this.ads.play())
  22871. .catch(() => silencePromise(this.media.play())),
  22872. this.media.play())
  22873. : null
  22874. ),
  22875. _defineProperty$1(this, 'pause', () =>
  22876. this.playing && is.function(this.media.pause)
  22877. ? this.media.pause()
  22878. : null
  22879. ),
  22880. _defineProperty$1(this, 'togglePlay', o =>
  22881. (is.boolean(o) ? o : !this.playing) ? this.play() : this.pause()
  22882. ),
  22883. _defineProperty$1(this, 'stop', () => {
  22884. this.isHTML5
  22885. ? (this.pause(), this.restart())
  22886. : is.function(this.media.stop) && this.media.stop();
  22887. }),
  22888. _defineProperty$1(this, 'restart', () => {
  22889. this.currentTime = 0;
  22890. }),
  22891. _defineProperty$1(this, 'rewind', o => {
  22892. this.currentTime -= is.number(o) ? o : this.config.seekTime;
  22893. }),
  22894. _defineProperty$1(this, 'forward', o => {
  22895. this.currentTime += is.number(o) ? o : this.config.seekTime;
  22896. }),
  22897. _defineProperty$1(this, 'increaseVolume', o => {
  22898. const l = this.media.muted ? 0 : this.volume;
  22899. this.volume = l + (is.number(o) ? o : 0);
  22900. }),
  22901. _defineProperty$1(this, 'decreaseVolume', o => {
  22902. this.increaseVolume(-o);
  22903. }),
  22904. _defineProperty$1(this, 'airplay', () => {
  22905. support.airplay && this.media.webkitShowPlaybackTargetPicker();
  22906. }),
  22907. _defineProperty$1(this, 'toggleControls', o => {
  22908. if (this.supported.ui && !this.isAudio) {
  22909. const l = hasClass(
  22910. this.elements.container,
  22911. this.config.classNames.hideControls
  22912. ),
  22913. c = o === void 0 ? void 0 : !o,
  22914. g = toggleClass(
  22915. this.elements.container,
  22916. this.config.classNames.hideControls,
  22917. c
  22918. );
  22919. if (
  22920. (g &&
  22921. is.array(this.config.controls) &&
  22922. this.config.controls.includes('settings') &&
  22923. !is.empty(this.config.settings) &&
  22924. controls$2.toggleMenu.call(this, !1),
  22925. g !== l)
  22926. ) {
  22927. const S = g ? 'controlshidden' : 'controlsshown';
  22928. triggerEvent.call(this, this.media, S);
  22929. }
  22930. return !g;
  22931. }
  22932. return !1;
  22933. }),
  22934. _defineProperty$1(this, 'on', (o, l) => {
  22935. on.call(this, this.elements.container, o, l);
  22936. }),
  22937. _defineProperty$1(this, 'once', (o, l) => {
  22938. once.call(this, this.elements.container, o, l);
  22939. }),
  22940. _defineProperty$1(this, 'off', (o, l) => {
  22941. off(this.elements.container, o, l);
  22942. }),
  22943. _defineProperty$1(this, 'destroy', (o, l = !1) => {
  22944. if (!this.ready) return;
  22945. const c = () => {
  22946. (document.body.style.overflow = ''),
  22947. (this.embed = null),
  22948. l
  22949. ? (Object.keys(this.elements).length &&
  22950. (removeElement(this.elements.buttons.play),
  22951. removeElement(this.elements.captions),
  22952. removeElement(this.elements.controls),
  22953. removeElement(this.elements.wrapper),
  22954. (this.elements.buttons.play = null),
  22955. (this.elements.captions = null),
  22956. (this.elements.controls = null),
  22957. (this.elements.wrapper = null)),
  22958. is.function(o) && o())
  22959. : (unbindListeners.call(this),
  22960. html5.cancelRequests.call(this),
  22961. replaceElement(this.elements.original, this.elements.container),
  22962. triggerEvent.call(
  22963. this,
  22964. this.elements.original,
  22965. 'destroyed',
  22966. !0
  22967. ),
  22968. is.function(o) && o.call(this.elements.original),
  22969. (this.ready = !1),
  22970. setTimeout(() => {
  22971. (this.elements = null), (this.media = null);
  22972. }, 200));
  22973. };
  22974. this.stop(),
  22975. clearTimeout(this.timers.loading),
  22976. clearTimeout(this.timers.controls),
  22977. clearTimeout(this.timers.resized),
  22978. this.isHTML5
  22979. ? (ui.toggleNativeControls.call(this, !0), c())
  22980. : this.isYouTube
  22981. ? (clearInterval(this.timers.buffering),
  22982. clearInterval(this.timers.playing),
  22983. this.embed !== null &&
  22984. is.function(this.embed.destroy) &&
  22985. this.embed.destroy(),
  22986. c())
  22987. : this.isVimeo &&
  22988. (this.embed !== null && this.embed.unload().then(c),
  22989. setTimeout(c, 200));
  22990. }),
  22991. _defineProperty$1(this, 'supports', o => support.mime.call(this, o)),
  22992. (this.timers = {}),
  22993. (this.ready = !1),
  22994. (this.loading = !1),
  22995. (this.failed = !1),
  22996. (this.touch = support.touch),
  22997. (this.media = t),
  22998. is.string(this.media) &&
  22999. (this.media = document.querySelectorAll(this.media)),
  23000. ((window.jQuery && this.media instanceof jQuery) ||
  23001. is.nodeList(this.media) ||
  23002. is.array(this.media)) &&
  23003. (this.media = this.media[0]),
  23004. (this.config = extend(
  23005. {},
  23006. defaults,
  23007. Plyr.defaults,
  23008. r || {},
  23009. (() => {
  23010. try {
  23011. return JSON.parse(this.media.getAttribute('data-plyr-config'));
  23012. } catch {
  23013. return {};
  23014. }
  23015. })()
  23016. )),
  23017. (this.elements = {
  23018. container: null,
  23019. fullscreen: null,
  23020. captions: null,
  23021. buttons: {},
  23022. display: {},
  23023. progress: {},
  23024. inputs: {},
  23025. settings: { popup: null, menu: null, panels: {}, buttons: {} }
  23026. }),
  23027. (this.captions = { active: null, currentTrack: -1, meta: new WeakMap() }),
  23028. (this.fullscreen = { active: !1 }),
  23029. (this.options = { speed: [], quality: [] }),
  23030. (this.debug = new Console(this.config.debug)),
  23031. this.debug.log('Config', this.config),
  23032. this.debug.log('Support', support),
  23033. is.nullOrUndefined(this.media) || !is.element(this.media))
  23034. )
  23035. return void this.debug.error('Setup failed: no suitable element passed');
  23036. if (this.media.plyr) return void this.debug.warn('Target already setup');
  23037. if (!this.config.enabled)
  23038. return void this.debug.error('Setup failed: disabled by config');
  23039. if (!support.check().api)
  23040. return void this.debug.error('Setup failed: no support');
  23041. const i = this.media.cloneNode(!0);
  23042. (i.autoplay = !1), (this.elements.original = i);
  23043. const s = this.media.tagName.toLowerCase();
  23044. let n = null,
  23045. a = null;
  23046. switch (s) {
  23047. case 'div':
  23048. if (((n = this.media.querySelector('iframe')), is.element(n))) {
  23049. if (
  23050. ((a = parseUrl(n.getAttribute('src'))),
  23051. (this.provider = getProviderByUrl(a.toString())),
  23052. (this.elements.container = this.media),
  23053. (this.media = n),
  23054. (this.elements.container.className = ''),
  23055. a.search.length)
  23056. ) {
  23057. const o = ['1', 'true'];
  23058. o.includes(a.searchParams.get('autoplay')) &&
  23059. (this.config.autoplay = !0),
  23060. o.includes(a.searchParams.get('loop')) &&
  23061. (this.config.loop.active = !0),
  23062. this.isYouTube
  23063. ? ((this.config.playsinline = o.includes(
  23064. a.searchParams.get('playsinline')
  23065. )),
  23066. (this.config.youtube.hl = a.searchParams.get('hl')))
  23067. : (this.config.playsinline = !0);
  23068. }
  23069. } else
  23070. (this.provider = this.media.getAttribute(
  23071. this.config.attributes.embed.provider
  23072. )),
  23073. this.media.removeAttribute(this.config.attributes.embed.provider);
  23074. if (
  23075. is.empty(this.provider) ||
  23076. !Object.values(providers).includes(this.provider)
  23077. )
  23078. return void this.debug.error('Setup failed: Invalid provider');
  23079. this.type = types.video;
  23080. break;
  23081. case 'video':
  23082. case 'audio':
  23083. (this.type = s),
  23084. (this.provider = providers.html5),
  23085. this.media.hasAttribute('crossorigin') &&
  23086. (this.config.crossorigin = !0),
  23087. this.media.hasAttribute('autoplay') && (this.config.autoplay = !0),
  23088. (this.media.hasAttribute('playsinline') ||
  23089. this.media.hasAttribute('webkit-playsinline')) &&
  23090. (this.config.playsinline = !0),
  23091. this.media.hasAttribute('muted') && (this.config.muted = !0),
  23092. this.media.hasAttribute('loop') && (this.config.loop.active = !0);
  23093. break;
  23094. default:
  23095. return void this.debug.error('Setup failed: unsupported type');
  23096. }
  23097. (this.supported = support.check(this.type, this.provider)),
  23098. this.supported.api
  23099. ? ((this.eventListeners = []),
  23100. (this.listeners = new Listeners(this)),
  23101. (this.storage = new Storage(this)),
  23102. (this.media.plyr = this),
  23103. is.element(this.elements.container) ||
  23104. ((this.elements.container = createElement('div')),
  23105. wrap(this.media, this.elements.container)),
  23106. ui.migrateStyles.call(this),
  23107. ui.addStyleHook.call(this),
  23108. media.setup.call(this),
  23109. this.config.debug &&
  23110. on.call(
  23111. this,
  23112. this.elements.container,
  23113. this.config.events.join(' '),
  23114. o => {
  23115. this.debug.log(`event: ${o.type}`);
  23116. }
  23117. ),
  23118. (this.fullscreen = new Fullscreen(this)),
  23119. (this.isHTML5 || (this.isEmbed && !this.supported.ui)) &&
  23120. ui.build.call(this),
  23121. this.listeners.container(),
  23122. this.listeners.global(),
  23123. this.config.ads.enabled && (this.ads = new Ads(this)),
  23124. this.isHTML5 &&
  23125. this.config.autoplay &&
  23126. this.once('canplay', () => silencePromise(this.play())),
  23127. (this.lastSeekTime = 0),
  23128. this.config.previewThumbnails.enabled &&
  23129. (this.previewThumbnails = new PreviewThumbnails(this)))
  23130. : this.debug.error('Setup failed: no support');
  23131. }
  23132. get isHTML5() {
  23133. return this.provider === providers.html5;
  23134. }
  23135. get isEmbed() {
  23136. return this.isYouTube || this.isVimeo;
  23137. }
  23138. get isYouTube() {
  23139. return this.provider === providers.youtube;
  23140. }
  23141. get isVimeo() {
  23142. return this.provider === providers.vimeo;
  23143. }
  23144. get isVideo() {
  23145. return this.type === types.video;
  23146. }
  23147. get isAudio() {
  23148. return this.type === types.audio;
  23149. }
  23150. get playing() {
  23151. return !!(this.ready && !this.paused && !this.ended);
  23152. }
  23153. get paused() {
  23154. return !!this.media.paused;
  23155. }
  23156. get stopped() {
  23157. return !!(this.paused && this.currentTime === 0);
  23158. }
  23159. get ended() {
  23160. return !!this.media.ended;
  23161. }
  23162. set currentTime(t) {
  23163. if (!this.duration) return;
  23164. const r = is.number(t) && t > 0;
  23165. (this.media.currentTime = r ? Math.min(t, this.duration) : 0),
  23166. this.debug.log(`Seeking to ${this.currentTime} seconds`);
  23167. }
  23168. get currentTime() {
  23169. return Number(this.media.currentTime);
  23170. }
  23171. get buffered() {
  23172. const { buffered: t } = this.media;
  23173. return is.number(t)
  23174. ? t
  23175. : t && t.length && this.duration > 0
  23176. ? t.end(0) / this.duration
  23177. : 0;
  23178. }
  23179. get seeking() {
  23180. return !!this.media.seeking;
  23181. }
  23182. get duration() {
  23183. const t = parseFloat(this.config.duration),
  23184. r = (this.media || {}).duration,
  23185. i = is.number(r) && r !== 1 / 0 ? r : 0;
  23186. return t || i;
  23187. }
  23188. set volume(t) {
  23189. let r = t;
  23190. is.string(r) && (r = Number(r)),
  23191. is.number(r) || (r = this.storage.get('volume')),
  23192. is.number(r) || ({ volume: r } = this.config),
  23193. r > 1 && (r = 1),
  23194. r < 0 && (r = 0),
  23195. (this.config.volume = r),
  23196. (this.media.volume = r),
  23197. !is.empty(t) && this.muted && r > 0 && (this.muted = !1);
  23198. }
  23199. get volume() {
  23200. return Number(this.media.volume);
  23201. }
  23202. set muted(t) {
  23203. let r = t;
  23204. is.boolean(r) || (r = this.storage.get('muted')),
  23205. is.boolean(r) || (r = this.config.muted),
  23206. (this.config.muted = r),
  23207. (this.media.muted = r);
  23208. }
  23209. get muted() {
  23210. return !!this.media.muted;
  23211. }
  23212. get hasAudio() {
  23213. return (
  23214. !this.isHTML5 ||
  23215. !!this.isAudio ||
  23216. !!this.media.mozHasAudio ||
  23217. !!this.media.webkitAudioDecodedByteCount ||
  23218. !!(this.media.audioTracks && this.media.audioTracks.length)
  23219. );
  23220. }
  23221. set speed(t) {
  23222. let r = null;
  23223. is.number(t) && (r = t),
  23224. is.number(r) || (r = this.storage.get('speed')),
  23225. is.number(r) || (r = this.config.speed.selected);
  23226. const { minimumSpeed: i, maximumSpeed: s } = this;
  23227. (r = clamp(r, i, s)),
  23228. (this.config.speed.selected = r),
  23229. setTimeout(() => {
  23230. this.media && (this.media.playbackRate = r);
  23231. }, 0);
  23232. }
  23233. get speed() {
  23234. return Number(this.media.playbackRate);
  23235. }
  23236. get minimumSpeed() {
  23237. return this.isYouTube
  23238. ? Math.min(...this.options.speed)
  23239. : this.isVimeo
  23240. ? 0.5
  23241. : 0.0625;
  23242. }
  23243. get maximumSpeed() {
  23244. return this.isYouTube
  23245. ? Math.max(...this.options.speed)
  23246. : this.isVimeo
  23247. ? 2
  23248. : 16;
  23249. }
  23250. set quality(t) {
  23251. const r = this.config.quality,
  23252. i = this.options.quality;
  23253. if (!i.length) return;
  23254. let s = [
  23255. !is.empty(t) && Number(t),
  23256. this.storage.get('quality'),
  23257. r.selected,
  23258. r.default
  23259. ].find(is.number),
  23260. n = !0;
  23261. if (!i.includes(s)) {
  23262. const a = closest(i, s);
  23263. this.debug.warn(`Unsupported quality option: ${s}, using ${a} instead`),
  23264. (s = a),
  23265. (n = !1);
  23266. }
  23267. (r.selected = s),
  23268. (this.media.quality = s),
  23269. n && this.storage.set({ quality: s });
  23270. }
  23271. get quality() {
  23272. return this.media.quality;
  23273. }
  23274. set loop(t) {
  23275. const r = is.boolean(t) ? t : this.config.loop.active;
  23276. (this.config.loop.active = r), (this.media.loop = r);
  23277. }
  23278. get loop() {
  23279. return !!this.media.loop;
  23280. }
  23281. set source(t) {
  23282. source.change.call(this, t);
  23283. }
  23284. get source() {
  23285. return this.media.currentSrc;
  23286. }
  23287. get download() {
  23288. const { download: t } = this.config.urls;
  23289. return is.url(t) ? t : this.source;
  23290. }
  23291. set download(t) {
  23292. is.url(t) &&
  23293. ((this.config.urls.download = t), controls$2.setDownloadUrl.call(this));
  23294. }
  23295. set poster(t) {
  23296. this.isVideo
  23297. ? ui.setPoster.call(this, t, !1).catch(() => {})
  23298. : this.debug.warn('Poster can only be set for video');
  23299. }
  23300. get poster() {
  23301. return this.isVideo
  23302. ? this.media.getAttribute('poster') ||
  23303. this.media.getAttribute('data-poster')
  23304. : null;
  23305. }
  23306. get ratio() {
  23307. if (!this.isVideo) return null;
  23308. const t = reduceAspectRatio(getAspectRatio.call(this));
  23309. return is.array(t) ? t.join(':') : t;
  23310. }
  23311. set ratio(t) {
  23312. this.isVideo
  23313. ? is.string(t) && validateAspectRatio(t)
  23314. ? ((this.config.ratio = reduceAspectRatio(t)),
  23315. setAspectRatio.call(this))
  23316. : this.debug.error(`Invalid aspect ratio specified (${t})`)
  23317. : this.debug.warn('Aspect ratio can only be set for video');
  23318. }
  23319. set autoplay(t) {
  23320. this.config.autoplay = is.boolean(t) ? t : this.config.autoplay;
  23321. }
  23322. get autoplay() {
  23323. return !!this.config.autoplay;
  23324. }
  23325. toggleCaptions(t) {
  23326. captions.toggle.call(this, t, !1);
  23327. }
  23328. set currentTrack(t) {
  23329. captions.set.call(this, t, !1), captions.setup.call(this);
  23330. }
  23331. get currentTrack() {
  23332. const { toggled: t, currentTrack: r } = this.captions;
  23333. return t ? r : -1;
  23334. }
  23335. set language(t) {
  23336. captions.setLanguage.call(this, t, !1);
  23337. }
  23338. get language() {
  23339. return (captions.getCurrentTrack.call(this) || {}).language;
  23340. }
  23341. set pip(t) {
  23342. if (!support.pip) return;
  23343. const r = is.boolean(t) ? t : !this.pip;
  23344. is.function(this.media.webkitSetPresentationMode) &&
  23345. this.media.webkitSetPresentationMode(r ? pip.active : pip.inactive),
  23346. is.function(this.media.requestPictureInPicture) &&
  23347. (!this.pip && r
  23348. ? this.media.requestPictureInPicture()
  23349. : this.pip && !r && document.exitPictureInPicture());
  23350. }
  23351. get pip() {
  23352. return support.pip
  23353. ? is.empty(this.media.webkitPresentationMode)
  23354. ? this.media === document.pictureInPictureElement
  23355. : this.media.webkitPresentationMode === pip.active
  23356. : null;
  23357. }
  23358. setPreviewThumbnails(t) {
  23359. this.previewThumbnails &&
  23360. this.previewThumbnails.loaded &&
  23361. (this.previewThumbnails.destroy(), (this.previewThumbnails = null)),
  23362. Object.assign(this.config.previewThumbnails, t),
  23363. this.config.previewThumbnails.enabled &&
  23364. (this.previewThumbnails = new PreviewThumbnails(this));
  23365. }
  23366. static supported(t, r) {
  23367. return support.check(t, r);
  23368. }
  23369. static loadSprite(t, r) {
  23370. return loadSprite(t, r);
  23371. }
  23372. static setup(t, r = {}) {
  23373. let i = null;
  23374. return (
  23375. is.string(t)
  23376. ? (i = Array.from(document.querySelectorAll(t)))
  23377. : is.nodeList(t)
  23378. ? (i = Array.from(t))
  23379. : is.array(t) && (i = t.filter(is.element)),
  23380. is.empty(i) ? null : i.map(s => new Plyr(s, r))
  23381. );
  23382. }
  23383. }
  23384. Plyr.defaults = cloneDeep(defaults);
  23385. const videoWrap = '_videoWrap_xntkj_1',
  23386. controls$1 = '_controls_xntkj_19',
  23387. time$1 = '_time_xntkj_27',
  23388. line$1 = '_line_xntkj_36',
  23389. slider$1 = '_slider_xntkj_43',
  23390. actions$1 = '_actions_xntkj_54',
  23391. actionWrap$1 = '_actionWrap_xntkj_62',
  23392. actionBtn$1 = '_actionBtn_xntkj_65',
  23393. playIcon = '_playIcon_xntkj_80',
  23394. btnPlay = '_btnPlay_xntkj_83',
  23395. btnPause = '_btnPause_xntkj_86',
  23396. loopBtn = '_loopBtn_xntkj_93',
  23397. styles$6 = {
  23398. videoWrap,
  23399. controls: controls$1,
  23400. time: time$1,
  23401. line: line$1,
  23402. slider: slider$1,
  23403. actions: actions$1,
  23404. actionWrap: actionWrap$1,
  23405. actionBtn: actionBtn$1,
  23406. playIcon,
  23407. btnPlay,
  23408. btnPause,
  23409. loopBtn
  23410. },
  23411. iconplay = '' + new URL('icon-pause-5efb540a.svg', import.meta.url).href,
  23412. iconpause = '' + new URL('icon-play-f01e3616.svg', import.meta.url).href,
  23413. iconReplay$1 = '' + new URL('icon-replay-06435dc9.svg', import.meta.url).href,
  23414. VideoPlay = defineComponent({
  23415. name: 'video-play',
  23416. props: {
  23417. item: { type: Object, default: () => ({}) },
  23418. isEmtry: { type: Boolean, default: !1 }
  23419. },
  23420. emits: ['loadedmetadata', 'togglePlay', 'ended', 'reset'],
  23421. setup(e, { emit: t, expose: r }) {
  23422. const { item: i, isEmtry: s } = toRefs(e),
  23423. n = ref(),
  23424. a = ref(),
  23425. o = 'v' + Date.now() + Math.floor(Math.random() * 100),
  23426. l = 'play' + Date.now() + Math.floor(Math.random() * 100),
  23427. c = 'replay' + Date.now() + Math.floor(Math.random() * 100),
  23428. g = A => {
  23429. var u;
  23430. (u = a.value) == null || u.toggleControls(A);
  23431. },
  23432. S = A => {
  23433. var u;
  23434. A.stopPropagation(), (u = a.value) == null || u.togglePlay();
  23435. },
  23436. p = () => {
  23437. !document.getElementById(c) || !a.value || a.value.restart();
  23438. },
  23439. P = () => {
  23440. var A, u, f;
  23441. (A = document.getElementById(o)) == null ||
  23442. A.addEventListener('click', m => {
  23443. m.stopPropagation(), t('reset');
  23444. }),
  23445. (u = document.getElementById(l)) == null ||
  23446. u.addEventListener('click', S),
  23447. (f = document.getElementById(c)) == null ||
  23448. f.addEventListener('click', p);
  23449. },
  23450. b = A => {
  23451. const u = document.getElementById(l);
  23452. u &&
  23453. (A == 'play'
  23454. ? (u.classList.remove(styles$6.btnPause),
  23455. u.classList.add(styles$6.btnPlay))
  23456. : (u.classList.remove(styles$6.btnPlay),
  23457. u.classList.add(styles$6.btnPause)));
  23458. },
  23459. y = `
  23460. <div id="${o}" class="plyr__controls bottomFixed ${styles$6.controls}">
  23461. <div class="${styles$6.actions}">
  23462. <div class="${styles$6.actionWrap}">
  23463. <button id="${l}" class="${styles$6.actionBtn}">
  23464. <div class="van-loading van-loading--circular" aria-live="polite" aria-busy="true"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(255, 255, 255);"><svg class="van-loading__circular" viewBox="25 25 50 50"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
  23465. <img class="${styles$6.playIcon}" src="${iconplay}" />
  23466. <img class="${styles$6.playIcon}" src="${iconpause}" />
  23467. </button>
  23468. </div>
  23469. <div class="${styles$6.time}">
  23470. <div class="plyr__time plyr__time--current" aria-label="Current time">00:00</div><span class="${styles$6.line}">/</span>
  23471. <div class="plyr__time plyr__time--duration" aria-label="Duration">00:00</div>
  23472. </div>
  23473. </div>
  23474. <div class="${styles$6.slider}">
  23475. <div class="plyr__progress">
  23476. <input data-plyr="seek" type="range" min="0" max="100" step="0.01" value="0" aria-label="Seek">
  23477. <progress class="plyr__progress__buffer" min="0" max="100" value="0">% buffered</progress>
  23478. <span role="tooltip" class="plyr__tooltip">00:00</span>
  23479. </div>
  23480. </div>
  23481. <div class="${styles$6.actions}" style="padding-right: 0;">
  23482. <button id="${c}" class="${styles$6.actionBtn} ${styles$6.loopBtn}">
  23483. <img class="loop" src="${iconReplay$1}" />
  23484. </button>
  23485. </div>
  23486. </div>`;
  23487. return (
  23488. onMounted(() => {
  23489. (a.value = new Plyr(n.value, {
  23490. autoplay: !0,
  23491. controls: y,
  23492. autopause: !0,
  23493. ratio: '16:9',
  23494. hideControls: !1,
  23495. clickToPlay: !1,
  23496. fullscreen: { enabled: !1, fallback: !1, iosNative: !1 }
  23497. })),
  23498. a.value &&
  23499. (a.value.on('play', () => {
  23500. var A;
  23501. a.value && ((a.value.muted = !1), (a.value.volume = 1)),
  23502. !i.value.autoPlay &&
  23503. !i.value.isprepare &&
  23504. a.value &&
  23505. (console.log(a.value), a.value.pause()),
  23506. b(''),
  23507. t('togglePlay', (A = a.value) == null ? void 0 : A.paused);
  23508. }),
  23509. a.value.on('pause', () => {
  23510. var A;
  23511. b('play'),
  23512. t('togglePlay', (A = a.value) == null ? void 0 : A.paused);
  23513. }),
  23514. a.value.on('ended', () => {
  23515. t('ended'), b('play');
  23516. }),
  23517. a.value.once('loadedmetadata', () => {
  23518. b('play'),
  23519. i.value.autoPlay && a.value && a.value.play(),
  23520. t('loadedmetadata', a.value);
  23521. }),
  23522. nextTick(() => {
  23523. P();
  23524. }));
  23525. }),
  23526. r({ changePlayBtn: b, toggleHideControl: g }),
  23527. () =>
  23528. createVNode('div', { class: styles$6.videoWrap }, [
  23529. createVNode(
  23530. 'video',
  23531. {
  23532. style: { width: '100%', height: '100%' },
  23533. src: s.value ? '' : i.value.content,
  23534. ref: n,
  23535. playsinline: 'false'
  23536. },
  23537. null
  23538. )
  23539. ])
  23540. );
  23541. }
  23542. }),
  23543. pen = '_pen_frc2u_1',
  23544. open = '_open_frc2u_9',
  23545. whiteboard = '_whiteboard_frc2u_12',
  23546. hide = '_hide_frc2u_15',
  23547. iframe = '_iframe_frc2u_18',
  23548. dely = '_dely_frc2u_24',
  23549. rightItem = '_rightItem_frc2u_27',
  23550. img = '_img_frc2u_39',
  23551. styles$5 = { pen, open, whiteboard, hide, iframe, dely, rightItem, img },
  23552. Pen = defineComponent({
  23553. name: 'pen-page',
  23554. props: {
  23555. show: { type: Boolean, default: !1 },
  23556. type: { type: String, default: 'pen' },
  23557. close: { type: Function, default: () => ({}) }
  23558. },
  23559. setup(e) {
  23560. const { show: t, type: r } = toRefs(e),
  23561. i = ref(!0),
  23562. s =
  23563. (/(localhost|192)/.test(location.host),
  23564. 'https://test.lexiaoya.cn/whiteboard-noCollab');
  23565. return () =>
  23566. createVNode(
  23567. 'div',
  23568. {
  23569. class: [
  23570. styles$5.pen,
  23571. r.value === 'whiteboard' ? styles$5.whiteboard : '',
  23572. i.value ? styles$5.dely : '',
  23573. t.value ? styles$5.open : styles$5.hide
  23574. ]
  23575. },
  23576. [
  23577. createVNode(
  23578. 'iframe',
  23579. {
  23580. class: styles$5.iframe,
  23581. frameborder: '0',
  23582. width: '100vw',
  23583. height: '100vh',
  23584. src: s,
  23585. onLoad: () => {
  23586. i.value = !1;
  23587. }
  23588. },
  23589. null
  23590. ),
  23591. createVNode(
  23592. 'div',
  23593. { class: styles$5.rightItem, onClick: () => e.close() },
  23594. [
  23595. createVNode(
  23596. 'svg',
  23597. { width: '22px', height: '20px', viewBox: '0 0 22 20' },
  23598. [
  23599. createVNode(
  23600. 'path',
  23601. {
  23602. transform: 'translate(-1.000000, -2.000000)',
  23603. fill: '#FFFFFF',
  23604. d: 'M13,2 C13.5522847,2 14,2.44771525 14,3 C14,3.51283584 13.6139598,3.93550716 13.1166211,3.99327227 L13,4 L3,4 L3,20 L13,20 C13.5128358,20 13.9355072,20.3860402 13.9932723,20.8833789 L14,21 C14,21.5128358 13.6139598,21.9355072 13.1166211,21.9932723 L13,22 L2,22 C1.48716416,22 1.06449284,21.6139598 1.00672773,21.1166211 L1,21 L1,3 C1,2.48716416 1.38604019,2.06449284 1.88337887,2.00672773 L2,2 L13,2 Z M17.7071068,7.05025253 L21.9497475,11.2928932 L21.9497475,11.2928932 C22.3402718,11.6834175 22.3402718,12.3165825 21.9497475,12.7071068 L17.7071068,16.9497475 C17.3165825,17.3402718 16.6834175,17.3402718 16.2928932,16.9497475 C15.9023689,16.5592232 15.9023689,15.9260582 16.2928932,15.5355339 L18.828,12.999 L9.29368112,13 C8.74139637,13 8.29368112,12.5522847 8.29368112,12 C8.29368112,11.4871642 8.67972131,11.0644928 9.17706,11.0067277 L9.29368112,11 L18.827,10.999 L16.2928932,8.46446609 C15.9023689,8.0739418 15.9023689,7.44077682 16.2928932,7.05025253 C16.6834175,6.65972824 17.3165825,6.65972824 17.7071068,7.05025253 Z'
  23605. },
  23606. null
  23607. )
  23608. ]
  23609. )
  23610. ]
  23611. )
  23612. ]
  23613. );
  23614. }
  23615. }),
  23616. audioWrap = '_audioWrap_1fqhr_1',
  23617. audioContainer = '_audioContainer_1fqhr_6',
  23618. audio = '_audio_1fqhr_1',
  23619. tempVudio = '_tempVudio_1fqhr_22',
  23620. controls = '_controls_1fqhr_34',
  23621. time = '_time_1fqhr_48',
  23622. line = '_line_1fqhr_57',
  23623. actions = '_actions_1fqhr_64',
  23624. actionWrap = '_actionWrap_1fqhr_72',
  23625. actionBtn = '_actionBtn_1fqhr_75',
  23626. iconReplay = '_iconReplay_1fqhr_86',
  23627. slider = '_slider_1fqhr_95',
  23628. sectionAnimate = '_sectionAnimate_1fqhr_103',
  23629. styles$4 = {
  23630. audioWrap,
  23631. audioContainer,
  23632. audio,
  23633. tempVudio,
  23634. controls,
  23635. time,
  23636. line,
  23637. actions,
  23638. actionWrap,
  23639. actionBtn,
  23640. iconReplay,
  23641. slider,
  23642. sectionAnimate
  23643. };
  23644. var vudioExports = {},
  23645. vudio = {
  23646. get exports() {
  23647. return vudioExports;
  23648. },
  23649. set exports(e) {
  23650. vudioExports = e;
  23651. }
  23652. };
  23653. (function (e, t) {
  23654. (function (r) {
  23655. e.exports = r();
  23656. })(function () {
  23657. var r = {
  23658. effect: 'waveform',
  23659. accuracy: 128,
  23660. width: 256,
  23661. height: 100,
  23662. waveform: {
  23663. maxHeight: 80,
  23664. minHeight: 1,
  23665. spacing: 1,
  23666. color: '#f00',
  23667. shadowBlur: 0,
  23668. shadowColor: '#f00',
  23669. fadeSide: !0,
  23670. horizontalAlign: 'center',
  23671. verticalAlign: 'middle',
  23672. prettify: !0
  23673. },
  23674. lighting: {
  23675. maxHeight: 80,
  23676. lineWidth: 0,
  23677. color: '#f00',
  23678. shadowBlur: 0,
  23679. shadowColor: '#f00',
  23680. fadeSide: !0,
  23681. horizontalAlign: 'center',
  23682. verticalAlign: 'middle'
  23683. }
  23684. };
  23685. function i(n, a, o) {
  23686. if (
  23687. [
  23688. '[object HTMLAudioSource]',
  23689. '[object HTMLAudioElement]',
  23690. '[object MediaStream]'
  23691. ].indexOf(Object.prototype.toString.call(n)) === -1
  23692. )
  23693. throw new TypeError('Invaild Audio Source');
  23694. if (Object.prototype.toString.call(a) !== '[object HTMLCanvasElement]')
  23695. throw new TypeError('Invaild Canvas Element');
  23696. (this.audioSrc = n),
  23697. (this.canvasEle = a),
  23698. (this.option = s(r, o)),
  23699. (this.meta = {}),
  23700. (this.stat = 0),
  23701. (this.freqByteData = null),
  23702. this.__init();
  23703. }
  23704. function s() {
  23705. var n = {};
  23706. return (
  23707. Array.prototype.forEach.call(arguments, function (a) {
  23708. var o;
  23709. for (o in a)
  23710. Object.prototype.hasOwnProperty.call(a, o) &&
  23711. (Object.prototype.toString.call(a[o]) === '[object Object]'
  23712. ? (n[o] = s(n[o], a[o]))
  23713. : (n[o] = a[o]));
  23714. }),
  23715. n
  23716. );
  23717. }
  23718. return (
  23719. (i.prototype = {
  23720. __init: function () {
  23721. var n = new (window.AudioContext ||
  23722. window.webkitAudioContext ||
  23723. window.mozAudioContext)(),
  23724. a =
  23725. Object.prototype.toString.call(this.audioSrc) !==
  23726. '[object MediaStream]'
  23727. ? n.createMediaElementSource(this.audioSrc)
  23728. : n.createMediaStreamSource(this.audioSrc),
  23729. o = window.devicePixelRatio || 1;
  23730. (this.analyser = n.createAnalyser()),
  23731. (this.meta.spr = n.sampleRate),
  23732. a.connect(this.analyser),
  23733. (this.analyser.fftSize = this.option.accuracy * 2),
  23734. this.analyser.connect(n.destination),
  23735. (this.freqByteData = new Uint8Array(
  23736. this.analyser.frequencyBinCount
  23737. )),
  23738. (this.context2d = this.canvasEle.getContext('2d')),
  23739. (this.width = this.option.width),
  23740. (this.height = this.option.height),
  23741. (this.context2d.canvas.width = this.width * o),
  23742. (this.context2d.canvas.height = this.height * o),
  23743. this.context2d.scale(o, o);
  23744. },
  23745. __rebuildData: function (n, a) {
  23746. var o;
  23747. return (
  23748. a === 'center'
  23749. ? (o = [].concat(
  23750. Array.from(n)
  23751. .reverse()
  23752. .splice(this.option.accuracy / 2, this.option.accuracy / 2),
  23753. Array.from(n).splice(0, this.option.accuracy / 2)
  23754. ))
  23755. : a === 'left'
  23756. ? (o = n)
  23757. : a === 'right'
  23758. ? (o = Array.from(n).reverse())
  23759. : (o = [].concat(
  23760. Array.from(n)
  23761. .reverse()
  23762. .splice(this.option.accuracy / 2, this.option.accuracy / 2),
  23763. Array.from(n).splice(0, this.option.accuracy / 2)
  23764. )),
  23765. o
  23766. );
  23767. },
  23768. __animate: function () {
  23769. this.stat === 1 &&
  23770. (this.analyser.getByteFrequencyData(this.freqByteData),
  23771. typeof this.__effects()[this.option.effect] == 'function' &&
  23772. this.__effects()[this.option.effect](this.freqByteData),
  23773. requestAnimationFrame(this.__animate.bind(this)));
  23774. },
  23775. __testFrame: function () {
  23776. this.analyser.getByteFrequencyData(this.freqByteData),
  23777. typeof this.__effects()[this.option.effect] == 'function' &&
  23778. this.__effects()[this.option.effect](this.freqByteData);
  23779. },
  23780. __effects: function () {
  23781. var n = this;
  23782. return {
  23783. lighting: function (a) {
  23784. var o = n.option.lighting,
  23785. l = n.__rebuildData(a, o.horizontalAlign),
  23786. c = o.maxHeight / 2,
  23787. g = !0,
  23788. S,
  23789. p;
  23790. o.horizontalAlign,
  23791. n.context2d.clearRect(0, 0, n.width, n.height),
  23792. (n.context2d.lineWidth = o.lineWidth),
  23793. (n.context2d.strokeStyle = o.color),
  23794. n.context2d.beginPath(),
  23795. l.forEach(function (P, b) {
  23796. (S = (n.width / n.option.accuracy) * b),
  23797. (p = (P / 256) * c),
  23798. o.verticalAlign === 'middle'
  23799. ? (p = (n.height - P) / 2 - c / 2)
  23800. : o.verticalAlign === 'bottom'
  23801. ? (p = n.height - P)
  23802. : o.verticalAlign === 'top'
  23803. ? (p = P)
  23804. : (p = (n.height - P) / 2 - c / 2),
  23805. g
  23806. ? (n.context2d.moveTo(S, p), (g = !1))
  23807. : n.context2d.lineTo(S, p);
  23808. }),
  23809. n.context2d.stroke();
  23810. },
  23811. waveform: function (a) {
  23812. var o = n.option.waveform,
  23813. l = o.fadeSide,
  23814. c = o.prettify,
  23815. g = n.__rebuildData(a, o.horizontalAlign),
  23816. S,
  23817. p,
  23818. P,
  23819. b,
  23820. y,
  23821. A,
  23822. u,
  23823. f;
  23824. o.horizontalAlign !== 'center' && ((l = !1), (c = !1)),
  23825. n.context2d.clearRect(0, 0, n.width, n.height),
  23826. g.forEach(function (m, d) {
  23827. (p =
  23828. (n.width - n.option.accuracy * o.spacing) /
  23829. n.option.accuracy),
  23830. (b = d * (p + o.spacing)),
  23831. o.spacing !== 1 && (b += o.spacing / 2),
  23832. c
  23833. ? d <= n.option.accuracy / 2
  23834. ? (S =
  23835. (1 -
  23836. (n.option.accuracy / 2 - 1 - d) /
  23837. (n.option.accuracy / 2)) *
  23838. o.maxHeight)
  23839. : (S =
  23840. (1 -
  23841. (d - n.option.accuracy / 2) /
  23842. (n.option.accuracy / 2)) *
  23843. o.maxHeight)
  23844. : (S = o.maxHeight),
  23845. (P = (m / 256) * S),
  23846. (P = P < o.minHeight ? o.minHeight : P),
  23847. o.verticalAlign === 'middle'
  23848. ? (y = (n.height - P) / 2)
  23849. : o.verticalAlign === 'top'
  23850. ? (y = 0)
  23851. : o.verticalAlign === 'bottom'
  23852. ? (y = n.height - P)
  23853. : (y = (n.height - P) / 2),
  23854. (A = o.color),
  23855. A instanceof Array
  23856. ? ((u = n.context2d.createLinearGradient(b, y, b, y + P)),
  23857. A.forEach(function (E, T) {
  23858. E instanceof Array
  23859. ? ((f = E[0]), (E = E[1]))
  23860. : T === 0 || T === A.length - 1
  23861. ? (f = T / (A.length - 1))
  23862. : (f = T / A.length + 0.5 / A.length),
  23863. u.addColorStop(f, E);
  23864. }),
  23865. (n.context2d.fillStyle = u))
  23866. : (n.context2d.fillStyle = A),
  23867. o.shadowBlur > 0 &&
  23868. ((n.context2d.shadowBlur = o.shadowBlur),
  23869. (n.context2d.shadowColor = o.shadowColor)),
  23870. l
  23871. ? d <= n.option.accuracy / 2
  23872. ? (n.context2d.globalAlpha =
  23873. 1 -
  23874. (n.option.accuracy / 2 - 1 - d) /
  23875. (n.option.accuracy / 2))
  23876. : (n.context2d.globalAlpha =
  23877. 1 -
  23878. (d - n.option.accuracy / 2) /
  23879. (n.option.accuracy / 2))
  23880. : (n.context2d.globalAlpha = 1),
  23881. n.context2d.fillRect(b, y, p, P);
  23882. });
  23883. }
  23884. };
  23885. },
  23886. dance: function () {
  23887. return this.stat === 0 && ((this.stat = 1), this.__animate()), this;
  23888. },
  23889. pause: function () {
  23890. return (this.stat = 0), this;
  23891. },
  23892. setOption: function (n) {
  23893. this.option = s(this.option, n);
  23894. }
  23895. }),
  23896. i
  23897. );
  23898. });
  23899. })(vudio);
  23900. const Vudio = vudioExports,
  23901. tickMp3 = '' + new URL('tick-b5f22461.mp3', import.meta.url).href,
  23902. AudioPay = defineComponent({
  23903. name: 'audio-play',
  23904. props: {
  23905. item: { type: Object, default: () => ({}) },
  23906. isEmtry: { type: Boolean, default: !1 }
  23907. },
  23908. emits: ['loadedmetadata', 'togglePlay', 'ended', 'reset'],
  23909. setup(e, { emit: t, expose: r }) {
  23910. const i = reactive({
  23911. paused: !0,
  23912. currentTimeNum: 0,
  23913. currentTime: '00:00',
  23914. durationNum: 0,
  23915. duration: '00:00',
  23916. showBar: !0,
  23917. afterMa3: !0
  23918. }),
  23919. s = ref(),
  23920. n = ref();
  23921. let a = null;
  23922. const o = y => {
  23923. y == null || y.stopPropagation(),
  23924. n.value.paused
  23925. ? (l(n.value, s.value), n.value.play(), (i.afterMa3 = !1))
  23926. : n.value.pause(),
  23927. (i.paused = n.value.paused),
  23928. t('togglePlay', i.paused);
  23929. },
  23930. l = (y, A) => {
  23931. a ||
  23932. ((a = new Vudio(y, A, {
  23933. effect: 'waveform',
  23934. accuracy: 256,
  23935. width: 1024,
  23936. height: 600,
  23937. waveform: {
  23938. maxHeight: 200,
  23939. color: [
  23940. [0, '#44D1FF'],
  23941. [0.5, '#44D1FF'],
  23942. [0.5, '#198CFE'],
  23943. [1, '#198CFE']
  23944. ],
  23945. prettify: !1
  23946. }
  23947. })),
  23948. a.dance());
  23949. },
  23950. c = y => {
  23951. if (y > 0) {
  23952. const A = Math.floor(y / 60),
  23953. u = y % 60;
  23954. return (A < 10 ? '0' + A : A) + ':' + (u < 10 ? '0' + u : u);
  23955. } else return '00:00';
  23956. },
  23957. g = y => {
  23958. i.showBar = y;
  23959. },
  23960. S = () => {
  23961. n.value && (n.value.currentTime = 0);
  23962. };
  23963. let p = null;
  23964. const P = ref(),
  23965. b = ref();
  23966. return (
  23967. nextTick(() => {
  23968. (p = new Vudio(b.value, P.value, {
  23969. effect: 'waveform',
  23970. accuracy: 256,
  23971. width: 1024,
  23972. height: 600,
  23973. waveform: {
  23974. maxHeight: 200,
  23975. color: [
  23976. [0, '#44D1FF'],
  23977. [0.5, '#44D1FF'],
  23978. [0.5, '#198CFE'],
  23979. [1, '#198CFE']
  23980. ],
  23981. prettify: !1
  23982. }
  23983. })),
  23984. p.dance();
  23985. }),
  23986. r({ toggleHideControl: g }),
  23987. () =>
  23988. createVNode('div', { class: styles$4.audioWrap }, [
  23989. createVNode('div', { class: styles$4.audioContainer }, [
  23990. createVNode(
  23991. 'audio',
  23992. {
  23993. ref: n,
  23994. crossorigin: 'anonymous',
  23995. src: e.item.content + '?time=1',
  23996. onEnded: () => {
  23997. (i.paused = !0), t('ended');
  23998. },
  23999. onTimeupdate: () => {
  24000. var y;
  24001. (i.currentTime = c(
  24002. Math.round(
  24003. ((y = n.value) == null ? void 0 : y.currentTime) || 0
  24004. )
  24005. )),
  24006. (i.currentTimeNum = n.value.currentTime);
  24007. },
  24008. onLoadedmetadata: () => {
  24009. (i.duration = c(Math.round(n.value.duration))),
  24010. (i.durationNum = n.value.duration),
  24011. e.item.autoPlay && n.value && n.value.play(),
  24012. (n.value.stop = () => {
  24013. n.value.pause(),
  24014. (i.paused = !0),
  24015. t('togglePlay', i.paused);
  24016. }),
  24017. (n.value.onPlay = () => {
  24018. n.value.play(),
  24019. (i.paused = !1),
  24020. l(n.value, s.value),
  24021. t('togglePlay', i.paused);
  24022. }),
  24023. t('loadedmetadata', n.value);
  24024. }
  24025. },
  24026. null
  24027. ),
  24028. createVNode('canvas', { ref: s }, null),
  24029. i.afterMa3 &&
  24030. createVNode('div', { class: styles$4.tempVudio }, [
  24031. createVNode('audio', { ref: b, src: tickMp3 }, null),
  24032. createVNode('canvas', { ref: P }, null)
  24033. ])
  24034. ]),
  24035. createVNode(
  24036. 'div',
  24037. {
  24038. class: [
  24039. styles$4.controls,
  24040. i.showBar ? '' : styles$4.sectionAnimate
  24041. ],
  24042. onClick: y => {
  24043. y.stopPropagation(), t('reset');
  24044. }
  24045. },
  24046. [
  24047. createVNode('div', { class: styles$4.actions }, [
  24048. createVNode('div', { class: styles$4.actionWrap }, [
  24049. createVNode(
  24050. 'button',
  24051. { class: styles$4.actionBtn, onClick: o },
  24052. [
  24053. i.paused
  24054. ? createVNode(
  24055. 'img',
  24056. { class: styles$4.playIcon, src: iconplay },
  24057. null
  24058. )
  24059. : createVNode(
  24060. 'img',
  24061. { class: styles$4.playIcon, src: iconpause },
  24062. null
  24063. )
  24064. ]
  24065. )
  24066. ]),
  24067. createVNode('div', { class: styles$4.time }, [
  24068. createVNode(
  24069. 'div',
  24070. {
  24071. class: 'plyr__time plyr__time--current',
  24072. 'aria-label': 'Current time'
  24073. },
  24074. [i.currentTime]
  24075. ),
  24076. createVNode('span', { class: styles$4.line }, [
  24077. createTextVNode('/')
  24078. ]),
  24079. createVNode(
  24080. 'div',
  24081. {
  24082. class: 'plyr__time plyr__time--duration',
  24083. 'aria-label': 'Duration'
  24084. },
  24085. [i.duration]
  24086. )
  24087. ])
  24088. ]),
  24089. createVNode('div', { class: styles$4.slider }, [
  24090. createVNode(
  24091. NSlider,
  24092. {
  24093. value: i.currentTimeNum,
  24094. step: 0.01,
  24095. max: i.durationNum,
  24096. tooltip: !1,
  24097. 'onUpdate:value': y => {
  24098. (n.value.currentTime = y),
  24099. (i.currentTimeNum = y),
  24100. (i.currentTime = c(Math.round(y || 0)));
  24101. }
  24102. },
  24103. null
  24104. )
  24105. ]),
  24106. createVNode('div', { class: styles$4.actions }, [
  24107. createVNode('div', { class: styles$4.actionWrap }, [
  24108. createVNode(
  24109. 'button',
  24110. { class: styles$4.iconReplay, onClick: S },
  24111. [createVNode('img', { src: iconReplay$1 }, null)]
  24112. )
  24113. ])
  24114. ])
  24115. ]
  24116. )
  24117. ])
  24118. );
  24119. }
  24120. }),
  24121. trainSettings = '_trainSettings_1ohlb_1',
  24122. trainBtnGroup = '_trainBtnGroup_1ohlb_1',
  24123. searchGroup$1 = '_searchGroup_1ohlb_9',
  24124. datetime = '_datetime_1ohlb_13',
  24125. trainList = '_trainList_1ohlb_43',
  24126. trainEditModal = '_trainEditModal_1ohlb_53',
  24127. selectMusicModal = '_selectMusicModal_1ohlb_56',
  24128. styles$3 = {
  24129. trainSettings,
  24130. trainBtnGroup,
  24131. searchGroup: searchGroup$1,
  24132. datetime,
  24133. trainList,
  24134. trainEditModal,
  24135. selectMusicModal
  24136. },
  24137. trainType = '_trainType_45ce3_1',
  24138. title = '_title_45ce3_13',
  24139. btn = '_btn_45ce3_28',
  24140. preview = '_preview_45ce3_70',
  24141. previewBtn = '_previewBtn_45ce3_84',
  24142. type = '_type_45ce3_100',
  24143. operation = '_operation_45ce3_113',
  24144. evaluationType = '_evaluationType_45ce3_122',
  24145. styles$2 = {
  24146. trainType,
  24147. 'train-header': '_train-header_45ce3_8',
  24148. title,
  24149. 'title-tag': '_title-tag_45ce3_20',
  24150. 'title-text': '_title-text_45ce3_25',
  24151. btn,
  24152. 'train-content': '_train-content_45ce3_53',
  24153. preview,
  24154. previewBtn,
  24155. 'train-footer': '_train-footer_45ce3_95',
  24156. type,
  24157. operation,
  24158. evaluationType
  24159. },
  24160. pTag = '' + new URL('p-tag-c1dd923a.svg', import.meta.url).href,
  24161. eTag = '' + new URL('e-tag-41ad6d7f.svg', import.meta.url).href,
  24162. pEdit = '' + new URL('p-edit-4f706e0f.svg', import.meta.url).href,
  24163. eEdit = '' + new URL('e-edit-27c28498.svg', import.meta.url).href,
  24164. iconPause = '' + new URL('icon-pause-70c10a79.svg', import.meta.url).href,
  24165. pDelete = '' + new URL('p-delete-f451a434.svg', import.meta.url).href,
  24166. eDelete = '' + new URL('e-delete-50e50a8c.svg', import.meta.url).href;
  24167. function _isSlot$2(e) {
  24168. return (
  24169. typeof e == 'function' ||
  24170. (Object.prototype.toString.call(e) === '[object Object]' && !isVNode(e))
  24171. );
  24172. }
  24173. const TrainType = defineComponent({
  24174. name: 'train-type',
  24175. props: { item: { type: Object, default: () => ({}) } },
  24176. emits: ['click', 'delete', 'edit'],
  24177. setup(e, { emit: t }) {
  24178. useUserStore();
  24179. const r = useDialog(),
  24180. i = () => {
  24181. const n = r.warning({
  24182. title: '提示',
  24183. content: '您确定是否删除?',
  24184. positiveText: '确定',
  24185. negativeText: '取消',
  24186. onPositiveClick: () => {
  24187. (n.loading = !0), t('delete', e.item);
  24188. }
  24189. });
  24190. },
  24191. s = () => {
  24192. const n =
  24193. 'https://dev.kt.colexiu.com/instrument?platform=pc&modelType=practise';
  24194. window.open(n, '_blank');
  24195. };
  24196. return () => {
  24197. let n;
  24198. return createVNode(
  24199. 'div',
  24200. {
  24201. class: [
  24202. styles$2.trainType,
  24203. e.item.type === 'evaluation' ? styles$2.evaluationType : ''
  24204. ],
  24205. onClick: () => t('click', e.item)
  24206. },
  24207. [
  24208. createVNode('div', { class: styles$2['train-header'] }, [
  24209. createVNode('div', { class: styles$2.title }, [
  24210. createVNode(
  24211. 'img',
  24212. {
  24213. src: e.item.type === 'evaluation' ? eTag : pTag,
  24214. class: styles$2['title-tag']
  24215. },
  24216. null
  24217. ),
  24218. createVNode(
  24219. NEllipsis,
  24220. { class: styles$2['title-text'] },
  24221. { default: () => [e.item.name] }
  24222. )
  24223. ]),
  24224. createVNode(
  24225. NButton,
  24226. { class: styles$2.btn, round: !0, onClick: s },
  24227. {
  24228. default: () => [
  24229. e.item.type === 'evaluation' ? '评测模式' : '练习模式',
  24230. createVNode('img', { src: iconPause }, null)
  24231. ]
  24232. }
  24233. )
  24234. ]),
  24235. createVNode('div', { class: styles$2['train-content'] }, [
  24236. createVNode(
  24237. NImage,
  24238. { src: e.item.src, previewDisabled: !0, objectFit: 'cover' },
  24239. null
  24240. ),
  24241. createVNode('div', { class: styles$2.preview }, [
  24242. createVNode(
  24243. NButton,
  24244. {
  24245. strong: !0,
  24246. secondary: !0,
  24247. class: styles$2.previewBtn,
  24248. onClick: s
  24249. },
  24250. { default: () => [createTextVNode('预览')] }
  24251. )
  24252. ])
  24253. ]),
  24254. createVNode('div', { class: styles$2['train-footer'] }, [
  24255. createVNode(
  24256. NSpace,
  24257. { class: styles$2.type },
  24258. _isSlot$2(
  24259. (n = e.item.typeList.map(a =>
  24260. createVNode(
  24261. NTag,
  24262. null,
  24263. _isSlot$2(a) ? a : { default: () => [a] }
  24264. )
  24265. ))
  24266. )
  24267. ? n
  24268. : { default: () => [n] }
  24269. ),
  24270. createVNode(
  24271. NSpace,
  24272. { size: 6 },
  24273. {
  24274. default: () => [
  24275. createVNode(
  24276. resolveComponent('n-button'),
  24277. {
  24278. quaternary: !0,
  24279. class: styles$2.operation,
  24280. onClick: a => {
  24281. a.stopPropagation(), t('edit', e.item);
  24282. }
  24283. },
  24284. {
  24285. default: () => [
  24286. createVNode(
  24287. 'img',
  24288. {
  24289. src: e.item.type === 'evaluation' ? eEdit : pEdit
  24290. },
  24291. null
  24292. )
  24293. ]
  24294. }
  24295. ),
  24296. createVNode(
  24297. resolveComponent('n-button'),
  24298. {
  24299. quaternary: !0,
  24300. class: styles$2.operation,
  24301. onClick: a => {
  24302. a.stopPropagation(), i();
  24303. }
  24304. },
  24305. {
  24306. default: () => [
  24307. createVNode(
  24308. 'img',
  24309. {
  24310. src:
  24311. e.item.type === 'evaluation' ? eDelete : pDelete
  24312. },
  24313. null
  24314. )
  24315. ]
  24316. }
  24317. )
  24318. ]
  24319. }
  24320. )
  24321. ])
  24322. ]
  24323. );
  24324. };
  24325. }
  24326. }),
  24327. trainUpdate = '_trainUpdate_gry8i_1',
  24328. updateBtnGroup = '_updateBtnGroup_gry8i_4',
  24329. active = '_active_gry8i_16',
  24330. styles$1 = {
  24331. trainUpdate,
  24332. updateBtnGroup,
  24333. switch: '_switch_gry8i_12',
  24334. active
  24335. },
  24336. TrainUpdate = defineComponent({
  24337. name: 'train-update',
  24338. emits: ['close'],
  24339. setup(e, { emit: t }) {
  24340. const r = reactive({
  24341. type: 'practice',
  24342. minScore: null,
  24343. maxScore: null,
  24344. difficulty: '1'
  24345. });
  24346. return () =>
  24347. createVNode('div', { class: styles$1.trainUpdate }, [
  24348. createVNode(
  24349. NForm,
  24350. { labelAlign: 'left', labelPlacement: 'left' },
  24351. {
  24352. default: () => [
  24353. createVNode(
  24354. NFormItem,
  24355. { label: '训练方式', path: 'type' },
  24356. {
  24357. default: () => [
  24358. createVNode(NSpace, null, {
  24359. default: () => [
  24360. createVNode(
  24361. NButton,
  24362. {
  24363. secondary: !0,
  24364. class: [
  24365. styles$1.switch,
  24366. r.type === 'practice' ? styles$1.active : ''
  24367. ],
  24368. onClick: () => (r.type = 'practice')
  24369. },
  24370. { default: () => [createTextVNode('练习')] }
  24371. ),
  24372. createVNode(
  24373. NButton,
  24374. {
  24375. secondary: !0,
  24376. class: [
  24377. styles$1.switch,
  24378. r.type === 'evaluation' ? styles$1.active : ''
  24379. ],
  24380. onClick: () => (r.type = 'evaluation')
  24381. },
  24382. { default: () => [createTextVNode('评测')] }
  24383. )
  24384. ]
  24385. })
  24386. ]
  24387. }
  24388. ),
  24389. r.type === 'practice' &&
  24390. createVNode(Fragment, null, [
  24391. createVNode(
  24392. NFormItem,
  24393. { label: '练习小节', path: 'minScore' },
  24394. {
  24395. default: () => [
  24396. createVNode(
  24397. NInputNumber,
  24398. {
  24399. value: r.minScore,
  24400. 'onUpdate:value': [
  24401. i => (r.minScore = i),
  24402. () => {
  24403. r.maxScore = null;
  24404. }
  24405. ],
  24406. showButton: !1,
  24407. min: 0,
  24408. max: 99,
  24409. placeholder: '最小练习小节',
  24410. style: { width: '46%' }
  24411. },
  24412. null
  24413. ),
  24414. createVNode(
  24415. 'div',
  24416. {
  24417. style: {
  24418. display: 'flex',
  24419. alignItems: 'center',
  24420. lineHeight: '1',
  24421. marginTop: '-2px',
  24422. margin: '-2px 4% 0 4%'
  24423. }
  24424. },
  24425. [createTextVNode('-')]
  24426. ),
  24427. createVNode(
  24428. NInputNumber,
  24429. {
  24430. value: r.maxScore,
  24431. 'onUpdate:value': i => (r.maxScore = i),
  24432. showButton: !1,
  24433. min: r.minScore || 0,
  24434. max: 99,
  24435. placeholder: '最大练习小节',
  24436. style: { width: '46%' }
  24437. },
  24438. null
  24439. )
  24440. ]
  24441. }
  24442. ),
  24443. createVNode(
  24444. NFormItem,
  24445. { label: '练习速度' },
  24446. {
  24447. default: () => [
  24448. createVNode(
  24449. NInputNumber,
  24450. {
  24451. min: 0,
  24452. showButton: !1,
  24453. style: { width: '100%' }
  24454. },
  24455. null
  24456. )
  24457. ]
  24458. }
  24459. ),
  24460. createVNode(
  24461. NFormItem,
  24462. { label: '练习时长' },
  24463. {
  24464. default: () => [
  24465. createVNode(NInputGroup, null, {
  24466. default: () => [
  24467. createVNode(NInput, null, null),
  24468. createVNode(NInputGroupLabel, null, {
  24469. default: () => [createTextVNode('分钟')]
  24470. })
  24471. ]
  24472. })
  24473. ]
  24474. }
  24475. )
  24476. ]),
  24477. r.type === 'evaluation' &&
  24478. createVNode(Fragment, null, [
  24479. createVNode(
  24480. NFormItem,
  24481. { label: '评测难度', path: 'type' },
  24482. {
  24483. default: () => [
  24484. createVNode(NSpace, null, {
  24485. default: () => [
  24486. createVNode(
  24487. NButton,
  24488. {
  24489. secondary: !0,
  24490. class: [
  24491. styles$1.switch,
  24492. r.difficulty === '1' ? styles$1.active : ''
  24493. ],
  24494. onClick: () => (r.difficulty = '1')
  24495. },
  24496. { default: () => [createTextVNode('入门级')] }
  24497. ),
  24498. createVNode(
  24499. NButton,
  24500. {
  24501. secondary: !0,
  24502. class: [
  24503. styles$1.switch,
  24504. r.difficulty === '2' ? styles$1.active : ''
  24505. ],
  24506. onClick: () => (r.difficulty = '2')
  24507. },
  24508. { default: () => [createTextVNode('进阶级')] }
  24509. ),
  24510. createVNode(
  24511. NButton,
  24512. {
  24513. secondary: !0,
  24514. class: [
  24515. styles$1.switch,
  24516. r.difficulty === '3' ? styles$1.active : ''
  24517. ],
  24518. onClick: () => (r.difficulty = '3')
  24519. },
  24520. { default: () => [createTextVNode('大师级')] }
  24521. )
  24522. ]
  24523. })
  24524. ]
  24525. }
  24526. ),
  24527. createVNode(
  24528. NFormItem,
  24529. { label: '评测速度' },
  24530. {
  24531. default: () => [
  24532. createVNode(NInputGroup, null, {
  24533. default: () => [
  24534. createVNode(NInput, null, null),
  24535. createVNode(NInputGroupLabel, null, {
  24536. default: () => [createTextVNode('分钟')]
  24537. })
  24538. ]
  24539. })
  24540. ]
  24541. }
  24542. ),
  24543. createVNode(
  24544. NFormItem,
  24545. { label: '合格分数' },
  24546. {
  24547. default: () => [
  24548. createVNode(NInputGroup, null, {
  24549. default: () => [
  24550. createVNode(NInput, null, null),
  24551. createVNode(NInputGroupLabel, null, {
  24552. default: () => [createTextVNode('分')]
  24553. })
  24554. ]
  24555. })
  24556. ]
  24557. }
  24558. )
  24559. ]),
  24560. createVNode(
  24561. NSpace,
  24562. { class: styles$1.updateBtnGroup },
  24563. {
  24564. default: () => [
  24565. createVNode(
  24566. NButton,
  24567. {
  24568. strong: !0,
  24569. type: 'default',
  24570. round: !0,
  24571. onClick: () => t('close')
  24572. },
  24573. { default: () => [createTextVNode('取消')] }
  24574. ),
  24575. createVNode(
  24576. NButton,
  24577. {
  24578. strong: !0,
  24579. type: 'primary',
  24580. round: !0,
  24581. onClick: () => t('close')
  24582. },
  24583. { default: () => [createTextVNode('确认')] }
  24584. )
  24585. ]
  24586. }
  24587. )
  24588. ]
  24589. }
  24590. )
  24591. ]);
  24592. }
  24593. }),
  24594. selectMusic = '_selectMusic_1akyv_1',
  24595. close = '_close_1akyv_30',
  24596. listContainer = '_listContainer_1akyv_37',
  24597. list = '_list_1akyv_37',
  24598. searchGroup = '_searchGroup_1akyv_50',
  24599. inputSearch = '_inputSearch_1akyv_72',
  24600. styles = {
  24601. selectMusic,
  24602. close,
  24603. listContainer,
  24604. list,
  24605. searchGroup,
  24606. inputSearch
  24607. },
  24608. SearchGroup = defineComponent({
  24609. name: 'search-group',
  24610. setup() {
  24611. return (
  24612. ref(!1),
  24613. reactive({ search: '' }),
  24614. () =>
  24615. createVNode('div', { class: styles.searchGroup }, [
  24616. createVNode(
  24617. NForm,
  24618. { labelAlign: 'left', labelPlacement: 'left' },
  24619. {
  24620. default: () => [
  24621. createVNode(
  24622. NFormItem,
  24623. { label: '教材:' },
  24624. {
  24625. default: () => [
  24626. createVNode(NSpace, null, {
  24627. default: () => [
  24628. createVNode(
  24629. NButton,
  24630. {
  24631. secondary: !0,
  24632. strong: !0,
  24633. type: 'primary',
  24634. focusable: !1
  24635. },
  24636. { default: () => [createTextVNode('全部')] }
  24637. ),
  24638. createVNode(
  24639. NButton,
  24640. { quaternary: !0, focusable: !1 },
  24641. { default: () => [createTextVNode('人教版')] }
  24642. ),
  24643. createVNode(
  24644. NButton,
  24645. { quaternary: !0, focusable: !1 },
  24646. { default: () => [createTextVNode('声部训练')] }
  24647. ),
  24648. createVNode(
  24649. NButton,
  24650. { quaternary: !0, focusable: !1 },
  24651. { default: () => [createTextVNode('小曲目')] }
  24652. ),
  24653. createVNode(
  24654. NButton,
  24655. { quaternary: !0, focusable: !1 },
  24656. { default: () => [createTextVNode('考级曲目')] }
  24657. )
  24658. ]
  24659. })
  24660. ]
  24661. }
  24662. ),
  24663. createVNode(
  24664. NFormItem,
  24665. { label: '乐器:' },
  24666. {
  24667. default: () => [
  24668. createVNode(NSpace, null, {
  24669. default: () => [
  24670. createVNode(
  24671. NButton,
  24672. { secondary: !0, strong: !0, type: 'primary' },
  24673. { default: () => [createTextVNode('全部')] }
  24674. ),
  24675. createVNode(
  24676. NButton,
  24677. {
  24678. quaternary: !0,
  24679. focusable: !1,
  24680. type: 'default'
  24681. },
  24682. { default: () => [createTextVNode('竖笛')] }
  24683. ),
  24684. createVNode(
  24685. NButton,
  24686. {
  24687. quaternary: !0,
  24688. focusable: !1,
  24689. type: 'default'
  24690. },
  24691. { default: () => [createTextVNode('排萧')] }
  24692. ),
  24693. createVNode(
  24694. NButton,
  24695. {
  24696. quaternary: !0,
  24697. focusable: !1,
  24698. type: 'default'
  24699. },
  24700. { default: () => [createTextVNode('口风琴')] }
  24701. ),
  24702. createVNode(
  24703. NButton,
  24704. {
  24705. quaternary: !0,
  24706. focusable: !1,
  24707. type: 'default'
  24708. },
  24709. { default: () => [createTextVNode('陶笛')] }
  24710. ),
  24711. createVNode(
  24712. NButton,
  24713. {
  24714. quaternary: !0,
  24715. focusable: !1,
  24716. type: 'default'
  24717. },
  24718. { default: () => [createTextVNode('葫芦丝')] }
  24719. )
  24720. ]
  24721. })
  24722. ]
  24723. }
  24724. )
  24725. ]
  24726. }
  24727. ),
  24728. createVNode(
  24729. TheSearch,
  24730. { class: styles.inputSearch, round: !0 },
  24731. null
  24732. )
  24733. ])
  24734. );
  24735. }
  24736. }),
  24737. SelectMusic = defineComponent({
  24738. name: 'select-music',
  24739. emits: ['select'],
  24740. setup(e, { emit: t }) {
  24741. const r = reactive({ list: [], height: '100%' });
  24742. return (
  24743. (() => {
  24744. const s = listData.rows || [];
  24745. console.log(s);
  24746. const n = [];
  24747. s.forEach((a, o) => {
  24748. o <= 10 &&
  24749. n.push({
  24750. id: a.id,
  24751. type: 'MUSIC',
  24752. title: a.musicSheetName,
  24753. url: a.fixedTone ? a.fixedTone.split(',')[0] : '',
  24754. isCollect: !(o % 3),
  24755. isSelected: !(o % 4)
  24756. });
  24757. }),
  24758. (r.list = n || []);
  24759. })(),
  24760. () =>
  24761. createVNode('div', { class: styles.selectMusic }, [
  24762. createVNode(
  24763. NTabs,
  24764. {
  24765. animated: !0,
  24766. defaultValue: 'shareResources',
  24767. paneClass: styles.paneTitle,
  24768. justifyContent: 'center',
  24769. paneWrapperClass: styles.paneWrapperContainer
  24770. },
  24771. {
  24772. default: () => [
  24773. createVNode(
  24774. NTabPane,
  24775. { name: 'shareResources', tab: '选择曲目' },
  24776. {
  24777. default: () => [
  24778. createVNode(SearchGroup, null, null),
  24779. createVNode(
  24780. NScrollbar,
  24781. { class: styles.listContainer },
  24782. {
  24783. default: () => [
  24784. createVNode('div', { class: styles.list }, [
  24785. r.list.map(s =>
  24786. createVNode(
  24787. CardType,
  24788. {
  24789. isShowAdd: !0,
  24790. item: s,
  24791. onAdd: n => t('select', n)
  24792. },
  24793. null
  24794. )
  24795. )
  24796. ])
  24797. ]
  24798. }
  24799. )
  24800. ]
  24801. }
  24802. )
  24803. ]
  24804. }
  24805. )
  24806. ])
  24807. );
  24808. }
  24809. });
  24810. function _isSlot$1(e) {
  24811. return (
  24812. typeof e == 'function' ||
  24813. (Object.prototype.toString.call(e) === '[object Object]' && !isVNode(e))
  24814. );
  24815. }
  24816. const TrainSettings = defineComponent({
  24817. name: 'train-settings',
  24818. emits: ['close'],
  24819. setup(e, { emit: t }) {
  24820. const r = reactive({ editStatus: !1, selectMusicStatus: !1 }),
  24821. i = [
  24822. {
  24823. id: 22078,
  24824. src: 'https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-fixed/1675770786664-1.png',
  24825. type: 'practice',
  24826. name: '彩虹岛',
  24827. typeList: ['1-12小节', '速度90', '20分钟']
  24828. },
  24829. {
  24830. id: 22048,
  24831. src: 'https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-fixed/1675839970286-1.png',
  24832. type: 'evaluation',
  24833. name: '彩云追月',
  24834. typeList: ['入门级', '全部小节', '速度90', '20分钟']
  24835. }
  24836. ];
  24837. return () => {
  24838. let s;
  24839. return createVNode('div', { class: styles$3.trainSettings }, [
  24840. createVNode('div', { class: styles$3.searchGroup }, [
  24841. createVNode(
  24842. NButton,
  24843. { onClick: () => (r.selectMusicStatus = !0) },
  24844. { default: () => [createTextVNode('添加训练')] }
  24845. ),
  24846. createVNode('div', { class: styles$3.datetime }, [
  24847. createVNode('label', null, [createTextVNode('截止时间:')]),
  24848. createVNode(
  24849. NDatePicker,
  24850. {
  24851. style: { width: '200px' },
  24852. 'value-format': 'yyyy-MM-dd',
  24853. type: 'date',
  24854. clearable: !0,
  24855. placeholder: '请选择截止日期'
  24856. },
  24857. null
  24858. )
  24859. ])
  24860. ]),
  24861. createVNode(
  24862. NScrollbar,
  24863. { class: styles$3.trainList },
  24864. _isSlot$1(
  24865. (s = i.map(n =>
  24866. createVNode(
  24867. TrainType,
  24868. {
  24869. item: n,
  24870. onEdit: () => {
  24871. console.log('edit'), (r.editStatus = !0);
  24872. }
  24873. },
  24874. null
  24875. )
  24876. ))
  24877. )
  24878. ? s
  24879. : { default: () => [s] }
  24880. ),
  24881. createVNode(
  24882. NSpace,
  24883. { class: styles$3.trainBtnGroup },
  24884. {
  24885. default: () => [
  24886. createVNode(
  24887. NButton,
  24888. {
  24889. strong: !0,
  24890. type: 'default',
  24891. round: !0,
  24892. onClick: () => t('close')
  24893. },
  24894. { default: () => [createTextVNode('取消布置')] }
  24895. ),
  24896. createVNode(
  24897. NButton,
  24898. { strong: !0, type: 'primary', round: !0 },
  24899. { default: () => [createTextVNode('立即布置')] }
  24900. )
  24901. ]
  24902. }
  24903. ),
  24904. createVNode(
  24905. NModal,
  24906. {
  24907. show: r.editStatus,
  24908. 'onUpdate:show': n => (r.editStatus = n),
  24909. class: ['modalTitle background', styles$3.trainEditModal],
  24910. preset: 'card',
  24911. title: '训练设置'
  24912. },
  24913. {
  24914. default: () => [
  24915. createVNode(
  24916. TrainUpdate,
  24917. { onClose: () => (r.editStatus = !1) },
  24918. null
  24919. )
  24920. ]
  24921. }
  24922. ),
  24923. createVNode(
  24924. NModal,
  24925. {
  24926. show: r.selectMusicStatus,
  24927. 'onUpdate:show': n => (r.selectMusicStatus = n),
  24928. class: ['modalTitle', styles$3.selectMusicModal],
  24929. preset: 'card',
  24930. title: '选择曲目'
  24931. },
  24932. {
  24933. default: () => [
  24934. createVNode(
  24935. SelectMusic,
  24936. {
  24937. onSelect: () => {
  24938. (r.selectMusicStatus = !1), (r.editStatus = !0);
  24939. }
  24940. },
  24941. null
  24942. )
  24943. ]
  24944. }
  24945. )
  24946. ]);
  24947. };
  24948. }
  24949. });
  24950. function _isSlot(e) {
  24951. return (
  24952. typeof e == 'function' ||
  24953. (Object.prototype.toString.call(e) === '[object Object]' && !isVNode(e))
  24954. );
  24955. }
  24956. const index = defineComponent({
  24957. name: 'CoursewarePlay',
  24958. setup() {
  24959. const e = useMessage(),
  24960. t = reactive({ width: '100vw' }),
  24961. r = () => {
  24962. const I = Math.min(screen.width, screen.height),
  24963. V = Math.max(screen.width, screen.height),
  24964. D = I * (16 / 9);
  24965. if (D > V) {
  24966. t.width = '100vw';
  24967. return;
  24968. } else t.width = D + 'px';
  24969. },
  24970. i = (I = 0) => {
  24971. r();
  24972. };
  24973. i(),
  24974. onUnmounted(() => {
  24975. i(1);
  24976. });
  24977. const s = reactive({
  24978. detail: null,
  24979. knowledgePointList: [],
  24980. itemList: [],
  24981. showHead: !0,
  24982. isCourse: !1,
  24983. isRecordPlay: !1,
  24984. videoRefs: {},
  24985. audioRefs: {},
  24986. modelAttendStatus: !1,
  24987. modelTrainStatus: !1
  24988. }),
  24989. n = reactive({
  24990. isAutoPlay: !0,
  24991. nowTime: 0,
  24992. model: !0,
  24993. isAnimation: !0,
  24994. videoBtns: !0,
  24995. currentTime: 0,
  24996. duration: 0,
  24997. timer: null,
  24998. item: null
  24999. }),
  25000. a = async () => {
  25001. (s.knowledgePointList = [
  25002. {
  25003. id: '1',
  25004. name: '其多列',
  25005. title: '其多列',
  25006. type: 'VIDEO',
  25007. content:
  25008. 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687844560120.mp4',
  25009. url: 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687844640957.png'
  25010. },
  25011. {
  25012. id: '5',
  25013. name: '歌曲表演 大鹿',
  25014. title: '歌曲表演 大鹿',
  25015. type: 'SONG',
  25016. content:
  25017. 'https://cloud-coach.ks3-cn-beijing.ksyuncs.com/1686819360752.mp3',
  25018. url: 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687916228530.png'
  25019. },
  25020. {
  25021. id: '2',
  25022. name: '其多列',
  25023. title: '其多列',
  25024. type: 'IMG',
  25025. content:
  25026. 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1688007481564.jpg',
  25027. url: 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1688007481564.jpg'
  25028. },
  25029. {
  25030. id: '4',
  25031. name: '歌曲 其多列',
  25032. title: '其多列',
  25033. type: 'MUSIC',
  25034. content: '43541',
  25035. url: 'https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-first/1687847690372-1.png'
  25036. }
  25037. ]),
  25038. (s.itemList = s.knowledgePointList.map(I => ({
  25039. ...I,
  25040. iframeRef: null,
  25041. videoEle: null,
  25042. audioEle: null,
  25043. autoPlay: !1,
  25044. isprepare: !1,
  25045. isRender: !1
  25046. })));
  25047. },
  25048. o = I => {
  25049. var V;
  25050. ((V = I.data) == null ? void 0 : V.api) === 'headerTogge' &&
  25051. (n.model = I.data.show || I.data.playState != 'play');
  25052. };
  25053. onMounted(() => {
  25054. a();
  25055. });
  25056. const l = reactive({ open: !1, activeIndex: 0, toolOpen: !1 }),
  25057. c = () => {
  25058. var I, V;
  25059. for (let D = 0; D < s.itemList.length; D++) {
  25060. const N = s.itemList[D];
  25061. N.type === 'VIDEO' && N.videoEle && N.videoEle.stop(),
  25062. N.type === 'SONG' && N.audioEle && N.audioEle.stop(),
  25063. N.type === 'MUSIC' &&
  25064. ((V = (I = N.iframeRef) == null ? void 0 : I.contentWindow) ==
  25065. null ||
  25066. V.postMessage({ api: 'setPlayState' }, '*'));
  25067. }
  25068. },
  25069. g = I => {
  25070. const V = s.itemList.findIndex(D => D.id == I);
  25071. V > -1 && f(V);
  25072. },
  25073. S = () => {
  25074. clearTimeout(n.timer),
  25075. e.destroyAll(),
  25076. (n.timer = setTimeout(() => {
  25077. (n.model = !1),
  25078. Object.values(s.videoRefs).map(I => I.toggleHideControl(!1)),
  25079. Object.values(s.audioRefs).map(I => I.toggleHideControl(!1));
  25080. }, 4e3));
  25081. },
  25082. p = () => {
  25083. clearTimeout(n.timer),
  25084. e.destroyAll(),
  25085. (n.model = !1),
  25086. Object.values(s.videoRefs).map(I => I.toggleHideControl(!1)),
  25087. Object.values(s.audioRefs).map(I => I.toggleHideControl(!1));
  25088. },
  25089. P = (I = !0) => {
  25090. (n.model = I),
  25091. Object.values(s.videoRefs).map(V => V.toggleHideControl(I)),
  25092. Object.values(s.audioRefs).map(V => V.toggleHideControl(I));
  25093. },
  25094. b = I => {
  25095. if (I && I.type === 'VIDEO') {
  25096. const V = I.videoEle;
  25097. V &&
  25098. (V.paused
  25099. ? (e.destroyAll(), V.play())
  25100. : (e.warning('已暂停'), V.pause()));
  25101. }
  25102. };
  25103. ref(-4);
  25104. const y = ref(3),
  25105. A = [
  25106. {
  25107. prev: { transform: 'translate3d(0, 0, -800px) rotateX(180deg)' },
  25108. next: { transform: 'translate3d(0, 0, -800px) rotateX(-180deg)' }
  25109. },
  25110. {
  25111. prev: { transform: 'translate3d(-100%, 0, -800px)' },
  25112. next: { transform: 'translate3d(100%, 0, -800px)' }
  25113. },
  25114. {
  25115. prev: { transform: 'translate3d(-50%, 0, -800px) rotateY(80deg)' },
  25116. next: { transform: 'translate3d(50%, 0, -800px) rotateY(-80deg)' }
  25117. },
  25118. {
  25119. prev: { transform: 'translate3d(-100%, 0, -800px) rotateY(-120deg)' },
  25120. next: { transform: 'translate3d(100%, 0, -800px) rotateY(120deg)' }
  25121. },
  25122. {
  25123. prev: {
  25124. transform: 'translate3d(-50%, 50%, -800px) rotateZ(-14deg)',
  25125. opacity: 0
  25126. },
  25127. next: {
  25128. transform: 'translate3d(50%, 50%, -800px) rotateZ(14deg)',
  25129. opacity: 0
  25130. }
  25131. },
  25132. {
  25133. prev: {
  25134. transform: 'translateZ(-800px) rotate3d(0, -1, 0, 90deg)',
  25135. opacity: 0
  25136. },
  25137. next: {
  25138. transform: 'translateZ(-800px) rotate3d(0, 1, 0, 90deg)',
  25139. opacity: 0
  25140. },
  25141. current: { transitionDelay: '700ms' }
  25142. }
  25143. ],
  25144. u = ref(),
  25145. f = I => {
  25146. l.activeIndex != I &&
  25147. (c(),
  25148. clearTimeout(u.value),
  25149. m(l.activeIndex, I),
  25150. (l.activeIndex = I),
  25151. (u.value = setTimeout(
  25152. () => {
  25153. const V = s.itemList[I];
  25154. V &&
  25155. (V.type == 'MUSIC' && (n.model = !0),
  25156. V.type === 'SONG' && (clearTimeout(n.timer), e.destroyAll()),
  25157. V.type === 'VIDEO' && (clearTimeout(n.timer), e.destroyAll()));
  25158. },
  25159. n.isAnimation ? 800 : 0
  25160. )));
  25161. },
  25162. m = (I, V) => {
  25163. const D = s.itemList[I],
  25164. N = s.itemList[V];
  25165. if (N) {
  25166. if (N.knowledgePointId != D.knowledgePointId) {
  25167. n.isAnimation = !0;
  25168. return;
  25169. }
  25170. const $ = D.videoEle,
  25171. O = N.videoEle;
  25172. ($ && $.duration < 8 && I < V) || (O && O.duration < 8 && I > V)
  25173. ? (n.isAnimation = !1)
  25174. : (n.isAnimation = !0);
  25175. } else
  25176. n.isAnimation = !((D == null ? void 0 : D.adviseStudyTimeSecond) < 8);
  25177. },
  25178. d = I => {
  25179. f(I === 'up' ? l.activeIndex - 1 : l.activeIndex + 1);
  25180. },
  25181. E = () => {
  25182. var V, D;
  25183. const I = s.itemList[l.activeIndex];
  25184. (I == null ? void 0 : I.type) == 'VIDEO' &&
  25185. !((V = I.videoEle) != null && V.paused) &&
  25186. S(),
  25187. (I == null ? void 0 : I.type) == 'SONG' &&
  25188. !((D = I.audioEle) != null && D.paused) &&
  25189. S();
  25190. };
  25191. document.body.addEventListener('keyup', I => {
  25192. if (I.code === 'ArrowUp') {
  25193. if (l.activeIndex === 0) return;
  25194. d('up');
  25195. } else if (I.code === 'ArrowDown') {
  25196. if (l.activeIndex === s.itemList.length - 1) return;
  25197. d('down');
  25198. }
  25199. });
  25200. const T = reactive({ type: '', penShow: !1 }),
  25201. x = I => {
  25202. var D, N;
  25203. const V = s.itemList[l.activeIndex];
  25204. switch (
  25205. (V.type === 'VIDEO' && V.videoEle && V.videoEle.pause(),
  25206. V.type === 'SONG' && V.audioEle && V.audioEle.stop(),
  25207. V.type === 'MUSIC' &&
  25208. ((N = (D = V.iframeRef) == null ? void 0 : D.contentWindow) ==
  25209. null ||
  25210. N.postMessage({ api: 'setPlayState' }, '*')),
  25211. p(),
  25212. (l.toolOpen = !1),
  25213. (T.type = I.type),
  25214. I.type)
  25215. ) {
  25216. case 'pen':
  25217. T.penShow = !0;
  25218. break;
  25219. case 'whiteboard':
  25220. T.penShow = !0;
  25221. }
  25222. },
  25223. _ = () => {
  25224. (T.type = 'init'), P();
  25225. };
  25226. return (
  25227. onMounted(() => {
  25228. window.addEventListener('message', o);
  25229. }),
  25230. () => {
  25231. let I;
  25232. return createVNode(
  25233. 'div',
  25234. { id: 'playContent', class: styles$8.playContent },
  25235. [
  25236. createVNode(
  25237. 'div',
  25238. {
  25239. onClick: () => {
  25240. clearTimeout(n.timer),
  25241. (n.model = !n.model),
  25242. Object.values(s.videoRefs).map(V =>
  25243. V.toggleHideControl(n.model)
  25244. ),
  25245. Object.values(s.audioRefs).map(V =>
  25246. V.toggleHideControl(n.model)
  25247. );
  25248. }
  25249. },
  25250. [
  25251. createVNode(
  25252. 'div',
  25253. {
  25254. class: styles$8.coursewarePlay,
  25255. style: { width: t.width },
  25256. onClick: V => {
  25257. V.stopPropagation(), S();
  25258. }
  25259. },
  25260. [
  25261. createVNode('div', { class: styles$8.wraps }, [
  25262. s.itemList.map((V, D) => {
  25263. const N = V.isRender || Math.abs(l.activeIndex - D) < 2,
  25264. $ = Math.abs(l.activeIndex - D) > 4;
  25265. return (
  25266. N && (V.isRender = !0),
  25267. N
  25268. ? createVNode(
  25269. 'div',
  25270. {
  25271. key: 'index' + D,
  25272. class: [
  25273. styles$8.itemDiv,
  25274. l.activeIndex === D && styles$8.itemActive,
  25275. n.isAnimation && styles$8.acitveAnimation,
  25276. Math.abs(l.activeIndex - D) < 2
  25277. ? styles$8.show
  25278. : styles$8.hide
  25279. ],
  25280. style:
  25281. D < l.activeIndex
  25282. ? A[y.value].prev
  25283. : D > l.activeIndex
  25284. ? A[y.value].next
  25285. : {},
  25286. onClick: O => {
  25287. if (
  25288. (O.stopPropagation(),
  25289. clearTimeout(n.timer),
  25290. Date.now() - n.nowTime < 300)
  25291. ) {
  25292. b(V);
  25293. return;
  25294. }
  25295. (n.nowTime = Date.now()),
  25296. (n.timer = setTimeout(() => {
  25297. (n.model = !n.model),
  25298. Object.values(s.videoRefs).map(B =>
  25299. B.toggleHideControl(n.model)
  25300. ),
  25301. Object.values(s.audioRefs).map(B =>
  25302. B.toggleHideControl(n.model)
  25303. ),
  25304. n.model && S();
  25305. }, 300));
  25306. }
  25307. },
  25308. [
  25309. V.type === 'VIDEO'
  25310. ? createVNode(Fragment, null, [
  25311. createVNode(
  25312. VideoPlay,
  25313. {
  25314. ref: O => (s.videoRefs[D] = O),
  25315. item: V,
  25316. isEmtry: $,
  25317. onLoadedmetadata: O => {
  25318. (V.videoEle = O),
  25319. (V.isprepare = !0);
  25320. },
  25321. onTogglePlay: O => {
  25322. (V.autoPlay = !1),
  25323. O || l.open
  25324. ? clearTimeout(n.timer)
  25325. : S();
  25326. },
  25327. onEnded: () => {
  25328. const O = l.activeIndex + 1;
  25329. O < s.itemList.length && f(O);
  25330. },
  25331. onReset: () => {
  25332. var O;
  25333. ((O = V.videoEle) != null &&
  25334. O.paused) ||
  25335. S();
  25336. }
  25337. },
  25338. null
  25339. ),
  25340. createVNode(
  25341. Transition,
  25342. { name: 'van-fade' },
  25343. {
  25344. default: () => [
  25345. !V.isprepare &&
  25346. createVNode(
  25347. 'div',
  25348. { class: styles$8.loadWrap },
  25349. [
  25350. createVNode(
  25351. Vue3Lottie,
  25352. {
  25353. animationData:
  25354. playLoadData
  25355. },
  25356. null
  25357. )
  25358. ]
  25359. )
  25360. ]
  25361. }
  25362. )
  25363. ])
  25364. : V.type === 'IMG'
  25365. ? createVNode(
  25366. 'img',
  25367. { src: V.content },
  25368. null
  25369. )
  25370. : V.type === 'SONG'
  25371. ? createVNode(
  25372. AudioPay,
  25373. {
  25374. item: V,
  25375. ref: O => (s.audioRefs[D] = O),
  25376. onLoadedmetadata: O => {
  25377. (V.audioEle = O),
  25378. (V.isprepare = !0);
  25379. },
  25380. onTogglePlay: O => {
  25381. (V.autoPlay = !1),
  25382. O || l.open
  25383. ? clearTimeout(n.timer)
  25384. : S();
  25385. },
  25386. onEnded: () => {
  25387. const O = l.activeIndex + 1;
  25388. O < s.itemList.length && f(O);
  25389. },
  25390. onReset: () => {
  25391. var O;
  25392. ((O = V.audioEle) != null &&
  25393. O.paused) ||
  25394. S();
  25395. }
  25396. },
  25397. null
  25398. )
  25399. : createVNode(
  25400. MusicScore,
  25401. {
  25402. activeModel: n.model,
  25403. 'data-vid': V.id,
  25404. music: V,
  25405. onSetIframe: O => {
  25406. V.iframeRef = O;
  25407. }
  25408. },
  25409. null
  25410. )
  25411. ]
  25412. )
  25413. : null
  25414. );
  25415. })
  25416. ]),
  25417. createVNode(
  25418. Transition,
  25419. { name: 'right' },
  25420. {
  25421. default: () => [
  25422. n.model &&
  25423. createVNode(
  25424. 'div',
  25425. {
  25426. class: styles$8.rightFixedBtns,
  25427. onClick: V => {
  25428. V.stopPropagation(), clearTimeout(n.timer);
  25429. }
  25430. },
  25431. [
  25432. createVNode(
  25433. 'div',
  25434. {
  25435. class: [
  25436. styles$8.fullBtn,
  25437. l.activeIndex === 0
  25438. ? styles$8.btnsDisabled
  25439. : ''
  25440. ],
  25441. onClick: () => {
  25442. l.activeIndex !== 0 && d('up');
  25443. }
  25444. },
  25445. [createVNode('img', { src: iconUp }, null)]
  25446. ),
  25447. createVNode(
  25448. 'div',
  25449. {
  25450. class: [styles$8.fullBtn, styles$8.point],
  25451. onClick: () => (l.open = !0)
  25452. },
  25453. [createVNode('img', { src: iconMenu }, null)]
  25454. ),
  25455. createVNode(
  25456. 'div',
  25457. {
  25458. class: [
  25459. styles$8.fullBtn,
  25460. l.activeIndex === s.itemList.length - 1
  25461. ? styles$8.btnsDisabled
  25462. : ''
  25463. ],
  25464. onClick: () => {
  25465. l.activeIndex !== s.itemList.length - 1 &&
  25466. d('down');
  25467. }
  25468. },
  25469. [createVNode('img', { src: iconDown }, null)]
  25470. )
  25471. ]
  25472. )
  25473. ]
  25474. }
  25475. )
  25476. ]
  25477. )
  25478. ]
  25479. ),
  25480. createVNode(
  25481. 'div',
  25482. {
  25483. class: [
  25484. styles$8.assignHomework,
  25485. n.model ? '' : styles$8.sectionAnimateUp
  25486. ],
  25487. onClick: () => (s.modelAttendStatus = !0)
  25488. },
  25489. [createVNode('img', { src: iconAssignHomework }, null)]
  25490. ),
  25491. createVNode(
  25492. 'div',
  25493. {
  25494. class: [
  25495. styles$8.switchDisplaySection,
  25496. n.model ? '' : styles$8.sectionAnimate
  25497. ]
  25498. },
  25499. [
  25500. createVNode(
  25501. NTooltip,
  25502. { trigger: 'hover' },
  25503. {
  25504. trigger: () =>
  25505. createVNode(
  25506. 'div',
  25507. {
  25508. class: styles$8.displayBtn,
  25509. onClick: () =>
  25510. x({ type: 'pen', icon: iconNote, name: '批注' })
  25511. },
  25512. [createVNode('img', { src: iconNote }, null)]
  25513. ),
  25514. default: () => '批注'
  25515. }
  25516. ),
  25517. createVNode(
  25518. NTooltip,
  25519. { trigger: 'hover' },
  25520. {
  25521. trigger: () =>
  25522. createVNode(
  25523. 'div',
  25524. {
  25525. class: styles$8.displayBtn,
  25526. onClick: () =>
  25527. x({
  25528. type: 'whiteboard',
  25529. icon: iconWhiteboard,
  25530. name: '白板'
  25531. })
  25532. },
  25533. [createVNode('img', { src: iconWhiteboard }, null)]
  25534. ),
  25535. default: () => '白板'
  25536. }
  25537. )
  25538. ]
  25539. ),
  25540. createVNode(
  25541. NDrawer,
  25542. {
  25543. show: l.open,
  25544. 'onUpdate:show': V => (l.open = V),
  25545. class: styles$8.drawerContainer,
  25546. onAfterLeave: E,
  25547. showMask: !1
  25548. },
  25549. {
  25550. default: () => [
  25551. createVNode(
  25552. NDrawerContent,
  25553. { title: '资源列表', closable: !0 },
  25554. _isSlot(
  25555. (I = s.knowledgePointList.map((V, D) =>
  25556. createVNode(
  25557. CardType,
  25558. {
  25559. item: V,
  25560. isActive: l.activeIndex === D,
  25561. isCollect: !1,
  25562. onClick: N => {
  25563. (l.open = !1), g(N.id);
  25564. }
  25565. },
  25566. null
  25567. )
  25568. ))
  25569. )
  25570. ? I
  25571. : { default: () => [I] }
  25572. )
  25573. ]
  25574. }
  25575. ),
  25576. T.penShow &&
  25577. createVNode(
  25578. Pen,
  25579. {
  25580. show: T.type === 'pen' || T.type === 'whiteboard',
  25581. type: T.type,
  25582. close: () => _()
  25583. },
  25584. null
  25585. ),
  25586. createVNode(
  25587. NModal,
  25588. {
  25589. show: s.modelAttendStatus,
  25590. 'onUpdate:show': V => (s.modelAttendStatus = V),
  25591. preset: 'card',
  25592. class: styles$8.attendClassModal,
  25593. title: '课后训练'
  25594. },
  25595. {
  25596. default: () => [
  25597. createVNode('div', { class: styles$8.modelAttendContent }, [
  25598. createTextVNode('本节课已设置课后训练,是否布置?')
  25599. ]),
  25600. createVNode(
  25601. NSpace,
  25602. { class: styles$8.modelAttendBtnGroup },
  25603. {
  25604. default: () => [
  25605. createVNode(
  25606. NButton,
  25607. {
  25608. type: 'default',
  25609. round: !0,
  25610. onClick: () => {
  25611. (s.modelAttendStatus = !1), window.close();
  25612. }
  25613. },
  25614. { default: () => [createTextVNode('暂不布置')] }
  25615. ),
  25616. createVNode(
  25617. NButton,
  25618. {
  25619. type: 'primary',
  25620. round: !0,
  25621. onClick: () => {
  25622. (s.modelTrainStatus = !0),
  25623. (s.modelAttendStatus = !1);
  25624. }
  25625. },
  25626. { default: () => [createTextVNode('布置')] }
  25627. )
  25628. ]
  25629. }
  25630. )
  25631. ]
  25632. }
  25633. ),
  25634. createVNode(
  25635. NModal,
  25636. {
  25637. show: s.modelTrainStatus,
  25638. 'onUpdate:show': V => (s.modelTrainStatus = V),
  25639. preset: 'card',
  25640. class: [styles$8.attendClassModal, styles$8.trainClassModal],
  25641. title: '训练设置'
  25642. },
  25643. {
  25644. default: () => [
  25645. createVNode(
  25646. TrainSettings,
  25647. { onClose: () => (s.modelTrainStatus = !1) },
  25648. null
  25649. )
  25650. ]
  25651. }
  25652. )
  25653. ]
  25654. );
  25655. }
  25656. );
  25657. }
  25658. });
  25659. export { index as default };