google-protobuf.js 282 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242
  1. /*
  2. Copyright The Closure Library Authors.
  3. SPDX-License-Identifier: Apache-2.0
  4. */
  5. var $jscomp = $jscomp || {};
  6. $jscomp.scope = {};
  7. $jscomp.findInternal = function(a, b, c) {
  8. a instanceof String && (a = String(a));
  9. for (var d = a.length, e = 0; e < d; e++) {
  10. var f = a[e];
  11. if (b.call(c, f, e, a)) return {
  12. i: e,
  13. v: f
  14. }
  15. }
  16. return {
  17. i: -1,
  18. v: void 0
  19. }
  20. };
  21. $jscomp.ASSUME_ES5 = !1;
  22. $jscomp.ASSUME_NO_NATIVE_MAP = !1;
  23. $jscomp.ASSUME_NO_NATIVE_SET = !1;
  24. $jscomp.SIMPLE_FROUND_POLYFILL = !1;
  25. $jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty :
  26. function(a, b, c) {
  27. a != Array.prototype && a != Object.prototype && (a[b] = c.value)
  28. };
  29. $jscomp.getGlobal = function(a) {
  30. return "undefined" != typeof window && window === a ? a : "undefined" != typeof global && null != global ?
  31. global : a
  32. };
  33. $jscomp.global = $jscomp.getGlobal(this);
  34. $jscomp.polyfill = function(a, b, c, d) {
  35. if (b) {
  36. c = $jscomp.global;
  37. a = a.split(".");
  38. for (d = 0; d < a.length - 1; d++) {
  39. var e = a[d];
  40. e in c || (c[e] = {});
  41. c = c[e]
  42. }
  43. a = a[a.length - 1];
  44. d = c[a];
  45. b = b(d);
  46. b != d && null != b && $jscomp.defineProperty(c, a, {
  47. configurable: !0,
  48. writable: !0,
  49. value: b
  50. })
  51. }
  52. };
  53. $jscomp.polyfill("Array.prototype.findIndex", function(a) {
  54. return a ? a : function(a, c) {
  55. return $jscomp.findInternal(this, a, c).i
  56. }
  57. }, "es6", "es3");
  58. $jscomp.checkStringArgs = function(a, b, c) {
  59. if (null == a) throw new TypeError("The 'this' value for String.prototype." + c +
  60. " must not be null or undefined");
  61. if (b instanceof RegExp) throw new TypeError("First argument to String.prototype." + c +
  62. " must not be a regular expression");
  63. return a + ""
  64. };
  65. $jscomp.polyfill("String.prototype.endsWith", function(a) {
  66. return a ? a : function(a, c) {
  67. var b = $jscomp.checkStringArgs(this, a, "endsWith");
  68. a += "";
  69. void 0 === c && (c = b.length);
  70. c = Math.max(0, Math.min(c | 0, b.length));
  71. for (var e = a.length; 0 < e && 0 < c;)
  72. if (b[--c] != a[--e]) return !1;
  73. return 0 >= e
  74. }
  75. }, "es6", "es3");
  76. $jscomp.polyfill("Array.prototype.find", function(a) {
  77. return a ? a : function(a, c) {
  78. return $jscomp.findInternal(this, a, c).v
  79. }
  80. }, "es6", "es3");
  81. $jscomp.polyfill("String.prototype.startsWith", function(a) {
  82. return a ? a : function(a, c) {
  83. var b = $jscomp.checkStringArgs(this, a, "startsWith");
  84. a += "";
  85. var e = b.length,
  86. f = a.length;
  87. c = Math.max(0, Math.min(c | 0, b.length));
  88. for (var g = 0; g < f && c < e;)
  89. if (b[c++] != a[g++]) return !1;
  90. return g >= f
  91. }
  92. }, "es6", "es3");
  93. $jscomp.polyfill("String.prototype.repeat", function(a) {
  94. return a ? a : function(a) {
  95. var b = $jscomp.checkStringArgs(this, null, "repeat");
  96. if (0 > a || 1342177279 < a) throw new RangeError("Invalid count value");
  97. a |= 0;
  98. for (var d = ""; a;)
  99. if (a & 1 && (d += b), a >>>= 1) b += b;
  100. return d
  101. }
  102. }, "es6", "es3");
  103. var COMPILED = !0,
  104. goog = goog || {};
  105. goog.global = this || self;
  106. goog.exportPath_ = function(a, b, c) {
  107. a = a.split(".");
  108. c = c || goog.global;
  109. a[0] in c || "undefined" == typeof c.execScript || c.execScript("var " + a[0]);
  110. for (var d; a.length && (d = a.shift());) a.length || void 0 === b ? c = c[d] && c[d] !== Object.prototype[d] ?
  111. c[d] : c[d] = {} : c[d] = b
  112. };
  113. goog.define = function(a, b) {
  114. if (!COMPILED) {
  115. var c = goog.global.CLOSURE_UNCOMPILED_DEFINES,
  116. d = goog.global.CLOSURE_DEFINES;
  117. c && void 0 === c.nodeType && Object.prototype.hasOwnProperty.call(c, a) ? b = c[a] : d && void 0 === d
  118. .nodeType && Object.prototype.hasOwnProperty.call(d, a) && (b = d[a])
  119. }
  120. return b
  121. };
  122. goog.FEATURESET_YEAR = 2012;
  123. goog.DEBUG = !0;
  124. goog.LOCALE = "en";
  125. goog.TRUSTED_SITE = !0;
  126. goog.STRICT_MODE_COMPATIBLE = !1;
  127. goog.DISALLOW_TEST_ONLY_CODE = COMPILED && !goog.DEBUG;
  128. goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1;
  129. goog.provide = function(a) {
  130. if (goog.isInModuleLoader_()) throw Error("goog.provide cannot be used within a module.");
  131. if (!COMPILED && goog.isProvided_(a)) throw Error('Namespace "' + a + '" already declared.');
  132. goog.constructNamespace_(a)
  133. };
  134. goog.constructNamespace_ = function(a, b) {
  135. if (!COMPILED) {
  136. delete goog.implicitNamespaces_[a];
  137. for (var c = a;
  138. (c = c.substring(0, c.lastIndexOf("."))) && !goog.getObjectByName(c);) goog.implicitNamespaces_[c] = !0
  139. }
  140. goog.exportPath_(a, b)
  141. };
  142. goog.getScriptNonce = function(a) {
  143. if (a && a != goog.global) return goog.getScriptNonce_(a.document);
  144. null === goog.cspNonce_ && (goog.cspNonce_ = goog.getScriptNonce_(goog.global.document));
  145. return goog.cspNonce_
  146. };
  147. goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/;
  148. goog.cspNonce_ = null;
  149. goog.getScriptNonce_ = function(a) {
  150. return (a = a.querySelector && a.querySelector("script[nonce]")) && (a = a.nonce || a.getAttribute("nonce")) &&
  151. goog.NONCE_PATTERN_.test(a) ? a : ""
  152. };
  153. goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
  154. goog.module = function(a) {
  155. if ("string" !== typeof a || !a || -1 == a.search(goog.VALID_MODULE_RE_)) throw Error(
  156. "Invalid module identifier");
  157. if (!goog.isInGoogModuleLoader_()) throw Error("Module " + a +
  158. " has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide."
  159. );
  160. if (goog.moduleLoaderState_.moduleName) throw Error("goog.module may only be called once per module.");
  161. goog.moduleLoaderState_.moduleName = a;
  162. if (!COMPILED) {
  163. if (goog.isProvided_(a)) throw Error('Namespace "' + a + '" already declared.');
  164. delete goog.implicitNamespaces_[a]
  165. }
  166. };
  167. goog.module.get = function(a) {
  168. return goog.module.getInternal_(a)
  169. };
  170. goog.module.getInternal_ = function(a) {
  171. if (!COMPILED) {
  172. if (a in goog.loadedModules_) return goog.loadedModules_[a].exports;
  173. if (!goog.implicitNamespaces_[a]) return a = goog.getObjectByName(a), null != a ? a : null
  174. }
  175. return null
  176. };
  177. goog.ModuleType = {
  178. ES6: "es6",
  179. GOOG: "goog"
  180. };
  181. goog.moduleLoaderState_ = null;
  182. goog.isInModuleLoader_ = function() {
  183. return goog.isInGoogModuleLoader_() || goog.isInEs6ModuleLoader_()
  184. };
  185. goog.isInGoogModuleLoader_ = function() {
  186. return !!goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.GOOG
  187. };
  188. goog.isInEs6ModuleLoader_ = function() {
  189. if (goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.ES6) return !0;
  190. var a = goog.global.$jscomp;
  191. return a ? "function" != typeof a.getCurrentModulePath ? !1 : !!a.getCurrentModulePath() : !1
  192. };
  193. goog.module.declareLegacyNamespace = function() {
  194. if (!COMPILED && !goog.isInGoogModuleLoader_()) throw Error(
  195. "goog.module.declareLegacyNamespace must be called from within a goog.module");
  196. if (!COMPILED && !goog.moduleLoaderState_.moduleName) throw Error(
  197. "goog.module must be called prior to goog.module.declareLegacyNamespace.");
  198. goog.moduleLoaderState_.declareLegacyNamespace = !0
  199. };
  200. goog.declareModuleId = function(a) {
  201. if (!COMPILED) {
  202. if (!goog.isInEs6ModuleLoader_()) throw Error(
  203. "goog.declareModuleId may only be called from within an ES6 module");
  204. if (goog.moduleLoaderState_ && goog.moduleLoaderState_.moduleName) throw Error(
  205. "goog.declareModuleId may only be called once per module.");
  206. if (a in goog.loadedModules_) throw Error('Module with namespace "' + a + '" already exists.');
  207. }
  208. if (goog.moduleLoaderState_) goog.moduleLoaderState_.moduleName = a;
  209. else {
  210. var b = goog.global.$jscomp;
  211. if (!b || "function" != typeof b.getCurrentModulePath) throw Error('Module with namespace "' +
  212. a + '" has been loaded incorrectly.');
  213. b = b.require(b.getCurrentModulePath());
  214. goog.loadedModules_[a] = {
  215. exports: b,
  216. type: goog.ModuleType.ES6,
  217. moduleId: a
  218. }
  219. }
  220. };
  221. goog.setTestOnly = function(a) {
  222. if (goog.DISALLOW_TEST_ONLY_CODE) throw a = a || "", Error(
  223. "Importing test-only code into non-debug environment" + (a ? ": " + a : "."));
  224. };
  225. goog.forwardDeclare = function(a) {};
  226. COMPILED || (goog.isProvided_ = function(a) {
  227. return a in goog.loadedModules_ || !goog.implicitNamespaces_[a] && null != goog.getObjectByName(a)
  228. }, goog.implicitNamespaces_ = {
  229. "goog.module": !0
  230. });
  231. goog.getObjectByName = function(a, b) {
  232. a = a.split(".");
  233. b = b || goog.global;
  234. for (var c = 0; c < a.length; c++)
  235. if (b = b[a[c]], null == b) return null;
  236. return b
  237. };
  238. goog.globalize = function(a, b) {
  239. b = b || goog.global;
  240. for (var c in a) b[c] = a[c]
  241. };
  242. goog.addDependency = function(a, b, c, d) {
  243. !COMPILED && goog.DEPENDENCIES_ENABLED && goog.debugLoader_.addDependency(a, b, c, d)
  244. };
  245. goog.ENABLE_DEBUG_LOADER = !0;
  246. goog.logToConsole_ = function(a) {
  247. goog.global.console && goog.global.console.error(a)
  248. };
  249. goog.require = function(a) {
  250. if (!COMPILED) {
  251. goog.ENABLE_DEBUG_LOADER && goog.debugLoader_.requested(a);
  252. if (goog.isProvided_(a)) {
  253. if (goog.isInModuleLoader_()) return goog.module.getInternal_(a)
  254. } else if (goog.ENABLE_DEBUG_LOADER) {
  255. var b = goog.moduleLoaderState_;
  256. goog.moduleLoaderState_ = null;
  257. try {
  258. goog.debugLoader_.load_(a)
  259. } finally {
  260. goog.moduleLoaderState_ = b
  261. }
  262. }
  263. return null
  264. }
  265. };
  266. goog.requireType = function(a) {
  267. return {}
  268. };
  269. goog.basePath = "";
  270. goog.nullFunction = function() {};
  271. goog.abstractMethod = function() {
  272. throw Error("unimplemented abstract method");
  273. };
  274. goog.addSingletonGetter = function(a) {
  275. a.instance_ = void 0;
  276. a.getInstance = function() {
  277. if (a.instance_) return a.instance_;
  278. goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a);
  279. return a.instance_ = new a
  280. }
  281. };
  282. goog.instantiatedSingletons_ = [];
  283. goog.LOAD_MODULE_USING_EVAL = !0;
  284. goog.SEAL_MODULE_EXPORTS = goog.DEBUG;
  285. goog.loadedModules_ = {};
  286. goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
  287. goog.TRANSPILE = "detect";
  288. goog.ASSUME_ES_MODULES_TRANSPILED = !1;
  289. goog.TRANSPILE_TO_LANGUAGE = "";
  290. goog.TRANSPILER = "transpile.js";
  291. goog.hasBadLetScoping = null;
  292. goog.useSafari10Workaround = function() {
  293. if (null == goog.hasBadLetScoping) {
  294. try {
  295. var a = !eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')
  296. } catch (b) {
  297. a = !1
  298. }
  299. goog.hasBadLetScoping = a
  300. }
  301. return goog.hasBadLetScoping
  302. };
  303. goog.workaroundSafari10EvalBug = function(a) {
  304. return "(function(){" + a + "\n;})();\n"
  305. };
  306. goog.loadModule = function(a) {
  307. var b = goog.moduleLoaderState_;
  308. try {
  309. goog.moduleLoaderState_ = {
  310. moduleName: "",
  311. declareLegacyNamespace: !1,
  312. type: goog.ModuleType.GOOG
  313. };
  314. if (goog.isFunction(a)) var c = a.call(void 0, {});
  315. else if ("string" === typeof a) goog.useSafari10Workaround() && (a = goog.workaroundSafari10EvalBug(a)), c =
  316. goog.loadModuleFromSource_.call(void 0, a);
  317. else throw Error("Invalid module definition");
  318. var d = goog.moduleLoaderState_.moduleName;
  319. if ("string" === typeof d && d) goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d,
  320. c) : goog.SEAL_MODULE_EXPORTS && Object.seal && "object" == typeof c && null != c && Object.seal(c),
  321. goog.loadedModules_[d] = {
  322. exports: c,
  323. type: goog.ModuleType.GOOG,
  324. moduleId: goog.moduleLoaderState_.moduleName
  325. };
  326. else throw Error('Invalid module name "' + d + '"');
  327. } finally {
  328. goog.moduleLoaderState_ = b
  329. }
  330. };
  331. goog.loadModuleFromSource_ = function(a) {
  332. eval(a);
  333. return {}
  334. };
  335. goog.normalizePath_ = function(a) {
  336. a = a.split("/");
  337. for (var b = 0; b < a.length;) "." == a[b] ? a.splice(b, 1) : b && ".." == a[b] && a[b - 1] && ".." != a[b -
  338. 1] ? a.splice(--b, 2) : b++;
  339. return a.join("/")
  340. };
  341. goog.loadFileSync_ = function(a) {
  342. if (goog.global.CLOSURE_LOAD_FILE_SYNC) return goog.global.CLOSURE_LOAD_FILE_SYNC(a);
  343. try {
  344. var b = new goog.global.XMLHttpRequest;
  345. b.open("get", a, !1);
  346. b.send();
  347. return 0 == b.status || 200 == b.status ? b.responseText : null
  348. } catch (c) {
  349. return null
  350. }
  351. };
  352. goog.transpile_ = function(a, b, c) {
  353. var d = goog.global.$jscomp;
  354. d || (goog.global.$jscomp = d = {});
  355. var e = d.transpile;
  356. if (!e) {
  357. var f = goog.basePath + goog.TRANSPILER,
  358. g = goog.loadFileSync_(f);
  359. if (g) {
  360. (function() {
  361. (0, eval)(g + "\n//# sourceURL=" + f)
  362. }).call(goog.global);
  363. if (goog.global.$gwtExport && goog.global.$gwtExport.$jscomp && !goog.global.$gwtExport.$jscomp
  364. .transpile) throw Error(
  365. 'The transpiler did not properly export the "transpile" method. $gwtExport: ' + JSON
  366. .stringify(goog.global.$gwtExport));
  367. goog.global.$jscomp.transpile =
  368. goog.global.$gwtExport.$jscomp.transpile;
  369. d = goog.global.$jscomp;
  370. e = d.transpile
  371. }
  372. }
  373. e || (e = d.transpile = function(a, b) {
  374. goog.logToConsole_(b + " requires transpilation but no transpiler was found.");
  375. return a
  376. });
  377. return e(a, b, c)
  378. };
  379. goog.typeOf = function(a) {
  380. var b = typeof a;
  381. if ("object" == b)
  382. if (a) {
  383. if (a instanceof Array) return "array";
  384. if (a instanceof Object) return b;
  385. var c = Object.prototype.toString.call(a);
  386. if ("[object Window]" == c) return "object";
  387. if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice &&
  388. "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) return "array";
  389. if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a
  390. .propertyIsEnumerable && !a.propertyIsEnumerable("call")) return "function"
  391. } else return "null";
  392. else if ("function" == b && "undefined" == typeof a.call) return "object";
  393. return b
  394. };
  395. goog.isArray = function(a) {
  396. return "array" == goog.typeOf(a)
  397. };
  398. goog.isArrayLike = function(a) {
  399. var b = goog.typeOf(a);
  400. return "array" == b || "object" == b && "number" == typeof a.length
  401. };
  402. goog.isDateLike = function(a) {
  403. return goog.isObject(a) && "function" == typeof a.getFullYear
  404. };
  405. goog.isFunction = function(a) {
  406. return "function" == goog.typeOf(a)
  407. };
  408. goog.isObject = function(a) {
  409. var b = typeof a;
  410. return "object" == b && null != a || "function" == b
  411. };
  412. goog.getUid = function(a) {
  413. return Object.prototype.hasOwnProperty.call(a, goog.UID_PROPERTY_) && a[goog.UID_PROPERTY_] || (a[goog
  414. .UID_PROPERTY_] = ++goog.uidCounter_)
  415. };
  416. goog.hasUid = function(a) {
  417. return !!a[goog.UID_PROPERTY_]
  418. };
  419. goog.removeUid = function(a) {
  420. null !== a && "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
  421. try {
  422. delete a[goog.UID_PROPERTY_]
  423. } catch (b) {}
  424. };
  425. goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
  426. goog.uidCounter_ = 0;
  427. goog.getHashCode = goog.getUid;
  428. goog.removeHashCode = goog.removeUid;
  429. goog.cloneObject = function(a) {
  430. var b = goog.typeOf(a);
  431. if ("object" == b || "array" == b) {
  432. if ("function" === typeof a.clone) return a.clone();
  433. b = "array" == b ? [] : {};
  434. for (var c in a) b[c] = goog.cloneObject(a[c]);
  435. return b
  436. }
  437. return a
  438. };
  439. goog.bindNative_ = function(a, b, c) {
  440. return a.call.apply(a.bind, arguments)
  441. };
  442. goog.bindJs_ = function(a, b, c) {
  443. if (!a) throw Error();
  444. if (2 < arguments.length) {
  445. var d = Array.prototype.slice.call(arguments, 2);
  446. return function() {
  447. var c = Array.prototype.slice.call(arguments);
  448. Array.prototype.unshift.apply(c, d);
  449. return a.apply(b, c)
  450. }
  451. }
  452. return function() {
  453. return a.apply(b, arguments)
  454. }
  455. };
  456. goog.bind = function(a, b, c) {
  457. Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog
  458. .bindNative_ : goog.bind = goog.bindJs_;
  459. return goog.bind.apply(null, arguments)
  460. };
  461. goog.partial = function(a, b) {
  462. var c = Array.prototype.slice.call(arguments, 1);
  463. return function() {
  464. var b = c.slice();
  465. b.push.apply(b, arguments);
  466. return a.apply(this, b)
  467. }
  468. };
  469. goog.mixin = function(a, b) {
  470. for (var c in b) a[c] = b[c]
  471. };
  472. goog.now = goog.TRUSTED_SITE && Date.now || function() {
  473. return +new Date
  474. };
  475. goog.globalEval = function(a) {
  476. if (goog.global.execScript) goog.global.execScript(a, "JavaScript");
  477. else if (goog.global.eval) {
  478. if (null == goog.evalWorksForGlobals_) {
  479. try {
  480. goog.global.eval("var _evalTest_ = 1;")
  481. } catch (d) {}
  482. if ("undefined" != typeof goog.global._evalTest_) {
  483. try {
  484. delete goog.global._evalTest_
  485. } catch (d) {}
  486. goog.evalWorksForGlobals_ = !0
  487. } else goog.evalWorksForGlobals_ = !1
  488. }
  489. if (goog.evalWorksForGlobals_) goog.global.eval(a);
  490. else {
  491. var b = goog.global.document,
  492. c = b.createElement("script");
  493. c.type = "text/javascript";
  494. c.defer = !1;
  495. c.appendChild(b.createTextNode(a));
  496. b.head.appendChild(c);
  497. b.head.removeChild(c)
  498. }
  499. } else throw Error("goog.globalEval not available");
  500. };
  501. goog.evalWorksForGlobals_ = null;
  502. goog.getCssName = function(a, b) {
  503. if ("." == String(a).charAt(0)) throw Error(
  504. 'className passed in goog.getCssName must not start with ".". You passed: ' + a);
  505. var c = function(a) {
  506. return goog.cssNameMapping_[a] || a
  507. },
  508. d = function(a) {
  509. a = a.split("-");
  510. for (var b = [], d = 0; d < a.length; d++) b.push(c(a[d]));
  511. return b.join("-")
  512. };
  513. d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function(a) {
  514. return a
  515. };
  516. a = b ? a + "-" + d(b) : d(a);
  517. return goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(a) : a
  518. };
  519. goog.setCssNameMapping = function(a, b) {
  520. goog.cssNameMapping_ = a;
  521. goog.cssNameMappingStyle_ = b
  522. };
  523. !COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING);
  524. goog.getMsg = function(a, b, c) {
  525. c && c.html && (a = a.replace(/</g, "&lt;"));
  526. b && (a = a.replace(/\{\$([^}]+)}/g, function(a, c) {
  527. return null != b && c in b ? b[c] : a
  528. }));
  529. return a
  530. };
  531. goog.getMsgWithFallback = function(a, b) {
  532. return a
  533. };
  534. goog.exportSymbol = function(a, b, c) {
  535. goog.exportPath_(a, b, c)
  536. };
  537. goog.exportProperty = function(a, b, c) {
  538. a[b] = c
  539. };
  540. goog.inherits = function(a, b) {
  541. function c() {}
  542. c.prototype = b.prototype;
  543. a.superClass_ = b.prototype;
  544. a.prototype = new c;
  545. a.prototype.constructor = a;
  546. a.base = function(a, c, f) {
  547. for (var d = Array(arguments.length - 2), e = 2; e < arguments.length; e++) d[e - 2] = arguments[e];
  548. return b.prototype[c].apply(a, d)
  549. }
  550. };
  551. goog.scope = function(a) {
  552. if (goog.isInModuleLoader_()) throw Error("goog.scope is not supported within a module.");
  553. a.call(goog.global)
  554. };
  555. COMPILED || (goog.global.COMPILED = COMPILED);
  556. goog.defineClass = function(a, b) {
  557. var c = b.constructor,
  558. d = b.statics;
  559. c && c != Object.prototype.constructor || (c = function() {
  560. throw Error("cannot instantiate an interface (no constructor defined).");
  561. });
  562. c = goog.defineClass.createSealingConstructor_(c, a);
  563. a && goog.inherits(c, a);
  564. delete b.constructor;
  565. delete b.statics;
  566. goog.defineClass.applyProperties_(c.prototype, b);
  567. null != d && (d instanceof Function ? d(c) : goog.defineClass.applyProperties_(c, d));
  568. return c
  569. };
  570. goog.defineClass.SEAL_CLASS_INSTANCES = goog.DEBUG;
  571. goog.defineClass.createSealingConstructor_ = function(a, b) {
  572. if (!goog.defineClass.SEAL_CLASS_INSTANCES) return a;
  573. var c = !goog.defineClass.isUnsealable_(b),
  574. d = function() {
  575. var b = a.apply(this, arguments) || this;
  576. b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_];
  577. this.constructor === d && c && Object.seal instanceof Function && Object.seal(b);
  578. return b
  579. };
  580. return d
  581. };
  582. goog.defineClass.isUnsealable_ = function(a) {
  583. return a && a.prototype && a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]
  584. };
  585. goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ =
  586. "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  587. goog.defineClass.applyProperties_ = function(a, b) {
  588. for (var c in b) Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]);
  589. for (var d = 0; d < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; d++) c = goog.defineClass
  590. .OBJECT_PROTOTYPE_FIELDS_[d], Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c])
  591. };
  592. goog.tagUnsealableClass = function(a) {
  593. !COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES && (a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = !0)
  594. };
  595. goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable";
  596. !COMPILED && goog.DEPENDENCIES_ENABLED && (goog.inHtmlDocument_ = function() {
  597. var a = goog.global.document;
  598. return null != a && "write" in a
  599. }, goog.isDocumentLoading_ = function() {
  600. var a = goog.global.document;
  601. return a.attachEvent ? "complete" != a.readyState : "loading" == a.readyState
  602. }, goog.findBasePath_ = function() {
  603. if (void 0 != goog.global.CLOSURE_BASE_PATH && "string" === typeof goog.global.CLOSURE_BASE_PATH) goog
  604. .basePath = goog.global.CLOSURE_BASE_PATH;
  605. else if (goog.inHtmlDocument_()) {
  606. var a = goog.global.document,
  607. b = a.currentScript;
  608. a = b ? [b] : a.getElementsByTagName("SCRIPT");
  609. for (b = a.length - 1; 0 <= b; --b) {
  610. var c = a[b].src,
  611. d = c.lastIndexOf("?");
  612. d = -1 == d ? c.length : d;
  613. if ("base.js" == c.substr(d - 7, 7)) {
  614. goog.basePath = c.substr(0, d - 7);
  615. break
  616. }
  617. }
  618. }
  619. }, goog.findBasePath_(), goog.Transpiler = function() {
  620. this.requiresTranspilation_ = null;
  621. this.transpilationTarget_ = goog.TRANSPILE_TO_LANGUAGE
  622. }, goog.Transpiler.prototype.createRequiresTranspilation_ = function() {
  623. function a(a, b) {
  624. e ? d[a] = !0 : b() ? (c = a, d[a] = !1) : e = d[a] = !0
  625. }
  626. function b(a) {
  627. try {
  628. return !!eval(a)
  629. } catch (h) {
  630. return !1
  631. }
  632. }
  633. var c = "es3",
  634. d = {
  635. es3: !1
  636. },
  637. e = !1,
  638. f = goog.global.navigator && goog.global.navigator.userAgent ? goog.global.navigator.userAgent : "";
  639. a("es5", function() {
  640. return b("[1,].length==1")
  641. });
  642. a("es6", function() {
  643. return f.match(/Edge\/(\d+)(\.\d)*/i) ? !1 : b(
  644. '(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()'
  645. )
  646. });
  647. a("es7", function() {
  648. return b("2 ** 2 == 4")
  649. });
  650. a("es8", function() {
  651. return b("async () => 1, true")
  652. });
  653. a("es9", function() {
  654. return b("({...rest} = {}), true")
  655. });
  656. a("es_next", function() {
  657. return !1
  658. });
  659. return {
  660. target: c,
  661. map: d
  662. }
  663. }, goog.Transpiler.prototype.needsTranspile = function(a, b) {
  664. if ("always" == goog.TRANSPILE) return !0;
  665. if ("never" == goog.TRANSPILE) return !1;
  666. if (!this.requiresTranspilation_) {
  667. var c = this.createRequiresTranspilation_();
  668. this.requiresTranspilation_ = c.map;
  669. this.transpilationTarget_ = this.transpilationTarget_ ||
  670. c.target
  671. }
  672. if (a in this.requiresTranspilation_) return this.requiresTranspilation_[a] ? !0 : !goog
  673. .inHtmlDocument_() || "es6" != b || "noModule" in goog.global.document.createElement("script") ? !
  674. 1 : !0;
  675. throw Error("Unknown language mode: " + a);
  676. }, goog.Transpiler.prototype.transpile = function(a, b) {
  677. return goog.transpile_(a, b, this.transpilationTarget_)
  678. }, goog.transpiler_ = new goog.Transpiler, goog.protectScriptTag_ = function(a) {
  679. return a.replace(/<\/(SCRIPT)/ig, "\\x3c/$1")
  680. }, goog.DebugLoader_ = function() {
  681. this.dependencies_ = {};
  682. this.idToPath_ = {};
  683. this.written_ = {};
  684. this.loadingDeps_ = [];
  685. this.depsToLoad_ = [];
  686. this.paused_ = !1;
  687. this.factory_ = new goog.DependencyFactory(goog.transpiler_);
  688. this.deferredCallbacks_ = {};
  689. this.deferredQueue_ = []
  690. }, goog.DebugLoader_.prototype.bootstrap = function(a, b) {
  691. function c() {
  692. d && (goog.global.setTimeout(d, 0), d = null)
  693. }
  694. var d = b;
  695. if (a.length) {
  696. b = [];
  697. for (var e = 0; e < a.length; e++) {
  698. var f = this.getPathFromDeps_(a[e]);
  699. if (!f) throw Error("Unregonized namespace: " + a[e]);
  700. b.push(this.dependencies_[f])
  701. }
  702. f = goog.require;
  703. var g = 0;
  704. for (e =
  705. 0; e < a.length; e++) f(a[e]), b[e].onLoad(function() {
  706. ++g == a.length && c()
  707. })
  708. } else c()
  709. }, goog.DebugLoader_.prototype.loadClosureDeps = function() {
  710. this.depsToLoad_.push(this.factory_.createDependency(goog.normalizePath_(goog.basePath + "deps.js"),
  711. "deps.js", [], [], {}, !1));
  712. this.loadDeps_()
  713. }, goog.DebugLoader_.prototype.requested = function(a, b) {
  714. (a = this.getPathFromDeps_(a)) && (b || this.areDepsLoaded_(this.dependencies_[a].requires)) && (b = this
  715. .deferredCallbacks_[a]) && (delete this.deferredCallbacks_[a], b())
  716. }, goog.DebugLoader_.prototype.setDependencyFactory =
  717. function(a) {
  718. this.factory_ = a
  719. }, goog.DebugLoader_.prototype.load_ = function(a) {
  720. if (this.getPathFromDeps_(a)) {
  721. var b = this,
  722. c = [],
  723. d = function(a) {
  724. var e = b.getPathFromDeps_(a);
  725. if (!e) throw Error("Bad dependency path or symbol: " + a);
  726. if (!b.written_[e]) {
  727. b.written_[e] = !0;
  728. a = b.dependencies_[e];
  729. for (e = 0; e < a.requires.length; e++) goog.isProvided_(a.requires[e]) || d(a.requires[e]);
  730. c.push(a)
  731. }
  732. };
  733. d(a);
  734. a = !!this.depsToLoad_.length;
  735. this.depsToLoad_ = this.depsToLoad_.concat(c);
  736. this.paused_ || a || this.loadDeps_()
  737. } else throw a = "goog.require could not find: " +
  738. a, goog.logToConsole_(a), Error(a);
  739. }, goog.DebugLoader_.prototype.loadDeps_ = function() {
  740. for (var a = this, b = this.paused_; this.depsToLoad_.length && !b;)(function() {
  741. var c = !1,
  742. d = a.depsToLoad_.shift(),
  743. e = !1;
  744. a.loading_(d);
  745. var f = {
  746. pause: function() {
  747. if (c) throw Error("Cannot call pause after the call to load.");
  748. b = !0
  749. },
  750. resume: function() {
  751. c ? a.resume_() : b = !1
  752. },
  753. loaded: function() {
  754. if (e) throw Error("Double call to loaded.");
  755. e = !0;
  756. a.loaded_(d)
  757. },
  758. pending: function() {
  759. for (var b = [], c = 0; c < a.loadingDeps_.length; c++) b.push(a.loadingDeps_[
  760. c]);
  761. return b
  762. },
  763. setModuleState: function(a) {
  764. goog.moduleLoaderState_ = {
  765. type: a,
  766. moduleName: "",
  767. declareLegacyNamespace: !1
  768. }
  769. },
  770. registerEs6ModuleExports: function(a, b, c) {
  771. c && (goog.loadedModules_[c] = {
  772. exports: b,
  773. type: goog.ModuleType.ES6,
  774. moduleId: c || ""
  775. })
  776. },
  777. registerGoogModuleExports: function(a, b) {
  778. goog.loadedModules_[a] = {
  779. exports: b,
  780. type: goog.ModuleType.GOOG,
  781. moduleId: a
  782. }
  783. },
  784. clearModuleState: function() {
  785. goog.moduleLoaderState_ = null
  786. },
  787. defer: function(b) {
  788. if (c) throw Error("Cannot register with defer after the call to load.");
  789. a.defer_(d,
  790. b)
  791. },
  792. areDepsLoaded: function() {
  793. return a.areDepsLoaded_(d.requires)
  794. }
  795. };
  796. try {
  797. d.load(f)
  798. } finally {
  799. c = !0
  800. }
  801. })();
  802. b && this.pause_()
  803. }, goog.DebugLoader_.prototype.pause_ = function() {
  804. this.paused_ = !0
  805. }, goog.DebugLoader_.prototype.resume_ = function() {
  806. this.paused_ && (this.paused_ = !1, this.loadDeps_())
  807. }, goog.DebugLoader_.prototype.loading_ = function(a) {
  808. this.loadingDeps_.push(a)
  809. }, goog.DebugLoader_.prototype.loaded_ = function(a) {
  810. for (var b = 0; b < this.loadingDeps_.length; b++)
  811. if (this.loadingDeps_[b] == a) {
  812. this.loadingDeps_.splice(b, 1);
  813. break
  814. } for (b = 0; b < this.deferredQueue_.length; b++)
  815. if (this.deferredQueue_[b] == a.path) {
  816. this.deferredQueue_.splice(b, 1);
  817. break
  818. } if (this.loadingDeps_.length == this.deferredQueue_.length && !this.depsToLoad_.length)
  819. for (; this.deferredQueue_.length;) this.requested(this.deferredQueue_.shift(), !0);
  820. a.loaded()
  821. }, goog.DebugLoader_.prototype.areDepsLoaded_ = function(a) {
  822. for (var b = 0; b < a.length; b++) {
  823. var c = this.getPathFromDeps_(a[b]);
  824. if (!c || !(c in this.deferredCallbacks_ || goog.isProvided_(a[b]))) return !1
  825. }
  826. return !0
  827. }, goog.DebugLoader_.prototype.getPathFromDeps_ =
  828. function(a) {
  829. return a in this.idToPath_ ? this.idToPath_[a] : a in this.dependencies_ ? a : null
  830. }, goog.DebugLoader_.prototype.defer_ = function(a, b) {
  831. this.deferredCallbacks_[a.path] = b;
  832. this.deferredQueue_.push(a.path)
  833. }, goog.LoadController = function() {}, goog.LoadController.prototype.pause = function() {}, goog.LoadController
  834. .prototype.resume = function() {}, goog.LoadController.prototype.loaded = function() {}, goog.LoadController
  835. .prototype.pending = function() {}, goog.LoadController.prototype.registerEs6ModuleExports = function(a,
  836. b, c) {}, goog.LoadController.prototype.setModuleState = function(a) {}, goog.LoadController.prototype
  837. .clearModuleState = function() {}, goog.LoadController.prototype.defer = function(a) {}, goog.LoadController
  838. .prototype.areDepsLoaded = function() {}, goog.Dependency = function(a, b, c, d, e) {
  839. this.path = a;
  840. this.relativePath = b;
  841. this.provides = c;
  842. this.requires = d;
  843. this.loadFlags = e;
  844. this.loaded_ = !1;
  845. this.loadCallbacks_ = []
  846. }, goog.Dependency.prototype.getPathName = function() {
  847. var a = this.path,
  848. b = a.indexOf("://");
  849. 0 <= b && (a = a.substring(b + 3), b =
  850. a.indexOf("/"), 0 <= b && (a = a.substring(b + 1)));
  851. return a
  852. }, goog.Dependency.prototype.onLoad = function(a) {
  853. this.loaded_ ? a() : this.loadCallbacks_.push(a)
  854. }, goog.Dependency.prototype.loaded = function() {
  855. this.loaded_ = !0;
  856. var a = this.loadCallbacks_;
  857. this.loadCallbacks_ = [];
  858. for (var b = 0; b < a.length; b++) a[b]()
  859. }, goog.Dependency.defer_ = !1, goog.Dependency.callbackMap_ = {}, goog.Dependency.registerCallback_ = function(
  860. a) {
  861. var b = Math.random().toString(32);
  862. goog.Dependency.callbackMap_[b] = a;
  863. return b
  864. }, goog.Dependency.unregisterCallback_ =
  865. function(a) {
  866. delete goog.Dependency.callbackMap_[a]
  867. }, goog.Dependency.callback_ = function(a, b) {
  868. if (a in goog.Dependency.callbackMap_) {
  869. for (var c = goog.Dependency.callbackMap_[a], d = [], e = 1; e < arguments.length; e++) d.push(
  870. arguments[e]);
  871. c.apply(void 0, d)
  872. } else throw Error("Callback key " + a + " does not exist (was base.js loaded more than once?).");
  873. }, goog.Dependency.prototype.load = function(a) {
  874. if (goog.global.CLOSURE_IMPORT_SCRIPT) goog.global.CLOSURE_IMPORT_SCRIPT(this.path) ? a.loaded() : a
  875. .pause();
  876. else if (goog.inHtmlDocument_()) {
  877. var b =
  878. goog.global.document;
  879. if ("complete" == b.readyState && !goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) {
  880. if (/\bdeps.js$/.test(this.path)) {
  881. a.loaded();
  882. return
  883. }
  884. throw Error('Cannot write "' + this.path + '" after document load');
  885. }
  886. if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING && goog.isDocumentLoading_()) {
  887. var c = goog.Dependency.registerCallback_(function(b) {
  888. goog.DebugLoader_.IS_OLD_IE_ && "complete" != b.readyState || (goog.Dependency
  889. .unregisterCallback_(c), a.loaded())
  890. }),
  891. d = !goog.DebugLoader_.IS_OLD_IE_ && goog.getScriptNonce() ?
  892. ' nonce="' + goog.getScriptNonce() + '"' : "";
  893. d = '<script src="' + this.path + '" ' + (goog.DebugLoader_.IS_OLD_IE_ ? "onreadystatechange" :
  894. "onload") + "=\"goog.Dependency.callback_('" + c + '\', this)" type="text/javascript" ' + (
  895. goog.Dependency.defer_ ? "defer" : "") + d + ">\x3c/script>";
  896. b.write(goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createHTML(d) : d)
  897. } else {
  898. var e = b.createElement("script");
  899. e.defer = goog.Dependency.defer_;
  900. e.async = !1;
  901. e.type = "text/javascript";
  902. (d = goog.getScriptNonce()) && e.setAttribute("nonce", d);
  903. goog.DebugLoader_.IS_OLD_IE_ ?
  904. (a.pause(), e.onreadystatechange = function() {
  905. if ("loaded" == e.readyState || "complete" == e.readyState) a.loaded(), a.resume()
  906. }) : e.onload = function() {
  907. e.onload = null;
  908. a.loaded()
  909. };
  910. e.src = goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path) : this
  911. .path;
  912. b.head.appendChild(e)
  913. }
  914. } else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."), "deps.js" == this
  915. .relativePath ? (goog.logToConsole_(
  916. "Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."
  917. ),
  918. a.loaded()) : a.pause()
  919. }, goog.Es6ModuleDependency = function(a, b, c, d, e) {
  920. goog.Dependency.call(this, a, b, c, d, e)
  921. }, goog.inherits(goog.Es6ModuleDependency, goog.Dependency), goog.Es6ModuleDependency.prototype.load = function(
  922. a) {
  923. function b(a, b) {
  924. a = b ? '<script type="module" crossorigin>' + b + "\x3c/script>" :
  925. '<script type="module" crossorigin src="' + a + '">\x3c/script>';
  926. d.write(goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createHTML(a) : a)
  927. }
  928. function c(a, b) {
  929. var c = d.createElement("script");
  930. c.defer = !0;
  931. c.async = !1;
  932. c.type =
  933. "module";
  934. c.setAttribute("crossorigin", !0);
  935. var e = goog.getScriptNonce();
  936. e && c.setAttribute("nonce", e);
  937. b ? c.textContent = goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createScript(b) : b : c
  938. .src = goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createScriptURL(a) : a;
  939. d.head.appendChild(c)
  940. }
  941. if (goog.global.CLOSURE_IMPORT_SCRIPT) goog.global.CLOSURE_IMPORT_SCRIPT(this.path) ? a.loaded() : a
  942. .pause();
  943. else if (goog.inHtmlDocument_()) {
  944. var d = goog.global.document,
  945. e = this;
  946. if (goog.isDocumentLoading_()) {
  947. var f = b;
  948. goog.Dependency.defer_ = !0
  949. } else f = c;
  950. var g = goog.Dependency.registerCallback_(function() {
  951. goog.Dependency.unregisterCallback_(g);
  952. a.setModuleState(goog.ModuleType.ES6)
  953. });
  954. f(void 0, 'goog.Dependency.callback_("' + g + '")');
  955. f(this.path, void 0);
  956. var h = goog.Dependency.registerCallback_(function(b) {
  957. goog.Dependency.unregisterCallback_(h);
  958. a.registerEs6ModuleExports(e.path, b, goog.moduleLoaderState_.moduleName)
  959. });
  960. f(void 0, 'import * as m from "' + this.path + '"; goog.Dependency.callback_("' + h + '", m)');
  961. var k = goog.Dependency.registerCallback_(function() {
  962. goog.Dependency.unregisterCallback_(k);
  963. a.clearModuleState();
  964. a.loaded()
  965. });
  966. f(void 0, 'goog.Dependency.callback_("' + k + '")')
  967. } else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."), a.pause()
  968. }, goog.TransformedDependency = function(a, b, c, d, e) {
  969. goog.Dependency.call(this, a, b, c, d, e);
  970. this.contents_ = null;
  971. this.lazyFetch_ = !goog.inHtmlDocument_() || !("noModule" in goog.global.document.createElement("script"))
  972. }, goog.inherits(goog.TransformedDependency, goog.Dependency), goog.TransformedDependency.prototype.load =
  973. function(a) {
  974. function b() {
  975. e.contents_ =
  976. goog.loadFileSync_(e.path);
  977. e.contents_ && (e.contents_ = e.transform(e.contents_), e.contents_ && (e.contents_ +=
  978. "\n//# sourceURL=" + e.path))
  979. }
  980. function c() {
  981. e.lazyFetch_ && b();
  982. if (e.contents_) {
  983. f && a.setModuleState(goog.ModuleType.ES6);
  984. try {
  985. var c = e.contents_;
  986. e.contents_ = null;
  987. goog.globalEval(c);
  988. if (f) var d = goog.moduleLoaderState_.moduleName
  989. } finally {
  990. f && a.clearModuleState()
  991. }
  992. f && goog.global.$jscomp.require.ensure([e.getPathName()], function() {
  993. a.registerEs6ModuleExports(e.path, goog.global.$jscomp.require(e.getPathName()),
  994. d)
  995. });
  996. a.loaded()
  997. }
  998. }
  999. function d() {
  1000. var a = goog.global.document,
  1001. b = goog.Dependency.registerCallback_(function() {
  1002. goog.Dependency.unregisterCallback_(b);
  1003. c()
  1004. }),
  1005. d = '<script type="text/javascript">' + goog.protectScriptTag_('goog.Dependency.callback_("' + b +
  1006. '");') + "\x3c/script>";
  1007. a.write(goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createHTML(d) : d)
  1008. }
  1009. var e = this;
  1010. if (goog.global.CLOSURE_IMPORT_SCRIPT) b(), this.contents_ && goog.global.CLOSURE_IMPORT_SCRIPT("", this
  1011. .contents_) ? (this.contents_ = null, a.loaded()) : a.pause();
  1012. else {
  1013. var f = this.loadFlags.module == goog.ModuleType.ES6;
  1014. this.lazyFetch_ || b();
  1015. var g = 1 < a.pending().length,
  1016. h = g && goog.DebugLoader_.IS_OLD_IE_;
  1017. g = goog.Dependency.defer_ && (g || goog.isDocumentLoading_());
  1018. if (h || g) a.defer(function() {
  1019. c()
  1020. });
  1021. else {
  1022. var k = goog.global.document;
  1023. h = goog.inHtmlDocument_() && "ActiveXObject" in goog.global;
  1024. if (f && goog.inHtmlDocument_() && goog.isDocumentLoading_() && !h) {
  1025. goog.Dependency.defer_ = !0;
  1026. a.pause();
  1027. var l = k.onreadystatechange;
  1028. k.onreadystatechange = function() {
  1029. "interactive" == k.readyState && (k.onreadystatechange =
  1030. l, c(), a.resume());
  1031. goog.isFunction(l) && l.apply(void 0, arguments)
  1032. }
  1033. } else !goog.DebugLoader_.IS_OLD_IE_ && goog.inHtmlDocument_() && goog.isDocumentLoading_() ? d() :
  1034. c()
  1035. }
  1036. }
  1037. }, goog.TransformedDependency.prototype.transform = function(a) {}, goog.TranspiledDependency = function(a, b,
  1038. c, d, e, f) {
  1039. goog.TransformedDependency.call(this, a, b, c, d, e);
  1040. this.transpiler = f
  1041. }, goog.inherits(goog.TranspiledDependency, goog.TransformedDependency), goog.TranspiledDependency.prototype
  1042. .transform = function(a) {
  1043. return this.transpiler.transpile(a, this.getPathName())
  1044. },
  1045. goog.PreTranspiledEs6ModuleDependency = function(a, b, c, d, e) {
  1046. goog.TransformedDependency.call(this, a, b, c, d, e)
  1047. }, goog.inherits(goog.PreTranspiledEs6ModuleDependency, goog.TransformedDependency), goog
  1048. .PreTranspiledEs6ModuleDependency.prototype.transform = function(a) {
  1049. return a
  1050. }, goog.GoogModuleDependency = function(a, b, c, d, e, f, g) {
  1051. goog.TransformedDependency.call(this, a, b, c, d, e);
  1052. this.needsTranspile_ = f;
  1053. this.transpiler_ = g
  1054. }, goog.inherits(goog.GoogModuleDependency, goog.TransformedDependency), goog.GoogModuleDependency.prototype
  1055. .transform =
  1056. function(a) {
  1057. this.needsTranspile_ && (a = this.transpiler_.transpile(a, this.getPathName()));
  1058. return goog.LOAD_MODULE_USING_EVAL && void 0 !== goog.global.JSON ? "goog.loadModule(" + goog.global.JSON
  1059. .stringify(a + "\n//# sourceURL=" + this.path + "\n") + ");" :
  1060. 'goog.loadModule(function(exports) {"use strict";' + a + "\n;return exports});\n//# sourceURL=" + this
  1061. .path + "\n"
  1062. }, goog.DebugLoader_.IS_OLD_IE_ = !(goog.global.atob || !goog.global.document || !goog.global.document.all),
  1063. goog.DebugLoader_.prototype.addDependency = function(a, b, c,
  1064. d) {
  1065. b = b || [];
  1066. a = a.replace(/\\/g, "/");
  1067. var e = goog.normalizePath_(goog.basePath + a);
  1068. d && "boolean" !== typeof d || (d = d ? {
  1069. module: goog.ModuleType.GOOG
  1070. } : {});
  1071. c = this.factory_.createDependency(e, a, b, c, d, goog.transpiler_.needsTranspile(d.lang || "es3", d
  1072. .module));
  1073. this.dependencies_[e] = c;
  1074. for (c = 0; c < b.length; c++) this.idToPath_[b[c]] = e;
  1075. this.idToPath_[a] = e
  1076. }, goog.DependencyFactory = function(a) {
  1077. this.transpiler = a
  1078. }, goog.DependencyFactory.prototype.createDependency = function(a, b, c, d, e, f) {
  1079. return e.module == goog.ModuleType.GOOG ? new goog.GoogModuleDependency(a,
  1080. b, c, d, e, f, this.transpiler) : f ? new goog.TranspiledDependency(a, b, c, d, e, this
  1081. .transpiler) : e.module == goog.ModuleType.ES6 ? "never" == goog.TRANSPILE && goog
  1082. .ASSUME_ES_MODULES_TRANSPILED ? new goog.PreTranspiledEs6ModuleDependency(a, b, c, d, e) : new goog
  1083. .Es6ModuleDependency(a, b, c, d, e) : new goog.Dependency(a, b, c, d, e)
  1084. }, goog.debugLoader_ = new goog.DebugLoader_, goog.loadClosureDeps = function() {
  1085. goog.debugLoader_.loadClosureDeps()
  1086. }, goog.setDependencyFactory = function(a) {
  1087. goog.debugLoader_.setDependencyFactory(a)
  1088. }, goog.global.CLOSURE_NO_DEPS ||
  1089. goog.debugLoader_.loadClosureDeps(), goog.bootstrap = function(a, b) {
  1090. goog.debugLoader_.bootstrap(a, b)
  1091. });
  1092. goog.TRUSTED_TYPES_POLICY_NAME = "";
  1093. goog.identity_ = function(a) {
  1094. return a
  1095. };
  1096. goog.createTrustedTypesPolicy = function(a) {
  1097. var b = null,
  1098. c = goog.global.trustedTypes || goog.global.TrustedTypes;
  1099. if (!c || !c.createPolicy) return b;
  1100. try {
  1101. b = c.createPolicy(a, {
  1102. createHTML: goog.identity_,
  1103. createScript: goog.identity_,
  1104. createScriptURL: goog.identity_,
  1105. createURL: goog.identity_
  1106. })
  1107. } catch (d) {
  1108. goog.logToConsole_(d.message)
  1109. }
  1110. return b
  1111. };
  1112. goog.TRUSTED_TYPES_POLICY_ = goog.TRUSTED_TYPES_POLICY_NAME ? goog.createTrustedTypesPolicy(goog
  1113. .TRUSTED_TYPES_POLICY_NAME + "#base") : null;
  1114. goog.object = {};
  1115. goog.object.is = function(a, b) {
  1116. return a === b ? 0 !== a || 1 / a === 1 / b : a !== a && b !== b
  1117. };
  1118. goog.object.forEach = function(a, b, c) {
  1119. for (var d in a) b.call(c, a[d], d, a)
  1120. };
  1121. goog.object.filter = function(a, b, c) {
  1122. var d = {},
  1123. e;
  1124. for (e in a) b.call(c, a[e], e, a) && (d[e] = a[e]);
  1125. return d
  1126. };
  1127. goog.object.map = function(a, b, c) {
  1128. var d = {},
  1129. e;
  1130. for (e in a) d[e] = b.call(c, a[e], e, a);
  1131. return d
  1132. };
  1133. goog.object.some = function(a, b, c) {
  1134. for (var d in a)
  1135. if (b.call(c, a[d], d, a)) return !0;
  1136. return !1
  1137. };
  1138. goog.object.every = function(a, b, c) {
  1139. for (var d in a)
  1140. if (!b.call(c, a[d], d, a)) return !1;
  1141. return !0
  1142. };
  1143. goog.object.getCount = function(a) {
  1144. var b = 0,
  1145. c;
  1146. for (c in a) b++;
  1147. return b
  1148. };
  1149. goog.object.getAnyKey = function(a) {
  1150. for (var b in a) return b
  1151. };
  1152. goog.object.getAnyValue = function(a) {
  1153. for (var b in a) return a[b]
  1154. };
  1155. goog.object.contains = function(a, b) {
  1156. return goog.object.containsValue(a, b)
  1157. };
  1158. goog.object.getValues = function(a) {
  1159. var b = [],
  1160. c = 0,
  1161. d;
  1162. for (d in a) b[c++] = a[d];
  1163. return b
  1164. };
  1165. goog.object.getKeys = function(a) {
  1166. var b = [],
  1167. c = 0,
  1168. d;
  1169. for (d in a) b[c++] = d;
  1170. return b
  1171. };
  1172. goog.object.getValueByKeys = function(a, b) {
  1173. var c = goog.isArrayLike(b),
  1174. d = c ? b : arguments;
  1175. for (c = c ? 0 : 1; c < d.length; c++) {
  1176. if (null == a) return;
  1177. a = a[d[c]]
  1178. }
  1179. return a
  1180. };
  1181. goog.object.containsKey = function(a, b) {
  1182. return null !== a && b in a
  1183. };
  1184. goog.object.containsValue = function(a, b) {
  1185. for (var c in a)
  1186. if (a[c] == b) return !0;
  1187. return !1
  1188. };
  1189. goog.object.findKey = function(a, b, c) {
  1190. for (var d in a)
  1191. if (b.call(c, a[d], d, a)) return d
  1192. };
  1193. goog.object.findValue = function(a, b, c) {
  1194. return (b = goog.object.findKey(a, b, c)) && a[b]
  1195. };
  1196. goog.object.isEmpty = function(a) {
  1197. for (var b in a) return !1;
  1198. return !0
  1199. };
  1200. goog.object.clear = function(a) {
  1201. for (var b in a) delete a[b]
  1202. };
  1203. goog.object.remove = function(a, b) {
  1204. var c;
  1205. (c = b in a) && delete a[b];
  1206. return c
  1207. };
  1208. goog.object.add = function(a, b, c) {
  1209. if (null !== a && b in a) throw Error('The object already contains the key "' + b + '"');
  1210. goog.object.set(a, b, c)
  1211. };
  1212. goog.object.get = function(a, b, c) {
  1213. return null !== a && b in a ? a[b] : c
  1214. };
  1215. goog.object.set = function(a, b, c) {
  1216. a[b] = c
  1217. };
  1218. goog.object.setIfUndefined = function(a, b, c) {
  1219. return b in a ? a[b] : a[b] = c
  1220. };
  1221. goog.object.setWithReturnValueIfNotSet = function(a, b, c) {
  1222. if (b in a) return a[b];
  1223. c = c();
  1224. return a[b] = c
  1225. };
  1226. goog.object.equals = function(a, b) {
  1227. for (var c in a)
  1228. if (!(c in b) || a[c] !== b[c]) return !1;
  1229. for (var d in b)
  1230. if (!(d in a)) return !1;
  1231. return !0
  1232. };
  1233. goog.object.clone = function(a) {
  1234. var b = {},
  1235. c;
  1236. for (c in a) b[c] = a[c];
  1237. return b
  1238. };
  1239. goog.object.unsafeClone = function(a) {
  1240. var b = goog.typeOf(a);
  1241. if ("object" == b || "array" == b) {
  1242. if (goog.isFunction(a.clone)) return a.clone();
  1243. b = "array" == b ? [] : {};
  1244. for (var c in a) b[c] = goog.object.unsafeClone(a[c]);
  1245. return b
  1246. }
  1247. return a
  1248. };
  1249. goog.object.transpose = function(a) {
  1250. var b = {},
  1251. c;
  1252. for (c in a) b[a[c]] = c;
  1253. return b
  1254. };
  1255. goog.object.PROTOTYPE_FIELDS_ =
  1256. "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  1257. goog.object.extend = function(a, b) {
  1258. for (var c, d, e = 1; e < arguments.length; e++) {
  1259. d = arguments[e];
  1260. for (c in d) a[c] = d[c];
  1261. for (var f = 0; f < goog.object.PROTOTYPE_FIELDS_.length; f++) c = goog.object.PROTOTYPE_FIELDS_[f], Object
  1262. .prototype.hasOwnProperty.call(d, c) && (a[c] = d[c])
  1263. }
  1264. };
  1265. goog.object.create = function(a) {
  1266. var b = arguments.length;
  1267. if (1 == b && Array.isArray(arguments[0])) return goog.object.create.apply(null, arguments[0]);
  1268. if (b % 2) throw Error("Uneven number of arguments");
  1269. for (var c = {}, d = 0; d < b; d += 2) c[arguments[d]] = arguments[d + 1];
  1270. return c
  1271. };
  1272. goog.object.createSet = function(a) {
  1273. var b = arguments.length;
  1274. if (1 == b && Array.isArray(arguments[0])) return goog.object.createSet.apply(null, arguments[0]);
  1275. for (var c = {}, d = 0; d < b; d++) c[arguments[d]] = !0;
  1276. return c
  1277. };
  1278. goog.object.createImmutableView = function(a) {
  1279. var b = a;
  1280. Object.isFrozen && !Object.isFrozen(a) && (b = Object.create(a), Object.freeze(b));
  1281. return b
  1282. };
  1283. goog.object.isImmutableView = function(a) {
  1284. return !!Object.isFrozen && Object.isFrozen(a)
  1285. };
  1286. goog.object.getAllPropertyNames = function(a, b, c) {
  1287. if (!a) return [];
  1288. if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) return goog.object.getKeys(a);
  1289. for (var d = {}; a && (a !== Object.prototype || b) && (a !== Function.prototype || c);) {
  1290. for (var e = Object.getOwnPropertyNames(a), f = 0; f < e.length; f++) d[e[f]] = !0;
  1291. a = Object.getPrototypeOf(a)
  1292. }
  1293. return goog.object.getKeys(d)
  1294. };
  1295. goog.object.getSuperClass = function(a) {
  1296. return (a = Object.getPrototypeOf(a.prototype)) && a.constructor
  1297. };
  1298. var jspb = {
  1299. asserts: {}
  1300. };
  1301. jspb.asserts.doAssertFailure = function(a, b, c, d) {
  1302. var e = "Assertion failed";
  1303. if (c) {
  1304. e += ": " + c;
  1305. var f = d
  1306. } else a && (e += ": " + a, f = b);
  1307. throw Error("" + e, f || []);
  1308. };
  1309. jspb.asserts.assert = function(a, b, c) {
  1310. for (var d = [], e = 2; e < arguments.length; ++e) d[e - 2] = arguments[e];
  1311. a || jspb.asserts.doAssertFailure("", null, b, d);
  1312. return a
  1313. };
  1314. jspb.asserts.assertString = function(a, b, c) {
  1315. for (var d = [], e = 2; e < arguments.length; ++e) d[e - 2] = arguments[e];
  1316. "string" !== typeof a && jspb.asserts.doAssertFailure("Expected string but got %s: %s.", [goog.typeOf(a), a], b,
  1317. d);
  1318. return a
  1319. };
  1320. jspb.asserts.assertArray = function(a, b, c) {
  1321. for (var d = [], e = 2; e < arguments.length; ++e) d[e - 2] = arguments[e];
  1322. Array.isArray(a) || jspb.asserts.doAssertFailure("Expected array but got %s: %s.", [goog.typeOf(a), a], b, d);
  1323. return a
  1324. };
  1325. jspb.asserts.fail = function(a, b) {
  1326. for (var c = [], d = 1; d < arguments.length; ++d) c[d - 1] = arguments[d];
  1327. throw Error("Failure" + (a ? ": " + a : ""), c);
  1328. };
  1329. jspb.asserts.assertInstanceof = function(a, b, c, d) {
  1330. for (var e = [], f = 3; f < arguments.length; ++f) e[f - 3] = arguments[f];
  1331. a instanceof b || jspb.asserts.doAssertFailure("Expected instanceof %s but got %s.", [jspb.asserts.getType(b),
  1332. jspb.asserts.getType(a)
  1333. ], c, e);
  1334. return a
  1335. };
  1336. jspb.asserts.getType = function(a) {
  1337. return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a
  1338. .constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" :
  1339. typeof a
  1340. };
  1341. jspb.BinaryConstants = {};
  1342. jspb.ConstBinaryMessage = function() {};
  1343. jspb.BinaryMessage = function() {};
  1344. jspb.BinaryConstants.FieldType = {
  1345. INVALID: -1,
  1346. DOUBLE: 1,
  1347. FLOAT: 2,
  1348. INT64: 3,
  1349. UINT64: 4,
  1350. INT32: 5,
  1351. FIXED64: 6,
  1352. FIXED32: 7,
  1353. BOOL: 8,
  1354. STRING: 9,
  1355. GROUP: 10,
  1356. MESSAGE: 11,
  1357. BYTES: 12,
  1358. UINT32: 13,
  1359. ENUM: 14,
  1360. SFIXED32: 15,
  1361. SFIXED64: 16,
  1362. SINT32: 17,
  1363. SINT64: 18,
  1364. FHASH64: 30,
  1365. VHASH64: 31
  1366. };
  1367. jspb.BinaryConstants.WireType = {
  1368. INVALID: -1,
  1369. VARINT: 0,
  1370. FIXED64: 1,
  1371. DELIMITED: 2,
  1372. START_GROUP: 3,
  1373. END_GROUP: 4,
  1374. FIXED32: 5
  1375. };
  1376. jspb.BinaryConstants.FieldTypeToWireType = function(a) {
  1377. var b = jspb.BinaryConstants.FieldType,
  1378. c = jspb.BinaryConstants.WireType;
  1379. switch (a) {
  1380. case b.INT32:
  1381. case b.INT64:
  1382. case b.UINT32:
  1383. case b.UINT64:
  1384. case b.SINT32:
  1385. case b.SINT64:
  1386. case b.BOOL:
  1387. case b.ENUM:
  1388. case b.VHASH64:
  1389. return c.VARINT;
  1390. case b.DOUBLE:
  1391. case b.FIXED64:
  1392. case b.SFIXED64:
  1393. case b.FHASH64:
  1394. return c.FIXED64;
  1395. case b.STRING:
  1396. case b.MESSAGE:
  1397. case b.BYTES:
  1398. return c.DELIMITED;
  1399. case b.FLOAT:
  1400. case b.FIXED32:
  1401. case b.SFIXED32:
  1402. return c.FIXED32;
  1403. default:
  1404. return c.INVALID
  1405. }
  1406. };
  1407. jspb.BinaryConstants.INVALID_FIELD_NUMBER = -1;
  1408. jspb.BinaryConstants.FLOAT32_EPS = 1.401298464324817E-45;
  1409. jspb.BinaryConstants.FLOAT32_MIN = 1.1754943508222875E-38;
  1410. jspb.BinaryConstants.FLOAT32_MAX = 3.4028234663852886E38;
  1411. jspb.BinaryConstants.FLOAT64_EPS = 4.9E-324;
  1412. jspb.BinaryConstants.FLOAT64_MIN = 2.2250738585072014E-308;
  1413. jspb.BinaryConstants.FLOAT64_MAX = 1.7976931348623157E308;
  1414. jspb.BinaryConstants.TWO_TO_20 = 1048576;
  1415. jspb.BinaryConstants.TWO_TO_23 = 8388608;
  1416. jspb.BinaryConstants.TWO_TO_31 = 2147483648;
  1417. jspb.BinaryConstants.TWO_TO_32 = 4294967296;
  1418. jspb.BinaryConstants.TWO_TO_52 = 4503599627370496;
  1419. jspb.BinaryConstants.TWO_TO_63 = 0x7fffffffffffffff;
  1420. jspb.BinaryConstants.TWO_TO_64 = 1.8446744073709552E19;
  1421. jspb.BinaryConstants.ZERO_HASH = "\x00\x00\x00\x00\x00\x00\x00\x00";
  1422. goog.debug = {};
  1423. goog.debug.Error = function(a) {
  1424. if (Error.captureStackTrace) Error.captureStackTrace(this, goog.debug.Error);
  1425. else {
  1426. var b = Error().stack;
  1427. b && (this.stack = b)
  1428. }
  1429. a && (this.message = String(a));
  1430. this.reportErrorToServer = !0
  1431. };
  1432. goog.inherits(goog.debug.Error, Error);
  1433. goog.debug.Error.prototype.name = "CustomError";
  1434. goog.dom = {};
  1435. goog.dom.NodeType = {
  1436. ELEMENT: 1,
  1437. ATTRIBUTE: 2,
  1438. TEXT: 3,
  1439. CDATA_SECTION: 4,
  1440. ENTITY_REFERENCE: 5,
  1441. ENTITY: 6,
  1442. PROCESSING_INSTRUCTION: 7,
  1443. COMMENT: 8,
  1444. DOCUMENT: 9,
  1445. DOCUMENT_TYPE: 10,
  1446. DOCUMENT_FRAGMENT: 11,
  1447. NOTATION: 12
  1448. };
  1449. goog.asserts = {};
  1450. goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
  1451. goog.asserts.AssertionError = function(a, b) {
  1452. goog.debug.Error.call(this, goog.asserts.subs_(a, b));
  1453. this.messagePattern = a
  1454. };
  1455. goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
  1456. goog.asserts.AssertionError.prototype.name = "AssertionError";
  1457. goog.asserts.DEFAULT_ERROR_HANDLER = function(a) {
  1458. throw a;
  1459. };
  1460. goog.asserts.errorHandler_ = goog.asserts.DEFAULT_ERROR_HANDLER;
  1461. goog.asserts.subs_ = function(a, b) {
  1462. a = a.split("%s");
  1463. for (var c = "", d = a.length - 1, e = 0; e < d; e++) c += a[e] + (e < b.length ? b[e] : "%s");
  1464. return c + a[d]
  1465. };
  1466. goog.asserts.doAssertFailure_ = function(a, b, c, d) {
  1467. var e = "Assertion failed";
  1468. if (c) {
  1469. e += ": " + c;
  1470. var f = d
  1471. } else a && (e += ": " + a, f = b);
  1472. a = new goog.asserts.AssertionError("" + e, f || []);
  1473. goog.asserts.errorHandler_(a)
  1474. };
  1475. goog.asserts.setErrorHandler = function(a) {
  1476. goog.asserts.ENABLE_ASSERTS && (goog.asserts.errorHandler_ = a)
  1477. };
  1478. goog.asserts.assert = function(a, b, c) {
  1479. goog.asserts.ENABLE_ASSERTS && !a && goog.asserts.doAssertFailure_("", null, b, Array.prototype.slice.call(
  1480. arguments, 2));
  1481. return a
  1482. };
  1483. goog.asserts.assertExists = function(a, b, c) {
  1484. goog.asserts.ENABLE_ASSERTS && null == a && goog.asserts.doAssertFailure_("Expected to exist: %s.", [a], b,
  1485. Array.prototype.slice.call(arguments, 2));
  1486. return a
  1487. };
  1488. goog.asserts.fail = function(a, b) {
  1489. goog.asserts.ENABLE_ASSERTS && goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure" + (a ?
  1490. ": " + a : ""), Array.prototype.slice.call(arguments, 1)))
  1491. };
  1492. goog.asserts.assertNumber = function(a, b, c) {
  1493. goog.asserts.ENABLE_ASSERTS && "number" !== typeof a && goog.asserts.doAssertFailure_(
  1494. "Expected number but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1495. return a
  1496. };
  1497. goog.asserts.assertString = function(a, b, c) {
  1498. goog.asserts.ENABLE_ASSERTS && "string" !== typeof a && goog.asserts.doAssertFailure_(
  1499. "Expected string but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1500. return a
  1501. };
  1502. goog.asserts.assertFunction = function(a, b, c) {
  1503. goog.asserts.ENABLE_ASSERTS && !goog.isFunction(a) && goog.asserts.doAssertFailure_(
  1504. "Expected function but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1505. return a
  1506. };
  1507. goog.asserts.assertObject = function(a, b, c) {
  1508. goog.asserts.ENABLE_ASSERTS && !goog.isObject(a) && goog.asserts.doAssertFailure_(
  1509. "Expected object but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1510. return a
  1511. };
  1512. goog.asserts.assertArray = function(a, b, c) {
  1513. goog.asserts.ENABLE_ASSERTS && !Array.isArray(a) && goog.asserts.doAssertFailure_(
  1514. "Expected array but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1515. return a
  1516. };
  1517. goog.asserts.assertBoolean = function(a, b, c) {
  1518. goog.asserts.ENABLE_ASSERTS && "boolean" !== typeof a && goog.asserts.doAssertFailure_(
  1519. "Expected boolean but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1520. return a
  1521. };
  1522. goog.asserts.assertElement = function(a, b, c) {
  1523. !goog.asserts.ENABLE_ASSERTS || goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT || goog.asserts
  1524. .doAssertFailure_("Expected Element but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(
  1525. arguments, 2));
  1526. return a
  1527. };
  1528. goog.asserts.assertInstanceof = function(a, b, c, d) {
  1529. !goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_(
  1530. "Expected instanceof %s but got %s.", [goog.asserts.getType_(b), goog.asserts.getType_(a)], c, Array
  1531. .prototype.slice.call(arguments, 3));
  1532. return a
  1533. };
  1534. goog.asserts.assertFinite = function(a, b, c) {
  1535. !goog.asserts.ENABLE_ASSERTS || "number" == typeof a && isFinite(a) || goog.asserts.doAssertFailure_(
  1536. "Expected %s to be a finite number but it is not.", [a], b, Array.prototype.slice.call(arguments, 2));
  1537. return a
  1538. };
  1539. goog.asserts.assertObjectPrototypeIsIntact = function() {
  1540. for (var a in Object.prototype) goog.asserts.fail(a + " should not be enumerable in Object.prototype.")
  1541. };
  1542. goog.asserts.getType_ = function(a) {
  1543. return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a
  1544. .constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" :
  1545. typeof a
  1546. };
  1547. goog.array = {};
  1548. goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE;
  1549. goog.array.ASSUME_NATIVE_FUNCTIONS = 2012 < goog.FEATURESET_YEAR;
  1550. goog.array.peek = function(a) {
  1551. return a[a.length - 1]
  1552. };
  1553. goog.array.last = goog.array.peek;
  1554. goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ?
  1555. function(a, b, c) {
  1556. goog.asserts.assert(null != a.length);
  1557. return Array.prototype.indexOf.call(a, b, c)
  1558. } : function(a, b, c) {
  1559. c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
  1560. if ("string" === typeof a) return "string" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, c);
  1561. for (; c < a.length; c++)
  1562. if (c in a && a[c] === b) return c;
  1563. return -1
  1564. };
  1565. goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype
  1566. .lastIndexOf) ? function(a, b, c) {
  1567. goog.asserts.assert(null != a.length);
  1568. return Array.prototype.lastIndexOf.call(a, b, null == c ? a.length - 1 : c)
  1569. } : function(a, b, c) {
  1570. c = null == c ? a.length - 1 : c;
  1571. 0 > c && (c = Math.max(0, a.length + c));
  1572. if ("string" === typeof a) return "string" !== typeof b || 1 != b.length ? -1 : a.lastIndexOf(b, c);
  1573. for (; 0 <= c; c--)
  1574. if (c in a && a[c] === b) return c;
  1575. return -1
  1576. };
  1577. goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ?
  1578. function(a, b, c) {
  1579. goog.asserts.assert(null != a.length);
  1580. Array.prototype.forEach.call(a, b, c)
  1581. } : function(a, b, c) {
  1582. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++) f in e && b.call(c, e[f],
  1583. f, a)
  1584. };
  1585. goog.array.forEachRight = function(a, b, c) {
  1586. var d = a.length,
  1587. e = "string" === typeof a ? a.split("") : a;
  1588. for (--d; 0 <= d; --d) d in e && b.call(c, e[d], d, a)
  1589. };
  1590. goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ?
  1591. function(a, b, c) {
  1592. goog.asserts.assert(null != a.length);
  1593. return Array.prototype.filter.call(a, b, c)
  1594. } : function(a, b, c) {
  1595. for (var d = a.length, e = [], f = 0, g = "string" === typeof a ? a.split("") : a, h = 0; h < d; h++)
  1596. if (h in g) {
  1597. var k = g[h];
  1598. b.call(c, k, h, a) && (e[f++] = k)
  1599. } return e
  1600. };
  1601. goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ? function(
  1602. a, b, c) {
  1603. goog.asserts.assert(null != a.length);
  1604. return Array.prototype.map.call(a, b, c)
  1605. } : function(a, b, c) {
  1606. for (var d = a.length, e = Array(d), f = "string" === typeof a ? a.split("") : a, g = 0; g < d; g++) g in f && (
  1607. e[g] = b.call(c, f[g], g, a));
  1608. return e
  1609. };
  1610. goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ?
  1611. function(a, b, c, d) {
  1612. goog.asserts.assert(null != a.length);
  1613. d && (b = goog.bind(b, d));
  1614. return Array.prototype.reduce.call(a, b, c)
  1615. } : function(a, b, c, d) {
  1616. var e = c;
  1617. goog.array.forEach(a, function(c, g) {
  1618. e = b.call(d, e, c, g, a)
  1619. });
  1620. return e
  1621. };
  1622. goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype
  1623. .reduceRight) ? function(a, b, c, d) {
  1624. goog.asserts.assert(null != a.length);
  1625. goog.asserts.assert(null != b);
  1626. d && (b = goog.bind(b, d));
  1627. return Array.prototype.reduceRight.call(a, b, c)
  1628. } : function(a, b, c, d) {
  1629. var e = c;
  1630. goog.array.forEachRight(a, function(c, g) {
  1631. e = b.call(d, e, c, g, a)
  1632. });
  1633. return e
  1634. };
  1635. goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.some) ?
  1636. function(a, b, c) {
  1637. goog.asserts.assert(null != a.length);
  1638. return Array.prototype.some.call(a, b, c)
  1639. } : function(a, b, c) {
  1640. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++)
  1641. if (f in e && b.call(c, e[f], f, a)) return !0;
  1642. return !1
  1643. };
  1644. goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.every) ?
  1645. function(a, b, c) {
  1646. goog.asserts.assert(null != a.length);
  1647. return Array.prototype.every.call(a, b, c)
  1648. } : function(a, b, c) {
  1649. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++)
  1650. if (f in e && !b.call(c, e[f], f, a)) return !1;
  1651. return !0
  1652. };
  1653. goog.array.count = function(a, b, c) {
  1654. var d = 0;
  1655. goog.array.forEach(a, function(a, f, g) {
  1656. b.call(c, a, f, g) && ++d
  1657. }, c);
  1658. return d
  1659. };
  1660. goog.array.find = function(a, b, c) {
  1661. b = goog.array.findIndex(a, b, c);
  1662. return 0 > b ? null : "string" === typeof a ? a.charAt(b) : a[b]
  1663. };
  1664. goog.array.findIndex = function(a, b, c) {
  1665. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++)
  1666. if (f in e && b.call(c, e[f], f, a)) return f;
  1667. return -1
  1668. };
  1669. goog.array.findRight = function(a, b, c) {
  1670. b = goog.array.findIndexRight(a, b, c);
  1671. return 0 > b ? null : "string" === typeof a ? a.charAt(b) : a[b]
  1672. };
  1673. goog.array.findIndexRight = function(a, b, c) {
  1674. var d = a.length,
  1675. e = "string" === typeof a ? a.split("") : a;
  1676. for (--d; 0 <= d; d--)
  1677. if (d in e && b.call(c, e[d], d, a)) return d;
  1678. return -1
  1679. };
  1680. goog.array.contains = function(a, b) {
  1681. return 0 <= goog.array.indexOf(a, b)
  1682. };
  1683. goog.array.isEmpty = function(a) {
  1684. return 0 == a.length
  1685. };
  1686. goog.array.clear = function(a) {
  1687. if (!Array.isArray(a))
  1688. for (var b = a.length - 1; 0 <= b; b--) delete a[b];
  1689. a.length = 0
  1690. };
  1691. goog.array.insert = function(a, b) {
  1692. goog.array.contains(a, b) || a.push(b)
  1693. };
  1694. goog.array.insertAt = function(a, b, c) {
  1695. goog.array.splice(a, c, 0, b)
  1696. };
  1697. goog.array.insertArrayAt = function(a, b, c) {
  1698. goog.partial(goog.array.splice, a, c, 0).apply(null, b)
  1699. };
  1700. goog.array.insertBefore = function(a, b, c) {
  1701. var d;
  1702. 2 == arguments.length || 0 > (d = goog.array.indexOf(a, c)) ? a.push(b) : goog.array.insertAt(a, b, d)
  1703. };
  1704. goog.array.remove = function(a, b) {
  1705. b = goog.array.indexOf(a, b);
  1706. var c;
  1707. (c = 0 <= b) && goog.array.removeAt(a, b);
  1708. return c
  1709. };
  1710. goog.array.removeLast = function(a, b) {
  1711. b = goog.array.lastIndexOf(a, b);
  1712. return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1
  1713. };
  1714. goog.array.removeAt = function(a, b) {
  1715. goog.asserts.assert(null != a.length);
  1716. return 1 == Array.prototype.splice.call(a, b, 1).length
  1717. };
  1718. goog.array.removeIf = function(a, b, c) {
  1719. b = goog.array.findIndex(a, b, c);
  1720. return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1
  1721. };
  1722. goog.array.removeAllIf = function(a, b, c) {
  1723. var d = 0;
  1724. goog.array.forEachRight(a, function(e, f) {
  1725. b.call(c, e, f, a) && goog.array.removeAt(a, f) && d++
  1726. });
  1727. return d
  1728. };
  1729. goog.array.concat = function(a) {
  1730. return Array.prototype.concat.apply([], arguments)
  1731. };
  1732. goog.array.join = function(a) {
  1733. return Array.prototype.concat.apply([], arguments)
  1734. };
  1735. goog.array.toArray = function(a) {
  1736. var b = a.length;
  1737. if (0 < b) {
  1738. for (var c = Array(b), d = 0; d < b; d++) c[d] = a[d];
  1739. return c
  1740. }
  1741. return []
  1742. };
  1743. goog.array.clone = goog.array.toArray;
  1744. goog.array.extend = function(a, b) {
  1745. for (var c = 1; c < arguments.length; c++) {
  1746. var d = arguments[c];
  1747. if (goog.isArrayLike(d)) {
  1748. var e = a.length || 0,
  1749. f = d.length || 0;
  1750. a.length = e + f;
  1751. for (var g = 0; g < f; g++) a[e + g] = d[g]
  1752. } else a.push(d)
  1753. }
  1754. };
  1755. goog.array.splice = function(a, b, c, d) {
  1756. goog.asserts.assert(null != a.length);
  1757. return Array.prototype.splice.apply(a, goog.array.slice(arguments, 1))
  1758. };
  1759. goog.array.slice = function(a, b, c) {
  1760. goog.asserts.assert(null != a.length);
  1761. return 2 >= arguments.length ? Array.prototype.slice.call(a, b) : Array.prototype.slice.call(a, b, c)
  1762. };
  1763. goog.array.removeDuplicates = function(a, b, c) {
  1764. b = b || a;
  1765. var d = function(a) {
  1766. return goog.isObject(a) ? "o" + goog.getUid(a) : (typeof a).charAt(0) + a
  1767. };
  1768. c = c || d;
  1769. d = {};
  1770. for (var e = 0, f = 0; f < a.length;) {
  1771. var g = a[f++],
  1772. h = c(g);
  1773. Object.prototype.hasOwnProperty.call(d, h) || (d[h] = !0, b[e++] = g)
  1774. }
  1775. b.length = e
  1776. };
  1777. goog.array.binarySearch = function(a, b, c) {
  1778. return goog.array.binarySearch_(a, c || goog.array.defaultCompare, !1, b)
  1779. };
  1780. goog.array.binarySelect = function(a, b, c) {
  1781. return goog.array.binarySearch_(a, b, !0, void 0, c)
  1782. };
  1783. goog.array.binarySearch_ = function(a, b, c, d, e) {
  1784. for (var f = 0, g = a.length, h; f < g;) {
  1785. var k = f + (g - f >>> 1);
  1786. var l = c ? b.call(e, a[k], k, a) : b(d, a[k]);
  1787. 0 < l ? f = k + 1 : (g = k, h = !l)
  1788. }
  1789. return h ? f : -f - 1
  1790. };
  1791. goog.array.sort = function(a, b) {
  1792. a.sort(b || goog.array.defaultCompare)
  1793. };
  1794. goog.array.stableSort = function(a, b) {
  1795. for (var c = Array(a.length), d = 0; d < a.length; d++) c[d] = {
  1796. index: d,
  1797. value: a[d]
  1798. };
  1799. var e = b || goog.array.defaultCompare;
  1800. goog.array.sort(c, function(a, b) {
  1801. return e(a.value, b.value) || a.index - b.index
  1802. });
  1803. for (d = 0; d < a.length; d++) a[d] = c[d].value
  1804. };
  1805. goog.array.sortByKey = function(a, b, c) {
  1806. var d = c || goog.array.defaultCompare;
  1807. goog.array.sort(a, function(a, c) {
  1808. return d(b(a), b(c))
  1809. })
  1810. };
  1811. goog.array.sortObjectsByKey = function(a, b, c) {
  1812. goog.array.sortByKey(a, function(a) {
  1813. return a[b]
  1814. }, c)
  1815. };
  1816. goog.array.isSorted = function(a, b, c) {
  1817. b = b || goog.array.defaultCompare;
  1818. for (var d = 1; d < a.length; d++) {
  1819. var e = b(a[d - 1], a[d]);
  1820. if (0 < e || 0 == e && c) return !1
  1821. }
  1822. return !0
  1823. };
  1824. goog.array.equals = function(a, b, c) {
  1825. if (!goog.isArrayLike(a) || !goog.isArrayLike(b) || a.length != b.length) return !1;
  1826. var d = a.length;
  1827. c = c || goog.array.defaultCompareEquality;
  1828. for (var e = 0; e < d; e++)
  1829. if (!c(a[e], b[e])) return !1;
  1830. return !0
  1831. };
  1832. goog.array.compare3 = function(a, b, c) {
  1833. c = c || goog.array.defaultCompare;
  1834. for (var d = Math.min(a.length, b.length), e = 0; e < d; e++) {
  1835. var f = c(a[e], b[e]);
  1836. if (0 != f) return f
  1837. }
  1838. return goog.array.defaultCompare(a.length, b.length)
  1839. };
  1840. goog.array.defaultCompare = function(a, b) {
  1841. return a > b ? 1 : a < b ? -1 : 0
  1842. };
  1843. goog.array.inverseDefaultCompare = function(a, b) {
  1844. return -goog.array.defaultCompare(a, b)
  1845. };
  1846. goog.array.defaultCompareEquality = function(a, b) {
  1847. return a === b
  1848. };
  1849. goog.array.binaryInsert = function(a, b, c) {
  1850. c = goog.array.binarySearch(a, b, c);
  1851. return 0 > c ? (goog.array.insertAt(a, b, -(c + 1)), !0) : !1
  1852. };
  1853. goog.array.binaryRemove = function(a, b, c) {
  1854. b = goog.array.binarySearch(a, b, c);
  1855. return 0 <= b ? goog.array.removeAt(a, b) : !1
  1856. };
  1857. goog.array.bucket = function(a, b, c) {
  1858. for (var d = {}, e = 0; e < a.length; e++) {
  1859. var f = a[e],
  1860. g = b.call(c, f, e, a);
  1861. void 0 !== g && (d[g] || (d[g] = [])).push(f)
  1862. }
  1863. return d
  1864. };
  1865. goog.array.toObject = function(a, b, c) {
  1866. var d = {};
  1867. goog.array.forEach(a, function(e, f) {
  1868. d[b.call(c, e, f, a)] = e
  1869. });
  1870. return d
  1871. };
  1872. goog.array.range = function(a, b, c) {
  1873. var d = [],
  1874. e = 0,
  1875. f = a;
  1876. c = c || 1;
  1877. void 0 !== b && (e = a, f = b);
  1878. if (0 > c * (f - e)) return [];
  1879. if (0 < c)
  1880. for (a = e; a < f; a += c) d.push(a);
  1881. else
  1882. for (a = e; a > f; a += c) d.push(a);
  1883. return d
  1884. };
  1885. goog.array.repeat = function(a, b) {
  1886. for (var c = [], d = 0; d < b; d++) c[d] = a;
  1887. return c
  1888. };
  1889. goog.array.flatten = function(a) {
  1890. for (var b = [], c = 0; c < arguments.length; c++) {
  1891. var d = arguments[c];
  1892. if (Array.isArray(d))
  1893. for (var e = 0; e < d.length; e += 8192) {
  1894. var f = goog.array.slice(d, e, e + 8192);
  1895. f = goog.array.flatten.apply(null, f);
  1896. for (var g = 0; g < f.length; g++) b.push(f[g])
  1897. } else b.push(d)
  1898. }
  1899. return b
  1900. };
  1901. goog.array.rotate = function(a, b) {
  1902. goog.asserts.assert(null != a.length);
  1903. a.length && (b %= a.length, 0 < b ? Array.prototype.unshift.apply(a, a.splice(-b, b)) : 0 > b && Array.prototype
  1904. .push.apply(a, a.splice(0, -b)));
  1905. return a
  1906. };
  1907. goog.array.moveItem = function(a, b, c) {
  1908. goog.asserts.assert(0 <= b && b < a.length);
  1909. goog.asserts.assert(0 <= c && c < a.length);
  1910. b = Array.prototype.splice.call(a, b, 1);
  1911. Array.prototype.splice.call(a, c, 0, b[0])
  1912. };
  1913. goog.array.zip = function(a) {
  1914. if (!arguments.length) return [];
  1915. for (var b = [], c = arguments[0].length, d = 1; d < arguments.length; d++) arguments[d].length < c && (c =
  1916. arguments[d].length);
  1917. for (d = 0; d < c; d++) {
  1918. for (var e = [], f = 0; f < arguments.length; f++) e.push(arguments[f][d]);
  1919. b.push(e)
  1920. }
  1921. return b
  1922. };
  1923. goog.array.shuffle = function(a, b) {
  1924. b = b || Math.random;
  1925. for (var c = a.length - 1; 0 < c; c--) {
  1926. var d = Math.floor(b() * (c + 1)),
  1927. e = a[c];
  1928. a[c] = a[d];
  1929. a[d] = e
  1930. }
  1931. };
  1932. goog.array.copyByIndex = function(a, b) {
  1933. var c = [];
  1934. goog.array.forEach(b, function(b) {
  1935. c.push(a[b])
  1936. });
  1937. return c
  1938. };
  1939. goog.array.concatMap = function(a, b, c) {
  1940. return goog.array.concat.apply([], goog.array.map(a, b, c))
  1941. };
  1942. goog.crypt = {};
  1943. goog.crypt.stringToByteArray = function(a) {
  1944. for (var b = [], c = 0, d = 0; d < a.length; d++) {
  1945. var e = a.charCodeAt(d);
  1946. 255 < e && (b[c++] = e & 255, e >>= 8);
  1947. b[c++] = e
  1948. }
  1949. return b
  1950. };
  1951. goog.crypt.byteArrayToString = function(a) {
  1952. if (8192 >= a.length) return String.fromCharCode.apply(null, a);
  1953. for (var b = "", c = 0; c < a.length; c += 8192) {
  1954. var d = goog.array.slice(a, c, c + 8192);
  1955. b += String.fromCharCode.apply(null, d)
  1956. }
  1957. return b
  1958. };
  1959. goog.crypt.byteArrayToHex = function(a, b) {
  1960. return goog.array.map(a, function(a) {
  1961. a = a.toString(16);
  1962. return 1 < a.length ? a : "0" + a
  1963. }).join(b || "")
  1964. };
  1965. goog.crypt.hexToByteArray = function(a) {
  1966. goog.asserts.assert(0 == a.length % 2, "Key string length must be multiple of 2");
  1967. for (var b = [], c = 0; c < a.length; c += 2) b.push(parseInt(a.substring(c, c + 2), 16));
  1968. return b
  1969. };
  1970. goog.crypt.stringToUtf8ByteArray = function(a) {
  1971. for (var b = [], c = 0, d = 0; d < a.length; d++) {
  1972. var e = a.charCodeAt(d);
  1973. 128 > e ? b[c++] = e : (2048 > e ? b[c++] = e >> 6 | 192 : (55296 == (e & 64512) && d + 1 < a.length &&
  1974. 56320 == (a.charCodeAt(d + 1) & 64512) ? (e = 65536 + ((e & 1023) << 10) + (a.charCodeAt(++d) &
  1975. 1023), b[c++] = e >> 18 | 240, b[c++] = e >> 12 & 63 | 128) : b[c++] = e >> 12 | 224, b[
  1976. c++] = e >> 6 & 63 | 128), b[c++] = e & 63 | 128)
  1977. }
  1978. return b
  1979. };
  1980. goog.crypt.utf8ByteArrayToString = function(a) {
  1981. for (var b = [], c = 0, d = 0; c < a.length;) {
  1982. var e = a[c++];
  1983. if (128 > e) b[d++] = String.fromCharCode(e);
  1984. else if (191 < e && 224 > e) {
  1985. var f = a[c++];
  1986. b[d++] = String.fromCharCode((e & 31) << 6 | f & 63)
  1987. } else if (239 < e && 365 > e) {
  1988. f = a[c++];
  1989. var g = a[c++],
  1990. h = a[c++];
  1991. e = ((e & 7) << 18 | (f & 63) << 12 | (g & 63) << 6 | h & 63) - 65536;
  1992. b[d++] = String.fromCharCode(55296 + (e >> 10));
  1993. b[d++] = String.fromCharCode(56320 + (e & 1023))
  1994. } else f = a[c++], g = a[c++], b[d++] = String.fromCharCode((e & 15) << 12 | (f & 63) << 6 | g & 63)
  1995. }
  1996. return b.join("")
  1997. };
  1998. goog.crypt.xorByteArray = function(a, b) {
  1999. goog.asserts.assert(a.length == b.length, "XOR array lengths must match");
  2000. for (var c = [], d = 0; d < a.length; d++) c.push(a[d] ^ b[d]);
  2001. return c
  2002. };
  2003. goog.dom.asserts = {};
  2004. goog.dom.asserts.assertIsLocation = function(a) {
  2005. if (goog.asserts.ENABLE_ASSERTS) {
  2006. var b = goog.dom.asserts.getWindow_(a);
  2007. b && (!a || !(a instanceof b.Location) && a instanceof b.Element) && goog.asserts.fail(
  2008. "Argument is not a Location (or a non-Element mock); got: %s", goog.dom.asserts.debugStringForType_(
  2009. a))
  2010. }
  2011. return a
  2012. };
  2013. goog.dom.asserts.assertIsElementType_ = function(a, b) {
  2014. if (goog.asserts.ENABLE_ASSERTS) {
  2015. var c = goog.dom.asserts.getWindow_(a);
  2016. c && "undefined" != typeof c[b] && (a && (a instanceof c[b] || !(a instanceof c.Location || a instanceof c
  2017. .Element)) || goog.asserts.fail(
  2018. "Argument is not a %s (or a non-Element, non-Location mock); got: %s", b, goog.dom.asserts
  2019. .debugStringForType_(a)))
  2020. }
  2021. return a
  2022. };
  2023. goog.dom.asserts.assertIsHTMLAnchorElement = function(a) {
  2024. return goog.dom.asserts.assertIsElementType_(a, "HTMLAnchorElement")
  2025. };
  2026. goog.dom.asserts.assertIsHTMLButtonElement = function(a) {
  2027. return goog.dom.asserts.assertIsElementType_(a, "HTMLButtonElement")
  2028. };
  2029. goog.dom.asserts.assertIsHTMLLinkElement = function(a) {
  2030. return goog.dom.asserts.assertIsElementType_(a, "HTMLLinkElement")
  2031. };
  2032. goog.dom.asserts.assertIsHTMLImageElement = function(a) {
  2033. return goog.dom.asserts.assertIsElementType_(a, "HTMLImageElement")
  2034. };
  2035. goog.dom.asserts.assertIsHTMLAudioElement = function(a) {
  2036. return goog.dom.asserts.assertIsElementType_(a, "HTMLAudioElement")
  2037. };
  2038. goog.dom.asserts.assertIsHTMLVideoElement = function(a) {
  2039. return goog.dom.asserts.assertIsElementType_(a, "HTMLVideoElement")
  2040. };
  2041. goog.dom.asserts.assertIsHTMLInputElement = function(a) {
  2042. return goog.dom.asserts.assertIsElementType_(a, "HTMLInputElement")
  2043. };
  2044. goog.dom.asserts.assertIsHTMLTextAreaElement = function(a) {
  2045. return goog.dom.asserts.assertIsElementType_(a, "HTMLTextAreaElement")
  2046. };
  2047. goog.dom.asserts.assertIsHTMLCanvasElement = function(a) {
  2048. return goog.dom.asserts.assertIsElementType_(a, "HTMLCanvasElement")
  2049. };
  2050. goog.dom.asserts.assertIsHTMLEmbedElement = function(a) {
  2051. return goog.dom.asserts.assertIsElementType_(a, "HTMLEmbedElement")
  2052. };
  2053. goog.dom.asserts.assertIsHTMLFormElement = function(a) {
  2054. return goog.dom.asserts.assertIsElementType_(a, "HTMLFormElement")
  2055. };
  2056. goog.dom.asserts.assertIsHTMLFrameElement = function(a) {
  2057. return goog.dom.asserts.assertIsElementType_(a, "HTMLFrameElement")
  2058. };
  2059. goog.dom.asserts.assertIsHTMLIFrameElement = function(a) {
  2060. return goog.dom.asserts.assertIsElementType_(a, "HTMLIFrameElement")
  2061. };
  2062. goog.dom.asserts.assertIsHTMLObjectElement = function(a) {
  2063. return goog.dom.asserts.assertIsElementType_(a, "HTMLObjectElement")
  2064. };
  2065. goog.dom.asserts.assertIsHTMLScriptElement = function(a) {
  2066. return goog.dom.asserts.assertIsElementType_(a, "HTMLScriptElement")
  2067. };
  2068. goog.dom.asserts.debugStringForType_ = function(a) {
  2069. if (goog.isObject(a)) try {
  2070. return a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a)
  2071. } catch (b) {
  2072. return "<object could not be stringified>"
  2073. } else return void 0 === a ? "undefined" : null === a ? "null" : typeof a
  2074. };
  2075. goog.dom.asserts.getWindow_ = function(a) {
  2076. try {
  2077. var b = a && a.ownerDocument,
  2078. c = b && (b.defaultView || b.parentWindow);
  2079. c = c || goog.global;
  2080. if (c.Element && c.Location) return c
  2081. } catch (d) {}
  2082. return null
  2083. };
  2084. goog.functions = {};
  2085. goog.functions.constant = function(a) {
  2086. return function() {
  2087. return a
  2088. }
  2089. };
  2090. goog.functions.FALSE = function() {
  2091. return !1
  2092. };
  2093. goog.functions.TRUE = function() {
  2094. return !0
  2095. };
  2096. goog.functions.NULL = function() {
  2097. return null
  2098. };
  2099. goog.functions.identity = function(a, b) {
  2100. return a
  2101. };
  2102. goog.functions.error = function(a) {
  2103. return function() {
  2104. throw Error(a);
  2105. }
  2106. };
  2107. goog.functions.fail = function(a) {
  2108. return function() {
  2109. throw a;
  2110. }
  2111. };
  2112. goog.functions.lock = function(a, b) {
  2113. b = b || 0;
  2114. return function() {
  2115. return a.apply(this, Array.prototype.slice.call(arguments, 0, b))
  2116. }
  2117. };
  2118. goog.functions.nth = function(a) {
  2119. return function() {
  2120. return arguments[a]
  2121. }
  2122. };
  2123. goog.functions.partialRight = function(a, b) {
  2124. var c = Array.prototype.slice.call(arguments, 1);
  2125. return function() {
  2126. var b = Array.prototype.slice.call(arguments);
  2127. b.push.apply(b, c);
  2128. return a.apply(this, b)
  2129. }
  2130. };
  2131. goog.functions.withReturnValue = function(a, b) {
  2132. return goog.functions.sequence(a, goog.functions.constant(b))
  2133. };
  2134. goog.functions.equalTo = function(a, b) {
  2135. return function(c) {
  2136. return b ? a == c : a === c
  2137. }
  2138. };
  2139. goog.functions.compose = function(a, b) {
  2140. var c = arguments,
  2141. d = c.length;
  2142. return function() {
  2143. var a;
  2144. d && (a = c[d - 1].apply(this, arguments));
  2145. for (var b = d - 2; 0 <= b; b--) a = c[b].call(this, a);
  2146. return a
  2147. }
  2148. };
  2149. goog.functions.sequence = function(a) {
  2150. var b = arguments,
  2151. c = b.length;
  2152. return function() {
  2153. for (var a, e = 0; e < c; e++) a = b[e].apply(this, arguments);
  2154. return a
  2155. }
  2156. };
  2157. goog.functions.and = function(a) {
  2158. var b = arguments,
  2159. c = b.length;
  2160. return function() {
  2161. for (var a = 0; a < c; a++)
  2162. if (!b[a].apply(this, arguments)) return !1;
  2163. return !0
  2164. }
  2165. };
  2166. goog.functions.or = function(a) {
  2167. var b = arguments,
  2168. c = b.length;
  2169. return function() {
  2170. for (var a = 0; a < c; a++)
  2171. if (b[a].apply(this, arguments)) return !0;
  2172. return !1
  2173. }
  2174. };
  2175. goog.functions.not = function(a) {
  2176. return function() {
  2177. return !a.apply(this, arguments)
  2178. }
  2179. };
  2180. goog.functions.create = function(a, b) {
  2181. var c = function() {};
  2182. c.prototype = a.prototype;
  2183. c = new c;
  2184. a.apply(c, Array.prototype.slice.call(arguments, 1));
  2185. return c
  2186. };
  2187. goog.functions.CACHE_RETURN_VALUE = !0;
  2188. goog.functions.cacheReturnValue = function(a) {
  2189. var b = !1,
  2190. c;
  2191. return function() {
  2192. if (!goog.functions.CACHE_RETURN_VALUE) return a();
  2193. b || (c = a(), b = !0);
  2194. return c
  2195. }
  2196. };
  2197. goog.functions.once = function(a) {
  2198. var b = a;
  2199. return function() {
  2200. if (b) {
  2201. var a = b;
  2202. b = null;
  2203. a()
  2204. }
  2205. }
  2206. };
  2207. goog.functions.debounce = function(a, b, c) {
  2208. var d = 0;
  2209. return function(e) {
  2210. goog.global.clearTimeout(d);
  2211. var f = arguments;
  2212. d = goog.global.setTimeout(function() {
  2213. a.apply(c, f)
  2214. }, b)
  2215. }
  2216. };
  2217. goog.functions.throttle = function(a, b, c) {
  2218. var d = 0,
  2219. e = !1,
  2220. f = [],
  2221. g = function() {
  2222. d = 0;
  2223. e && (e = !1, h())
  2224. },
  2225. h = function() {
  2226. d = goog.global.setTimeout(g, b);
  2227. a.apply(c, f)
  2228. };
  2229. return function(a) {
  2230. f = arguments;
  2231. d ? e = !0 : h()
  2232. }
  2233. };
  2234. goog.functions.rateLimit = function(a, b, c) {
  2235. var d = 0,
  2236. e = function() {
  2237. d = 0
  2238. };
  2239. return function(f) {
  2240. d || (d = goog.global.setTimeout(e, b), a.apply(c, arguments))
  2241. }
  2242. };
  2243. goog.dom.HtmlElement = function() {};
  2244. goog.dom.TagName = function(a) {
  2245. this.tagName_ = a
  2246. };
  2247. goog.dom.TagName.prototype.toString = function() {
  2248. return this.tagName_
  2249. };
  2250. goog.dom.TagName.A = new goog.dom.TagName("A");
  2251. goog.dom.TagName.ABBR = new goog.dom.TagName("ABBR");
  2252. goog.dom.TagName.ACRONYM = new goog.dom.TagName("ACRONYM");
  2253. goog.dom.TagName.ADDRESS = new goog.dom.TagName("ADDRESS");
  2254. goog.dom.TagName.APPLET = new goog.dom.TagName("APPLET");
  2255. goog.dom.TagName.AREA = new goog.dom.TagName("AREA");
  2256. goog.dom.TagName.ARTICLE = new goog.dom.TagName("ARTICLE");
  2257. goog.dom.TagName.ASIDE = new goog.dom.TagName("ASIDE");
  2258. goog.dom.TagName.AUDIO = new goog.dom.TagName("AUDIO");
  2259. goog.dom.TagName.B = new goog.dom.TagName("B");
  2260. goog.dom.TagName.BASE = new goog.dom.TagName("BASE");
  2261. goog.dom.TagName.BASEFONT = new goog.dom.TagName("BASEFONT");
  2262. goog.dom.TagName.BDI = new goog.dom.TagName("BDI");
  2263. goog.dom.TagName.BDO = new goog.dom.TagName("BDO");
  2264. goog.dom.TagName.BIG = new goog.dom.TagName("BIG");
  2265. goog.dom.TagName.BLOCKQUOTE = new goog.dom.TagName("BLOCKQUOTE");
  2266. goog.dom.TagName.BODY = new goog.dom.TagName("BODY");
  2267. goog.dom.TagName.BR = new goog.dom.TagName("BR");
  2268. goog.dom.TagName.BUTTON = new goog.dom.TagName("BUTTON");
  2269. goog.dom.TagName.CANVAS = new goog.dom.TagName("CANVAS");
  2270. goog.dom.TagName.CAPTION = new goog.dom.TagName("CAPTION");
  2271. goog.dom.TagName.CENTER = new goog.dom.TagName("CENTER");
  2272. goog.dom.TagName.CITE = new goog.dom.TagName("CITE");
  2273. goog.dom.TagName.CODE = new goog.dom.TagName("CODE");
  2274. goog.dom.TagName.COL = new goog.dom.TagName("COL");
  2275. goog.dom.TagName.COLGROUP = new goog.dom.TagName("COLGROUP");
  2276. goog.dom.TagName.COMMAND = new goog.dom.TagName("COMMAND");
  2277. goog.dom.TagName.DATA = new goog.dom.TagName("DATA");
  2278. goog.dom.TagName.DATALIST = new goog.dom.TagName("DATALIST");
  2279. goog.dom.TagName.DD = new goog.dom.TagName("DD");
  2280. goog.dom.TagName.DEL = new goog.dom.TagName("DEL");
  2281. goog.dom.TagName.DETAILS = new goog.dom.TagName("DETAILS");
  2282. goog.dom.TagName.DFN = new goog.dom.TagName("DFN");
  2283. goog.dom.TagName.DIALOG = new goog.dom.TagName("DIALOG");
  2284. goog.dom.TagName.DIR = new goog.dom.TagName("DIR");
  2285. goog.dom.TagName.DIV = new goog.dom.TagName("DIV");
  2286. goog.dom.TagName.DL = new goog.dom.TagName("DL");
  2287. goog.dom.TagName.DT = new goog.dom.TagName("DT");
  2288. goog.dom.TagName.EM = new goog.dom.TagName("EM");
  2289. goog.dom.TagName.EMBED = new goog.dom.TagName("EMBED");
  2290. goog.dom.TagName.FIELDSET = new goog.dom.TagName("FIELDSET");
  2291. goog.dom.TagName.FIGCAPTION = new goog.dom.TagName("FIGCAPTION");
  2292. goog.dom.TagName.FIGURE = new goog.dom.TagName("FIGURE");
  2293. goog.dom.TagName.FONT = new goog.dom.TagName("FONT");
  2294. goog.dom.TagName.FOOTER = new goog.dom.TagName("FOOTER");
  2295. goog.dom.TagName.FORM = new goog.dom.TagName("FORM");
  2296. goog.dom.TagName.FRAME = new goog.dom.TagName("FRAME");
  2297. goog.dom.TagName.FRAMESET = new goog.dom.TagName("FRAMESET");
  2298. goog.dom.TagName.H1 = new goog.dom.TagName("H1");
  2299. goog.dom.TagName.H2 = new goog.dom.TagName("H2");
  2300. goog.dom.TagName.H3 = new goog.dom.TagName("H3");
  2301. goog.dom.TagName.H4 = new goog.dom.TagName("H4");
  2302. goog.dom.TagName.H5 = new goog.dom.TagName("H5");
  2303. goog.dom.TagName.H6 = new goog.dom.TagName("H6");
  2304. goog.dom.TagName.HEAD = new goog.dom.TagName("HEAD");
  2305. goog.dom.TagName.HEADER = new goog.dom.TagName("HEADER");
  2306. goog.dom.TagName.HGROUP = new goog.dom.TagName("HGROUP");
  2307. goog.dom.TagName.HR = new goog.dom.TagName("HR");
  2308. goog.dom.TagName.HTML = new goog.dom.TagName("HTML");
  2309. goog.dom.TagName.I = new goog.dom.TagName("I");
  2310. goog.dom.TagName.IFRAME = new goog.dom.TagName("IFRAME");
  2311. goog.dom.TagName.IMG = new goog.dom.TagName("IMG");
  2312. goog.dom.TagName.INPUT = new goog.dom.TagName("INPUT");
  2313. goog.dom.TagName.INS = new goog.dom.TagName("INS");
  2314. goog.dom.TagName.ISINDEX = new goog.dom.TagName("ISINDEX");
  2315. goog.dom.TagName.KBD = new goog.dom.TagName("KBD");
  2316. goog.dom.TagName.KEYGEN = new goog.dom.TagName("KEYGEN");
  2317. goog.dom.TagName.LABEL = new goog.dom.TagName("LABEL");
  2318. goog.dom.TagName.LEGEND = new goog.dom.TagName("LEGEND");
  2319. goog.dom.TagName.LI = new goog.dom.TagName("LI");
  2320. goog.dom.TagName.LINK = new goog.dom.TagName("LINK");
  2321. goog.dom.TagName.MAIN = new goog.dom.TagName("MAIN");
  2322. goog.dom.TagName.MAP = new goog.dom.TagName("MAP");
  2323. goog.dom.TagName.MARK = new goog.dom.TagName("MARK");
  2324. goog.dom.TagName.MATH = new goog.dom.TagName("MATH");
  2325. goog.dom.TagName.MENU = new goog.dom.TagName("MENU");
  2326. goog.dom.TagName.MENUITEM = new goog.dom.TagName("MENUITEM");
  2327. goog.dom.TagName.META = new goog.dom.TagName("META");
  2328. goog.dom.TagName.METER = new goog.dom.TagName("METER");
  2329. goog.dom.TagName.NAV = new goog.dom.TagName("NAV");
  2330. goog.dom.TagName.NOFRAMES = new goog.dom.TagName("NOFRAMES");
  2331. goog.dom.TagName.NOSCRIPT = new goog.dom.TagName("NOSCRIPT");
  2332. goog.dom.TagName.OBJECT = new goog.dom.TagName("OBJECT");
  2333. goog.dom.TagName.OL = new goog.dom.TagName("OL");
  2334. goog.dom.TagName.OPTGROUP = new goog.dom.TagName("OPTGROUP");
  2335. goog.dom.TagName.OPTION = new goog.dom.TagName("OPTION");
  2336. goog.dom.TagName.OUTPUT = new goog.dom.TagName("OUTPUT");
  2337. goog.dom.TagName.P = new goog.dom.TagName("P");
  2338. goog.dom.TagName.PARAM = new goog.dom.TagName("PARAM");
  2339. goog.dom.TagName.PICTURE = new goog.dom.TagName("PICTURE");
  2340. goog.dom.TagName.PRE = new goog.dom.TagName("PRE");
  2341. goog.dom.TagName.PROGRESS = new goog.dom.TagName("PROGRESS");
  2342. goog.dom.TagName.Q = new goog.dom.TagName("Q");
  2343. goog.dom.TagName.RP = new goog.dom.TagName("RP");
  2344. goog.dom.TagName.RT = new goog.dom.TagName("RT");
  2345. goog.dom.TagName.RTC = new goog.dom.TagName("RTC");
  2346. goog.dom.TagName.RUBY = new goog.dom.TagName("RUBY");
  2347. goog.dom.TagName.S = new goog.dom.TagName("S");
  2348. goog.dom.TagName.SAMP = new goog.dom.TagName("SAMP");
  2349. goog.dom.TagName.SCRIPT = new goog.dom.TagName("SCRIPT");
  2350. goog.dom.TagName.SECTION = new goog.dom.TagName("SECTION");
  2351. goog.dom.TagName.SELECT = new goog.dom.TagName("SELECT");
  2352. goog.dom.TagName.SMALL = new goog.dom.TagName("SMALL");
  2353. goog.dom.TagName.SOURCE = new goog.dom.TagName("SOURCE");
  2354. goog.dom.TagName.SPAN = new goog.dom.TagName("SPAN");
  2355. goog.dom.TagName.STRIKE = new goog.dom.TagName("STRIKE");
  2356. goog.dom.TagName.STRONG = new goog.dom.TagName("STRONG");
  2357. goog.dom.TagName.STYLE = new goog.dom.TagName("STYLE");
  2358. goog.dom.TagName.SUB = new goog.dom.TagName("SUB");
  2359. goog.dom.TagName.SUMMARY = new goog.dom.TagName("SUMMARY");
  2360. goog.dom.TagName.SUP = new goog.dom.TagName("SUP");
  2361. goog.dom.TagName.SVG = new goog.dom.TagName("SVG");
  2362. goog.dom.TagName.TABLE = new goog.dom.TagName("TABLE");
  2363. goog.dom.TagName.TBODY = new goog.dom.TagName("TBODY");
  2364. goog.dom.TagName.TD = new goog.dom.TagName("TD");
  2365. goog.dom.TagName.TEMPLATE = new goog.dom.TagName("TEMPLATE");
  2366. goog.dom.TagName.TEXTAREA = new goog.dom.TagName("TEXTAREA");
  2367. goog.dom.TagName.TFOOT = new goog.dom.TagName("TFOOT");
  2368. goog.dom.TagName.TH = new goog.dom.TagName("TH");
  2369. goog.dom.TagName.THEAD = new goog.dom.TagName("THEAD");
  2370. goog.dom.TagName.TIME = new goog.dom.TagName("TIME");
  2371. goog.dom.TagName.TITLE = new goog.dom.TagName("TITLE");
  2372. goog.dom.TagName.TR = new goog.dom.TagName("TR");
  2373. goog.dom.TagName.TRACK = new goog.dom.TagName("TRACK");
  2374. goog.dom.TagName.TT = new goog.dom.TagName("TT");
  2375. goog.dom.TagName.U = new goog.dom.TagName("U");
  2376. goog.dom.TagName.UL = new goog.dom.TagName("UL");
  2377. goog.dom.TagName.VAR = new goog.dom.TagName("VAR");
  2378. goog.dom.TagName.VIDEO = new goog.dom.TagName("VIDEO");
  2379. goog.dom.TagName.WBR = new goog.dom.TagName("WBR");
  2380. goog.dom.tags = {};
  2381. goog.dom.tags.VOID_TAGS_ = {
  2382. area: !0,
  2383. base: !0,
  2384. br: !0,
  2385. col: !0,
  2386. command: !0,
  2387. embed: !0,
  2388. hr: !0,
  2389. img: !0,
  2390. input: !0,
  2391. keygen: !0,
  2392. link: !0,
  2393. meta: !0,
  2394. param: !0,
  2395. source: !0,
  2396. track: !0,
  2397. wbr: !0
  2398. };
  2399. goog.dom.tags.isVoidTag = function(a) {
  2400. return !0 === goog.dom.tags.VOID_TAGS_[a]
  2401. };
  2402. goog.html = {};
  2403. goog.html.trustedtypes = {};
  2404. goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY = goog.TRUSTED_TYPES_POLICY_NAME ? goog
  2405. .createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME + "#html") : null;
  2406. goog.string = {};
  2407. goog.string.TypedString = function() {};
  2408. goog.string.Const = function(a, b) {
  2409. this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = a === goog.string.Const
  2410. .GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_ && b || "";
  2411. this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_
  2412. };
  2413. goog.string.Const.prototype.implementsGoogStringTypedString = !0;
  2414. goog.string.Const.prototype.getTypedStringValue = function() {
  2415. return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_
  2416. };
  2417. goog.DEBUG && (goog.string.Const.prototype.toString = function() {
  2418. return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}"
  2419. });
  2420. goog.string.Const.unwrap = function(a) {
  2421. if (a instanceof goog.string.Const && a.constructor === goog.string.Const && a
  2422. .STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) return a
  2423. .stringConstValueWithSecurityContract__googStringSecurityPrivate_;
  2424. goog.asserts.fail("expected object of type Const, got '" + a + "'");
  2425. return "type_error:Const"
  2426. };
  2427. goog.string.Const.from = function(a) {
  2428. return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_, a)
  2429. };
  2430. goog.string.Const.TYPE_MARKER_ = {};
  2431. goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_ = {};
  2432. goog.string.Const.EMPTY = goog.string.Const.from("");
  2433. goog.html.SafeScript = function() {
  2434. this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
  2435. this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript
  2436. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
  2437. };
  2438. goog.html.SafeScript.prototype.implementsGoogStringTypedString = !0;
  2439. goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2440. goog.html.SafeScript.fromConstant = function(a) {
  2441. a = goog.string.Const.unwrap(a);
  2442. return 0 === a.length ? goog.html.SafeScript.EMPTY : goog.html.SafeScript
  2443. .createSafeScriptSecurityPrivateDoNotAccessOrElse(a)
  2444. };
  2445. goog.html.SafeScript.fromConstantAndArgs = function(a, b) {
  2446. for (var c = [], d = 1; d < arguments.length; d++) c.push(goog.html.SafeScript.stringify_(arguments[d]));
  2447. return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("(" + goog.string.Const.unwrap(a) +
  2448. ")(" + c.join(", ") + ");")
  2449. };
  2450. goog.html.SafeScript.fromJson = function(a) {
  2451. return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(a))
  2452. };
  2453. goog.html.SafeScript.prototype.getTypedStringValue = function() {
  2454. return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()
  2455. };
  2456. goog.DEBUG && (goog.html.SafeScript.prototype.toString = function() {
  2457. return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}"
  2458. });
  2459. goog.html.SafeScript.unwrap = function(a) {
  2460. return goog.html.SafeScript.unwrapTrustedScript(a).toString()
  2461. };
  2462. goog.html.SafeScript.unwrapTrustedScript = function(a) {
  2463. if (a instanceof goog.html.SafeScript && a.constructor === goog.html.SafeScript && a
  2464. .SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript
  2465. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;
  2466. goog.asserts.fail("expected object of type SafeScript, got '" + a + "' of type " + goog.typeOf(a));
  2467. return "type_error:SafeScript"
  2468. };
  2469. goog.html.SafeScript.stringify_ = function(a) {
  2470. return JSON.stringify(a).replace(/</g, "\\x3c")
  2471. };
  2472. goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function(a) {
  2473. return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(a)
  2474. };
  2475. goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a) {
  2476. this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = goog.html.trustedtypes
  2477. .PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY
  2478. .createScript(a) : a;
  2479. return this
  2480. };
  2481. goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
  2482. goog.fs = {};
  2483. goog.fs.url = {};
  2484. goog.fs.url.createObjectUrl = function(a) {
  2485. return goog.fs.url.getUrlObject_().createObjectURL(a)
  2486. };
  2487. goog.fs.url.revokeObjectUrl = function(a) {
  2488. goog.fs.url.getUrlObject_().revokeObjectURL(a)
  2489. };
  2490. goog.fs.url.UrlObject_ = function() {};
  2491. goog.fs.url.UrlObject_.prototype.createObjectURL = function(a) {};
  2492. goog.fs.url.UrlObject_.prototype.revokeObjectURL = function(a) {};
  2493. goog.fs.url.getUrlObject_ = function() {
  2494. var a = goog.fs.url.findUrlObject_();
  2495. if (null != a) return a;
  2496. throw Error("This browser doesn't seem to support blob URLs");
  2497. };
  2498. goog.fs.url.findUrlObject_ = function() {
  2499. return void 0 !== goog.global.URL && void 0 !== goog.global.URL.createObjectURL ? goog.global.URL : void 0 !==
  2500. goog.global.webkitURL && void 0 !== goog.global.webkitURL.createObjectURL ? goog.global.webkitURL :
  2501. void 0 !== goog.global.createObjectURL ? goog.global : null
  2502. };
  2503. goog.fs.url.browserSupportsObjectUrls = function() {
  2504. return null != goog.fs.url.findUrlObject_()
  2505. };
  2506. goog.fs.blob = {};
  2507. goog.fs.blob.getBlob = function(a) {
  2508. var b = goog.global.BlobBuilder || goog.global.WebKitBlobBuilder;
  2509. if (void 0 !== b) {
  2510. b = new b;
  2511. for (var c = 0; c < arguments.length; c++) b.append(arguments[c]);
  2512. return b.getBlob()
  2513. }
  2514. return goog.fs.blob.getBlobWithProperties(goog.array.toArray(arguments))
  2515. };
  2516. goog.fs.blob.getBlobWithProperties = function(a, b, c) {
  2517. var d = goog.global.BlobBuilder || goog.global.WebKitBlobBuilder;
  2518. if (void 0 !== d) {
  2519. d = new d;
  2520. for (var e = 0; e < a.length; e++) d.append(a[e], c);
  2521. return d.getBlob(b)
  2522. }
  2523. if (void 0 !== goog.global.Blob) return d = {}, b && (d.type = b), c && (d.endings = c), new Blob(a, d);
  2524. throw Error("This browser doesn't seem to support creating Blobs");
  2525. };
  2526. goog.i18n = {};
  2527. goog.i18n.bidi = {};
  2528. goog.i18n.bidi.FORCE_RTL = !1;
  2529. goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || ("ar" == goog.LOCALE.substring(0, 2).toLowerCase() || "fa" == goog
  2530. .LOCALE.substring(0, 2).toLowerCase() || "he" == goog.LOCALE.substring(0, 2).toLowerCase() || "iw" == goog
  2531. .LOCALE.substring(0, 2).toLowerCase() || "ps" == goog.LOCALE.substring(0, 2).toLowerCase() || "sd" == goog
  2532. .LOCALE.substring(0, 2).toLowerCase() || "ug" == goog.LOCALE.substring(0, 2).toLowerCase() || "ur" == goog
  2533. .LOCALE.substring(0, 2).toLowerCase() || "yi" == goog.LOCALE.substring(0, 2).toLowerCase()) && (2 == goog.LOCALE
  2534. .length ||
  2535. "-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) || 3 <= goog.LOCALE.length && "ckb" ==
  2536. goog.LOCALE.substring(0, 3).toLowerCase() && (3 == goog.LOCALE.length || "-" == goog.LOCALE.substring(3, 4) ||
  2537. "_" == goog.LOCALE.substring(3, 4)) || 7 <= goog.LOCALE.length && ("-" == goog.LOCALE.substring(2, 3) || "_" ==
  2538. goog.LOCALE.substring(2, 3)) && ("adlm" == goog.LOCALE.substring(3, 7).toLowerCase() || "arab" == goog.LOCALE
  2539. .substring(3, 7).toLowerCase() || "hebr" == goog.LOCALE.substring(3, 7).toLowerCase() || "nkoo" == goog.LOCALE
  2540. .substring(3,
  2541. 7).toLowerCase() || "rohg" == goog.LOCALE.substring(3, 7).toLowerCase() || "thaa" == goog.LOCALE.substring(
  2542. 3, 7).toLowerCase()) || 8 <= goog.LOCALE.length && ("-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE
  2543. .substring(3, 4)) && ("adlm" == goog.LOCALE.substring(4, 8).toLowerCase() || "arab" == goog.LOCALE.substring(4,
  2544. 8).toLowerCase() || "hebr" == goog.LOCALE.substring(4, 8).toLowerCase() || "nkoo" == goog.LOCALE.substring(
  2545. 4, 8).toLowerCase() || "rohg" == goog.LOCALE.substring(4, 8).toLowerCase() || "thaa" == goog.LOCALE
  2546. .substring(4, 8).toLowerCase());
  2547. goog.i18n.bidi.Format = {
  2548. LRE: "\u202a",
  2549. RLE: "\u202b",
  2550. PDF: "\u202c",
  2551. LRM: "\u200e",
  2552. RLM: "\u200f"
  2553. };
  2554. goog.i18n.bidi.Dir = {
  2555. LTR: 1,
  2556. RTL: -1,
  2557. NEUTRAL: 0
  2558. };
  2559. goog.i18n.bidi.RIGHT = "right";
  2560. goog.i18n.bidi.LEFT = "left";
  2561. goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
  2562. goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
  2563. goog.i18n.bidi.toDir = function(a, b) {
  2564. return "number" == typeof a ? 0 < a ? goog.i18n.bidi.Dir.LTR : 0 > a ? goog.i18n.bidi.Dir.RTL : b ? null : goog
  2565. .i18n.bidi.Dir.NEUTRAL : null == a ? null : a ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR
  2566. };
  2567. goog.i18n.bidi.ltrChars_ =
  2568. "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
  2569. goog.i18n.bidi.rtlChars_ = "\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc";
  2570. goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
  2571. goog.i18n.bidi.stripHtmlIfNeeded_ = function(a, b) {
  2572. return b ? a.replace(goog.i18n.bidi.htmlSkipReg_, "") : a
  2573. };
  2574. goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
  2575. goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
  2576. goog.i18n.bidi.hasAnyRtl = function(a, b) {
  2577. return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2578. };
  2579. goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
  2580. goog.i18n.bidi.hasAnyLtr = function(a, b) {
  2581. return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2582. };
  2583. goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
  2584. goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
  2585. goog.i18n.bidi.isRtlChar = function(a) {
  2586. return goog.i18n.bidi.rtlRe_.test(a)
  2587. };
  2588. goog.i18n.bidi.isLtrChar = function(a) {
  2589. return goog.i18n.bidi.ltrRe_.test(a)
  2590. };
  2591. goog.i18n.bidi.isNeutralChar = function(a) {
  2592. return !goog.i18n.bidi.isLtrChar(a) && !goog.i18n.bidi.isRtlChar(a)
  2593. };
  2594. goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
  2595. goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
  2596. goog.i18n.bidi.startsWithRtl = function(a, b) {
  2597. return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2598. };
  2599. goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
  2600. goog.i18n.bidi.startsWithLtr = function(a, b) {
  2601. return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2602. };
  2603. goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
  2604. goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
  2605. goog.i18n.bidi.isNeutralText = function(a, b) {
  2606. a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b);
  2607. return goog.i18n.bidi.isRequiredLtrRe_.test(a) || !goog.i18n.bidi.hasAnyLtr(a) && !goog.i18n.bidi.hasAnyRtl(a)
  2608. };
  2609. goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ +
  2610. "]*$");
  2611. goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ +
  2612. "]*$");
  2613. goog.i18n.bidi.endsWithLtr = function(a, b) {
  2614. return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2615. };
  2616. goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
  2617. goog.i18n.bidi.endsWithRtl = function(a, b) {
  2618. return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2619. };
  2620. goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
  2621. goog.i18n.bidi.rtlLocalesRe_ =
  2622. /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
  2623. goog.i18n.bidi.isRtlLanguage = function(a) {
  2624. return goog.i18n.bidi.rtlLocalesRe_.test(a)
  2625. };
  2626. goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
  2627. goog.i18n.bidi.guardBracketInText = function(a, b) {
  2628. b = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
  2629. return a.replace(goog.i18n.bidi.bracketGuardTextRe_, b + "$&" + b)
  2630. };
  2631. goog.i18n.bidi.enforceRtlInHtml = function(a) {
  2632. return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=rtl") : "\n<span dir=rtl>" + a + "</span>"
  2633. };
  2634. goog.i18n.bidi.enforceRtlInText = function(a) {
  2635. return goog.i18n.bidi.Format.RLE + a + goog.i18n.bidi.Format.PDF
  2636. };
  2637. goog.i18n.bidi.enforceLtrInHtml = function(a) {
  2638. return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=ltr") : "\n<span dir=ltr>" + a + "</span>"
  2639. };
  2640. goog.i18n.bidi.enforceLtrInText = function(a) {
  2641. return goog.i18n.bidi.Format.LRE + a + goog.i18n.bidi.Format.PDF
  2642. };
  2643. goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
  2644. goog.i18n.bidi.leftRe_ = /left/gi;
  2645. goog.i18n.bidi.rightRe_ = /right/gi;
  2646. goog.i18n.bidi.tempRe_ = /%%%%/g;
  2647. goog.i18n.bidi.mirrorCSS = function(a) {
  2648. return a.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(
  2649. goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT)
  2650. };
  2651. goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
  2652. goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
  2653. goog.i18n.bidi.normalizeHebrewQuote = function(a) {
  2654. return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi
  2655. .singleQuoteSubstituteRe_, "$1\u05f3")
  2656. };
  2657. goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
  2658. goog.i18n.bidi.hasNumeralsRe_ = /[\d\u06f0-\u06f9]/;
  2659. goog.i18n.bidi.rtlDetectionThreshold_ = .4;
  2660. goog.i18n.bidi.estimateDirection = function(a, b) {
  2661. var c = 0,
  2662. d = 0,
  2663. e = !1;
  2664. a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b).split(goog.i18n.bidi.wordSeparatorRe_);
  2665. for (b = 0; b < a.length; b++) {
  2666. var f = a[b];
  2667. goog.i18n.bidi.startsWithRtl(f) ? (c++, d++) : goog.i18n.bidi.isRequiredLtrRe_.test(f) ? e = !0 : goog.i18n
  2668. .bidi.hasAnyLtr(f) ? d++ : goog.i18n.bidi.hasNumeralsRe_.test(f) && (e = !0)
  2669. }
  2670. return 0 == d ? e ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : c / d > goog.i18n.bidi
  2671. .rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR
  2672. };
  2673. goog.i18n.bidi.detectRtlDirectionality = function(a, b) {
  2674. return goog.i18n.bidi.estimateDirection(a, b) == goog.i18n.bidi.Dir.RTL
  2675. };
  2676. goog.i18n.bidi.setElementDirAndAlign = function(a, b) {
  2677. a && (b = goog.i18n.bidi.toDir(b)) && (a.style.textAlign = b == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT :
  2678. goog.i18n.bidi.LEFT, a.dir = b == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr")
  2679. };
  2680. goog.i18n.bidi.setElementDirByTextDirectionality = function(a, b) {
  2681. switch (goog.i18n.bidi.estimateDirection(b)) {
  2682. case goog.i18n.bidi.Dir.LTR:
  2683. a.dir = "ltr";
  2684. break;
  2685. case goog.i18n.bidi.Dir.RTL:
  2686. a.dir = "rtl";
  2687. break;
  2688. default:
  2689. a.removeAttribute("dir")
  2690. }
  2691. };
  2692. goog.i18n.bidi.DirectionalString = function() {};
  2693. goog.html.TrustedResourceUrl = function(a, b) {
  2694. this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a === goog.html.TrustedResourceUrl
  2695. .CONSTRUCTOR_TOKEN_PRIVATE_ && b || "";
  2696. this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl
  2697. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
  2698. };
  2699. goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = !0;
  2700. goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {
  2701. return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()
  2702. };
  2703. goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
  2704. goog.html.TrustedResourceUrl.prototype.getDirection = function() {
  2705. return goog.i18n.bidi.Dir.LTR
  2706. };
  2707. goog.html.TrustedResourceUrl.prototype.cloneWithParams = function(a, b) {
  2708. var c = goog.html.TrustedResourceUrl.unwrap(this);
  2709. c = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(c);
  2710. var d = c[3] || "";
  2711. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c[1] + goog.html
  2712. .TrustedResourceUrl.stringifyParams_("?", c[2] || "", a) + goog.html.TrustedResourceUrl
  2713. .stringifyParams_("#", d, b))
  2714. };
  2715. goog.DEBUG && (goog.html.TrustedResourceUrl.prototype.toString = function() {
  2716. return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}"
  2717. });
  2718. goog.html.TrustedResourceUrl.unwrap = function(a) {
  2719. return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(a).toString()
  2720. };
  2721. goog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function(a) {
  2722. if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a
  2723. .TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl
  2724. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
  2725. goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "' of type " + goog.typeOf(a));
  2726. return "type_error:TrustedResourceUrl"
  2727. };
  2728. goog.html.TrustedResourceUrl.format = function(a, b) {
  2729. var c = goog.string.Const.unwrap(a);
  2730. if (!goog.html.TrustedResourceUrl.BASE_URL_.test(c)) throw Error("Invalid TrustedResourceUrl format: " + c);
  2731. a = c.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_, function(a, e) {
  2732. if (!Object.prototype.hasOwnProperty.call(b, e)) throw Error('Found marker, "' + e +
  2733. '", in format string, "' + c + '", but no valid label mapping found in args: ' + JSON
  2734. .stringify(b));
  2735. a = b[e];
  2736. return a instanceof goog.string.Const ? goog.string.Const.unwrap(a) :
  2737. encodeURIComponent(String(a))
  2738. });
  2739. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)
  2740. };
  2741. goog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\w+)}/g;
  2742. goog.html.TrustedResourceUrl.BASE_URL_ =
  2743. /^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i;
  2744. goog.html.TrustedResourceUrl.URL_PARAM_PARSER_ = /^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;
  2745. goog.html.TrustedResourceUrl.formatWithParams = function(a, b, c, d) {
  2746. return goog.html.TrustedResourceUrl.format(a, b).cloneWithParams(c, d)
  2747. };
  2748. goog.html.TrustedResourceUrl.fromConstant = function(a) {
  2749. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const
  2750. .unwrap(a))
  2751. };
  2752. goog.html.TrustedResourceUrl.fromConstants = function(a) {
  2753. for (var b = "", c = 0; c < a.length; c++) b += goog.string.Const.unwrap(a[c]);
  2754. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)
  2755. };
  2756. goog.html.TrustedResourceUrl.fromSafeScript = function(a) {
  2757. a = goog.fs.blob.getBlobWithProperties([goog.html.SafeScript.unwrap(a)], "text/javascript");
  2758. a = goog.fs.url.createObjectUrl(a);
  2759. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)
  2760. };
  2761. goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2762. goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(a) {
  2763. a = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes
  2764. .PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(a) : a;
  2765. return new goog.html.TrustedResourceUrl(goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_, a)
  2766. };
  2767. goog.html.TrustedResourceUrl.stringifyParams_ = function(a, b, c) {
  2768. if (null == c) return b;
  2769. if ("string" === typeof c) return c ? a + encodeURIComponent(c) : "";
  2770. for (var d in c) {
  2771. var e = c[d];
  2772. e = Array.isArray(e) ? e : [e];
  2773. for (var f = 0; f < e.length; f++) {
  2774. var g = e[f];
  2775. null != g && (b || (b = a), b += (b.length > a.length ? "&" : "") + encodeURIComponent(d) + "=" +
  2776. encodeURIComponent(String(g)))
  2777. }
  2778. }
  2779. return b
  2780. };
  2781. goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};
  2782. goog.string.internal = {};
  2783. goog.string.internal.startsWith = function(a, b) {
  2784. return 0 == a.lastIndexOf(b, 0)
  2785. };
  2786. goog.string.internal.endsWith = function(a, b) {
  2787. var c = a.length - b.length;
  2788. return 0 <= c && a.indexOf(b, c) == c
  2789. };
  2790. goog.string.internal.caseInsensitiveStartsWith = function(a, b) {
  2791. return 0 == goog.string.internal.caseInsensitiveCompare(b, a.substr(0, b.length))
  2792. };
  2793. goog.string.internal.caseInsensitiveEndsWith = function(a, b) {
  2794. return 0 == goog.string.internal.caseInsensitiveCompare(b, a.substr(a.length - b.length, b.length))
  2795. };
  2796. goog.string.internal.caseInsensitiveEquals = function(a, b) {
  2797. return a.toLowerCase() == b.toLowerCase()
  2798. };
  2799. goog.string.internal.isEmptyOrWhitespace = function(a) {
  2800. return /^[\s\xa0]*$/.test(a)
  2801. };
  2802. goog.string.internal.trim = goog.TRUSTED_SITE && String.prototype.trim ? function(a) {
  2803. return a.trim()
  2804. } : function(a) {
  2805. return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]
  2806. };
  2807. goog.string.internal.caseInsensitiveCompare = function(a, b) {
  2808. a = String(a).toLowerCase();
  2809. b = String(b).toLowerCase();
  2810. return a < b ? -1 : a == b ? 0 : 1
  2811. };
  2812. goog.string.internal.newLineToBr = function(a, b) {
  2813. return a.replace(/(\r\n|\r|\n)/g, b ? "<br />" : "<br>")
  2814. };
  2815. goog.string.internal.htmlEscape = function(a, b) {
  2816. if (b) a = a.replace(goog.string.internal.AMP_RE_, "&amp;").replace(goog.string.internal.LT_RE_, "&lt;")
  2817. .replace(goog.string.internal.GT_RE_, "&gt;").replace(goog.string.internal.QUOT_RE_, "&quot;").replace(goog
  2818. .string.internal.SINGLE_QUOTE_RE_, "&#39;").replace(goog.string.internal.NULL_RE_, "&#0;");
  2819. else {
  2820. if (!goog.string.internal.ALL_RE_.test(a)) return a; - 1 != a.indexOf("&") && (a = a.replace(goog.string
  2821. .internal.AMP_RE_, "&amp;")); - 1 != a.indexOf("<") && (a = a.replace(goog.string.internal.LT_RE_,
  2822. "&lt;")); - 1 != a.indexOf(">") && (a = a.replace(goog.string.internal.GT_RE_, "&gt;")); - 1 != a
  2823. .indexOf('"') && (a = a.replace(goog.string.internal.QUOT_RE_, "&quot;")); - 1 != a.indexOf("'") && (a =
  2824. a.replace(goog.string.internal.SINGLE_QUOTE_RE_, "&#39;")); - 1 != a.indexOf("\x00") && (a = a.replace(
  2825. goog.string.internal.NULL_RE_, "&#0;"))
  2826. }
  2827. return a
  2828. };
  2829. goog.string.internal.AMP_RE_ = /&/g;
  2830. goog.string.internal.LT_RE_ = /</g;
  2831. goog.string.internal.GT_RE_ = />/g;
  2832. goog.string.internal.QUOT_RE_ = /"/g;
  2833. goog.string.internal.SINGLE_QUOTE_RE_ = /'/g;
  2834. goog.string.internal.NULL_RE_ = /\x00/g;
  2835. goog.string.internal.ALL_RE_ = /[\x00&<>"']/;
  2836. goog.string.internal.whitespaceEscape = function(a, b) {
  2837. return goog.string.internal.newLineToBr(a.replace(/ /g, " &#160;"), b)
  2838. };
  2839. goog.string.internal.contains = function(a, b) {
  2840. return -1 != a.indexOf(b)
  2841. };
  2842. goog.string.internal.caseInsensitiveContains = function(a, b) {
  2843. return goog.string.internal.contains(a.toLowerCase(), b.toLowerCase())
  2844. };
  2845. goog.string.internal.compareVersions = function(a, b) {
  2846. var c = 0;
  2847. a = goog.string.internal.trim(String(a)).split(".");
  2848. b = goog.string.internal.trim(String(b)).split(".");
  2849. for (var d = Math.max(a.length, b.length), e = 0; 0 == c && e < d; e++) {
  2850. var f = a[e] || "",
  2851. g = b[e] || "";
  2852. do {
  2853. f = /(\d*)(\D*)(.*)/.exec(f) || ["", "", "", ""];
  2854. g = /(\d*)(\D*)(.*)/.exec(g) || ["", "", "", ""];
  2855. if (0 == f[0].length && 0 == g[0].length) break;
  2856. c = 0 == f[1].length ? 0 : parseInt(f[1], 10);
  2857. var h = 0 == g[1].length ? 0 : parseInt(g[1], 10);
  2858. c = goog.string.internal.compareElements_(c, h) || goog.string.internal.compareElements_(0 ==
  2859. f[2].length, 0 == g[2].length) || goog.string.internal.compareElements_(f[2], g[2]);
  2860. f = f[3];
  2861. g = g[3]
  2862. } while (0 == c)
  2863. }
  2864. return c
  2865. };
  2866. goog.string.internal.compareElements_ = function(a, b) {
  2867. return a < b ? -1 : a > b ? 1 : 0
  2868. };
  2869. goog.html.SafeUrl = function(a, b) {
  2870. this.privateDoNotAccessOrElseSafeUrlWrappedValue_ = a === goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_ && b ||
  2871. "";
  2872. this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl
  2873. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
  2874. };
  2875. goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
  2876. goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0;
  2877. goog.html.SafeUrl.prototype.getTypedStringValue = function() {
  2878. return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()
  2879. };
  2880. goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
  2881. goog.html.SafeUrl.prototype.getDirection = function() {
  2882. return goog.i18n.bidi.Dir.LTR
  2883. };
  2884. goog.DEBUG && (goog.html.SafeUrl.prototype.toString = function() {
  2885. return "SafeUrl{" + this.privateDoNotAccessOrElseSafeUrlWrappedValue_ + "}"
  2886. });
  2887. goog.html.SafeUrl.unwrap = function(a) {
  2888. if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a
  2889. .SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl
  2890. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;
  2891. goog.asserts.fail("expected object of type SafeUrl, got '" + a + "' of type " + goog.typeOf(a));
  2892. return "type_error:SafeUrl"
  2893. };
  2894. goog.html.SafeUrl.fromConstant = function(a) {
  2895. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))
  2896. };
  2897. goog.html.SAFE_MIME_TYPE_PATTERN_ =
  2898. /^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i;
  2899. goog.html.SafeUrl.isSafeMimeType = function(a) {
  2900. return goog.html.SAFE_MIME_TYPE_PATTERN_.test(a)
  2901. };
  2902. goog.html.SafeUrl.fromBlob = function(a) {
  2903. a = goog.html.SafeUrl.isSafeMimeType(a.type) ? goog.fs.url.createObjectUrl(a) : goog.html.SafeUrl
  2904. .INNOCUOUS_STRING;
  2905. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2906. };
  2907. goog.html.SafeUrl.fromMediaSource = function(a) {
  2908. goog.asserts.assert("MediaSource" in goog.global, "No support for MediaSource");
  2909. a = a instanceof MediaSource ? goog.fs.url.createObjectUrl(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
  2910. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2911. };
  2912. goog.html.DATA_URL_PATTERN_ = /^data:(.*);base64,[a-z0-9+\/]+=*$/i;
  2913. goog.html.SafeUrl.fromDataUrl = function(a) {
  2914. a = a.replace(/(%0A|%0D)/g, "");
  2915. var b = a.match(goog.html.DATA_URL_PATTERN_);
  2916. b = b && goog.html.SafeUrl.isSafeMimeType(b[1]);
  2917. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b ? a : goog.html.SafeUrl
  2918. .INNOCUOUS_STRING)
  2919. };
  2920. goog.html.SafeUrl.fromTelUrl = function(a) {
  2921. goog.string.internal.caseInsensitiveStartsWith(a, "tel:") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2922. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2923. };
  2924. goog.html.SIP_URL_PATTERN_ = /^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i;
  2925. goog.html.SafeUrl.fromSipUrl = function(a) {
  2926. goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(a)) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2927. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2928. };
  2929. goog.html.SafeUrl.fromFacebookMessengerUrl = function(a) {
  2930. goog.string.internal.caseInsensitiveStartsWith(a, "fb-messenger://share") || (a = goog.html.SafeUrl
  2931. .INNOCUOUS_STRING);
  2932. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2933. };
  2934. goog.html.SafeUrl.fromWhatsAppUrl = function(a) {
  2935. goog.string.internal.caseInsensitiveStartsWith(a, "whatsapp://send") || (a = goog.html.SafeUrl
  2936. .INNOCUOUS_STRING);
  2937. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2938. };
  2939. goog.html.SafeUrl.fromSmsUrl = function(a) {
  2940. goog.string.internal.caseInsensitiveStartsWith(a, "sms:") && goog.html.SafeUrl.isSmsUrlBodyValid_(a) || (a =
  2941. goog.html.SafeUrl.INNOCUOUS_STRING);
  2942. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2943. };
  2944. goog.html.SafeUrl.isSmsUrlBodyValid_ = function(a) {
  2945. var b = a.indexOf("#");
  2946. 0 < b && (a = a.substring(0, b));
  2947. b = a.match(/[?&]body=/gi);
  2948. if (!b) return !0;
  2949. if (1 < b.length) return !1;
  2950. a = a.match(/[?&]body=([^&]*)/)[1];
  2951. if (!a) return !0;
  2952. try {
  2953. decodeURIComponent(a)
  2954. } catch (c) {
  2955. return !1
  2956. }
  2957. return /^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(a)
  2958. };
  2959. goog.html.SafeUrl.fromSshUrl = function(a) {
  2960. goog.string.internal.caseInsensitiveStartsWith(a, "ssh://") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2961. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2962. };
  2963. goog.html.SafeUrl.sanitizeChromeExtensionUrl = function(a, b) {
  2964. return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//, a, b)
  2965. };
  2966. goog.html.SafeUrl.sanitizeFirefoxExtensionUrl = function(a, b) {
  2967. return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//, a, b)
  2968. };
  2969. goog.html.SafeUrl.sanitizeEdgeExtensionUrl = function(a, b) {
  2970. return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//, a, b)
  2971. };
  2972. goog.html.SafeUrl.sanitizeExtensionUrl_ = function(a, b, c) {
  2973. (a = a.exec(b)) ? (a = a[1], -1 == (c instanceof goog.string.Const ? [goog.string.Const.unwrap(c)] : c.map(
  2974. function(a) {
  2975. return goog.string.Const.unwrap(a)
  2976. })).indexOf(a) && (b = goog.html.SafeUrl.INNOCUOUS_STRING)) : b = goog.html.SafeUrl.INNOCUOUS_STRING;
  2977. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)
  2978. };
  2979. goog.html.SafeUrl.fromTrustedResourceUrl = function(a) {
  2980. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(a))
  2981. };
  2982. goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;
  2983. goog.html.SafeUrl.SAFE_URL_PATTERN = goog.html.SAFE_URL_PATTERN_;
  2984. goog.html.SafeUrl.sanitize = function(a) {
  2985. if (a instanceof goog.html.SafeUrl) return a;
  2986. a = "object" == typeof a && a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
  2987. goog.html.SAFE_URL_PATTERN_.test(a) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2988. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2989. };
  2990. goog.html.SafeUrl.sanitizeAssertUnchanged = function(a, b) {
  2991. if (a instanceof goog.html.SafeUrl) return a;
  2992. a = "object" == typeof a && a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
  2993. if (b && /^data:/i.test(a) && (b = goog.html.SafeUrl.fromDataUrl(a), b.getTypedStringValue() == a)) return b;
  2994. goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(a), "%s does not match the safe URL pattern", a) || (a =
  2995. goog.html.SafeUrl.INNOCUOUS_STRING);
  2996. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2997. };
  2998. goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2999. goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(a) {
  3000. return new goog.html.SafeUrl(goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_, a)
  3001. };
  3002. goog.html.SafeUrl.ABOUT_BLANK = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");
  3003. goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};
  3004. goog.html.SafeStyle = function() {
  3005. this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
  3006. this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle
  3007. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
  3008. };
  3009. goog.html.SafeStyle.prototype.implementsGoogStringTypedString = !0;
  3010. goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  3011. goog.html.SafeStyle.fromConstant = function(a) {
  3012. a = goog.string.Const.unwrap(a);
  3013. if (0 === a.length) return goog.html.SafeStyle.EMPTY;
  3014. goog.asserts.assert(goog.string.internal.endsWith(a, ";"), "Last character of style string is not ';': " + a);
  3015. goog.asserts.assert(goog.string.internal.contains(a, ":"),
  3016. "Style string must contain at least one ':', to specify a \"name: value\" pair: " + a);
  3017. return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)
  3018. };
  3019. goog.html.SafeStyle.prototype.getTypedStringValue = function() {
  3020. return this.privateDoNotAccessOrElseSafeStyleWrappedValue_
  3021. };
  3022. goog.DEBUG && (goog.html.SafeStyle.prototype.toString = function() {
  3023. return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}"
  3024. });
  3025. goog.html.SafeStyle.unwrap = function(a) {
  3026. if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a
  3027. .SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle
  3028. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
  3029. goog.asserts.fail("expected object of type SafeStyle, got '" + a + "' of type " + goog.typeOf(a));
  3030. return "type_error:SafeStyle"
  3031. };
  3032. goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(a) {
  3033. return (new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(a)
  3034. };
  3035. goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a) {
  3036. this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = a;
  3037. return this
  3038. };
  3039. goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
  3040. goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
  3041. goog.html.SafeStyle.create = function(a) {
  3042. var b = "",
  3043. c;
  3044. for (c in a) {
  3045. if (!/^[-_a-zA-Z0-9]+$/.test(c)) throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
  3046. var d = a[c];
  3047. null != d && (d = Array.isArray(d) ? goog.array.map(d, goog.html.SafeStyle.sanitizePropertyValue_).join(
  3048. " ") : goog.html.SafeStyle.sanitizePropertyValue_(d), b += c + ":" + d + ";")
  3049. }
  3050. return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY
  3051. };
  3052. goog.html.SafeStyle.sanitizePropertyValue_ = function(a) {
  3053. if (a instanceof goog.html.SafeUrl) return 'url("' + goog.html.SafeUrl.unwrap(a).replace(/</g, "%3c").replace(
  3054. /[\\"]/g, "\\$&") + '")';
  3055. a = a instanceof goog.string.Const ? goog.string.Const.unwrap(a) : goog.html.SafeStyle
  3056. .sanitizePropertyValueString_(String(a));
  3057. if (/[{;}]/.test(a)) throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.", [a]);
  3058. return a
  3059. };
  3060. goog.html.SafeStyle.sanitizePropertyValueString_ = function(a) {
  3061. var b = a.replace(goog.html.SafeStyle.FUNCTIONS_RE_, "$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_, "$1")
  3062. .replace(goog.html.SafeStyle.URL_RE_, "url");
  3063. if (goog.html.SafeStyle.VALUE_RE_.test(b)) {
  3064. if (goog.html.SafeStyle.COMMENT_RE_.test(a)) return goog.asserts.fail(
  3065. "String value disallows comments, got: " + a), goog.html.SafeStyle.INNOCUOUS_STRING;
  3066. if (!goog.html.SafeStyle.hasBalancedQuotes_(a)) return goog.asserts.fail(
  3067. "String value requires balanced quotes, got: " +
  3068. a), goog.html.SafeStyle.INNOCUOUS_STRING;
  3069. if (!goog.html.SafeStyle.hasBalancedSquareBrackets_(a)) return goog.asserts.fail(
  3070. "String value requires balanced square brackets and one identifier per pair of brackets, got: " +
  3071. a), goog.html.SafeStyle.INNOCUOUS_STRING
  3072. } else return goog.asserts.fail("String value allows only " + goog.html.SafeStyle.VALUE_ALLOWED_CHARS_ +
  3073. " and simple functions, got: " + a), goog.html.SafeStyle.INNOCUOUS_STRING;
  3074. return goog.html.SafeStyle.sanitizeUrl_(a)
  3075. };
  3076. goog.html.SafeStyle.hasBalancedQuotes_ = function(a) {
  3077. for (var b = !0, c = !0, d = 0; d < a.length; d++) {
  3078. var e = a.charAt(d);
  3079. "'" == e && c ? b = !b : '"' == e && b && (c = !c)
  3080. }
  3081. return b && c
  3082. };
  3083. goog.html.SafeStyle.hasBalancedSquareBrackets_ = function(a) {
  3084. for (var b = !0, c = /^[-_a-zA-Z0-9]$/, d = 0; d < a.length; d++) {
  3085. var e = a.charAt(d);
  3086. if ("]" == e) {
  3087. if (b) return !1;
  3088. b = !0
  3089. } else if ("[" == e) {
  3090. if (!b) return !1;
  3091. b = !1
  3092. } else if (!b && !c.test(e)) return !1
  3093. }
  3094. return b
  3095. };
  3096. goog.html.SafeStyle.VALUE_ALLOWED_CHARS_ = "[-,.\"'%_!# a-zA-Z0-9\\[\\]]";
  3097. goog.html.SafeStyle.VALUE_RE_ = new RegExp("^" + goog.html.SafeStyle.VALUE_ALLOWED_CHARS_ + "+$");
  3098. goog.html.SafeStyle.URL_RE_ = /\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g;
  3099. goog.html.SafeStyle.ALLOWED_FUNCTIONS_ =
  3100. "calc cubic-bezier fit-content hsl hsla linear-gradient matrix minmax repeat rgb rgba (rotate|scale|translate)(X|Y|Z|3d)?"
  3101. .split(" ");
  3102. goog.html.SafeStyle.FUNCTIONS_RE_ = new RegExp("\\b(" + goog.html.SafeStyle.ALLOWED_FUNCTIONS_.join("|") +
  3103. ")\\([-+*/0-9a-z.%\\[\\], ]+\\)", "g");
  3104. goog.html.SafeStyle.COMMENT_RE_ = /\/\*/;
  3105. goog.html.SafeStyle.sanitizeUrl_ = function(a) {
  3106. return a.replace(goog.html.SafeStyle.URL_RE_, function(a, c, d, e) {
  3107. var b = "";
  3108. d = d.replace(/^(['"])(.*)\1$/, function(a, c, d) {
  3109. b = c;
  3110. return d
  3111. });
  3112. a = goog.html.SafeUrl.sanitize(d).getTypedStringValue();
  3113. return c + b + a + b + e
  3114. })
  3115. };
  3116. goog.html.SafeStyle.concat = function(a) {
  3117. var b = "",
  3118. c = function(a) {
  3119. Array.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a)
  3120. };
  3121. goog.array.forEach(arguments, c);
  3122. return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY
  3123. };
  3124. goog.html.SafeStyleSheet = function() {
  3125. this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = "";
  3126. this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet
  3127. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
  3128. };
  3129. goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString = !0;
  3130. goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  3131. goog.html.SafeStyleSheet.createRule = function(a, b) {
  3132. if (goog.string.internal.contains(a, "<")) throw Error("Selector does not allow '<', got: " + a);
  3133. var c = a.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g, "");
  3134. if (!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(c)) throw Error(
  3135. "Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: " + a);
  3136. if (!goog.html.SafeStyleSheet.hasBalancedBrackets_(c)) throw Error(
  3137. "() and [] in selector must be balanced, got: " + a);
  3138. b instanceof goog.html.SafeStyle || (b = goog.html.SafeStyle.create(b));
  3139. a = a + "{" + goog.html.SafeStyle.unwrap(b).replace(/</g, "\\3C ") + "}";
  3140. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)
  3141. };
  3142. goog.html.SafeStyleSheet.hasBalancedBrackets_ = function(a) {
  3143. for (var b = {
  3144. "(": ")",
  3145. "[": "]"
  3146. }, c = [], d = 0; d < a.length; d++) {
  3147. var e = a[d];
  3148. if (b[e]) c.push(b[e]);
  3149. else if (goog.object.contains(b, e) && c.pop() != e) return !1
  3150. }
  3151. return 0 == c.length
  3152. };
  3153. goog.html.SafeStyleSheet.concat = function(a) {
  3154. var b = "",
  3155. c = function(a) {
  3156. Array.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyleSheet.unwrap(a)
  3157. };
  3158. goog.array.forEach(arguments, c);
  3159. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)
  3160. };
  3161. goog.html.SafeStyleSheet.fromConstant = function(a) {
  3162. a = goog.string.Const.unwrap(a);
  3163. if (0 === a.length) return goog.html.SafeStyleSheet.EMPTY;
  3164. goog.asserts.assert(!goog.string.internal.contains(a, "<"), "Forbidden '<' character in style sheet string: " +
  3165. a);
  3166. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)
  3167. };
  3168. goog.html.SafeStyleSheet.prototype.getTypedStringValue = function() {
  3169. return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_
  3170. };
  3171. goog.DEBUG && (goog.html.SafeStyleSheet.prototype.toString = function() {
  3172. return "SafeStyleSheet{" + this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ + "}"
  3173. });
  3174. goog.html.SafeStyleSheet.unwrap = function(a) {
  3175. if (a instanceof goog.html.SafeStyleSheet && a.constructor === goog.html.SafeStyleSheet && a
  3176. .SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet
  3177. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
  3178. goog.asserts.fail("expected object of type SafeStyleSheet, got '" + a + "' of type " + goog.typeOf(a));
  3179. return "type_error:SafeStyleSheet"
  3180. };
  3181. goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse = function(a) {
  3182. return (new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(a)
  3183. };
  3184. goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a) {
  3185. this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = a;
  3186. return this
  3187. };
  3188. goog.html.SafeStyleSheet.EMPTY = goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");
  3189. goog.labs = {};
  3190. goog.labs.userAgent = {};
  3191. goog.labs.userAgent.util = {};
  3192. goog.labs.userAgent.util.getNativeUserAgentString_ = function() {
  3193. var a = goog.labs.userAgent.util.getNavigator_();
  3194. return a && (a = a.userAgent) ? a : ""
  3195. };
  3196. goog.labs.userAgent.util.getNavigator_ = function() {
  3197. return goog.global.navigator
  3198. };
  3199. goog.labs.userAgent.util.userAgent_ = goog.labs.userAgent.util.getNativeUserAgentString_();
  3200. goog.labs.userAgent.util.setUserAgent = function(a) {
  3201. goog.labs.userAgent.util.userAgent_ = a || goog.labs.userAgent.util.getNativeUserAgentString_()
  3202. };
  3203. goog.labs.userAgent.util.getUserAgent = function() {
  3204. return goog.labs.userAgent.util.userAgent_
  3205. };
  3206. goog.labs.userAgent.util.matchUserAgent = function(a) {
  3207. var b = goog.labs.userAgent.util.getUserAgent();
  3208. return goog.string.internal.contains(b, a)
  3209. };
  3210. goog.labs.userAgent.util.matchUserAgentIgnoreCase = function(a) {
  3211. var b = goog.labs.userAgent.util.getUserAgent();
  3212. return goog.string.internal.caseInsensitiveContains(b, a)
  3213. };
  3214. goog.labs.userAgent.util.extractVersionTuples = function(a) {
  3215. for (var b = /(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g, c = [], d; d = b.exec(a);) c.push([d[1], d[2], d[3] ||
  3216. void 0
  3217. ]);
  3218. return c
  3219. };
  3220. goog.labs.userAgent.browser = {};
  3221. goog.labs.userAgent.browser.matchOpera_ = function() {
  3222. return goog.labs.userAgent.util.matchUserAgent("Opera")
  3223. };
  3224. goog.labs.userAgent.browser.matchIE_ = function() {
  3225. return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE")
  3226. };
  3227. goog.labs.userAgent.browser.matchEdgeHtml_ = function() {
  3228. return goog.labs.userAgent.util.matchUserAgent("Edge")
  3229. };
  3230. goog.labs.userAgent.browser.matchEdgeChromium_ = function() {
  3231. return goog.labs.userAgent.util.matchUserAgent("Edg/")
  3232. };
  3233. goog.labs.userAgent.browser.matchOperaChromium_ = function() {
  3234. return goog.labs.userAgent.util.matchUserAgent("OPR")
  3235. };
  3236. goog.labs.userAgent.browser.matchFirefox_ = function() {
  3237. return goog.labs.userAgent.util.matchUserAgent("Firefox") || goog.labs.userAgent.util.matchUserAgent("FxiOS")
  3238. };
  3239. goog.labs.userAgent.browser.matchSafari_ = function() {
  3240. return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog
  3241. .labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs
  3242. .userAgent.browser.matchEdgeHtml_() || goog.labs.userAgent.browser.matchEdgeChromium_() || goog.labs
  3243. .userAgent.browser.matchOperaChromium_() || goog.labs.userAgent.browser.matchFirefox_() || goog.labs
  3244. .userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"))
  3245. };
  3246. goog.labs.userAgent.browser.matchCoast_ = function() {
  3247. return goog.labs.userAgent.util.matchUserAgent("Coast")
  3248. };
  3249. goog.labs.userAgent.browser.matchIosWebview_ = function() {
  3250. return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) &&
  3251. !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs
  3252. .userAgent.browser.matchCoast_() && !goog.labs.userAgent.browser.matchFirefox_() && goog.labs.userAgent.util
  3253. .matchUserAgent("AppleWebKit")
  3254. };
  3255. goog.labs.userAgent.browser.matchChrome_ = function() {
  3256. return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent(
  3257. "CriOS")) && !goog.labs.userAgent.browser.matchEdgeHtml_()
  3258. };
  3259. goog.labs.userAgent.browser.matchAndroidBrowser_ = function() {
  3260. return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog
  3261. .labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent
  3262. .browser.isSilk())
  3263. };
  3264. goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
  3265. goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
  3266. goog.labs.userAgent.browser.isEdge = goog.labs.userAgent.browser.matchEdgeHtml_;
  3267. goog.labs.userAgent.browser.isEdgeChromium = goog.labs.userAgent.browser.matchEdgeChromium_;
  3268. goog.labs.userAgent.browser.isOperaChromium = goog.labs.userAgent.browser.matchOperaChromium_;
  3269. goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
  3270. goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
  3271. goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
  3272. goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
  3273. goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
  3274. goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
  3275. goog.labs.userAgent.browser.isSilk = function() {
  3276. return goog.labs.userAgent.util.matchUserAgent("Silk")
  3277. };
  3278. goog.labs.userAgent.browser.getVersion = function() {
  3279. function a(a) {
  3280. a = goog.array.find(a, d);
  3281. return c[a] || ""
  3282. }
  3283. var b = goog.labs.userAgent.util.getUserAgent();
  3284. if (goog.labs.userAgent.browser.isIE()) return goog.labs.userAgent.browser.getIEVersion_(b);
  3285. b = goog.labs.userAgent.util.extractVersionTuples(b);
  3286. var c = {};
  3287. goog.array.forEach(b, function(a) {
  3288. c[a[0]] = a[1]
  3289. });
  3290. var d = goog.partial(goog.object.containsKey, c);
  3291. return goog.labs.userAgent.browser.isOpera() ? a(["Version", "Opera"]) : goog.labs.userAgent.browser.isEdge() ?
  3292. a(["Edge"]) :
  3293. goog.labs.userAgent.browser.isEdgeChromium() ? a(["Edg"]) : goog.labs.userAgent.browser.isChrome() ? a([
  3294. "Chrome", "CriOS", "HeadlessChrome"
  3295. ]) : (b = b[2]) && b[1] || ""
  3296. };
  3297. goog.labs.userAgent.browser.isVersionOrHigher = function(a) {
  3298. return 0 <= goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(), a)
  3299. };
  3300. goog.labs.userAgent.browser.getIEVersion_ = function(a) {
  3301. var b = /rv: *([\d\.]*)/.exec(a);
  3302. if (b && b[1]) return b[1];
  3303. b = "";
  3304. var c = /MSIE +([\d\.]+)/.exec(a);
  3305. if (c && c[1])
  3306. if (a = /Trident\/(\d.\d)/.exec(a), "7.0" == c[1])
  3307. if (a && a[1]) switch (a[1]) {
  3308. case "4.0":
  3309. b = "8.0";
  3310. break;
  3311. case "5.0":
  3312. b = "9.0";
  3313. break;
  3314. case "6.0":
  3315. b = "10.0";
  3316. break;
  3317. case "7.0":
  3318. b = "11.0"
  3319. } else b = "7.0";
  3320. else b = c[1];
  3321. return b
  3322. };
  3323. goog.html.SafeHtml = function() {
  3324. this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
  3325. this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml
  3326. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  3327. this.dir_ = null
  3328. };
  3329. goog.html.SafeHtml.ENABLE_ERROR_MESSAGES = goog.DEBUG;
  3330. goog.html.SafeHtml.SUPPORT_STYLE_ATTRIBUTE = !0;
  3331. goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = !0;
  3332. goog.html.SafeHtml.prototype.getDirection = function() {
  3333. return this.dir_
  3334. };
  3335. goog.html.SafeHtml.prototype.implementsGoogStringTypedString = !0;
  3336. goog.html.SafeHtml.prototype.getTypedStringValue = function() {
  3337. return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()
  3338. };
  3339. goog.DEBUG && (goog.html.SafeHtml.prototype.toString = function() {
  3340. return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}"
  3341. });
  3342. goog.html.SafeHtml.unwrap = function(a) {
  3343. return goog.html.SafeHtml.unwrapTrustedHTML(a).toString()
  3344. };
  3345. goog.html.SafeHtml.unwrapTrustedHTML = function(a) {
  3346. if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a
  3347. .SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml
  3348. .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
  3349. goog.asserts.fail("expected object of type SafeHtml, got '" + a + "' of type " + goog.typeOf(a));
  3350. return "type_error:SafeHtml"
  3351. };
  3352. goog.html.SafeHtml.htmlEscape = function(a) {
  3353. if (a instanceof goog.html.SafeHtml) return a;
  3354. var b = "object" == typeof a,
  3355. c = null;
  3356. b && a.implementsGoogI18nBidiDirectionalString && (c = a.getDirection());
  3357. a = b && a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
  3358. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(a), c)
  3359. };
  3360. goog.html.SafeHtml.htmlEscapePreservingNewlines = function(a) {
  3361. if (a instanceof goog.html.SafeHtml) return a;
  3362. a = goog.html.SafeHtml.htmlEscape(a);
  3363. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog
  3364. .html.SafeHtml.unwrap(a)), a.getDirection())
  3365. };
  3366. goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function(a) {
  3367. if (a instanceof goog.html.SafeHtml) return a;
  3368. a = goog.html.SafeHtml.htmlEscape(a);
  3369. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(
  3370. goog.html.SafeHtml.unwrap(a)), a.getDirection())
  3371. };
  3372. goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
  3373. goog.html.SafeHtml.comment = function(a) {
  3374. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("\x3c!--" + goog.string.internal
  3375. .htmlEscape(a) + "--\x3e", null)
  3376. };
  3377. goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
  3378. goog.html.SafeHtml.URL_ATTRIBUTES_ = {
  3379. action: !0,
  3380. cite: !0,
  3381. data: !0,
  3382. formaction: !0,
  3383. href: !0,
  3384. manifest: !0,
  3385. poster: !0,
  3386. src: !0
  3387. };
  3388. goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = {
  3389. APPLET: !0,
  3390. BASE: !0,
  3391. EMBED: !0,
  3392. IFRAME: !0,
  3393. LINK: !0,
  3394. MATH: !0,
  3395. META: !0,
  3396. OBJECT: !0,
  3397. SCRIPT: !0,
  3398. STYLE: !0,
  3399. SVG: !0,
  3400. TEMPLATE: !0
  3401. };
  3402. goog.html.SafeHtml.create = function(a, b, c) {
  3403. goog.html.SafeHtml.verifyTagName(String(a));
  3404. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(a), b, c)
  3405. };
  3406. goog.html.SafeHtml.verifyTagName = function(a) {
  3407. if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ?
  3408. "Invalid tag name <" + a + ">." : "");
  3409. if (a.toUpperCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) throw Error(goog.html.SafeHtml
  3410. .ENABLE_ERROR_MESSAGES ? "Tag name <" + a + "> is not allowed for SafeHtml." : "");
  3411. };
  3412. goog.html.SafeHtml.createIframe = function(a, b, c, d) {
  3413. a && goog.html.TrustedResourceUrl.unwrap(a);
  3414. var e = {};
  3415. e.src = a || null;
  3416. e.srcdoc = b && goog.html.SafeHtml.unwrap(b);
  3417. a = goog.html.SafeHtml.combineAttributes(e, {
  3418. sandbox: ""
  3419. }, c);
  3420. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d)
  3421. };
  3422. goog.html.SafeHtml.createSandboxIframe = function(a, b, c, d) {
  3423. if (!goog.html.SafeHtml.canUseSandboxIframe()) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ?
  3424. "The browser does not support sandboxed iframes." : "");
  3425. var e = {};
  3426. e.src = a ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a)) : null;
  3427. e.srcdoc = b || null;
  3428. e.sandbox = "";
  3429. a = goog.html.SafeHtml.combineAttributes(e, {}, c);
  3430. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d)
  3431. };
  3432. goog.html.SafeHtml.canUseSandboxIframe = function() {
  3433. return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype
  3434. };
  3435. goog.html.SafeHtml.createScriptSrc = function(a, b) {
  3436. goog.html.TrustedResourceUrl.unwrap(a);
  3437. a = goog.html.SafeHtml.combineAttributes({
  3438. src: a
  3439. }, {}, b);
  3440. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", a)
  3441. };
  3442. goog.html.SafeHtml.createScript = function(a, b) {
  3443. for (var c in b) {
  3444. var d = c.toLowerCase();
  3445. if ("language" == d || "src" == d || "text" == d || "type" == d) throw Error(goog.html.SafeHtml
  3446. .ENABLE_ERROR_MESSAGES ? 'Cannot set "' + d + '" attribute' : "");
  3447. }
  3448. c = "";
  3449. a = goog.array.concat(a);
  3450. for (d = 0; d < a.length; d++) c += goog.html.SafeScript.unwrap(a[d]);
  3451. a = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, goog.i18n.bidi.Dir.NEUTRAL);
  3452. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", b, a)
  3453. };
  3454. goog.html.SafeHtml.createStyle = function(a, b) {
  3455. b = goog.html.SafeHtml.combineAttributes({
  3456. type: "text/css"
  3457. }, {}, b);
  3458. var c = "";
  3459. a = goog.array.concat(a);
  3460. for (var d = 0; d < a.length; d++) c += goog.html.SafeStyleSheet.unwrap(a[d]);
  3461. a = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, goog.i18n.bidi.Dir.NEUTRAL);
  3462. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", b, a)
  3463. };
  3464. goog.html.SafeHtml.createMetaRefresh = function(a, b) {
  3465. a = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a));
  3466. (goog.labs.userAgent.browser.isIE() || goog.labs.userAgent.browser.isEdge()) && goog.string.internal.contains(a,
  3467. ";") && (a = "'" + a.replace(/'/g, "%27") + "'");
  3468. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {
  3469. "http-equiv": "refresh",
  3470. content: (b || 0) + "; url=" + a
  3471. })
  3472. };
  3473. goog.html.SafeHtml.getAttrNameAndValue_ = function(a, b, c) {
  3474. if (c instanceof goog.string.Const) c = goog.string.Const.unwrap(c);
  3475. else if ("style" == b.toLowerCase())
  3476. if (goog.html.SafeHtml.SUPPORT_STYLE_ATTRIBUTE) c = goog.html.SafeHtml.getStyleValue_(c);
  3477. else throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "style" not supported.' : "");
  3478. else {
  3479. if (/^on/i.test(b)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + b +
  3480. '" requires goog.string.Const value, "' + c + '" given.' : "");
  3481. if (b.toLowerCase() in
  3482. goog.html.SafeHtml.URL_ATTRIBUTES_)
  3483. if (c instanceof goog.html.TrustedResourceUrl) c = goog.html.TrustedResourceUrl.unwrap(c);
  3484. else if (c instanceof goog.html.SafeUrl) c = goog.html.SafeUrl.unwrap(c);
  3485. else if ("string" === typeof c) c = goog.html.SafeUrl.sanitize(c).getTypedStringValue();
  3486. else throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + b + '" on tag "' + a +
  3487. '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + c + '" given.' : "");
  3488. }
  3489. c.implementsGoogStringTypedString && (c = c.getTypedStringValue());
  3490. goog.asserts.assert("string" === typeof c || "number" === typeof c, "String or number value expected, got " +
  3491. typeof c + " with value: " + c);
  3492. return b + '="' + goog.string.internal.htmlEscape(String(c)) + '"'
  3493. };
  3494. goog.html.SafeHtml.getStyleValue_ = function(a) {
  3495. if (!goog.isObject(a)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ?
  3496. 'The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof a +
  3497. " given: " + a : "");
  3498. a instanceof goog.html.SafeStyle || (a = goog.html.SafeStyle.create(a));
  3499. return goog.html.SafeStyle.unwrap(a)
  3500. };
  3501. goog.html.SafeHtml.createWithDir = function(a, b, c, d) {
  3502. b = goog.html.SafeHtml.create(b, c, d);
  3503. b.dir_ = a;
  3504. return b
  3505. };
  3506. goog.html.SafeHtml.join = function(a, b) {
  3507. a = goog.html.SafeHtml.htmlEscape(a);
  3508. var c = a.getDirection(),
  3509. d = [],
  3510. e = function(a) {
  3511. Array.isArray(a) ? goog.array.forEach(a, e) : (a = goog.html.SafeHtml.htmlEscape(a), d.push(goog.html
  3512. .SafeHtml.unwrap(a)), a = a.getDirection(), c == goog.i18n.bidi.Dir.NEUTRAL ? c = a : a !=
  3513. goog.i18n.bidi.Dir.NEUTRAL && c != a && (c = null))
  3514. };
  3515. goog.array.forEach(b, e);
  3516. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d.join(goog.html.SafeHtml.unwrap(a)),
  3517. c)
  3518. };
  3519. goog.html.SafeHtml.concat = function(a) {
  3520. return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY, Array.prototype.slice.call(arguments))
  3521. };
  3522. goog.html.SafeHtml.concatWithDir = function(a, b) {
  3523. var c = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
  3524. c.dir_ = a;
  3525. return c
  3526. };
  3527. goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  3528. goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(a, b) {
  3529. return (new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(a, b)
  3530. };
  3531. goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a, b) {
  3532. this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = goog.html.trustedtypes
  3533. .PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY
  3534. .createHTML(a) : a;
  3535. this.dir_ = b;
  3536. return this
  3537. };
  3538. goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(a, b, c) {
  3539. var d = null;
  3540. var e = "<" + a + goog.html.SafeHtml.stringifyAttributes(a, b);
  3541. null == c ? c = [] : Array.isArray(c) || (c = [c]);
  3542. goog.dom.tags.isVoidTag(a.toLowerCase()) ? (goog.asserts.assert(!c.length, "Void tag <" + a +
  3543. "> does not allow content."), e += ">") : (d = goog.html.SafeHtml.concat(c), e += ">" + goog.html
  3544. .SafeHtml.unwrap(d) + "</" + a + ">", d = d.getDirection());
  3545. (a = b && b.dir) && (d = /^(ltr|rtl|auto)$/i.test(a) ? goog.i18n.bidi.Dir.NEUTRAL : null);
  3546. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e,
  3547. d)
  3548. };
  3549. goog.html.SafeHtml.stringifyAttributes = function(a, b) {
  3550. var c = "";
  3551. if (b)
  3552. for (var d in b) {
  3553. if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(d)) throw Error(goog.html.SafeHtml
  3554. .ENABLE_ERROR_MESSAGES ? 'Invalid attribute name "' + d + '".' : "");
  3555. var e = b[d];
  3556. null != e && (c += " " + goog.html.SafeHtml.getAttrNameAndValue_(a, d, e))
  3557. }
  3558. return c
  3559. };
  3560. goog.html.SafeHtml.combineAttributes = function(a, b, c) {
  3561. var d = {},
  3562. e;
  3563. for (e in a) goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = a[e];
  3564. for (e in b) goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = b[e];
  3565. if (c)
  3566. for (e in c) {
  3567. var f = e.toLowerCase();
  3568. if (f in a) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot override "' + f +
  3569. '" attribute, got "' + e + '" with value "' + c[e] + '"' : "");
  3570. f in b && delete d[f];
  3571. d[e] = c[e]
  3572. }
  3573. return d
  3574. };
  3575. goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",
  3576. goog.i18n.bidi.Dir.NEUTRAL);
  3577. goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir
  3578. .NEUTRAL);
  3579. goog.html.SafeHtml.BR = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>", goog.i18n.bidi.Dir
  3580. .NEUTRAL);
  3581. goog.html.uncheckedconversions = {};
  3582. goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(a, b, c) {
  3583. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3584. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),
  3585. "must provide non-empty justification");
  3586. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b, c || null)
  3587. };
  3588. goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(a, b) {
  3589. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3590. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),
  3591. "must provide non-empty justification");
  3592. return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)
  3593. };
  3594. goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(a, b) {
  3595. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3596. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),
  3597. "must provide non-empty justification");
  3598. return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)
  3599. };
  3600. goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(a, b) {
  3601. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3602. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),
  3603. "must provide non-empty justification");
  3604. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)
  3605. };
  3606. goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(a, b) {
  3607. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3608. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),
  3609. "must provide non-empty justification");
  3610. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)
  3611. };
  3612. goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(a, b) {
  3613. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3614. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),
  3615. "must provide non-empty justification");
  3616. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)
  3617. };
  3618. goog.dom.safe = {};
  3619. goog.dom.safe.InsertAdjacentHtmlPosition = {
  3620. AFTERBEGIN: "afterbegin",
  3621. AFTEREND: "afterend",
  3622. BEFOREBEGIN: "beforebegin",
  3623. BEFOREEND: "beforeend"
  3624. };
  3625. goog.dom.safe.insertAdjacentHtml = function(a, b, c) {
  3626. a.insertAdjacentHTML(b, goog.html.SafeHtml.unwrapTrustedHTML(c))
  3627. };
  3628. goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_ = {
  3629. MATH: !0,
  3630. SCRIPT: !0,
  3631. STYLE: !0,
  3632. SVG: !0,
  3633. TEMPLATE: !0
  3634. };
  3635. goog.dom.safe.isInnerHtmlCleanupRecursive_ = goog.functions.cacheReturnValue(function() {
  3636. if (goog.DEBUG && "undefined" === typeof document) return !1;
  3637. var a = document.createElement("div"),
  3638. b = document.createElement("div");
  3639. b.appendChild(document.createElement("div"));
  3640. a.appendChild(b);
  3641. if (goog.DEBUG && !a.firstChild) return !1;
  3642. b = a.firstChild.firstChild;
  3643. a.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY);
  3644. return !b.parentElement
  3645. });
  3646. goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse = function(a, b) {
  3647. if (goog.dom.safe.isInnerHtmlCleanupRecursive_())
  3648. for (; a.lastChild;) a.removeChild(a.lastChild);
  3649. a.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(b)
  3650. };
  3651. goog.dom.safe.setInnerHtml = function(a, b) {
  3652. if (goog.asserts.ENABLE_ASSERTS) {
  3653. var c = a.tagName.toUpperCase();
  3654. if (goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[c]) throw Error(
  3655. "goog.dom.safe.setInnerHtml cannot be used to set content of " + a.tagName + ".");
  3656. }
  3657. goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(a, b)
  3658. };
  3659. goog.dom.safe.setOuterHtml = function(a, b) {
  3660. a.outerHTML = goog.html.SafeHtml.unwrapTrustedHTML(b)
  3661. };
  3662. goog.dom.safe.setFormElementAction = function(a, b) {
  3663. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3664. goog.dom.asserts.assertIsHTMLFormElement(a).action = goog.html.SafeUrl.unwrap(b)
  3665. };
  3666. goog.dom.safe.setButtonFormAction = function(a, b) {
  3667. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3668. goog.dom.asserts.assertIsHTMLButtonElement(a).formAction = goog.html.SafeUrl.unwrap(b)
  3669. };
  3670. goog.dom.safe.setInputFormAction = function(a, b) {
  3671. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3672. goog.dom.asserts.assertIsHTMLInputElement(a).formAction = goog.html.SafeUrl.unwrap(b)
  3673. };
  3674. goog.dom.safe.setStyle = function(a, b) {
  3675. a.style.cssText = goog.html.SafeStyle.unwrap(b)
  3676. };
  3677. goog.dom.safe.documentWrite = function(a, b) {
  3678. a.write(goog.html.SafeHtml.unwrapTrustedHTML(b))
  3679. };
  3680. goog.dom.safe.setAnchorHref = function(a, b) {
  3681. goog.dom.asserts.assertIsHTMLAnchorElement(a);
  3682. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3683. a.href = goog.html.SafeUrl.unwrap(b)
  3684. };
  3685. goog.dom.safe.setImageSrc = function(a, b) {
  3686. goog.dom.asserts.assertIsHTMLImageElement(a);
  3687. if (!(b instanceof goog.html.SafeUrl)) {
  3688. var c = /^data:image\//i.test(b);
  3689. b = goog.html.SafeUrl.sanitizeAssertUnchanged(b, c)
  3690. }
  3691. a.src = goog.html.SafeUrl.unwrap(b)
  3692. };
  3693. goog.dom.safe.setAudioSrc = function(a, b) {
  3694. goog.dom.asserts.assertIsHTMLAudioElement(a);
  3695. if (!(b instanceof goog.html.SafeUrl)) {
  3696. var c = /^data:audio\//i.test(b);
  3697. b = goog.html.SafeUrl.sanitizeAssertUnchanged(b, c)
  3698. }
  3699. a.src = goog.html.SafeUrl.unwrap(b)
  3700. };
  3701. goog.dom.safe.setVideoSrc = function(a, b) {
  3702. goog.dom.asserts.assertIsHTMLVideoElement(a);
  3703. if (!(b instanceof goog.html.SafeUrl)) {
  3704. var c = /^data:video\//i.test(b);
  3705. b = goog.html.SafeUrl.sanitizeAssertUnchanged(b, c)
  3706. }
  3707. a.src = goog.html.SafeUrl.unwrap(b)
  3708. };
  3709. goog.dom.safe.setEmbedSrc = function(a, b) {
  3710. goog.dom.asserts.assertIsHTMLEmbedElement(a);
  3711. a.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b)
  3712. };
  3713. goog.dom.safe.setFrameSrc = function(a, b) {
  3714. goog.dom.asserts.assertIsHTMLFrameElement(a);
  3715. a.src = goog.html.TrustedResourceUrl.unwrap(b)
  3716. };
  3717. goog.dom.safe.setIframeSrc = function(a, b) {
  3718. goog.dom.asserts.assertIsHTMLIFrameElement(a);
  3719. a.src = goog.html.TrustedResourceUrl.unwrap(b)
  3720. };
  3721. goog.dom.safe.setIframeSrcdoc = function(a, b) {
  3722. goog.dom.asserts.assertIsHTMLIFrameElement(a);
  3723. a.srcdoc = goog.html.SafeHtml.unwrapTrustedHTML(b)
  3724. };
  3725. goog.dom.safe.setLinkHrefAndRel = function(a, b, c) {
  3726. goog.dom.asserts.assertIsHTMLLinkElement(a);
  3727. a.rel = c;
  3728. goog.string.internal.caseInsensitiveContains(c, "stylesheet") ? (goog.asserts.assert(b instanceof goog.html
  3729. .TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'), a.href =
  3730. goog.html.TrustedResourceUrl.unwrap(b)) : a.href = b instanceof goog.html.TrustedResourceUrl ? goog.html
  3731. .TrustedResourceUrl.unwrap(b) : b instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(b) : goog.html
  3732. .SafeUrl.unwrap(goog.html.SafeUrl.sanitizeAssertUnchanged(b))
  3733. };
  3734. goog.dom.safe.setObjectData = function(a, b) {
  3735. goog.dom.asserts.assertIsHTMLObjectElement(a);
  3736. a.data = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b)
  3737. };
  3738. goog.dom.safe.setScriptSrc = function(a, b) {
  3739. goog.dom.asserts.assertIsHTMLScriptElement(a);
  3740. a.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b);
  3741. (b = goog.getScriptNonce()) && a.setAttribute("nonce", b)
  3742. };
  3743. goog.dom.safe.setScriptContent = function(a, b) {
  3744. goog.dom.asserts.assertIsHTMLScriptElement(a);
  3745. a.text = goog.html.SafeScript.unwrapTrustedScript(b);
  3746. (b = goog.getScriptNonce()) && a.setAttribute("nonce", b)
  3747. };
  3748. goog.dom.safe.setLocationHref = function(a, b) {
  3749. goog.dom.asserts.assertIsLocation(a);
  3750. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3751. a.href = goog.html.SafeUrl.unwrap(b)
  3752. };
  3753. goog.dom.safe.assignLocation = function(a, b) {
  3754. goog.dom.asserts.assertIsLocation(a);
  3755. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3756. a.assign(goog.html.SafeUrl.unwrap(b))
  3757. };
  3758. goog.dom.safe.replaceLocation = function(a, b) {
  3759. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3760. a.replace(goog.html.SafeUrl.unwrap(b))
  3761. };
  3762. goog.dom.safe.openInWindow = function(a, b, c, d, e) {
  3763. a = a instanceof goog.html.SafeUrl ? a : goog.html.SafeUrl.sanitizeAssertUnchanged(a);
  3764. b = b || goog.global;
  3765. c = c instanceof goog.string.Const ? goog.string.Const.unwrap(c) : c || "";
  3766. return b.open(goog.html.SafeUrl.unwrap(a), c, d, e)
  3767. };
  3768. goog.dom.safe.parseFromStringHtml = function(a, b) {
  3769. return goog.dom.safe.parseFromString(a, b, "text/html")
  3770. };
  3771. goog.dom.safe.parseFromString = function(a, b, c) {
  3772. return a.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(b), c)
  3773. };
  3774. goog.dom.safe.createImageFromBlob = function(a) {
  3775. if (!/^image\/.*/g.test(a.type)) throw Error(
  3776. "goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");
  3777. var b = goog.global.URL.createObjectURL(a);
  3778. a = new goog.global.Image;
  3779. a.onload = function() {
  3780. goog.global.URL.revokeObjectURL(b)
  3781. };
  3782. goog.dom.safe.setImageSrc(a, goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog
  3783. .string.Const.from("Image blob URL."), b));
  3784. return a
  3785. };
  3786. goog.string.DETECT_DOUBLE_ESCAPING = !1;
  3787. goog.string.FORCE_NON_DOM_HTML_UNESCAPING = !1;
  3788. goog.string.Unicode = {
  3789. NBSP: "\u00a0"
  3790. };
  3791. goog.string.startsWith = goog.string.internal.startsWith;
  3792. goog.string.endsWith = goog.string.internal.endsWith;
  3793. goog.string.caseInsensitiveStartsWith = goog.string.internal.caseInsensitiveStartsWith;
  3794. goog.string.caseInsensitiveEndsWith = goog.string.internal.caseInsensitiveEndsWith;
  3795. goog.string.caseInsensitiveEquals = goog.string.internal.caseInsensitiveEquals;
  3796. goog.string.subs = function(a, b) {
  3797. for (var c = a.split("%s"), d = "", e = Array.prototype.slice.call(arguments, 1); e.length && 1 < c.length;)
  3798. d += c.shift() + e.shift();
  3799. return d + c.join("%s")
  3800. };
  3801. goog.string.collapseWhitespace = function(a) {
  3802. return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "")
  3803. };
  3804. goog.string.isEmptyOrWhitespace = goog.string.internal.isEmptyOrWhitespace;
  3805. goog.string.isEmptyString = function(a) {
  3806. return 0 == a.length
  3807. };
  3808. goog.string.isEmpty = goog.string.isEmptyOrWhitespace;
  3809. goog.string.isEmptyOrWhitespaceSafe = function(a) {
  3810. return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(a))
  3811. };
  3812. goog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;
  3813. goog.string.isBreakingWhitespace = function(a) {
  3814. return !/[^\t\n\r ]/.test(a)
  3815. };
  3816. goog.string.isAlpha = function(a) {
  3817. return !/[^a-zA-Z]/.test(a)
  3818. };
  3819. goog.string.isNumeric = function(a) {
  3820. return !/[^0-9]/.test(a)
  3821. };
  3822. goog.string.isAlphaNumeric = function(a) {
  3823. return !/[^a-zA-Z0-9]/.test(a)
  3824. };
  3825. goog.string.isSpace = function(a) {
  3826. return " " == a
  3827. };
  3828. goog.string.isUnicodeChar = function(a) {
  3829. return 1 == a.length && " " <= a && "~" >= a || "\u0080" <= a && "\ufffd" >= a
  3830. };
  3831. goog.string.stripNewlines = function(a) {
  3832. return a.replace(/(\r\n|\r|\n)+/g, " ")
  3833. };
  3834. goog.string.canonicalizeNewlines = function(a) {
  3835. return a.replace(/(\r\n|\r|\n)/g, "\n")
  3836. };
  3837. goog.string.normalizeWhitespace = function(a) {
  3838. return a.replace(/\xa0|\s/g, " ")
  3839. };
  3840. goog.string.normalizeSpaces = function(a) {
  3841. return a.replace(/\xa0|[ \t]+/g, " ")
  3842. };
  3843. goog.string.collapseBreakingSpaces = function(a) {
  3844. return a.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "")
  3845. };
  3846. goog.string.trim = goog.string.internal.trim;
  3847. goog.string.trimLeft = function(a) {
  3848. return a.replace(/^[\s\xa0]+/, "")
  3849. };
  3850. goog.string.trimRight = function(a) {
  3851. return a.replace(/[\s\xa0]+$/, "")
  3852. };
  3853. goog.string.caseInsensitiveCompare = goog.string.internal.caseInsensitiveCompare;
  3854. goog.string.numberAwareCompare_ = function(a, b, c) {
  3855. if (a == b) return 0;
  3856. if (!a) return -1;
  3857. if (!b) return 1;
  3858. for (var d = a.toLowerCase().match(c), e = b.toLowerCase().match(c), f = Math.min(d.length, e.length), g =
  3859. 0; g < f; g++) {
  3860. c = d[g];
  3861. var h = e[g];
  3862. if (c != h) return a = parseInt(c, 10), !isNaN(a) && (b = parseInt(h, 10), !isNaN(b) && a - b) ? a - b : c <
  3863. h ? -1 : 1
  3864. }
  3865. return d.length != e.length ? d.length - e.length : a < b ? -1 : 1
  3866. };
  3867. goog.string.intAwareCompare = function(a, b) {
  3868. return goog.string.numberAwareCompare_(a, b, /\d+|\D+/g)
  3869. };
  3870. goog.string.floatAwareCompare = function(a, b) {
  3871. return goog.string.numberAwareCompare_(a, b, /\d+|\.\d+|\D+/g)
  3872. };
  3873. goog.string.numerateCompare = goog.string.floatAwareCompare;
  3874. goog.string.urlEncode = function(a) {
  3875. return encodeURIComponent(String(a))
  3876. };
  3877. goog.string.urlDecode = function(a) {
  3878. return decodeURIComponent(a.replace(/\+/g, " "))
  3879. };
  3880. goog.string.newLineToBr = goog.string.internal.newLineToBr;
  3881. goog.string.htmlEscape = function(a, b) {
  3882. a = goog.string.internal.htmlEscape(a, b);
  3883. goog.string.DETECT_DOUBLE_ESCAPING && (a = a.replace(goog.string.E_RE_, "&#101;"));
  3884. return a
  3885. };
  3886. goog.string.E_RE_ = /e/g;
  3887. goog.string.unescapeEntities = function(a) {
  3888. return goog.string.contains(a, "&") ? !goog.string.FORCE_NON_DOM_HTML_UNESCAPING && "document" in goog.global ?
  3889. goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a
  3890. };
  3891. goog.string.unescapeEntitiesWithDocument = function(a, b) {
  3892. return goog.string.contains(a, "&") ? goog.string.unescapeEntitiesUsingDom_(a, b) : a
  3893. };
  3894. goog.string.unescapeEntitiesUsingDom_ = function(a, b) {
  3895. var c = {
  3896. "&amp;": "&",
  3897. "&lt;": "<",
  3898. "&gt;": ">",
  3899. "&quot;": '"'
  3900. };
  3901. var d = b ? b.createElement("div") : goog.global.document.createElement("div");
  3902. return a.replace(goog.string.HTML_ENTITY_PATTERN_, function(a, b) {
  3903. var e = c[a];
  3904. if (e) return e;
  3905. "#" == b.charAt(0) && (b = Number("0" + b.substr(1)), isNaN(b) || (e = String.fromCharCode(b)));
  3906. e || (goog.dom.safe.setInnerHtml(d, goog.html.uncheckedconversions
  3907. .safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from(
  3908. "Single HTML entity."),
  3909. a + " ")), e = d.firstChild.nodeValue.slice(0, -1));
  3910. return c[a] = e
  3911. })
  3912. };
  3913. goog.string.unescapePureXmlEntities_ = function(a) {
  3914. return a.replace(/&([^;]+);/g, function(a, c) {
  3915. switch (c) {
  3916. case "amp":
  3917. return "&";
  3918. case "lt":
  3919. return "<";
  3920. case "gt":
  3921. return ">";
  3922. case "quot":
  3923. return '"';
  3924. default:
  3925. return "#" != c.charAt(0) || (c = Number("0" + c.substr(1)), isNaN(c)) ? a : String
  3926. .fromCharCode(c)
  3927. }
  3928. })
  3929. };
  3930. goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
  3931. goog.string.whitespaceEscape = function(a, b) {
  3932. return goog.string.newLineToBr(a.replace(/ /g, " &#160;"), b)
  3933. };
  3934. goog.string.preserveSpaces = function(a) {
  3935. return a.replace(/(^|[\n ]) /g, "$1" + goog.string.Unicode.NBSP)
  3936. };
  3937. goog.string.stripQuotes = function(a, b) {
  3938. for (var c = b.length, d = 0; d < c; d++) {
  3939. var e = 1 == c ? b : b.charAt(d);
  3940. if (a.charAt(0) == e && a.charAt(a.length - 1) == e) return a.substring(1, a.length - 1)
  3941. }
  3942. return a
  3943. };
  3944. goog.string.truncate = function(a, b, c) {
  3945. c && (a = goog.string.unescapeEntities(a));
  3946. a.length > b && (a = a.substring(0, b - 3) + "...");
  3947. c && (a = goog.string.htmlEscape(a));
  3948. return a
  3949. };
  3950. goog.string.truncateMiddle = function(a, b, c, d) {
  3951. c && (a = goog.string.unescapeEntities(a));
  3952. if (d && a.length > b) {
  3953. d > b && (d = b);
  3954. var e = a.length - d;
  3955. a = a.substring(0, b - d) + "..." + a.substring(e)
  3956. } else a.length > b && (d = Math.floor(b / 2), e = a.length - d, a = a.substring(0, d + b % 2) + "..." + a
  3957. .substring(e));
  3958. c && (a = goog.string.htmlEscape(a));
  3959. return a
  3960. };
  3961. goog.string.specialEscapeChars_ = {
  3962. "\x00": "\\0",
  3963. "\b": "\\b",
  3964. "\f": "\\f",
  3965. "\n": "\\n",
  3966. "\r": "\\r",
  3967. "\t": "\\t",
  3968. "\x0B": "\\x0B",
  3969. '"': '\\"',
  3970. "\\": "\\\\",
  3971. "<": "\\u003C"
  3972. };
  3973. goog.string.jsEscapeCache_ = {
  3974. "'": "\\'"
  3975. };
  3976. goog.string.quote = function(a) {
  3977. a = String(a);
  3978. for (var b = ['"'], c = 0; c < a.length; c++) {
  3979. var d = a.charAt(c),
  3980. e = d.charCodeAt(0);
  3981. b[c + 1] = goog.string.specialEscapeChars_[d] || (31 < e && 127 > e ? d : goog.string.escapeChar(d))
  3982. }
  3983. b.push('"');
  3984. return b.join("")
  3985. };
  3986. goog.string.escapeString = function(a) {
  3987. for (var b = [], c = 0; c < a.length; c++) b[c] = goog.string.escapeChar(a.charAt(c));
  3988. return b.join("")
  3989. };
  3990. goog.string.escapeChar = function(a) {
  3991. if (a in goog.string.jsEscapeCache_) return goog.string.jsEscapeCache_[a];
  3992. if (a in goog.string.specialEscapeChars_) return goog.string.jsEscapeCache_[a] = goog.string
  3993. .specialEscapeChars_[a];
  3994. var b = a.charCodeAt(0);
  3995. if (31 < b && 127 > b) var c = a;
  3996. else {
  3997. if (256 > b) {
  3998. if (c = "\\x", 16 > b || 256 < b) c += "0"
  3999. } else c = "\\u", 4096 > b && (c += "0");
  4000. c += b.toString(16).toUpperCase()
  4001. }
  4002. return goog.string.jsEscapeCache_[a] = c
  4003. };
  4004. goog.string.contains = goog.string.internal.contains;
  4005. goog.string.caseInsensitiveContains = goog.string.internal.caseInsensitiveContains;
  4006. goog.string.countOf = function(a, b) {
  4007. return a && b ? a.split(b).length - 1 : 0
  4008. };
  4009. goog.string.removeAt = function(a, b, c) {
  4010. var d = a;
  4011. 0 <= b && b < a.length && 0 < c && (d = a.substr(0, b) + a.substr(b + c, a.length - b - c));
  4012. return d
  4013. };
  4014. goog.string.remove = function(a, b) {
  4015. return a.replace(b, "")
  4016. };
  4017. goog.string.removeAll = function(a, b) {
  4018. b = new RegExp(goog.string.regExpEscape(b), "g");
  4019. return a.replace(b, "")
  4020. };
  4021. goog.string.replaceAll = function(a, b, c) {
  4022. b = new RegExp(goog.string.regExpEscape(b), "g");
  4023. return a.replace(b, c.replace(/\$/g, "$$$$"))
  4024. };
  4025. goog.string.regExpEscape = function(a) {
  4026. return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08")
  4027. };
  4028. goog.string.repeat = String.prototype.repeat ? function(a, b) {
  4029. return a.repeat(b)
  4030. } : function(a, b) {
  4031. return Array(b + 1).join(a)
  4032. };
  4033. goog.string.padNumber = function(a, b, c) {
  4034. a = void 0 !== c ? a.toFixed(c) : String(a);
  4035. c = a.indexOf("."); - 1 == c && (c = a.length);
  4036. return goog.string.repeat("0", Math.max(0, b - c)) + a
  4037. };
  4038. goog.string.makeSafe = function(a) {
  4039. return null == a ? "" : String(a)
  4040. };
  4041. goog.string.buildString = function(a) {
  4042. return Array.prototype.join.call(arguments, "")
  4043. };
  4044. goog.string.getRandomString = function() {
  4045. return Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^
  4046. goog.now()).toString(36)
  4047. };
  4048. goog.string.compareVersions = goog.string.internal.compareVersions;
  4049. goog.string.hashCode = function(a) {
  4050. for (var b = 0, c = 0; c < a.length; ++c) b = 31 * b + a.charCodeAt(c) >>> 0;
  4051. return b
  4052. };
  4053. goog.string.uniqueStringCounter_ = 2147483648 * Math.random() | 0;
  4054. goog.string.createUniqueString = function() {
  4055. return "goog_" + goog.string.uniqueStringCounter_++
  4056. };
  4057. goog.string.toNumber = function(a) {
  4058. var b = Number(a);
  4059. return 0 == b && goog.string.isEmptyOrWhitespace(a) ? NaN : b
  4060. };
  4061. goog.string.isLowerCamelCase = function(a) {
  4062. return /^[a-z]+([A-Z][a-z]*)*$/.test(a)
  4063. };
  4064. goog.string.isUpperCamelCase = function(a) {
  4065. return /^([A-Z][a-z]*)+$/.test(a)
  4066. };
  4067. goog.string.toCamelCase = function(a) {
  4068. return String(a).replace(/\-([a-z])/g, function(a, c) {
  4069. return c.toUpperCase()
  4070. })
  4071. };
  4072. goog.string.toSelectorCase = function(a) {
  4073. return String(a).replace(/([A-Z])/g, "-$1").toLowerCase()
  4074. };
  4075. goog.string.toTitleCase = function(a, b) {
  4076. b = "string" === typeof b ? goog.string.regExpEscape(b) : "\\s";
  4077. return a.replace(new RegExp("(^" + (b ? "|[" + b + "]+" : "") + ")([a-z])", "g"), function(a, b, e) {
  4078. return b + e.toUpperCase()
  4079. })
  4080. };
  4081. goog.string.capitalize = function(a) {
  4082. return String(a.charAt(0)).toUpperCase() + String(a.substr(1)).toLowerCase()
  4083. };
  4084. goog.string.parseInt = function(a) {
  4085. isFinite(a) && (a = String(a));
  4086. return "string" === typeof a ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN
  4087. };
  4088. goog.string.splitLimit = function(a, b, c) {
  4089. a = a.split(b);
  4090. for (var d = []; 0 < c && a.length;) d.push(a.shift()), c--;
  4091. a.length && d.push(a.join(b));
  4092. return d
  4093. };
  4094. goog.string.lastComponent = function(a, b) {
  4095. if (b) "string" == typeof b && (b = [b]);
  4096. else return a;
  4097. for (var c = -1, d = 0; d < b.length; d++)
  4098. if ("" != b[d]) {
  4099. var e = a.lastIndexOf(b[d]);
  4100. e > c && (c = e)
  4101. } return -1 == c ? a : a.slice(c + 1)
  4102. };
  4103. goog.string.editDistance = function(a, b) {
  4104. var c = [],
  4105. d = [];
  4106. if (a == b) return 0;
  4107. if (!a.length || !b.length) return Math.max(a.length, b.length);
  4108. for (var e = 0; e < b.length + 1; e++) c[e] = e;
  4109. for (e = 0; e < a.length; e++) {
  4110. d[0] = e + 1;
  4111. for (var f = 0; f < b.length; f++) d[f + 1] = Math.min(d[f] + 1, c[f + 1] + 1, c[f] + Number(a[e] != b[f]));
  4112. for (f = 0; f < c.length; f++) c[f] = d[f]
  4113. }
  4114. return d[b.length]
  4115. };
  4116. goog.labs.userAgent.engine = {};
  4117. goog.labs.userAgent.engine.isPresto = function() {
  4118. return goog.labs.userAgent.util.matchUserAgent("Presto")
  4119. };
  4120. goog.labs.userAgent.engine.isTrident = function() {
  4121. return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE")
  4122. };
  4123. goog.labs.userAgent.engine.isEdge = function() {
  4124. return goog.labs.userAgent.util.matchUserAgent("Edge")
  4125. };
  4126. goog.labs.userAgent.engine.isWebKit = function() {
  4127. return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit") && !goog.labs.userAgent.engine.isEdge()
  4128. };
  4129. goog.labs.userAgent.engine.isGecko = function() {
  4130. return goog.labs.userAgent.util.matchUserAgent("Gecko") && !goog.labs.userAgent.engine.isWebKit() && !goog.labs
  4131. .userAgent.engine.isTrident() && !goog.labs.userAgent.engine.isEdge()
  4132. };
  4133. goog.labs.userAgent.engine.getVersion = function() {
  4134. var a = goog.labs.userAgent.util.getUserAgent();
  4135. if (a) {
  4136. a = goog.labs.userAgent.util.extractVersionTuples(a);
  4137. var b = goog.labs.userAgent.engine.getEngineTuple_(a);
  4138. if (b) return "Gecko" == b[0] ? goog.labs.userAgent.engine.getVersionForKey_(a, "Firefox") : b[1];
  4139. a = a[0];
  4140. var c;
  4141. if (a && (c = a[2]) && (c = /Trident\/([^\s;]+)/.exec(c))) return c[1]
  4142. }
  4143. return ""
  4144. };
  4145. goog.labs.userAgent.engine.getEngineTuple_ = function(a) {
  4146. if (!goog.labs.userAgent.engine.isEdge()) return a[1];
  4147. for (var b = 0; b < a.length; b++) {
  4148. var c = a[b];
  4149. if ("Edge" == c[0]) return c
  4150. }
  4151. };
  4152. goog.labs.userAgent.engine.isVersionOrHigher = function(a) {
  4153. return 0 <= goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(), a)
  4154. };
  4155. goog.labs.userAgent.engine.getVersionForKey_ = function(a, b) {
  4156. return (a = goog.array.find(a, function(a) {
  4157. return b == a[0]
  4158. })) && a[1] || ""
  4159. };
  4160. goog.labs.userAgent.platform = {};
  4161. goog.labs.userAgent.platform.isAndroid = function() {
  4162. return goog.labs.userAgent.util.matchUserAgent("Android")
  4163. };
  4164. goog.labs.userAgent.platform.isIpod = function() {
  4165. return goog.labs.userAgent.util.matchUserAgent("iPod")
  4166. };
  4167. goog.labs.userAgent.platform.isIphone = function() {
  4168. return goog.labs.userAgent.util.matchUserAgent("iPhone") && !goog.labs.userAgent.util.matchUserAgent("iPod") &&
  4169. !goog.labs.userAgent.util.matchUserAgent("iPad")
  4170. };
  4171. goog.labs.userAgent.platform.isIpad = function() {
  4172. return goog.labs.userAgent.util.matchUserAgent("iPad")
  4173. };
  4174. goog.labs.userAgent.platform.isIos = function() {
  4175. return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpad() || goog.labs.userAgent
  4176. .platform.isIpod()
  4177. };
  4178. goog.labs.userAgent.platform.isMacintosh = function() {
  4179. return goog.labs.userAgent.util.matchUserAgent("Macintosh")
  4180. };
  4181. goog.labs.userAgent.platform.isLinux = function() {
  4182. return goog.labs.userAgent.util.matchUserAgent("Linux")
  4183. };
  4184. goog.labs.userAgent.platform.isWindows = function() {
  4185. return goog.labs.userAgent.util.matchUserAgent("Windows")
  4186. };
  4187. goog.labs.userAgent.platform.isChromeOS = function() {
  4188. return goog.labs.userAgent.util.matchUserAgent("CrOS")
  4189. };
  4190. goog.labs.userAgent.platform.isChromecast = function() {
  4191. return goog.labs.userAgent.util.matchUserAgent("CrKey")
  4192. };
  4193. goog.labs.userAgent.platform.isKaiOS = function() {
  4194. return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")
  4195. };
  4196. goog.labs.userAgent.platform.getVersion = function() {
  4197. var a = goog.labs.userAgent.util.getUserAgent(),
  4198. b = "";
  4199. goog.labs.userAgent.platform.isWindows() ? (b = /Windows (?:NT|Phone) ([0-9.]+)/, b = (a = b.exec(a)) ? a[1] :
  4200. "0.0") : goog.labs.userAgent.platform.isIos() ? (b = /(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/, b = (a = b
  4201. .exec(a)) && a[1].replace(/_/g, ".")) : goog.labs.userAgent.platform.isMacintosh() ? (b =
  4202. /Mac OS X ([0-9_.]+)/, b = (a = b.exec(a)) ? a[1].replace(/_/g, ".") : "10") : goog.labs.userAgent
  4203. .platform.isKaiOS() ? (b = /(?:KaiOS)\/(\S+)/i,
  4204. b = (a = b.exec(a)) && a[1]) : goog.labs.userAgent.platform.isAndroid() ? (b =
  4205. /Android\s+([^\);]+)(\)|;)/, b = (a = b.exec(a)) && a[1]) : goog.labs.userAgent.platform.isChromeOS() &&
  4206. (b = /(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/, b = (a = b.exec(a)) && a[1]);
  4207. return b || ""
  4208. };
  4209. goog.labs.userAgent.platform.isVersionOrHigher = function(a) {
  4210. return 0 <= goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(), a)
  4211. };
  4212. goog.reflect = {};
  4213. goog.reflect.object = function(a, b) {
  4214. return b
  4215. };
  4216. goog.reflect.objectProperty = function(a, b) {
  4217. return a
  4218. };
  4219. goog.reflect.sinkValue = function(a) {
  4220. goog.reflect.sinkValue[" "](a);
  4221. return a
  4222. };
  4223. goog.reflect.sinkValue[" "] = goog.nullFunction;
  4224. goog.reflect.canAccessProperty = function(a, b) {
  4225. try {
  4226. return goog.reflect.sinkValue(a[b]), !0
  4227. } catch (c) {}
  4228. return !1
  4229. };
  4230. goog.reflect.cache = function(a, b, c, d) {
  4231. d = d ? d(b) : b;
  4232. return Object.prototype.hasOwnProperty.call(a, d) ? a[d] : a[d] = c(b)
  4233. };
  4234. goog.userAgent = {};
  4235. goog.userAgent.ASSUME_IE = !1;
  4236. goog.userAgent.ASSUME_EDGE = !1;
  4237. goog.userAgent.ASSUME_GECKO = !1;
  4238. goog.userAgent.ASSUME_WEBKIT = !1;
  4239. goog.userAgent.ASSUME_MOBILE_WEBKIT = !1;
  4240. goog.userAgent.ASSUME_OPERA = !1;
  4241. goog.userAgent.ASSUME_ANY_VERSION = !1;
  4242. goog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_GECKO ||
  4243. goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_OPERA;
  4244. goog.userAgent.getUserAgentString = function() {
  4245. return goog.labs.userAgent.util.getUserAgent()
  4246. };
  4247. goog.userAgent.getNavigatorTyped = function() {
  4248. return goog.global.navigator || null
  4249. };
  4250. goog.userAgent.getNavigator = function() {
  4251. return goog.userAgent.getNavigatorTyped()
  4252. };
  4253. goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_OPERA : goog.labs.userAgent.browser
  4254. .isOpera();
  4255. goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_IE : goog.labs.userAgent.browser.isIE();
  4256. goog.userAgent.EDGE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_EDGE : goog.labs.userAgent.engine.isEdge();
  4257. goog.userAgent.EDGE_OR_IE = goog.userAgent.EDGE || goog.userAgent.IE;
  4258. goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_GECKO : goog.labs.userAgent.engine
  4259. .isGecko();
  4260. goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_WEBKIT || goog.userAgent
  4261. .ASSUME_MOBILE_WEBKIT : goog.labs.userAgent.engine.isWebKit();
  4262. goog.userAgent.isMobile_ = function() {
  4263. return goog.userAgent.WEBKIT && goog.labs.userAgent.util.matchUserAgent("Mobile")
  4264. };
  4265. goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.isMobile_();
  4266. goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
  4267. goog.userAgent.determinePlatform_ = function() {
  4268. var a = goog.userAgent.getNavigatorTyped();
  4269. return a && a.platform || ""
  4270. };
  4271. goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
  4272. goog.userAgent.ASSUME_MAC = !1;
  4273. goog.userAgent.ASSUME_WINDOWS = !1;
  4274. goog.userAgent.ASSUME_LINUX = !1;
  4275. goog.userAgent.ASSUME_X11 = !1;
  4276. goog.userAgent.ASSUME_ANDROID = !1;
  4277. goog.userAgent.ASSUME_IPHONE = !1;
  4278. goog.userAgent.ASSUME_IPAD = !1;
  4279. goog.userAgent.ASSUME_IPOD = !1;
  4280. goog.userAgent.ASSUME_KAIOS = !1;
  4281. goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent
  4282. .ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog
  4283. .userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD;
  4284. goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.labs.userAgent.platform
  4285. .isMacintosh();
  4286. goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.labs.userAgent.platform
  4287. .isWindows();
  4288. goog.userAgent.isLegacyLinux_ = function() {
  4289. return goog.labs.userAgent.platform.isLinux() || goog.labs.userAgent.platform.isChromeOS()
  4290. };
  4291. goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
  4292. goog.userAgent.isX11_ = function() {
  4293. var a = goog.userAgent.getNavigatorTyped();
  4294. return !!a && goog.string.contains(a.appVersion || "", "X11")
  4295. };
  4296. goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
  4297. goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.labs.userAgent.platform
  4298. .isAndroid();
  4299. goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.labs.userAgent.platform
  4300. .isIphone();
  4301. goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.labs.userAgent.platform
  4302. .isIpad();
  4303. goog.userAgent.IPOD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPOD : goog.labs.userAgent.platform
  4304. .isIpod();
  4305. goog.userAgent.IOS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD || goog
  4306. .userAgent.ASSUME_IPOD : goog.labs.userAgent.platform.isIos();
  4307. goog.userAgent.KAIOS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_KAIOS : goog.labs.userAgent.platform
  4308. .isKaiOS();
  4309. goog.userAgent.determineVersion_ = function() {
  4310. var a = "",
  4311. b = goog.userAgent.getVersionRegexResult_();
  4312. b && (a = b ? b[1] : "");
  4313. return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), null != b && b > parseFloat(a)) ? String(
  4314. b) : a
  4315. };
  4316. goog.userAgent.getVersionRegexResult_ = function() {
  4317. var a = goog.userAgent.getUserAgentString();
  4318. if (goog.userAgent.GECKO) return /rv:([^\);]+)(\)|;)/.exec(a);
  4319. if (goog.userAgent.EDGE) return /Edge\/([\d\.]+)/.exec(a);
  4320. if (goog.userAgent.IE) return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
  4321. if (goog.userAgent.WEBKIT) return /WebKit\/(\S+)/.exec(a);
  4322. if (goog.userAgent.OPERA) return /(?:Version)[ \/]?(\S+)/.exec(a)
  4323. };
  4324. goog.userAgent.getDocumentMode_ = function() {
  4325. var a = goog.global.document;
  4326. return a ? a.documentMode : void 0
  4327. };
  4328. goog.userAgent.VERSION = goog.userAgent.determineVersion_();
  4329. goog.userAgent.compare = function(a, b) {
  4330. return goog.string.compareVersions(a, b)
  4331. };
  4332. goog.userAgent.isVersionOrHigherCache_ = {};
  4333. goog.userAgent.isVersionOrHigher = function(a) {
  4334. return goog.userAgent.ASSUME_ANY_VERSION || goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_, a,
  4335. function() {
  4336. return 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a)
  4337. })
  4338. };
  4339. goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
  4340. goog.userAgent.isDocumentModeOrHigher = function(a) {
  4341. return Number(goog.userAgent.DOCUMENT_MODE) >= a
  4342. };
  4343. goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
  4344. goog.userAgent.DOCUMENT_MODE = function() {
  4345. if (goog.global.document && goog.userAgent.IE) {
  4346. var a = goog.userAgent.getDocumentMode_();
  4347. return a ? a : parseInt(goog.userAgent.VERSION, 10) || void 0
  4348. }
  4349. }();
  4350. goog.userAgent.product = {};
  4351. goog.userAgent.product.ASSUME_FIREFOX = !1;
  4352. goog.userAgent.product.ASSUME_IPHONE = !1;
  4353. goog.userAgent.product.ASSUME_IPAD = !1;
  4354. goog.userAgent.product.ASSUME_ANDROID = !1;
  4355. goog.userAgent.product.ASSUME_CHROME = !1;
  4356. goog.userAgent.product.ASSUME_SAFARI = !1;
  4357. goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent
  4358. .ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent
  4359. .product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog
  4360. .userAgent.product.ASSUME_SAFARI;
  4361. goog.userAgent.product.OPERA = goog.userAgent.OPERA;
  4362. goog.userAgent.product.IE = goog.userAgent.IE;
  4363. goog.userAgent.product.EDGE = goog.userAgent.EDGE;
  4364. goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog
  4365. .labs.userAgent.browser.isFirefox();
  4366. goog.userAgent.product.isIphoneOrIpod_ = function() {
  4367. return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpod()
  4368. };
  4369. goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog
  4370. .userAgent.product.isIphoneOrIpod_();
  4371. goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.labs
  4372. .userAgent.platform.isIpad();
  4373. goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog
  4374. .labs.userAgent.browser.isAndroidBrowser();
  4375. goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.labs
  4376. .userAgent.browser.isChrome();
  4377. goog.userAgent.product.isSafariDesktop_ = function() {
  4378. return goog.labs.userAgent.browser.isSafari() && !goog.labs.userAgent.platform.isIos()
  4379. };
  4380. goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog
  4381. .userAgent.product.isSafariDesktop_();
  4382. goog.crypt.base64 = {};
  4383. goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  4384. goog.crypt.base64.ENCODED_VALS = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "+/=";
  4385. goog.crypt.base64.ENCODED_VALS_WEBSAFE = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "-_.";
  4386. goog.crypt.base64.Alphabet = {
  4387. DEFAULT: 0,
  4388. NO_PADDING: 1,
  4389. WEBSAFE: 2,
  4390. WEBSAFE_DOT_PADDING: 3,
  4391. WEBSAFE_NO_PADDING: 4
  4392. };
  4393. goog.crypt.base64.paddingChars_ = "=.";
  4394. goog.crypt.base64.isPadding_ = function(a) {
  4395. return goog.string.contains(goog.crypt.base64.paddingChars_, a)
  4396. };
  4397. goog.crypt.base64.byteToCharMaps_ = {};
  4398. goog.crypt.base64.charToByteMap_ = null;
  4399. goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ = goog.userAgent.GECKO || goog.userAgent.WEBKIT && !goog.userAgent.product
  4400. .SAFARI || goog.userAgent.OPERA;
  4401. goog.crypt.base64.HAS_NATIVE_ENCODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || "function" == typeof goog.global
  4402. .btoa;
  4403. goog.crypt.base64.HAS_NATIVE_DECODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || !goog.userAgent.product.SAFARI && !
  4404. goog.userAgent.IE && "function" == typeof goog.global.atob;
  4405. goog.crypt.base64.encodeByteArray = function(a, b) {
  4406. goog.asserts.assert(goog.isArrayLike(a), "encodeByteArray takes an array as a parameter");
  4407. void 0 === b && (b = goog.crypt.base64.Alphabet.DEFAULT);
  4408. goog.crypt.base64.init_();
  4409. b = goog.crypt.base64.byteToCharMaps_[b];
  4410. for (var c = [], d = 0; d < a.length; d += 3) {
  4411. var e = a[d],
  4412. f = d + 1 < a.length,
  4413. g = f ? a[d + 1] : 0,
  4414. h = d + 2 < a.length,
  4415. k = h ? a[d + 2] : 0,
  4416. l = e >> 2;
  4417. e = (e & 3) << 4 | g >> 4;
  4418. g = (g & 15) << 2 | k >> 6;
  4419. k &= 63;
  4420. h || (k = 64, f || (g = 64));
  4421. c.push(b[l], b[e], b[g] || "", b[k] || "")
  4422. }
  4423. return c.join("")
  4424. };
  4425. goog.crypt.base64.encodeString = function(a, b) {
  4426. return goog.crypt.base64.HAS_NATIVE_ENCODE_ && !b ? goog.global.btoa(a) : goog.crypt.base64.encodeByteArray(goog
  4427. .crypt.stringToByteArray(a), b)
  4428. };
  4429. goog.crypt.base64.decodeString = function(a, b) {
  4430. if (goog.crypt.base64.HAS_NATIVE_DECODE_ && !b) return goog.global.atob(a);
  4431. var c = "";
  4432. goog.crypt.base64.decodeStringInternal_(a, function(a) {
  4433. c += String.fromCharCode(a)
  4434. });
  4435. return c
  4436. };
  4437. goog.crypt.base64.decodeStringToByteArray = function(a, b) {
  4438. var c = [];
  4439. goog.crypt.base64.decodeStringInternal_(a, function(a) {
  4440. c.push(a)
  4441. });
  4442. return c
  4443. };
  4444. goog.crypt.base64.decodeStringToUint8Array = function(a) {
  4445. goog.asserts.assert(!goog.userAgent.IE || goog.userAgent.isVersionOrHigher("10"),
  4446. "Browser does not support typed arrays");
  4447. var b = a.length,
  4448. c = 3 * b / 4;
  4449. c % 3 ? c = Math.floor(c) : goog.crypt.base64.isPadding_(a[b - 1]) && (c = goog.crypt.base64.isPadding_(a[b -
  4450. 2]) ? c - 2 : c - 1);
  4451. var d = new Uint8Array(c),
  4452. e = 0;
  4453. goog.crypt.base64.decodeStringInternal_(a, function(a) {
  4454. d[e++] = a
  4455. });
  4456. return d.subarray(0, e)
  4457. };
  4458. goog.crypt.base64.decodeStringInternal_ = function(a, b) {
  4459. function c(b) {
  4460. for (; d < a.length;) {
  4461. var c = a.charAt(d++),
  4462. e = goog.crypt.base64.charToByteMap_[c];
  4463. if (null != e) return e;
  4464. if (!goog.string.isEmptyOrWhitespace(c)) throw Error("Unknown base64 encoding at char: " + c);
  4465. }
  4466. return b
  4467. }
  4468. goog.crypt.base64.init_();
  4469. for (var d = 0;;) {
  4470. var e = c(-1),
  4471. f = c(0),
  4472. g = c(64),
  4473. h = c(64);
  4474. if (64 === h && -1 === e) break;
  4475. b(e << 2 | f >> 4);
  4476. 64 != g && (b(f << 4 & 240 | g >> 2), 64 != h && b(g << 6 & 192 | h))
  4477. }
  4478. };
  4479. goog.crypt.base64.init_ = function() {
  4480. if (!goog.crypt.base64.charToByteMap_) {
  4481. goog.crypt.base64.charToByteMap_ = {};
  4482. for (var a = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""), b = ["+/=", "+/", "-_=", "-_.", "-_"],
  4483. c = 0; 5 > c; c++) {
  4484. var d = a.concat(b[c].split(""));
  4485. goog.crypt.base64.byteToCharMaps_[c] = d;
  4486. for (var e = 0; e < d.length; e++) {
  4487. var f = d[e],
  4488. g = goog.crypt.base64.charToByteMap_[f];
  4489. void 0 === g ? goog.crypt.base64.charToByteMap_[f] = e : goog.asserts.assert(g === e)
  4490. }
  4491. }
  4492. }
  4493. };
  4494. jspb.utils = {};
  4495. jspb.utils.split64Low = 0;
  4496. jspb.utils.split64High = 0;
  4497. jspb.utils.splitUint64 = function(a) {
  4498. var b = a >>> 0;
  4499. a = Math.floor((a - b) / jspb.BinaryConstants.TWO_TO_32) >>> 0;
  4500. jspb.utils.split64Low = b;
  4501. jspb.utils.split64High = a
  4502. };
  4503. jspb.utils.splitInt64 = function(a) {
  4504. var b = 0 > a;
  4505. a = Math.abs(a);
  4506. var c = a >>> 0;
  4507. a = Math.floor((a - c) / jspb.BinaryConstants.TWO_TO_32);
  4508. a >>>= 0;
  4509. b && (a = ~a >>> 0, c = (~c >>> 0) + 1, 4294967295 < c && (c = 0, a++, 4294967295 < a && (a = 0)));
  4510. jspb.utils.split64Low = c;
  4511. jspb.utils.split64High = a
  4512. };
  4513. jspb.utils.splitZigzag64 = function(a) {
  4514. var b = 0 > a;
  4515. a = 2 * Math.abs(a);
  4516. jspb.utils.splitUint64(a);
  4517. a = jspb.utils.split64Low;
  4518. var c = jspb.utils.split64High;
  4519. b && (0 == a ? 0 == c ? c = a = 4294967295 : (c--, a = 4294967295) : a--);
  4520. jspb.utils.split64Low = a;
  4521. jspb.utils.split64High = c
  4522. };
  4523. jspb.utils.splitFloat32 = function(a) {
  4524. var b = 0 > a ? 1 : 0;
  4525. a = b ? -a : a;
  4526. if (0 === a) 0 < 1 / a ? (jspb.utils.split64High = 0, jspb.utils.split64Low = 0) : (jspb.utils.split64High = 0,
  4527. jspb.utils.split64Low = 2147483648);
  4528. else if (isNaN(a)) jspb.utils.split64High = 0, jspb.utils.split64Low = 2147483647;
  4529. else if (a > jspb.BinaryConstants.FLOAT32_MAX) jspb.utils.split64High = 0, jspb.utils.split64Low = (b << 31 |
  4530. 2139095040) >>> 0;
  4531. else if (a < jspb.BinaryConstants.FLOAT32_MIN) a = Math.round(a / Math.pow(2, -149)), jspb.utils.split64High =
  4532. 0, jspb.utils.split64Low = (b << 31 |
  4533. a) >>> 0;
  4534. else {
  4535. var c = Math.floor(Math.log(a) / Math.LN2);
  4536. a *= Math.pow(2, -c);
  4537. a = Math.round(a * jspb.BinaryConstants.TWO_TO_23);
  4538. 16777216 <= a && ++c;
  4539. jspb.utils.split64High = 0;
  4540. jspb.utils.split64Low = (b << 31 | c + 127 << 23 | a & 8388607) >>> 0
  4541. }
  4542. };
  4543. jspb.utils.splitFloat64 = function(a) {
  4544. var b = 0 > a ? 1 : 0;
  4545. a = b ? -a : a;
  4546. if (0 === a) jspb.utils.split64High = 0 < 1 / a ? 0 : 2147483648, jspb.utils.split64Low = 0;
  4547. else if (isNaN(a)) jspb.utils.split64High = 2147483647, jspb.utils.split64Low = 4294967295;
  4548. else if (a > jspb.BinaryConstants.FLOAT64_MAX) jspb.utils.split64High = (b << 31 | 2146435072) >>> 0, jspb.utils
  4549. .split64Low = 0;
  4550. else if (a < jspb.BinaryConstants.FLOAT64_MIN) {
  4551. var c = a / Math.pow(2, -1074);
  4552. a = c / jspb.BinaryConstants.TWO_TO_32;
  4553. jspb.utils.split64High = (b << 31 | a) >>> 0;
  4554. jspb.utils.split64Low = c >>> 0
  4555. } else {
  4556. c =
  4557. a;
  4558. var d = 0;
  4559. if (2 <= c)
  4560. for (; 2 <= c && 1023 > d;) d++, c /= 2;
  4561. else
  4562. for (; 1 > c && -1022 < d;) c *= 2, d--;
  4563. c = a * Math.pow(2, -d);
  4564. a = c * jspb.BinaryConstants.TWO_TO_20 & 1048575;
  4565. c = c * jspb.BinaryConstants.TWO_TO_52 >>> 0;
  4566. jspb.utils.split64High = (b << 31 | d + 1023 << 20 | a) >>> 0;
  4567. jspb.utils.split64Low = c
  4568. }
  4569. };
  4570. jspb.utils.splitHash64 = function(a) {
  4571. var b = a.charCodeAt(0),
  4572. c = a.charCodeAt(1),
  4573. d = a.charCodeAt(2),
  4574. e = a.charCodeAt(3),
  4575. f = a.charCodeAt(4),
  4576. g = a.charCodeAt(5),
  4577. h = a.charCodeAt(6);
  4578. a = a.charCodeAt(7);
  4579. jspb.utils.split64Low = b + (c << 8) + (d << 16) + (e << 24) >>> 0;
  4580. jspb.utils.split64High = f + (g << 8) + (h << 16) + (a << 24) >>> 0
  4581. };
  4582. jspb.utils.joinUint64 = function(a, b) {
  4583. return b * jspb.BinaryConstants.TWO_TO_32 + (a >>> 0)
  4584. };
  4585. jspb.utils.joinInt64 = function(a, b) {
  4586. var c = b & 2147483648;
  4587. c && (a = ~a + 1 >>> 0, b = ~b >>> 0, 0 == a && (b = b + 1 >>> 0));
  4588. a = jspb.utils.joinUint64(a, b);
  4589. return c ? -a : a
  4590. };
  4591. jspb.utils.toZigzag64 = function(a, b, c) {
  4592. var d = b >> 31;
  4593. return c(a << 1 ^ d, (b << 1 | a >>> 31) ^ d)
  4594. };
  4595. jspb.utils.joinZigzag64 = function(a, b) {
  4596. return jspb.utils.fromZigzag64(a, b, jspb.utils.joinInt64)
  4597. };
  4598. jspb.utils.fromZigzag64 = function(a, b, c) {
  4599. var d = -(a & 1);
  4600. return c((a >>> 1 | b << 31) ^ d, b >>> 1 ^ d)
  4601. };
  4602. jspb.utils.joinFloat32 = function(a, b) {
  4603. b = 2 * (a >> 31) + 1;
  4604. var c = a >>> 23 & 255;
  4605. a &= 8388607;
  4606. return 255 == c ? a ? NaN : Infinity * b : 0 == c ? b * Math.pow(2, -149) * a : b * Math.pow(2, c - 150) * (a +
  4607. Math.pow(2, 23))
  4608. };
  4609. jspb.utils.joinFloat64 = function(a, b) {
  4610. var c = 2 * (b >> 31) + 1,
  4611. d = b >>> 20 & 2047;
  4612. a = jspb.BinaryConstants.TWO_TO_32 * (b & 1048575) + a;
  4613. return 2047 == d ? a ? NaN : Infinity * c : 0 == d ? c * Math.pow(2, -1074) * a : c * Math.pow(2, d - 1075) * (
  4614. a + jspb.BinaryConstants.TWO_TO_52)
  4615. };
  4616. jspb.utils.joinHash64 = function(a, b) {
  4617. return String.fromCharCode(a >>> 0 & 255, a >>> 8 & 255, a >>> 16 & 255, a >>> 24 & 255, b >>> 0 & 255, b >>>
  4618. 8 & 255, b >>> 16 & 255, b >>> 24 & 255)
  4619. };
  4620. jspb.utils.DIGITS = "0123456789abcdef".split("");
  4621. jspb.utils.ZERO_CHAR_CODE_ = 48;
  4622. jspb.utils.A_CHAR_CODE_ = 97;
  4623. jspb.utils.joinUnsignedDecimalString = function(a, b) {
  4624. function c(a, b) {
  4625. a = a ? String(a) : "";
  4626. return b ? "0000000".slice(a.length) + a : a
  4627. }
  4628. if (2097151 >= b) return "" + jspb.utils.joinUint64(a, b);
  4629. var d = (a >>> 24 | b << 8) >>> 0 & 16777215;
  4630. b = b >> 16 & 65535;
  4631. a = (a & 16777215) + 6777216 * d + 6710656 * b;
  4632. d += 8147497 * b;
  4633. b *= 2;
  4634. 1E7 <= a && (d += Math.floor(a / 1E7), a %= 1E7);
  4635. 1E7 <= d && (b += Math.floor(d / 1E7), d %= 1E7);
  4636. return c(b, 0) + c(d, b) + c(a, 1)
  4637. };
  4638. jspb.utils.joinSignedDecimalString = function(a, b) {
  4639. var c = b & 2147483648;
  4640. c && (a = ~a + 1 >>> 0, b = ~b + (0 == a ? 1 : 0) >>> 0);
  4641. a = jspb.utils.joinUnsignedDecimalString(a, b);
  4642. return c ? "-" + a : a
  4643. };
  4644. jspb.utils.hash64ToDecimalString = function(a, b) {
  4645. jspb.utils.splitHash64(a);
  4646. a = jspb.utils.split64Low;
  4647. var c = jspb.utils.split64High;
  4648. return b ? jspb.utils.joinSignedDecimalString(a, c) : jspb.utils.joinUnsignedDecimalString(a, c)
  4649. };
  4650. jspb.utils.hash64ArrayToDecimalStrings = function(a, b) {
  4651. for (var c = Array(a.length), d = 0; d < a.length; d++) c[d] = jspb.utils.hash64ToDecimalString(a[d], b);
  4652. return c
  4653. };
  4654. jspb.utils.decimalStringToHash64 = function(a) {
  4655. function b(a, b) {
  4656. for (var c = 0; 8 > c && (1 !== a || 0 < b); c++) b = a * e[c] + b, e[c] = b & 255, b >>>= 8
  4657. }
  4658. function c() {
  4659. for (var a = 0; 8 > a; a++) e[a] = ~e[a] & 255
  4660. }
  4661. jspb.asserts.assert(0 < a.length);
  4662. var d = !1;
  4663. "-" === a[0] && (d = !0, a = a.slice(1));
  4664. for (var e = [0, 0, 0, 0, 0, 0, 0, 0], f = 0; f < a.length; f++) b(10, a.charCodeAt(f) - jspb.utils
  4665. .ZERO_CHAR_CODE_);
  4666. d && (c(), b(1, 1));
  4667. return goog.crypt.byteArrayToString(e)
  4668. };
  4669. jspb.utils.splitDecimalString = function(a) {
  4670. jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(a))
  4671. };
  4672. jspb.utils.toHexDigit_ = function(a) {
  4673. return String.fromCharCode(10 > a ? jspb.utils.ZERO_CHAR_CODE_ + a : jspb.utils.A_CHAR_CODE_ - 10 + a)
  4674. };
  4675. jspb.utils.fromHexCharCode_ = function(a) {
  4676. return a >= jspb.utils.A_CHAR_CODE_ ? a - jspb.utils.A_CHAR_CODE_ + 10 : a - jspb.utils.ZERO_CHAR_CODE_
  4677. };
  4678. jspb.utils.hash64ToHexString = function(a) {
  4679. var b = Array(18);
  4680. b[0] = "0";
  4681. b[1] = "x";
  4682. for (var c = 0; 8 > c; c++) {
  4683. var d = a.charCodeAt(7 - c);
  4684. b[2 * c + 2] = jspb.utils.toHexDigit_(d >> 4);
  4685. b[2 * c + 3] = jspb.utils.toHexDigit_(d & 15)
  4686. }
  4687. return b.join("")
  4688. };
  4689. jspb.utils.hexStringToHash64 = function(a) {
  4690. a = a.toLowerCase();
  4691. jspb.asserts.assert(18 == a.length);
  4692. jspb.asserts.assert("0" == a[0]);
  4693. jspb.asserts.assert("x" == a[1]);
  4694. for (var b = "", c = 0; 8 > c; c++) {
  4695. var d = jspb.utils.fromHexCharCode_(a.charCodeAt(2 * c + 2)),
  4696. e = jspb.utils.fromHexCharCode_(a.charCodeAt(2 * c + 3));
  4697. b = String.fromCharCode(16 * d + e) + b
  4698. }
  4699. return b
  4700. };
  4701. jspb.utils.hash64ToNumber = function(a, b) {
  4702. jspb.utils.splitHash64(a);
  4703. a = jspb.utils.split64Low;
  4704. var c = jspb.utils.split64High;
  4705. return b ? jspb.utils.joinInt64(a, c) : jspb.utils.joinUint64(a, c)
  4706. };
  4707. jspb.utils.numberToHash64 = function(a) {
  4708. jspb.utils.splitInt64(a);
  4709. return jspb.utils.joinHash64(jspb.utils.split64Low, jspb.utils.split64High)
  4710. };
  4711. jspb.utils.countVarints = function(a, b, c) {
  4712. for (var d = 0, e = b; e < c; e++) d += a[e] >> 7;
  4713. return c - b - d
  4714. };
  4715. jspb.utils.countVarintFields = function(a, b, c, d) {
  4716. var e = 0;
  4717. d = 8 * d + jspb.BinaryConstants.WireType.VARINT;
  4718. if (128 > d)
  4719. for (; b < c && a[b++] == d;)
  4720. for (e++;;) {
  4721. var f = a[b++];
  4722. if (0 == (f & 128)) break
  4723. } else
  4724. for (; b < c;) {
  4725. for (f = d; 128 < f;) {
  4726. if (a[b] != (f & 127 | 128)) return e;
  4727. b++;
  4728. f >>= 7
  4729. }
  4730. if (a[b++] != f) break;
  4731. for (e++; f = a[b++], 0 != (f & 128););
  4732. }
  4733. return e
  4734. };
  4735. jspb.utils.countFixedFields_ = function(a, b, c, d, e) {
  4736. var f = 0;
  4737. if (128 > d)
  4738. for (; b < c && a[b++] == d;) f++, b += e;
  4739. else
  4740. for (; b < c;) {
  4741. for (var g = d; 128 < g;) {
  4742. if (a[b++] != (g & 127 | 128)) return f;
  4743. g >>= 7
  4744. }
  4745. if (a[b++] != g) break;
  4746. f++;
  4747. b += e
  4748. }
  4749. return f
  4750. };
  4751. jspb.utils.countFixed32Fields = function(a, b, c, d) {
  4752. return jspb.utils.countFixedFields_(a, b, c, 8 * d + jspb.BinaryConstants.WireType.FIXED32, 4)
  4753. };
  4754. jspb.utils.countFixed64Fields = function(a, b, c, d) {
  4755. return jspb.utils.countFixedFields_(a, b, c, 8 * d + jspb.BinaryConstants.WireType.FIXED64, 8)
  4756. };
  4757. jspb.utils.countDelimitedFields = function(a, b, c, d) {
  4758. var e = 0;
  4759. for (d = 8 * d + jspb.BinaryConstants.WireType.DELIMITED; b < c;) {
  4760. for (var f = d; 128 < f;) {
  4761. if (a[b++] != (f & 127 | 128)) return e;
  4762. f >>= 7
  4763. }
  4764. if (a[b++] != f) break;
  4765. e++;
  4766. for (var g = 0, h = 1; f = a[b++], g += (f & 127) * h, h *= 128, 0 != (f & 128););
  4767. b += g
  4768. }
  4769. return e
  4770. };
  4771. jspb.utils.debugBytesToTextFormat = function(a) {
  4772. var b = '"';
  4773. if (a) {
  4774. a = jspb.utils.byteSourceToUint8Array(a);
  4775. for (var c = 0; c < a.length; c++) b += "\\x", 16 > a[c] && (b += "0"), b += a[c].toString(16)
  4776. }
  4777. return b + '"'
  4778. };
  4779. jspb.utils.debugScalarToTextFormat = function(a) {
  4780. return "string" === typeof a ? goog.string.quote(a) : a.toString()
  4781. };
  4782. jspb.utils.stringToByteArray = function(a) {
  4783. for (var b = new Uint8Array(a.length), c = 0; c < a.length; c++) {
  4784. var d = a.charCodeAt(c);
  4785. if (255 < d) throw Error("Conversion error: string contains codepoint outside of byte range");
  4786. b[c] = d
  4787. }
  4788. return b
  4789. };
  4790. jspb.utils.byteSourceToUint8Array = function(a) {
  4791. if (a.constructor === Uint8Array) return a;
  4792. if (a.constructor === ArrayBuffer || a.constructor === Array) return new Uint8Array(a);
  4793. if (a.constructor === String) return goog.crypt.base64.decodeStringToUint8Array(a);
  4794. if (a instanceof Uint8Array) return new Uint8Array(a.buffer, a.byteOffset, a.byteLength);
  4795. jspb.asserts.fail("Type not convertible to Uint8Array.");
  4796. return new Uint8Array(0)
  4797. };
  4798. jspb.BinaryDecoder = function(a, b, c) {
  4799. this.bytes_ = null;
  4800. this.cursor_ = this.end_ = this.start_ = 0;
  4801. this.error_ = !1;
  4802. a && this.setBlock(a, b, c)
  4803. };
  4804. jspb.BinaryDecoder.instanceCache_ = [];
  4805. jspb.BinaryDecoder.alloc = function(a, b, c) {
  4806. if (jspb.BinaryDecoder.instanceCache_.length) {
  4807. var d = jspb.BinaryDecoder.instanceCache_.pop();
  4808. a && d.setBlock(a, b, c);
  4809. return d
  4810. }
  4811. return new jspb.BinaryDecoder(a, b, c)
  4812. };
  4813. jspb.BinaryDecoder.prototype.free = function() {
  4814. this.clear();
  4815. 100 > jspb.BinaryDecoder.instanceCache_.length && jspb.BinaryDecoder.instanceCache_.push(this)
  4816. };
  4817. jspb.BinaryDecoder.prototype.clone = function() {
  4818. return jspb.BinaryDecoder.alloc(this.bytes_, this.start_, this.end_ - this.start_)
  4819. };
  4820. jspb.BinaryDecoder.prototype.clear = function() {
  4821. this.bytes_ = null;
  4822. this.cursor_ = this.end_ = this.start_ = 0;
  4823. this.error_ = !1
  4824. };
  4825. jspb.BinaryDecoder.prototype.getBuffer = function() {
  4826. return this.bytes_
  4827. };
  4828. jspb.BinaryDecoder.prototype.setBlock = function(a, b, c) {
  4829. this.bytes_ = jspb.utils.byteSourceToUint8Array(a);
  4830. this.start_ = void 0 !== b ? b : 0;
  4831. this.end_ = void 0 !== c ? this.start_ + c : this.bytes_.length;
  4832. this.cursor_ = this.start_
  4833. };
  4834. jspb.BinaryDecoder.prototype.getEnd = function() {
  4835. return this.end_
  4836. };
  4837. jspb.BinaryDecoder.prototype.setEnd = function(a) {
  4838. this.end_ = a
  4839. };
  4840. jspb.BinaryDecoder.prototype.reset = function() {
  4841. this.cursor_ = this.start_
  4842. };
  4843. jspb.BinaryDecoder.prototype.getCursor = function() {
  4844. return this.cursor_
  4845. };
  4846. jspb.BinaryDecoder.prototype.setCursor = function(a) {
  4847. this.cursor_ = a
  4848. };
  4849. jspb.BinaryDecoder.prototype.advance = function(a) {
  4850. this.cursor_ += a;
  4851. jspb.asserts.assert(this.cursor_ <= this.end_)
  4852. };
  4853. jspb.BinaryDecoder.prototype.atEnd = function() {
  4854. return this.cursor_ == this.end_
  4855. };
  4856. jspb.BinaryDecoder.prototype.pastEnd = function() {
  4857. return this.cursor_ > this.end_
  4858. };
  4859. jspb.BinaryDecoder.prototype.getError = function() {
  4860. return this.error_ || 0 > this.cursor_ || this.cursor_ > this.end_
  4861. };
  4862. jspb.BinaryDecoder.prototype.readSplitVarint64 = function(a) {
  4863. for (var b = 128, c = 0, d = 0, e = 0; 4 > e && 128 <= b; e++) b = this.bytes_[this.cursor_++], c |= (b &
  4864. 127) << 7 * e;
  4865. 128 <= b && (b = this.bytes_[this.cursor_++], c |= (b & 127) << 28, d |= (b & 127) >> 4);
  4866. if (128 <= b)
  4867. for (e = 0; 5 > e && 128 <= b; e++) b = this.bytes_[this.cursor_++], d |= (b & 127) << 7 * e + 3;
  4868. if (128 > b) return a(c >>> 0, d >>> 0);
  4869. jspb.asserts.fail("Failed to read varint, encoding is invalid.");
  4870. this.error_ = !0
  4871. };
  4872. jspb.BinaryDecoder.prototype.readSplitZigzagVarint64 = function(a) {
  4873. return this.readSplitVarint64(function(b, c) {
  4874. return jspb.utils.fromZigzag64(b, c, a)
  4875. })
  4876. };
  4877. jspb.BinaryDecoder.prototype.readSplitFixed64 = function(a) {
  4878. var b = this.bytes_,
  4879. c = this.cursor_;
  4880. this.cursor_ += 8;
  4881. for (var d = 0, e = 0, f = c + 7; f >= c; f--) d = d << 8 | b[f], e = e << 8 | b[f + 4];
  4882. return a(d, e)
  4883. };
  4884. jspb.BinaryDecoder.prototype.skipVarint = function() {
  4885. for (; this.bytes_[this.cursor_] & 128;) this.cursor_++;
  4886. this.cursor_++
  4887. };
  4888. jspb.BinaryDecoder.prototype.unskipVarint = function(a) {
  4889. for (; 128 < a;) this.cursor_--, a >>>= 7;
  4890. this.cursor_--
  4891. };
  4892. jspb.BinaryDecoder.prototype.readUnsignedVarint32 = function() {
  4893. var a = this.bytes_;
  4894. var b = a[this.cursor_ + 0];
  4895. var c = b & 127;
  4896. if (128 > b) return this.cursor_ += 1, jspb.asserts.assert(this.cursor_ <= this.end_), c;
  4897. b = a[this.cursor_ + 1];
  4898. c |= (b & 127) << 7;
  4899. if (128 > b) return this.cursor_ += 2, jspb.asserts.assert(this.cursor_ <= this.end_), c;
  4900. b = a[this.cursor_ + 2];
  4901. c |= (b & 127) << 14;
  4902. if (128 > b) return this.cursor_ += 3, jspb.asserts.assert(this.cursor_ <= this.end_), c;
  4903. b = a[this.cursor_ + 3];
  4904. c |= (b & 127) << 21;
  4905. if (128 > b) return this.cursor_ += 4, jspb.asserts.assert(this.cursor_ <=
  4906. this.end_), c;
  4907. b = a[this.cursor_ + 4];
  4908. c |= (b & 15) << 28;
  4909. if (128 > b) return this.cursor_ += 5, jspb.asserts.assert(this.cursor_ <= this.end_), c >>> 0;
  4910. this.cursor_ += 5;
  4911. 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] &&
  4912. 128 <= a[this.cursor_++] && jspb.asserts.assert(!1);
  4913. jspb.asserts.assert(this.cursor_ <= this.end_);
  4914. return c
  4915. };
  4916. jspb.BinaryDecoder.prototype.readSignedVarint32 = function() {
  4917. return ~~this.readUnsignedVarint32()
  4918. };
  4919. jspb.BinaryDecoder.prototype.readUnsignedVarint32String = function() {
  4920. return this.readUnsignedVarint32().toString()
  4921. };
  4922. jspb.BinaryDecoder.prototype.readSignedVarint32String = function() {
  4923. return this.readSignedVarint32().toString()
  4924. };
  4925. jspb.BinaryDecoder.prototype.readZigzagVarint32 = function() {
  4926. var a = this.readUnsignedVarint32();
  4927. return a >>> 1 ^ -(a & 1)
  4928. };
  4929. jspb.BinaryDecoder.prototype.readUnsignedVarint64 = function() {
  4930. return this.readSplitVarint64(jspb.utils.joinUint64)
  4931. };
  4932. jspb.BinaryDecoder.prototype.readUnsignedVarint64String = function() {
  4933. return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)
  4934. };
  4935. jspb.BinaryDecoder.prototype.readSignedVarint64 = function() {
  4936. return this.readSplitVarint64(jspb.utils.joinInt64)
  4937. };
  4938. jspb.BinaryDecoder.prototype.readSignedVarint64String = function() {
  4939. return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)
  4940. };
  4941. jspb.BinaryDecoder.prototype.readZigzagVarint64 = function() {
  4942. return this.readSplitVarint64(jspb.utils.joinZigzag64)
  4943. };
  4944. jspb.BinaryDecoder.prototype.readZigzagVarintHash64 = function() {
  4945. return this.readSplitZigzagVarint64(jspb.utils.joinHash64)
  4946. };
  4947. jspb.BinaryDecoder.prototype.readZigzagVarint64String = function() {
  4948. return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)
  4949. };
  4950. jspb.BinaryDecoder.prototype.readUint8 = function() {
  4951. var a = this.bytes_[this.cursor_ + 0];
  4952. this.cursor_ += 1;
  4953. jspb.asserts.assert(this.cursor_ <= this.end_);
  4954. return a
  4955. };
  4956. jspb.BinaryDecoder.prototype.readUint16 = function() {
  4957. var a = this.bytes_[this.cursor_ + 0],
  4958. b = this.bytes_[this.cursor_ + 1];
  4959. this.cursor_ += 2;
  4960. jspb.asserts.assert(this.cursor_ <= this.end_);
  4961. return a << 0 | b << 8
  4962. };
  4963. jspb.BinaryDecoder.prototype.readUint32 = function() {
  4964. var a = this.bytes_[this.cursor_ + 0],
  4965. b = this.bytes_[this.cursor_ + 1],
  4966. c = this.bytes_[this.cursor_ + 2],
  4967. d = this.bytes_[this.cursor_ + 3];
  4968. this.cursor_ += 4;
  4969. jspb.asserts.assert(this.cursor_ <= this.end_);
  4970. return (a << 0 | b << 8 | c << 16 | d << 24) >>> 0
  4971. };
  4972. jspb.BinaryDecoder.prototype.readUint64 = function() {
  4973. var a = this.readUint32(),
  4974. b = this.readUint32();
  4975. return jspb.utils.joinUint64(a, b)
  4976. };
  4977. jspb.BinaryDecoder.prototype.readUint64String = function() {
  4978. var a = this.readUint32(),
  4979. b = this.readUint32();
  4980. return jspb.utils.joinUnsignedDecimalString(a, b)
  4981. };
  4982. jspb.BinaryDecoder.prototype.readInt8 = function() {
  4983. var a = this.bytes_[this.cursor_ + 0];
  4984. this.cursor_ += 1;
  4985. jspb.asserts.assert(this.cursor_ <= this.end_);
  4986. return a << 24 >> 24
  4987. };
  4988. jspb.BinaryDecoder.prototype.readInt16 = function() {
  4989. var a = this.bytes_[this.cursor_ + 0],
  4990. b = this.bytes_[this.cursor_ + 1];
  4991. this.cursor_ += 2;
  4992. jspb.asserts.assert(this.cursor_ <= this.end_);
  4993. return (a << 0 | b << 8) << 16 >> 16
  4994. };
  4995. jspb.BinaryDecoder.prototype.readInt32 = function() {
  4996. var a = this.bytes_[this.cursor_ + 0],
  4997. b = this.bytes_[this.cursor_ + 1],
  4998. c = this.bytes_[this.cursor_ + 2],
  4999. d = this.bytes_[this.cursor_ + 3];
  5000. this.cursor_ += 4;
  5001. jspb.asserts.assert(this.cursor_ <= this.end_);
  5002. return a << 0 | b << 8 | c << 16 | d << 24
  5003. };
  5004. jspb.BinaryDecoder.prototype.readInt64 = function() {
  5005. var a = this.readUint32(),
  5006. b = this.readUint32();
  5007. return jspb.utils.joinInt64(a, b)
  5008. };
  5009. jspb.BinaryDecoder.prototype.readInt64String = function() {
  5010. var a = this.readUint32(),
  5011. b = this.readUint32();
  5012. return jspb.utils.joinSignedDecimalString(a, b)
  5013. };
  5014. jspb.BinaryDecoder.prototype.readFloat = function() {
  5015. var a = this.readUint32();
  5016. return jspb.utils.joinFloat32(a, 0)
  5017. };
  5018. jspb.BinaryDecoder.prototype.readDouble = function() {
  5019. var a = this.readUint32(),
  5020. b = this.readUint32();
  5021. return jspb.utils.joinFloat64(a, b)
  5022. };
  5023. jspb.BinaryDecoder.prototype.readBool = function() {
  5024. return !!this.bytes_[this.cursor_++]
  5025. };
  5026. jspb.BinaryDecoder.prototype.readEnum = function() {
  5027. return this.readSignedVarint32()
  5028. };
  5029. jspb.BinaryDecoder.prototype.readString = function(a) {
  5030. var b = this.bytes_,
  5031. c = this.cursor_;
  5032. a = c + a;
  5033. for (var d = [], e = ""; c < a;) {
  5034. var f = b[c++];
  5035. if (128 > f) d.push(f);
  5036. else if (192 > f) continue;
  5037. else if (224 > f) {
  5038. var g = b[c++];
  5039. d.push((f & 31) << 6 | g & 63)
  5040. } else if (240 > f) {
  5041. g = b[c++];
  5042. var h = b[c++];
  5043. d.push((f & 15) << 12 | (g & 63) << 6 | h & 63)
  5044. } else if (248 > f) {
  5045. g = b[c++];
  5046. h = b[c++];
  5047. var k = b[c++];
  5048. f = (f & 7) << 18 | (g & 63) << 12 | (h & 63) << 6 | k & 63;
  5049. f -= 65536;
  5050. d.push((f >> 10 & 1023) + 55296, (f & 1023) + 56320)
  5051. }
  5052. 8192 <= d.length && (e += String.fromCharCode.apply(null, d), d.length = 0)
  5053. }
  5054. e += goog.crypt.byteArrayToString(d);
  5055. this.cursor_ = c;
  5056. return e
  5057. };
  5058. jspb.BinaryDecoder.prototype.readStringWithLength = function() {
  5059. var a = this.readUnsignedVarint32();
  5060. return this.readString(a)
  5061. };
  5062. jspb.BinaryDecoder.prototype.readBytes = function(a) {
  5063. if (0 > a || this.cursor_ + a > this.bytes_.length) return this.error_ = !0, jspb.asserts.fail(
  5064. "Invalid byte length!"), new Uint8Array(0);
  5065. var b = this.bytes_.subarray(this.cursor_, this.cursor_ + a);
  5066. this.cursor_ += a;
  5067. jspb.asserts.assert(this.cursor_ <= this.end_);
  5068. return b
  5069. };
  5070. jspb.BinaryDecoder.prototype.readVarintHash64 = function() {
  5071. return this.readSplitVarint64(jspb.utils.joinHash64)
  5072. };
  5073. jspb.BinaryDecoder.prototype.readFixedHash64 = function() {
  5074. var a = this.bytes_,
  5075. b = this.cursor_,
  5076. c = a[b + 0],
  5077. d = a[b + 1],
  5078. e = a[b + 2],
  5079. f = a[b + 3],
  5080. g = a[b + 4],
  5081. h = a[b + 5],
  5082. k = a[b + 6];
  5083. a = a[b + 7];
  5084. this.cursor_ += 8;
  5085. return String.fromCharCode(c, d, e, f, g, h, k, a)
  5086. };
  5087. jspb.BinaryReader = function(a, b, c) {
  5088. this.decoder_ = jspb.BinaryDecoder.alloc(a, b, c);
  5089. this.fieldCursor_ = this.decoder_.getCursor();
  5090. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  5091. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID;
  5092. this.error_ = !1;
  5093. this.readCallbacks_ = null
  5094. };
  5095. jspb.BinaryReader.instanceCache_ = [];
  5096. jspb.BinaryReader.alloc = function(a, b, c) {
  5097. if (jspb.BinaryReader.instanceCache_.length) {
  5098. var d = jspb.BinaryReader.instanceCache_.pop();
  5099. a && d.decoder_.setBlock(a, b, c);
  5100. return d
  5101. }
  5102. return new jspb.BinaryReader(a, b, c)
  5103. };
  5104. jspb.BinaryReader.prototype.alloc = jspb.BinaryReader.alloc;
  5105. jspb.BinaryReader.prototype.free = function() {
  5106. this.decoder_.clear();
  5107. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  5108. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID;
  5109. this.error_ = !1;
  5110. this.readCallbacks_ = null;
  5111. 100 > jspb.BinaryReader.instanceCache_.length && jspb.BinaryReader.instanceCache_.push(this)
  5112. };
  5113. jspb.BinaryReader.prototype.getFieldCursor = function() {
  5114. return this.fieldCursor_
  5115. };
  5116. jspb.BinaryReader.prototype.getCursor = function() {
  5117. return this.decoder_.getCursor()
  5118. };
  5119. jspb.BinaryReader.prototype.getBuffer = function() {
  5120. return this.decoder_.getBuffer()
  5121. };
  5122. jspb.BinaryReader.prototype.getFieldNumber = function() {
  5123. return this.nextField_
  5124. };
  5125. goog.exportProperty(jspb.BinaryReader.prototype, "getFieldNumber", jspb.BinaryReader.prototype.getFieldNumber);
  5126. jspb.BinaryReader.prototype.getWireType = function() {
  5127. return this.nextWireType_
  5128. };
  5129. jspb.BinaryReader.prototype.isDelimited = function() {
  5130. return this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED
  5131. };
  5132. goog.exportProperty(jspb.BinaryReader.prototype, "isDelimited", jspb.BinaryReader.prototype.isDelimited);
  5133. jspb.BinaryReader.prototype.isEndGroup = function() {
  5134. return this.nextWireType_ == jspb.BinaryConstants.WireType.END_GROUP
  5135. };
  5136. goog.exportProperty(jspb.BinaryReader.prototype, "isEndGroup", jspb.BinaryReader.prototype.isEndGroup);
  5137. jspb.BinaryReader.prototype.getError = function() {
  5138. return this.error_ || this.decoder_.getError()
  5139. };
  5140. jspb.BinaryReader.prototype.setBlock = function(a, b, c) {
  5141. this.decoder_.setBlock(a, b, c);
  5142. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  5143. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID
  5144. };
  5145. jspb.BinaryReader.prototype.reset = function() {
  5146. this.decoder_.reset();
  5147. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  5148. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID
  5149. };
  5150. jspb.BinaryReader.prototype.advance = function(a) {
  5151. this.decoder_.advance(a)
  5152. };
  5153. jspb.BinaryReader.prototype.nextField = function() {
  5154. if (this.decoder_.atEnd()) return !1;
  5155. if (this.getError()) return jspb.asserts.fail("Decoder hit an error"), !1;
  5156. this.fieldCursor_ = this.decoder_.getCursor();
  5157. var a = this.decoder_.readUnsignedVarint32(),
  5158. b = a >>> 3;
  5159. a &= 7;
  5160. if (a != jspb.BinaryConstants.WireType.VARINT && a != jspb.BinaryConstants.WireType.FIXED32 && a != jspb
  5161. .BinaryConstants.WireType.FIXED64 && a != jspb.BinaryConstants.WireType.DELIMITED && a != jspb
  5162. .BinaryConstants.WireType.START_GROUP && a != jspb.BinaryConstants.WireType.END_GROUP) return jspb.asserts
  5163. .fail("Invalid wire type: %s (at position %s)",
  5164. a, this.fieldCursor_), this.error_ = !0, !1;
  5165. this.nextField_ = b;
  5166. this.nextWireType_ = a;
  5167. return !0
  5168. };
  5169. goog.exportProperty(jspb.BinaryReader.prototype, "nextField", jspb.BinaryReader.prototype.nextField);
  5170. jspb.BinaryReader.prototype.unskipHeader = function() {
  5171. this.decoder_.unskipVarint(this.nextField_ << 3 | this.nextWireType_)
  5172. };
  5173. jspb.BinaryReader.prototype.skipMatchingFields = function() {
  5174. var a = this.nextField_;
  5175. for (this.unskipHeader(); this.nextField() && this.getFieldNumber() == a;) this.skipField();
  5176. this.decoder_.atEnd() || this.unskipHeader()
  5177. };
  5178. jspb.BinaryReader.prototype.skipVarintField = function() {
  5179. this.nextWireType_ != jspb.BinaryConstants.WireType.VARINT ? (jspb.asserts.fail(
  5180. "Invalid wire type for skipVarintField"), this.skipField()) : this.decoder_.skipVarint()
  5181. };
  5182. jspb.BinaryReader.prototype.skipDelimitedField = function() {
  5183. if (this.nextWireType_ != jspb.BinaryConstants.WireType.DELIMITED) jspb.asserts.fail(
  5184. "Invalid wire type for skipDelimitedField"), this.skipField();
  5185. else {
  5186. var a = this.decoder_.readUnsignedVarint32();
  5187. this.decoder_.advance(a)
  5188. }
  5189. };
  5190. jspb.BinaryReader.prototype.skipFixed32Field = function() {
  5191. this.nextWireType_ != jspb.BinaryConstants.WireType.FIXED32 ? (jspb.asserts.fail(
  5192. "Invalid wire type for skipFixed32Field"), this.skipField()) : this.decoder_.advance(4)
  5193. };
  5194. jspb.BinaryReader.prototype.skipFixed64Field = function() {
  5195. this.nextWireType_ != jspb.BinaryConstants.WireType.FIXED64 ? (jspb.asserts.fail(
  5196. "Invalid wire type for skipFixed64Field"), this.skipField()) : this.decoder_.advance(8)
  5197. };
  5198. jspb.BinaryReader.prototype.skipGroup = function() {
  5199. var a = this.nextField_;
  5200. do {
  5201. if (!this.nextField()) {
  5202. jspb.asserts.fail("Unmatched start-group tag: stream EOF");
  5203. this.error_ = !0;
  5204. break
  5205. }
  5206. if (this.nextWireType_ == jspb.BinaryConstants.WireType.END_GROUP) {
  5207. this.nextField_ != a && (jspb.asserts.fail("Unmatched end-group tag"), this.error_ = !0);
  5208. break
  5209. }
  5210. this.skipField()
  5211. } while (1)
  5212. };
  5213. jspb.BinaryReader.prototype.skipField = function() {
  5214. switch (this.nextWireType_) {
  5215. case jspb.BinaryConstants.WireType.VARINT:
  5216. this.skipVarintField();
  5217. break;
  5218. case jspb.BinaryConstants.WireType.FIXED64:
  5219. this.skipFixed64Field();
  5220. break;
  5221. case jspb.BinaryConstants.WireType.DELIMITED:
  5222. this.skipDelimitedField();
  5223. break;
  5224. case jspb.BinaryConstants.WireType.FIXED32:
  5225. this.skipFixed32Field();
  5226. break;
  5227. case jspb.BinaryConstants.WireType.START_GROUP:
  5228. this.skipGroup();
  5229. break;
  5230. default:
  5231. jspb.asserts.fail("Invalid wire encoding for field.")
  5232. }
  5233. };
  5234. jspb.BinaryReader.prototype.registerReadCallback = function(a, b) {
  5235. null === this.readCallbacks_ && (this.readCallbacks_ = {});
  5236. jspb.asserts.assert(!this.readCallbacks_[a]);
  5237. this.readCallbacks_[a] = b
  5238. };
  5239. jspb.BinaryReader.prototype.runReadCallback = function(a) {
  5240. jspb.asserts.assert(null !== this.readCallbacks_);
  5241. a = this.readCallbacks_[a];
  5242. jspb.asserts.assert(a);
  5243. return a(this)
  5244. };
  5245. jspb.BinaryReader.prototype.readAny = function(a) {
  5246. this.nextWireType_ = jspb.BinaryConstants.FieldTypeToWireType(a);
  5247. var b = jspb.BinaryConstants.FieldType;
  5248. switch (a) {
  5249. case b.DOUBLE:
  5250. return this.readDouble();
  5251. case b.FLOAT:
  5252. return this.readFloat();
  5253. case b.INT64:
  5254. return this.readInt64();
  5255. case b.UINT64:
  5256. return this.readUint64();
  5257. case b.INT32:
  5258. return this.readInt32();
  5259. case b.FIXED64:
  5260. return this.readFixed64();
  5261. case b.FIXED32:
  5262. return this.readFixed32();
  5263. case b.BOOL:
  5264. return this.readBool();
  5265. case b.STRING:
  5266. return this.readString();
  5267. case b.GROUP:
  5268. jspb.asserts.fail("Group field type not supported in readAny()");
  5269. case b.MESSAGE:
  5270. jspb.asserts.fail("Message field type not supported in readAny()");
  5271. case b.BYTES:
  5272. return this.readBytes();
  5273. case b.UINT32:
  5274. return this.readUint32();
  5275. case b.ENUM:
  5276. return this.readEnum();
  5277. case b.SFIXED32:
  5278. return this.readSfixed32();
  5279. case b.SFIXED64:
  5280. return this.readSfixed64();
  5281. case b.SINT32:
  5282. return this.readSint32();
  5283. case b.SINT64:
  5284. return this.readSint64();
  5285. case b.FHASH64:
  5286. return this.readFixedHash64();
  5287. case b.VHASH64:
  5288. return this.readVarintHash64();
  5289. default:
  5290. jspb.asserts.fail("Invalid field type in readAny()")
  5291. }
  5292. return 0
  5293. };
  5294. jspb.BinaryReader.prototype.readMessage = function(a, b) {
  5295. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  5296. var c = this.decoder_.getEnd(),
  5297. d = this.decoder_.readUnsignedVarint32();
  5298. d = this.decoder_.getCursor() + d;
  5299. this.decoder_.setEnd(d);
  5300. b(a, this);
  5301. this.decoder_.setCursor(d);
  5302. this.decoder_.setEnd(c)
  5303. };
  5304. goog.exportProperty(jspb.BinaryReader.prototype, "readMessage", jspb.BinaryReader.prototype.readMessage);
  5305. jspb.BinaryReader.prototype.readGroup = function(a, b, c) {
  5306. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.START_GROUP);
  5307. jspb.asserts.assert(this.nextField_ == a);
  5308. c(b, this);
  5309. this.error_ || this.nextWireType_ == jspb.BinaryConstants.WireType.END_GROUP || (jspb.asserts.fail(
  5310. "Group submessage did not end with an END_GROUP tag"), this.error_ = !0)
  5311. };
  5312. goog.exportProperty(jspb.BinaryReader.prototype, "readGroup", jspb.BinaryReader.prototype.readGroup);
  5313. jspb.BinaryReader.prototype.getFieldDecoder = function() {
  5314. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  5315. var a = this.decoder_.readUnsignedVarint32(),
  5316. b = this.decoder_.getCursor(),
  5317. c = b + a;
  5318. a = jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(), b, a);
  5319. this.decoder_.setCursor(c);
  5320. return a
  5321. };
  5322. jspb.BinaryReader.prototype.readInt32 = function() {
  5323. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5324. return this.decoder_.readSignedVarint32()
  5325. };
  5326. goog.exportProperty(jspb.BinaryReader.prototype, "readInt32", jspb.BinaryReader.prototype.readInt32);
  5327. jspb.BinaryReader.prototype.readInt32String = function() {
  5328. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5329. return this.decoder_.readSignedVarint32String()
  5330. };
  5331. jspb.BinaryReader.prototype.readInt64 = function() {
  5332. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5333. return this.decoder_.readSignedVarint64()
  5334. };
  5335. goog.exportProperty(jspb.BinaryReader.prototype, "readInt64", jspb.BinaryReader.prototype.readInt64);
  5336. jspb.BinaryReader.prototype.readInt64String = function() {
  5337. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5338. return this.decoder_.readSignedVarint64String()
  5339. };
  5340. jspb.BinaryReader.prototype.readUint32 = function() {
  5341. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5342. return this.decoder_.readUnsignedVarint32()
  5343. };
  5344. goog.exportProperty(jspb.BinaryReader.prototype, "readUint32", jspb.BinaryReader.prototype.readUint32);
  5345. jspb.BinaryReader.prototype.readUint32String = function() {
  5346. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5347. return this.decoder_.readUnsignedVarint32String()
  5348. };
  5349. jspb.BinaryReader.prototype.readUint64 = function() {
  5350. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5351. return this.decoder_.readUnsignedVarint64()
  5352. };
  5353. goog.exportProperty(jspb.BinaryReader.prototype, "readUint64", jspb.BinaryReader.prototype.readUint64);
  5354. jspb.BinaryReader.prototype.readUint64String = function() {
  5355. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5356. return this.decoder_.readUnsignedVarint64String()
  5357. };
  5358. jspb.BinaryReader.prototype.readSint32 = function() {
  5359. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5360. return this.decoder_.readZigzagVarint32()
  5361. };
  5362. goog.exportProperty(jspb.BinaryReader.prototype, "readSint32", jspb.BinaryReader.prototype.readSint32);
  5363. jspb.BinaryReader.prototype.readSint64 = function() {
  5364. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5365. return this.decoder_.readZigzagVarint64()
  5366. };
  5367. goog.exportProperty(jspb.BinaryReader.prototype, "readSint64", jspb.BinaryReader.prototype.readSint64);
  5368. jspb.BinaryReader.prototype.readSint64String = function() {
  5369. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5370. return this.decoder_.readZigzagVarint64String()
  5371. };
  5372. jspb.BinaryReader.prototype.readFixed32 = function() {
  5373. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  5374. return this.decoder_.readUint32()
  5375. };
  5376. goog.exportProperty(jspb.BinaryReader.prototype, "readFixed32", jspb.BinaryReader.prototype.readFixed32);
  5377. jspb.BinaryReader.prototype.readFixed64 = function() {
  5378. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5379. return this.decoder_.readUint64()
  5380. };
  5381. goog.exportProperty(jspb.BinaryReader.prototype, "readFixed64", jspb.BinaryReader.prototype.readFixed64);
  5382. jspb.BinaryReader.prototype.readFixed64String = function() {
  5383. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5384. return this.decoder_.readUint64String()
  5385. };
  5386. jspb.BinaryReader.prototype.readSfixed32 = function() {
  5387. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  5388. return this.decoder_.readInt32()
  5389. };
  5390. goog.exportProperty(jspb.BinaryReader.prototype, "readSfixed32", jspb.BinaryReader.prototype.readSfixed32);
  5391. jspb.BinaryReader.prototype.readSfixed32String = function() {
  5392. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  5393. return this.decoder_.readInt32().toString()
  5394. };
  5395. jspb.BinaryReader.prototype.readSfixed64 = function() {
  5396. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5397. return this.decoder_.readInt64()
  5398. };
  5399. goog.exportProperty(jspb.BinaryReader.prototype, "readSfixed64", jspb.BinaryReader.prototype.readSfixed64);
  5400. jspb.BinaryReader.prototype.readSfixed64String = function() {
  5401. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5402. return this.decoder_.readInt64String()
  5403. };
  5404. jspb.BinaryReader.prototype.readFloat = function() {
  5405. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  5406. return this.decoder_.readFloat()
  5407. };
  5408. goog.exportProperty(jspb.BinaryReader.prototype, "readFloat", jspb.BinaryReader.prototype.readFloat);
  5409. jspb.BinaryReader.prototype.readDouble = function() {
  5410. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5411. return this.decoder_.readDouble()
  5412. };
  5413. goog.exportProperty(jspb.BinaryReader.prototype, "readDouble", jspb.BinaryReader.prototype.readDouble);
  5414. jspb.BinaryReader.prototype.readBool = function() {
  5415. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5416. return !!this.decoder_.readUnsignedVarint32()
  5417. };
  5418. goog.exportProperty(jspb.BinaryReader.prototype, "readBool", jspb.BinaryReader.prototype.readBool);
  5419. jspb.BinaryReader.prototype.readEnum = function() {
  5420. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5421. return this.decoder_.readSignedVarint64()
  5422. };
  5423. goog.exportProperty(jspb.BinaryReader.prototype, "readEnum", jspb.BinaryReader.prototype.readEnum);
  5424. jspb.BinaryReader.prototype.readString = function() {
  5425. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  5426. var a = this.decoder_.readUnsignedVarint32();
  5427. return this.decoder_.readString(a)
  5428. };
  5429. goog.exportProperty(jspb.BinaryReader.prototype, "readString", jspb.BinaryReader.prototype.readString);
  5430. jspb.BinaryReader.prototype.readBytes = function() {
  5431. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  5432. var a = this.decoder_.readUnsignedVarint32();
  5433. return this.decoder_.readBytes(a)
  5434. };
  5435. goog.exportProperty(jspb.BinaryReader.prototype, "readBytes", jspb.BinaryReader.prototype.readBytes);
  5436. jspb.BinaryReader.prototype.readVarintHash64 = function() {
  5437. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5438. return this.decoder_.readVarintHash64()
  5439. };
  5440. jspb.BinaryReader.prototype.readSintHash64 = function() {
  5441. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5442. return this.decoder_.readZigzagVarintHash64()
  5443. };
  5444. jspb.BinaryReader.prototype.readSplitVarint64 = function(a) {
  5445. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5446. return this.decoder_.readSplitVarint64(a)
  5447. };
  5448. jspb.BinaryReader.prototype.readSplitZigzagVarint64 = function(a) {
  5449. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  5450. return this.decoder_.readSplitVarint64(function(b, c) {
  5451. return jspb.utils.fromZigzag64(b, c, a)
  5452. })
  5453. };
  5454. jspb.BinaryReader.prototype.readFixedHash64 = function() {
  5455. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5456. return this.decoder_.readFixedHash64()
  5457. };
  5458. jspb.BinaryReader.prototype.readSplitFixed64 = function(a) {
  5459. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  5460. return this.decoder_.readSplitFixed64(a)
  5461. };
  5462. jspb.BinaryReader.prototype.readPackedField_ = function(a) {
  5463. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  5464. var b = this.decoder_.readUnsignedVarint32();
  5465. b = this.decoder_.getCursor() + b;
  5466. for (var c = []; this.decoder_.getCursor() < b;) c.push(a.call(this.decoder_));
  5467. return c
  5468. };
  5469. jspb.BinaryReader.prototype.readPackedInt32 = function() {
  5470. return this.readPackedField_(this.decoder_.readSignedVarint32)
  5471. };
  5472. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedInt32", jspb.BinaryReader.prototype.readPackedInt32);
  5473. jspb.BinaryReader.prototype.readPackedInt32String = function() {
  5474. return this.readPackedField_(this.decoder_.readSignedVarint32String)
  5475. };
  5476. jspb.BinaryReader.prototype.readPackedInt64 = function() {
  5477. return this.readPackedField_(this.decoder_.readSignedVarint64)
  5478. };
  5479. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedInt64", jspb.BinaryReader.prototype.readPackedInt64);
  5480. jspb.BinaryReader.prototype.readPackedInt64String = function() {
  5481. return this.readPackedField_(this.decoder_.readSignedVarint64String)
  5482. };
  5483. jspb.BinaryReader.prototype.readPackedUint32 = function() {
  5484. return this.readPackedField_(this.decoder_.readUnsignedVarint32)
  5485. };
  5486. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedUint32", jspb.BinaryReader.prototype.readPackedUint32);
  5487. jspb.BinaryReader.prototype.readPackedUint32String = function() {
  5488. return this.readPackedField_(this.decoder_.readUnsignedVarint32String)
  5489. };
  5490. jspb.BinaryReader.prototype.readPackedUint64 = function() {
  5491. return this.readPackedField_(this.decoder_.readUnsignedVarint64)
  5492. };
  5493. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedUint64", jspb.BinaryReader.prototype.readPackedUint64);
  5494. jspb.BinaryReader.prototype.readPackedUint64String = function() {
  5495. return this.readPackedField_(this.decoder_.readUnsignedVarint64String)
  5496. };
  5497. jspb.BinaryReader.prototype.readPackedSint32 = function() {
  5498. return this.readPackedField_(this.decoder_.readZigzagVarint32)
  5499. };
  5500. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSint32", jspb.BinaryReader.prototype.readPackedSint32);
  5501. jspb.BinaryReader.prototype.readPackedSint64 = function() {
  5502. return this.readPackedField_(this.decoder_.readZigzagVarint64)
  5503. };
  5504. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSint64", jspb.BinaryReader.prototype.readPackedSint64);
  5505. jspb.BinaryReader.prototype.readPackedSint64String = function() {
  5506. return this.readPackedField_(this.decoder_.readZigzagVarint64String)
  5507. };
  5508. jspb.BinaryReader.prototype.readPackedFixed32 = function() {
  5509. return this.readPackedField_(this.decoder_.readUint32)
  5510. };
  5511. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedFixed32", jspb.BinaryReader.prototype.readPackedFixed32);
  5512. jspb.BinaryReader.prototype.readPackedFixed64 = function() {
  5513. return this.readPackedField_(this.decoder_.readUint64)
  5514. };
  5515. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedFixed64", jspb.BinaryReader.prototype.readPackedFixed64);
  5516. jspb.BinaryReader.prototype.readPackedFixed64String = function() {
  5517. return this.readPackedField_(this.decoder_.readUint64String)
  5518. };
  5519. jspb.BinaryReader.prototype.readPackedSfixed32 = function() {
  5520. return this.readPackedField_(this.decoder_.readInt32)
  5521. };
  5522. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSfixed32", jspb.BinaryReader.prototype.readPackedSfixed32);
  5523. jspb.BinaryReader.prototype.readPackedSfixed64 = function() {
  5524. return this.readPackedField_(this.decoder_.readInt64)
  5525. };
  5526. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSfixed64", jspb.BinaryReader.prototype.readPackedSfixed64);
  5527. jspb.BinaryReader.prototype.readPackedSfixed64String = function() {
  5528. return this.readPackedField_(this.decoder_.readInt64String)
  5529. };
  5530. jspb.BinaryReader.prototype.readPackedFloat = function() {
  5531. return this.readPackedField_(this.decoder_.readFloat)
  5532. };
  5533. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedFloat", jspb.BinaryReader.prototype.readPackedFloat);
  5534. jspb.BinaryReader.prototype.readPackedDouble = function() {
  5535. return this.readPackedField_(this.decoder_.readDouble)
  5536. };
  5537. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedDouble", jspb.BinaryReader.prototype.readPackedDouble);
  5538. jspb.BinaryReader.prototype.readPackedBool = function() {
  5539. return this.readPackedField_(this.decoder_.readBool)
  5540. };
  5541. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedBool", jspb.BinaryReader.prototype.readPackedBool);
  5542. jspb.BinaryReader.prototype.readPackedEnum = function() {
  5543. return this.readPackedField_(this.decoder_.readEnum)
  5544. };
  5545. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedEnum", jspb.BinaryReader.prototype.readPackedEnum);
  5546. jspb.BinaryReader.prototype.readPackedVarintHash64 = function() {
  5547. return this.readPackedField_(this.decoder_.readVarintHash64)
  5548. };
  5549. jspb.BinaryReader.prototype.readPackedFixedHash64 = function() {
  5550. return this.readPackedField_(this.decoder_.readFixedHash64)
  5551. };
  5552. jspb.BinaryEncoder = function() {
  5553. this.buffer_ = []
  5554. };
  5555. jspb.BinaryEncoder.prototype.length = function() {
  5556. return this.buffer_.length
  5557. };
  5558. jspb.BinaryEncoder.prototype.end = function() {
  5559. var a = this.buffer_;
  5560. this.buffer_ = [];
  5561. return a
  5562. };
  5563. jspb.BinaryEncoder.prototype.writeSplitVarint64 = function(a, b) {
  5564. jspb.asserts.assert(a == Math.floor(a));
  5565. jspb.asserts.assert(b == Math.floor(b));
  5566. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32);
  5567. for (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32); 0 < b || 127 < a;) this.buffer_.push(a &
  5568. 127 | 128), a = (a >>> 7 | b << 25) >>> 0, b >>>= 7;
  5569. this.buffer_.push(a)
  5570. };
  5571. jspb.BinaryEncoder.prototype.writeSplitFixed64 = function(a, b) {
  5572. jspb.asserts.assert(a == Math.floor(a));
  5573. jspb.asserts.assert(b == Math.floor(b));
  5574. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32);
  5575. jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32);
  5576. this.writeUint32(a);
  5577. this.writeUint32(b)
  5578. };
  5579. jspb.BinaryEncoder.prototype.writeUnsignedVarint32 = function(a) {
  5580. jspb.asserts.assert(a == Math.floor(a));
  5581. for (jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32); 127 < a;) this.buffer_.push(a & 127 |
  5582. 128), a >>>= 7;
  5583. this.buffer_.push(a)
  5584. };
  5585. jspb.BinaryEncoder.prototype.writeSignedVarint32 = function(a) {
  5586. jspb.asserts.assert(a == Math.floor(a));
  5587. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5588. if (0 <= a) this.writeUnsignedVarint32(a);
  5589. else {
  5590. for (var b = 0; 9 > b; b++) this.buffer_.push(a & 127 | 128), a >>= 7;
  5591. this.buffer_.push(1)
  5592. }
  5593. };
  5594. jspb.BinaryEncoder.prototype.writeUnsignedVarint64 = function(a) {
  5595. jspb.asserts.assert(a == Math.floor(a));
  5596. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_64);
  5597. jspb.utils.splitInt64(a);
  5598. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High)
  5599. };
  5600. jspb.BinaryEncoder.prototype.writeSignedVarint64 = function(a) {
  5601. jspb.asserts.assert(a == Math.floor(a));
  5602. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_63 && a < jspb.BinaryConstants.TWO_TO_63);
  5603. jspb.utils.splitInt64(a);
  5604. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High)
  5605. };
  5606. jspb.BinaryEncoder.prototype.writeZigzagVarint32 = function(a) {
  5607. jspb.asserts.assert(a == Math.floor(a));
  5608. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5609. this.writeUnsignedVarint32((a << 1 ^ a >> 31) >>> 0)
  5610. };
  5611. jspb.BinaryEncoder.prototype.writeZigzagVarint64 = function(a) {
  5612. jspb.asserts.assert(a == Math.floor(a));
  5613. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_63 && a < jspb.BinaryConstants.TWO_TO_63);
  5614. jspb.utils.splitZigzag64(a);
  5615. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High)
  5616. };
  5617. jspb.BinaryEncoder.prototype.writeZigzagVarint64String = function(a) {
  5618. this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(a))
  5619. };
  5620. jspb.BinaryEncoder.prototype.writeZigzagVarintHash64 = function(a) {
  5621. var b = this;
  5622. jspb.utils.splitHash64(a);
  5623. jspb.utils.toZigzag64(jspb.utils.split64Low, jspb.utils.split64High, function(a, d) {
  5624. b.writeSplitVarint64(a >>> 0, d >>> 0)
  5625. })
  5626. };
  5627. jspb.BinaryEncoder.prototype.writeUint8 = function(a) {
  5628. jspb.asserts.assert(a == Math.floor(a));
  5629. jspb.asserts.assert(0 <= a && 256 > a);
  5630. this.buffer_.push(a >>> 0 & 255)
  5631. };
  5632. jspb.BinaryEncoder.prototype.writeUint16 = function(a) {
  5633. jspb.asserts.assert(a == Math.floor(a));
  5634. jspb.asserts.assert(0 <= a && 65536 > a);
  5635. this.buffer_.push(a >>> 0 & 255);
  5636. this.buffer_.push(a >>> 8 & 255)
  5637. };
  5638. jspb.BinaryEncoder.prototype.writeUint32 = function(a) {
  5639. jspb.asserts.assert(a == Math.floor(a));
  5640. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32);
  5641. this.buffer_.push(a >>> 0 & 255);
  5642. this.buffer_.push(a >>> 8 & 255);
  5643. this.buffer_.push(a >>> 16 & 255);
  5644. this.buffer_.push(a >>> 24 & 255)
  5645. };
  5646. jspb.BinaryEncoder.prototype.writeUint64 = function(a) {
  5647. jspb.asserts.assert(a == Math.floor(a));
  5648. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_64);
  5649. jspb.utils.splitUint64(a);
  5650. this.writeUint32(jspb.utils.split64Low);
  5651. this.writeUint32(jspb.utils.split64High)
  5652. };
  5653. jspb.BinaryEncoder.prototype.writeInt8 = function(a) {
  5654. jspb.asserts.assert(a == Math.floor(a));
  5655. jspb.asserts.assert(-128 <= a && 128 > a);
  5656. this.buffer_.push(a >>> 0 & 255)
  5657. };
  5658. jspb.BinaryEncoder.prototype.writeInt16 = function(a) {
  5659. jspb.asserts.assert(a == Math.floor(a));
  5660. jspb.asserts.assert(-32768 <= a && 32768 > a);
  5661. this.buffer_.push(a >>> 0 & 255);
  5662. this.buffer_.push(a >>> 8 & 255)
  5663. };
  5664. jspb.BinaryEncoder.prototype.writeInt32 = function(a) {
  5665. jspb.asserts.assert(a == Math.floor(a));
  5666. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5667. this.buffer_.push(a >>> 0 & 255);
  5668. this.buffer_.push(a >>> 8 & 255);
  5669. this.buffer_.push(a >>> 16 & 255);
  5670. this.buffer_.push(a >>> 24 & 255)
  5671. };
  5672. jspb.BinaryEncoder.prototype.writeInt64 = function(a) {
  5673. jspb.asserts.assert(a == Math.floor(a));
  5674. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_63 && a < jspb.BinaryConstants.TWO_TO_63);
  5675. jspb.utils.splitInt64(a);
  5676. this.writeSplitFixed64(jspb.utils.split64Low, jspb.utils.split64High)
  5677. };
  5678. jspb.BinaryEncoder.prototype.writeInt64String = function(a) {
  5679. jspb.asserts.assert(a == Math.floor(a));
  5680. jspb.asserts.assert(+a >= -jspb.BinaryConstants.TWO_TO_63 && +a < jspb.BinaryConstants.TWO_TO_63);
  5681. jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(a));
  5682. this.writeSplitFixed64(jspb.utils.split64Low, jspb.utils.split64High)
  5683. };
  5684. jspb.BinaryEncoder.prototype.writeFloat = function(a) {
  5685. jspb.asserts.assert(Infinity === a || -Infinity === a || isNaN(a) || a >= -jspb.BinaryConstants.FLOAT32_MAX &&
  5686. a <= jspb.BinaryConstants.FLOAT32_MAX);
  5687. jspb.utils.splitFloat32(a);
  5688. this.writeUint32(jspb.utils.split64Low)
  5689. };
  5690. jspb.BinaryEncoder.prototype.writeDouble = function(a) {
  5691. jspb.asserts.assert(Infinity === a || -Infinity === a || isNaN(a) || a >= -jspb.BinaryConstants.FLOAT64_MAX &&
  5692. a <= jspb.BinaryConstants.FLOAT64_MAX);
  5693. jspb.utils.splitFloat64(a);
  5694. this.writeUint32(jspb.utils.split64Low);
  5695. this.writeUint32(jspb.utils.split64High)
  5696. };
  5697. jspb.BinaryEncoder.prototype.writeBool = function(a) {
  5698. jspb.asserts.assert("boolean" === typeof a || "number" === typeof a);
  5699. this.buffer_.push(a ? 1 : 0)
  5700. };
  5701. jspb.BinaryEncoder.prototype.writeEnum = function(a) {
  5702. jspb.asserts.assert(a == Math.floor(a));
  5703. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5704. this.writeSignedVarint32(a)
  5705. };
  5706. jspb.BinaryEncoder.prototype.writeBytes = function(a) {
  5707. this.buffer_.push.apply(this.buffer_, a)
  5708. };
  5709. jspb.BinaryEncoder.prototype.writeVarintHash64 = function(a) {
  5710. jspb.utils.splitHash64(a);
  5711. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High)
  5712. };
  5713. jspb.BinaryEncoder.prototype.writeFixedHash64 = function(a) {
  5714. jspb.utils.splitHash64(a);
  5715. this.writeUint32(jspb.utils.split64Low);
  5716. this.writeUint32(jspb.utils.split64High)
  5717. };
  5718. jspb.BinaryEncoder.prototype.writeString = function(a) {
  5719. var b = this.buffer_.length;
  5720. jspb.asserts.assertString(a);
  5721. for (var c = 0; c < a.length; c++) {
  5722. var d = a.charCodeAt(c);
  5723. if (128 > d) this.buffer_.push(d);
  5724. else if (2048 > d) this.buffer_.push(d >> 6 | 192), this.buffer_.push(d & 63 | 128);
  5725. else if (65536 > d)
  5726. if (55296 <= d && 56319 >= d && c + 1 < a.length) {
  5727. var e = a.charCodeAt(c + 1);
  5728. 56320 <= e && 57343 >= e && (d = 1024 * (d - 55296) + e - 56320 + 65536, this.buffer_.push(d >> 18 |
  5729. 240), this.buffer_.push(d >> 12 & 63 | 128), this.buffer_.push(d >> 6 & 63 | 128), this
  5730. .buffer_.push(d & 63 |
  5731. 128), c++)
  5732. } else this.buffer_.push(d >> 12 | 224), this.buffer_.push(d >> 6 & 63 | 128), this.buffer_.push(d &
  5733. 63 | 128)
  5734. }
  5735. return this.buffer_.length - b
  5736. };
  5737. jspb.arith = {};
  5738. jspb.arith.UInt64 = function(a, b) {
  5739. this.lo = a;
  5740. this.hi = b
  5741. };
  5742. jspb.arith.UInt64.prototype.cmp = function(a) {
  5743. return this.hi < a.hi || this.hi == a.hi && this.lo < a.lo ? -1 : this.hi == a.hi && this.lo == a.lo ? 0 : 1
  5744. };
  5745. jspb.arith.UInt64.prototype.rightShift = function() {
  5746. return new jspb.arith.UInt64((this.lo >>> 1 | (this.hi & 1) << 31) >>> 0, this.hi >>> 1 >>> 0)
  5747. };
  5748. jspb.arith.UInt64.prototype.leftShift = function() {
  5749. return new jspb.arith.UInt64(this.lo << 1 >>> 0, (this.hi << 1 | this.lo >>> 31) >>> 0)
  5750. };
  5751. jspb.arith.UInt64.prototype.msb = function() {
  5752. return !!(this.hi & 2147483648)
  5753. };
  5754. jspb.arith.UInt64.prototype.lsb = function() {
  5755. return !!(this.lo & 1)
  5756. };
  5757. jspb.arith.UInt64.prototype.zero = function() {
  5758. return 0 == this.lo && 0 == this.hi
  5759. };
  5760. jspb.arith.UInt64.prototype.add = function(a) {
  5761. return new jspb.arith.UInt64((this.lo + a.lo & 4294967295) >>> 0 >>> 0, ((this.hi + a.hi & 4294967295) >>> 0) +
  5762. (4294967296 <= this.lo + a.lo ? 1 : 0) >>> 0)
  5763. };
  5764. jspb.arith.UInt64.prototype.sub = function(a) {
  5765. return new jspb.arith.UInt64((this.lo - a.lo & 4294967295) >>> 0 >>> 0, ((this.hi - a.hi & 4294967295) >>> 0) -
  5766. (0 > this.lo - a.lo ? 1 : 0) >>> 0)
  5767. };
  5768. jspb.arith.UInt64.mul32x32 = function(a, b) {
  5769. var c = a & 65535;
  5770. a >>>= 16;
  5771. var d = b & 65535,
  5772. e = b >>> 16;
  5773. b = c * d + 65536 * (c * e & 65535) + 65536 * (a * d & 65535);
  5774. for (c = a * e + (c * e >>> 16) + (a * d >>> 16); 4294967296 <= b;) b -= 4294967296, c += 1;
  5775. return new jspb.arith.UInt64(b >>> 0, c >>> 0)
  5776. };
  5777. jspb.arith.UInt64.prototype.mul = function(a) {
  5778. var b = jspb.arith.UInt64.mul32x32(this.lo, a);
  5779. a = jspb.arith.UInt64.mul32x32(this.hi, a);
  5780. a.hi = a.lo;
  5781. a.lo = 0;
  5782. return b.add(a)
  5783. };
  5784. jspb.arith.UInt64.prototype.div = function(a) {
  5785. if (0 == a) return [];
  5786. var b = new jspb.arith.UInt64(0, 0),
  5787. c = new jspb.arith.UInt64(this.lo, this.hi);
  5788. a = new jspb.arith.UInt64(a, 0);
  5789. for (var d = new jspb.arith.UInt64(1, 0); !a.msb();) a = a.leftShift(), d = d.leftShift();
  5790. for (; !d.zero();) 0 >= a.cmp(c) && (b = b.add(d), c = c.sub(a)), a = a.rightShift(), d = d.rightShift();
  5791. return [b, c]
  5792. };
  5793. jspb.arith.UInt64.prototype.toString = function() {
  5794. for (var a = "", b = this; !b.zero();) {
  5795. b = b.div(10);
  5796. var c = b[0];
  5797. a = b[1].lo + a;
  5798. b = c
  5799. }
  5800. "" == a && (a = "0");
  5801. return a
  5802. };
  5803. jspb.arith.UInt64.fromString = function(a) {
  5804. for (var b = new jspb.arith.UInt64(0, 0), c = new jspb.arith.UInt64(0, 0), d = 0; d < a.length; d++) {
  5805. if ("0" > a[d] || "9" < a[d]) return null;
  5806. var e = parseInt(a[d], 10);
  5807. c.lo = e;
  5808. b = b.mul(10).add(c)
  5809. }
  5810. return b
  5811. };
  5812. jspb.arith.UInt64.prototype.clone = function() {
  5813. return new jspb.arith.UInt64(this.lo, this.hi)
  5814. };
  5815. jspb.arith.Int64 = function(a, b) {
  5816. this.lo = a;
  5817. this.hi = b
  5818. };
  5819. jspb.arith.Int64.prototype.add = function(a) {
  5820. return new jspb.arith.Int64((this.lo + a.lo & 4294967295) >>> 0 >>> 0, ((this.hi + a.hi & 4294967295) >>> 0) + (
  5821. 4294967296 <= this.lo + a.lo ? 1 : 0) >>> 0)
  5822. };
  5823. jspb.arith.Int64.prototype.sub = function(a) {
  5824. return new jspb.arith.Int64((this.lo - a.lo & 4294967295) >>> 0 >>> 0, ((this.hi - a.hi & 4294967295) >>> 0) - (
  5825. 0 > this.lo - a.lo ? 1 : 0) >>> 0)
  5826. };
  5827. jspb.arith.Int64.prototype.clone = function() {
  5828. return new jspb.arith.Int64(this.lo, this.hi)
  5829. };
  5830. jspb.arith.Int64.prototype.toString = function() {
  5831. var a = 0 != (this.hi & 2147483648),
  5832. b = new jspb.arith.UInt64(this.lo, this.hi);
  5833. a && (b = (new jspb.arith.UInt64(0, 0)).sub(b));
  5834. return (a ? "-" : "") + b.toString()
  5835. };
  5836. jspb.arith.Int64.fromString = function(a) {
  5837. var b = 0 < a.length && "-" == a[0];
  5838. b && (a = a.substring(1));
  5839. a = jspb.arith.UInt64.fromString(a);
  5840. if (null === a) return null;
  5841. b && (a = (new jspb.arith.UInt64(0, 0)).sub(a));
  5842. return new jspb.arith.Int64(a.lo, a.hi)
  5843. };
  5844. jspb.BinaryWriter = function() {
  5845. this.blocks_ = [];
  5846. this.totalLength_ = 0;
  5847. this.encoder_ = new jspb.BinaryEncoder;
  5848. this.bookmarks_ = []
  5849. };
  5850. jspb.BinaryWriter.prototype.appendUint8Array_ = function(a) {
  5851. var b = this.encoder_.end();
  5852. this.blocks_.push(b);
  5853. this.blocks_.push(a);
  5854. this.totalLength_ += b.length + a.length
  5855. };
  5856. jspb.BinaryWriter.prototype.beginDelimited_ = function(a) {
  5857. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED);
  5858. a = this.encoder_.end();
  5859. this.blocks_.push(a);
  5860. this.totalLength_ += a.length;
  5861. a.push(this.totalLength_);
  5862. return a
  5863. };
  5864. jspb.BinaryWriter.prototype.endDelimited_ = function(a) {
  5865. var b = a.pop();
  5866. b = this.totalLength_ + this.encoder_.length() - b;
  5867. for (jspb.asserts.assert(0 <= b); 127 < b;) a.push(b & 127 | 128), b >>>= 7, this.totalLength_++;
  5868. a.push(b);
  5869. this.totalLength_++
  5870. };
  5871. jspb.BinaryWriter.prototype.writeSerializedMessage = function(a, b, c) {
  5872. this.appendUint8Array_(a.subarray(b, c))
  5873. };
  5874. jspb.BinaryWriter.prototype.maybeWriteSerializedMessage = function(a, b, c) {
  5875. null != a && null != b && null != c && this.writeSerializedMessage(a, b, c)
  5876. };
  5877. jspb.BinaryWriter.prototype.reset = function() {
  5878. this.blocks_ = [];
  5879. this.encoder_.end();
  5880. this.totalLength_ = 0;
  5881. this.bookmarks_ = []
  5882. };
  5883. jspb.BinaryWriter.prototype.getResultBuffer = function() {
  5884. jspb.asserts.assert(0 == this.bookmarks_.length);
  5885. for (var a = new Uint8Array(this.totalLength_ + this.encoder_.length()), b = this.blocks_, c = b.length, d = 0,
  5886. e = 0; e < c; e++) {
  5887. var f = b[e];
  5888. a.set(f, d);
  5889. d += f.length
  5890. }
  5891. b = this.encoder_.end();
  5892. a.set(b, d);
  5893. d += b.length;
  5894. jspb.asserts.assert(d == a.length);
  5895. this.blocks_ = [a];
  5896. return a
  5897. };
  5898. goog.exportProperty(jspb.BinaryWriter.prototype, "getResultBuffer", jspb.BinaryWriter.prototype.getResultBuffer);
  5899. jspb.BinaryWriter.prototype.getResultBase64String = function(a) {
  5900. return goog.crypt.base64.encodeByteArray(this.getResultBuffer(), a)
  5901. };
  5902. jspb.BinaryWriter.prototype.beginSubMessage = function(a) {
  5903. this.bookmarks_.push(this.beginDelimited_(a))
  5904. };
  5905. jspb.BinaryWriter.prototype.endSubMessage = function() {
  5906. jspb.asserts.assert(0 <= this.bookmarks_.length);
  5907. this.endDelimited_(this.bookmarks_.pop())
  5908. };
  5909. jspb.BinaryWriter.prototype.writeFieldHeader_ = function(a, b) {
  5910. jspb.asserts.assert(1 <= a && a == Math.floor(a));
  5911. this.encoder_.writeUnsignedVarint32(8 * a + b)
  5912. };
  5913. jspb.BinaryWriter.prototype.writeAny = function(a, b, c) {
  5914. var d = jspb.BinaryConstants.FieldType;
  5915. switch (a) {
  5916. case d.DOUBLE:
  5917. this.writeDouble(b, c);
  5918. break;
  5919. case d.FLOAT:
  5920. this.writeFloat(b, c);
  5921. break;
  5922. case d.INT64:
  5923. this.writeInt64(b, c);
  5924. break;
  5925. case d.UINT64:
  5926. this.writeUint64(b, c);
  5927. break;
  5928. case d.INT32:
  5929. this.writeInt32(b, c);
  5930. break;
  5931. case d.FIXED64:
  5932. this.writeFixed64(b, c);
  5933. break;
  5934. case d.FIXED32:
  5935. this.writeFixed32(b, c);
  5936. break;
  5937. case d.BOOL:
  5938. this.writeBool(b, c);
  5939. break;
  5940. case d.STRING:
  5941. this.writeString(b, c);
  5942. break;
  5943. case d.GROUP:
  5944. jspb.asserts.fail("Group field type not supported in writeAny()");
  5945. break;
  5946. case d.MESSAGE:
  5947. jspb.asserts.fail("Message field type not supported in writeAny()");
  5948. break;
  5949. case d.BYTES:
  5950. this.writeBytes(b, c);
  5951. break;
  5952. case d.UINT32:
  5953. this.writeUint32(b, c);
  5954. break;
  5955. case d.ENUM:
  5956. this.writeEnum(b, c);
  5957. break;
  5958. case d.SFIXED32:
  5959. this.writeSfixed32(b, c);
  5960. break;
  5961. case d.SFIXED64:
  5962. this.writeSfixed64(b, c);
  5963. break;
  5964. case d.SINT32:
  5965. this.writeSint32(b, c);
  5966. break;
  5967. case d.SINT64:
  5968. this.writeSint64(b, c);
  5969. break;
  5970. case d.FHASH64:
  5971. this.writeFixedHash64(b, c);
  5972. break;
  5973. case d.VHASH64:
  5974. this.writeVarintHash64(b, c);
  5975. break;
  5976. default:
  5977. jspb.asserts.fail("Invalid field type in writeAny()")
  5978. }
  5979. };
  5980. jspb.BinaryWriter.prototype.writeUnsignedVarint32_ = function(a, b) {
  5981. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  5982. .writeUnsignedVarint32(b))
  5983. };
  5984. jspb.BinaryWriter.prototype.writeSignedVarint32_ = function(a, b) {
  5985. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  5986. .writeSignedVarint32(b))
  5987. };
  5988. jspb.BinaryWriter.prototype.writeUnsignedVarint64_ = function(a, b) {
  5989. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  5990. .writeUnsignedVarint64(b))
  5991. };
  5992. jspb.BinaryWriter.prototype.writeSignedVarint64_ = function(a, b) {
  5993. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  5994. .writeSignedVarint64(b))
  5995. };
  5996. jspb.BinaryWriter.prototype.writeZigzagVarint32_ = function(a, b) {
  5997. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  5998. .writeZigzagVarint32(b))
  5999. };
  6000. jspb.BinaryWriter.prototype.writeZigzagVarint64_ = function(a, b) {
  6001. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  6002. .writeZigzagVarint64(b))
  6003. };
  6004. jspb.BinaryWriter.prototype.writeZigzagVarint64String_ = function(a, b) {
  6005. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  6006. .writeZigzagVarint64String(b))
  6007. };
  6008. jspb.BinaryWriter.prototype.writeZigzagVarintHash64_ = function(a, b) {
  6009. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_
  6010. .writeZigzagVarintHash64(b))
  6011. };
  6012. jspb.BinaryWriter.prototype.writeInt32 = function(a, b) {
  6013. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31),
  6014. this.writeSignedVarint32_(a, b))
  6015. };
  6016. goog.exportProperty(jspb.BinaryWriter.prototype, "writeInt32", jspb.BinaryWriter.prototype.writeInt32);
  6017. jspb.BinaryWriter.prototype.writeInt32String = function(a, b) {
  6018. null != b && (b = parseInt(b, 10), jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb
  6019. .BinaryConstants.TWO_TO_31), this.writeSignedVarint32_(a, b))
  6020. };
  6021. jspb.BinaryWriter.prototype.writeInt64 = function(a, b) {
  6022. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_63 && b < jspb.BinaryConstants.TWO_TO_63),
  6023. this.writeSignedVarint64_(a, b))
  6024. };
  6025. goog.exportProperty(jspb.BinaryWriter.prototype, "writeInt64", jspb.BinaryWriter.prototype.writeInt64);
  6026. jspb.BinaryWriter.prototype.writeInt64String = function(a, b) {
  6027. null != b && (b = jspb.arith.Int64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6028. .VARINT), this.encoder_.writeSplitVarint64(b.lo, b.hi))
  6029. };
  6030. jspb.BinaryWriter.prototype.writeUint32 = function(a, b) {
  6031. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32), this.writeUnsignedVarint32_(a,
  6032. b))
  6033. };
  6034. goog.exportProperty(jspb.BinaryWriter.prototype, "writeUint32", jspb.BinaryWriter.prototype.writeUint32);
  6035. jspb.BinaryWriter.prototype.writeUint32String = function(a, b) {
  6036. null != b && (b = parseInt(b, 10), jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32), this
  6037. .writeUnsignedVarint32_(a, b))
  6038. };
  6039. jspb.BinaryWriter.prototype.writeUint64 = function(a, b) {
  6040. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_64), this.writeUnsignedVarint64_(a,
  6041. b))
  6042. };
  6043. goog.exportProperty(jspb.BinaryWriter.prototype, "writeUint64", jspb.BinaryWriter.prototype.writeUint64);
  6044. jspb.BinaryWriter.prototype.writeUint64String = function(a, b) {
  6045. null != b && (b = jspb.arith.UInt64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6046. .VARINT), this.encoder_.writeSplitVarint64(b.lo, b.hi))
  6047. };
  6048. jspb.BinaryWriter.prototype.writeSint32 = function(a, b) {
  6049. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31),
  6050. this.writeZigzagVarint32_(a, b))
  6051. };
  6052. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSint32", jspb.BinaryWriter.prototype.writeSint32);
  6053. jspb.BinaryWriter.prototype.writeSint64 = function(a, b) {
  6054. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_63 && b < jspb.BinaryConstants.TWO_TO_63),
  6055. this.writeZigzagVarint64_(a, b))
  6056. };
  6057. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSint64", jspb.BinaryWriter.prototype.writeSint64);
  6058. jspb.BinaryWriter.prototype.writeSintHash64 = function(a, b) {
  6059. null != b && this.writeZigzagVarintHash64_(a, b)
  6060. };
  6061. jspb.BinaryWriter.prototype.writeSint64String = function(a, b) {
  6062. null != b && this.writeZigzagVarint64String_(a, b)
  6063. };
  6064. jspb.BinaryWriter.prototype.writeFixed32 = function(a, b) {
  6065. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32), this.writeFieldHeader_(a, jspb
  6066. .BinaryConstants.WireType.FIXED32), this.encoder_.writeUint32(b))
  6067. };
  6068. goog.exportProperty(jspb.BinaryWriter.prototype, "writeFixed32", jspb.BinaryWriter.prototype.writeFixed32);
  6069. jspb.BinaryWriter.prototype.writeFixed64 = function(a, b) {
  6070. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_64), this.writeFieldHeader_(a, jspb
  6071. .BinaryConstants.WireType.FIXED64), this.encoder_.writeUint64(b))
  6072. };
  6073. goog.exportProperty(jspb.BinaryWriter.prototype, "writeFixed64", jspb.BinaryWriter.prototype.writeFixed64);
  6074. jspb.BinaryWriter.prototype.writeFixed64String = function(a, b) {
  6075. null != b && (b = jspb.arith.UInt64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6076. .FIXED64), this.encoder_.writeSplitFixed64(b.lo, b.hi))
  6077. };
  6078. jspb.BinaryWriter.prototype.writeSfixed32 = function(a, b) {
  6079. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31),
  6080. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED32), this.encoder_.writeInt32(b))
  6081. };
  6082. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSfixed32", jspb.BinaryWriter.prototype.writeSfixed32);
  6083. jspb.BinaryWriter.prototype.writeSfixed64 = function(a, b) {
  6084. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_63 && b < jspb.BinaryConstants.TWO_TO_63),
  6085. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeInt64(b))
  6086. };
  6087. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSfixed64", jspb.BinaryWriter.prototype.writeSfixed64);
  6088. jspb.BinaryWriter.prototype.writeSfixed64String = function(a, b) {
  6089. null != b && (b = jspb.arith.Int64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6090. .FIXED64), this.encoder_.writeSplitFixed64(b.lo, b.hi))
  6091. };
  6092. jspb.BinaryWriter.prototype.writeFloat = function(a, b) {
  6093. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED32), this.encoder_.writeFloat(b))
  6094. };
  6095. goog.exportProperty(jspb.BinaryWriter.prototype, "writeFloat", jspb.BinaryWriter.prototype.writeFloat);
  6096. jspb.BinaryWriter.prototype.writeDouble = function(a, b) {
  6097. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeDouble(b))
  6098. };
  6099. goog.exportProperty(jspb.BinaryWriter.prototype, "writeDouble", jspb.BinaryWriter.prototype.writeDouble);
  6100. jspb.BinaryWriter.prototype.writeBool = function(a, b) {
  6101. null != b && (jspb.asserts.assert("boolean" === typeof b || "number" === typeof b), this.writeFieldHeader_(a,
  6102. jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeBool(b))
  6103. };
  6104. goog.exportProperty(jspb.BinaryWriter.prototype, "writeBool", jspb.BinaryWriter.prototype.writeBool);
  6105. jspb.BinaryWriter.prototype.writeEnum = function(a, b) {
  6106. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31),
  6107. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSignedVarint32(b))
  6108. };
  6109. goog.exportProperty(jspb.BinaryWriter.prototype, "writeEnum", jspb.BinaryWriter.prototype.writeEnum);
  6110. jspb.BinaryWriter.prototype.writeString = function(a, b) {
  6111. null != b && (a = this.beginDelimited_(a), this.encoder_.writeString(b), this.endDelimited_(a))
  6112. };
  6113. goog.exportProperty(jspb.BinaryWriter.prototype, "writeString", jspb.BinaryWriter.prototype.writeString);
  6114. jspb.BinaryWriter.prototype.writeBytes = function(a, b) {
  6115. null != b && (b = jspb.utils.byteSourceToUint8Array(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6116. .DELIMITED), this.encoder_.writeUnsignedVarint32(b.length), this.appendUint8Array_(b))
  6117. };
  6118. goog.exportProperty(jspb.BinaryWriter.prototype, "writeBytes", jspb.BinaryWriter.prototype.writeBytes);
  6119. jspb.BinaryWriter.prototype.writeMessage = function(a, b, c) {
  6120. null != b && (a = this.beginDelimited_(a), c(b, this), this.endDelimited_(a))
  6121. };
  6122. goog.exportProperty(jspb.BinaryWriter.prototype, "writeMessage", jspb.BinaryWriter.prototype.writeMessage);
  6123. jspb.BinaryWriter.prototype.writeMessageSet = function(a, b, c) {
  6124. null != b && (this.writeFieldHeader_(1, jspb.BinaryConstants.WireType.START_GROUP), this.writeFieldHeader_(2,
  6125. jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSignedVarint32(a), a = this
  6126. .beginDelimited_(3), c(b, this), this.endDelimited_(a), this.writeFieldHeader_(1, jspb.BinaryConstants
  6127. .WireType.END_GROUP))
  6128. };
  6129. jspb.BinaryWriter.prototype.writeGroup = function(a, b, c) {
  6130. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.START_GROUP), c(b, this), this
  6131. .writeFieldHeader_(a, jspb.BinaryConstants.WireType.END_GROUP))
  6132. };
  6133. goog.exportProperty(jspb.BinaryWriter.prototype, "writeGroup", jspb.BinaryWriter.prototype.writeGroup);
  6134. jspb.BinaryWriter.prototype.writeFixedHash64 = function(a, b) {
  6135. null != b && (jspb.asserts.assert(8 == b.length), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6136. .FIXED64), this.encoder_.writeFixedHash64(b))
  6137. };
  6138. jspb.BinaryWriter.prototype.writeVarintHash64 = function(a, b) {
  6139. null != b && (jspb.asserts.assert(8 == b.length), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType
  6140. .VARINT), this.encoder_.writeVarintHash64(b))
  6141. };
  6142. jspb.BinaryWriter.prototype.writeSplitFixed64 = function(a, b, c) {
  6143. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64);
  6144. this.encoder_.writeSplitFixed64(b, c)
  6145. };
  6146. jspb.BinaryWriter.prototype.writeSplitVarint64 = function(a, b, c) {
  6147. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT);
  6148. this.encoder_.writeSplitVarint64(b, c)
  6149. };
  6150. jspb.BinaryWriter.prototype.writeSplitZigzagVarint64 = function(a, b, c) {
  6151. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT);
  6152. var d = this.encoder_;
  6153. jspb.utils.toZigzag64(b, c, function(a, b) {
  6154. d.writeSplitVarint64(a >>> 0, b >>> 0)
  6155. })
  6156. };
  6157. jspb.BinaryWriter.prototype.writeRepeatedInt32 = function(a, b) {
  6158. if (null != b)
  6159. for (var c = 0; c < b.length; c++) this.writeSignedVarint32_(a, b[c])
  6160. };
  6161. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedInt32", jspb.BinaryWriter.prototype.writeRepeatedInt32);
  6162. jspb.BinaryWriter.prototype.writeRepeatedInt32String = function(a, b) {
  6163. if (null != b)
  6164. for (var c = 0; c < b.length; c++) this.writeInt32String(a, b[c])
  6165. };
  6166. jspb.BinaryWriter.prototype.writeRepeatedInt64 = function(a, b) {
  6167. if (null != b)
  6168. for (var c = 0; c < b.length; c++) this.writeSignedVarint64_(a, b[c])
  6169. };
  6170. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedInt64", jspb.BinaryWriter.prototype.writeRepeatedInt64);
  6171. jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64 = function(a, b, c, d) {
  6172. if (null != b)
  6173. for (var e = 0; e < b.length; e++) this.writeSplitFixed64(a, c(b[e]), d(b[e]))
  6174. };
  6175. jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64 = function(a, b, c, d) {
  6176. if (null != b)
  6177. for (var e = 0; e < b.length; e++) this.writeSplitVarint64(a, c(b[e]), d(b[e]))
  6178. };
  6179. jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64 = function(a, b, c, d) {
  6180. if (null != b)
  6181. for (var e = 0; e < b.length; e++) this.writeSplitZigzagVarint64(a, c(b[e]), d(b[e]))
  6182. };
  6183. jspb.BinaryWriter.prototype.writeRepeatedInt64String = function(a, b) {
  6184. if (null != b)
  6185. for (var c = 0; c < b.length; c++) this.writeInt64String(a, b[c])
  6186. };
  6187. jspb.BinaryWriter.prototype.writeRepeatedUint32 = function(a, b) {
  6188. if (null != b)
  6189. for (var c = 0; c < b.length; c++) this.writeUnsignedVarint32_(a, b[c])
  6190. };
  6191. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedUint32", jspb.BinaryWriter.prototype
  6192. .writeRepeatedUint32);
  6193. jspb.BinaryWriter.prototype.writeRepeatedUint32String = function(a, b) {
  6194. if (null != b)
  6195. for (var c = 0; c < b.length; c++) this.writeUint32String(a, b[c])
  6196. };
  6197. jspb.BinaryWriter.prototype.writeRepeatedUint64 = function(a, b) {
  6198. if (null != b)
  6199. for (var c = 0; c < b.length; c++) this.writeUnsignedVarint64_(a, b[c])
  6200. };
  6201. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedUint64", jspb.BinaryWriter.prototype
  6202. .writeRepeatedUint64);
  6203. jspb.BinaryWriter.prototype.writeRepeatedUint64String = function(a, b) {
  6204. if (null != b)
  6205. for (var c = 0; c < b.length; c++) this.writeUint64String(a, b[c])
  6206. };
  6207. jspb.BinaryWriter.prototype.writeRepeatedSint32 = function(a, b) {
  6208. if (null != b)
  6209. for (var c = 0; c < b.length; c++) this.writeZigzagVarint32_(a, b[c])
  6210. };
  6211. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSint32", jspb.BinaryWriter.prototype
  6212. .writeRepeatedSint32);
  6213. jspb.BinaryWriter.prototype.writeRepeatedSint64 = function(a, b) {
  6214. if (null != b)
  6215. for (var c = 0; c < b.length; c++) this.writeZigzagVarint64_(a, b[c])
  6216. };
  6217. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSint64", jspb.BinaryWriter.prototype
  6218. .writeRepeatedSint64);
  6219. jspb.BinaryWriter.prototype.writeRepeatedSint64String = function(a, b) {
  6220. if (null != b)
  6221. for (var c = 0; c < b.length; c++) this.writeZigzagVarint64String_(a, b[c])
  6222. };
  6223. jspb.BinaryWriter.prototype.writeRepeatedSintHash64 = function(a, b) {
  6224. if (null != b)
  6225. for (var c = 0; c < b.length; c++) this.writeZigzagVarintHash64_(a, b[c])
  6226. };
  6227. jspb.BinaryWriter.prototype.writeRepeatedFixed32 = function(a, b) {
  6228. if (null != b)
  6229. for (var c = 0; c < b.length; c++) this.writeFixed32(a, b[c])
  6230. };
  6231. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFixed32", jspb.BinaryWriter.prototype
  6232. .writeRepeatedFixed32);
  6233. jspb.BinaryWriter.prototype.writeRepeatedFixed64 = function(a, b) {
  6234. if (null != b)
  6235. for (var c = 0; c < b.length; c++) this.writeFixed64(a, b[c])
  6236. };
  6237. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFixed64", jspb.BinaryWriter.prototype
  6238. .writeRepeatedFixed64);
  6239. jspb.BinaryWriter.prototype.writeRepeatedFixed64String = function(a, b) {
  6240. if (null != b)
  6241. for (var c = 0; c < b.length; c++) this.writeFixed64String(a, b[c])
  6242. };
  6243. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFixed64String", jspb.BinaryWriter.prototype
  6244. .writeRepeatedFixed64String);
  6245. jspb.BinaryWriter.prototype.writeRepeatedSfixed32 = function(a, b) {
  6246. if (null != b)
  6247. for (var c = 0; c < b.length; c++) this.writeSfixed32(a, b[c])
  6248. };
  6249. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSfixed32", jspb.BinaryWriter.prototype
  6250. .writeRepeatedSfixed32);
  6251. jspb.BinaryWriter.prototype.writeRepeatedSfixed64 = function(a, b) {
  6252. if (null != b)
  6253. for (var c = 0; c < b.length; c++) this.writeSfixed64(a, b[c])
  6254. };
  6255. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSfixed64", jspb.BinaryWriter.prototype
  6256. .writeRepeatedSfixed64);
  6257. jspb.BinaryWriter.prototype.writeRepeatedSfixed64String = function(a, b) {
  6258. if (null != b)
  6259. for (var c = 0; c < b.length; c++) this.writeSfixed64String(a, b[c])
  6260. };
  6261. jspb.BinaryWriter.prototype.writeRepeatedFloat = function(a, b) {
  6262. if (null != b)
  6263. for (var c = 0; c < b.length; c++) this.writeFloat(a, b[c])
  6264. };
  6265. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFloat", jspb.BinaryWriter.prototype.writeRepeatedFloat);
  6266. jspb.BinaryWriter.prototype.writeRepeatedDouble = function(a, b) {
  6267. if (null != b)
  6268. for (var c = 0; c < b.length; c++) this.writeDouble(a, b[c])
  6269. };
  6270. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedDouble", jspb.BinaryWriter.prototype
  6271. .writeRepeatedDouble);
  6272. jspb.BinaryWriter.prototype.writeRepeatedBool = function(a, b) {
  6273. if (null != b)
  6274. for (var c = 0; c < b.length; c++) this.writeBool(a, b[c])
  6275. };
  6276. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedBool", jspb.BinaryWriter.prototype.writeRepeatedBool);
  6277. jspb.BinaryWriter.prototype.writeRepeatedEnum = function(a, b) {
  6278. if (null != b)
  6279. for (var c = 0; c < b.length; c++) this.writeEnum(a, b[c])
  6280. };
  6281. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedEnum", jspb.BinaryWriter.prototype.writeRepeatedEnum);
  6282. jspb.BinaryWriter.prototype.writeRepeatedString = function(a, b) {
  6283. if (null != b)
  6284. for (var c = 0; c < b.length; c++) this.writeString(a, b[c])
  6285. };
  6286. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedString", jspb.BinaryWriter.prototype
  6287. .writeRepeatedString);
  6288. jspb.BinaryWriter.prototype.writeRepeatedBytes = function(a, b) {
  6289. if (null != b)
  6290. for (var c = 0; c < b.length; c++) this.writeBytes(a, b[c])
  6291. };
  6292. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedBytes", jspb.BinaryWriter.prototype.writeRepeatedBytes);
  6293. jspb.BinaryWriter.prototype.writeRepeatedMessage = function(a, b, c) {
  6294. if (null != b)
  6295. for (var d = 0; d < b.length; d++) {
  6296. var e = this.beginDelimited_(a);
  6297. c(b[d], this);
  6298. this.endDelimited_(e)
  6299. }
  6300. };
  6301. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedMessage", jspb.BinaryWriter.prototype
  6302. .writeRepeatedMessage);
  6303. jspb.BinaryWriter.prototype.writeRepeatedGroup = function(a, b, c) {
  6304. if (null != b)
  6305. for (var d = 0; d < b.length; d++) this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.START_GROUP), c(
  6306. b[d], this), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.END_GROUP)
  6307. };
  6308. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedGroup", jspb.BinaryWriter.prototype.writeRepeatedGroup);
  6309. jspb.BinaryWriter.prototype.writeRepeatedFixedHash64 = function(a, b) {
  6310. if (null != b)
  6311. for (var c = 0; c < b.length; c++) this.writeFixedHash64(a, b[c])
  6312. };
  6313. jspb.BinaryWriter.prototype.writeRepeatedVarintHash64 = function(a, b) {
  6314. if (null != b)
  6315. for (var c = 0; c < b.length; c++) this.writeVarintHash64(a, b[c])
  6316. };
  6317. jspb.BinaryWriter.prototype.writePackedInt32 = function(a, b) {
  6318. if (null != b && b.length) {
  6319. a = this.beginDelimited_(a);
  6320. for (var c = 0; c < b.length; c++) this.encoder_.writeSignedVarint32(b[c]);
  6321. this.endDelimited_(a)
  6322. }
  6323. };
  6324. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedInt32", jspb.BinaryWriter.prototype.writePackedInt32);
  6325. jspb.BinaryWriter.prototype.writePackedInt32String = function(a, b) {
  6326. if (null != b && b.length) {
  6327. a = this.beginDelimited_(a);
  6328. for (var c = 0; c < b.length; c++) this.encoder_.writeSignedVarint32(parseInt(b[c], 10));
  6329. this.endDelimited_(a)
  6330. }
  6331. };
  6332. jspb.BinaryWriter.prototype.writePackedInt64 = function(a, b) {
  6333. if (null != b && b.length) {
  6334. a = this.beginDelimited_(a);
  6335. for (var c = 0; c < b.length; c++) this.encoder_.writeSignedVarint64(b[c]);
  6336. this.endDelimited_(a)
  6337. }
  6338. };
  6339. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedInt64", jspb.BinaryWriter.prototype.writePackedInt64);
  6340. jspb.BinaryWriter.prototype.writePackedSplitFixed64 = function(a, b, c, d) {
  6341. if (null != b) {
  6342. a = this.beginDelimited_(a);
  6343. for (var e = 0; e < b.length; e++) this.encoder_.writeSplitFixed64(c(b[e]), d(b[e]));
  6344. this.endDelimited_(a)
  6345. }
  6346. };
  6347. jspb.BinaryWriter.prototype.writePackedSplitVarint64 = function(a, b, c, d) {
  6348. if (null != b) {
  6349. a = this.beginDelimited_(a);
  6350. for (var e = 0; e < b.length; e++) this.encoder_.writeSplitVarint64(c(b[e]), d(b[e]));
  6351. this.endDelimited_(a)
  6352. }
  6353. };
  6354. jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64 = function(a, b, c, d) {
  6355. if (null != b) {
  6356. a = this.beginDelimited_(a);
  6357. for (var e = this.encoder_, f = 0; f < b.length; f++) jspb.utils.toZigzag64(c(b[f]), d(b[f]), function(a,
  6358. b) {
  6359. e.writeSplitVarint64(a >>> 0, b >>> 0)
  6360. });
  6361. this.endDelimited_(a)
  6362. }
  6363. };
  6364. jspb.BinaryWriter.prototype.writePackedInt64String = function(a, b) {
  6365. if (null != b && b.length) {
  6366. a = this.beginDelimited_(a);
  6367. for (var c = 0; c < b.length; c++) {
  6368. var d = jspb.arith.Int64.fromString(b[c]);
  6369. this.encoder_.writeSplitVarint64(d.lo, d.hi)
  6370. }
  6371. this.endDelimited_(a)
  6372. }
  6373. };
  6374. jspb.BinaryWriter.prototype.writePackedUint32 = function(a, b) {
  6375. if (null != b && b.length) {
  6376. a = this.beginDelimited_(a);
  6377. for (var c = 0; c < b.length; c++) this.encoder_.writeUnsignedVarint32(b[c]);
  6378. this.endDelimited_(a)
  6379. }
  6380. };
  6381. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedUint32", jspb.BinaryWriter.prototype.writePackedUint32);
  6382. jspb.BinaryWriter.prototype.writePackedUint32String = function(a, b) {
  6383. if (null != b && b.length) {
  6384. a = this.beginDelimited_(a);
  6385. for (var c = 0; c < b.length; c++) this.encoder_.writeUnsignedVarint32(parseInt(b[c], 10));
  6386. this.endDelimited_(a)
  6387. }
  6388. };
  6389. jspb.BinaryWriter.prototype.writePackedUint64 = function(a, b) {
  6390. if (null != b && b.length) {
  6391. a = this.beginDelimited_(a);
  6392. for (var c = 0; c < b.length; c++) this.encoder_.writeUnsignedVarint64(b[c]);
  6393. this.endDelimited_(a)
  6394. }
  6395. };
  6396. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedUint64", jspb.BinaryWriter.prototype.writePackedUint64);
  6397. jspb.BinaryWriter.prototype.writePackedUint64String = function(a, b) {
  6398. if (null != b && b.length) {
  6399. a = this.beginDelimited_(a);
  6400. for (var c = 0; c < b.length; c++) {
  6401. var d = jspb.arith.UInt64.fromString(b[c]);
  6402. this.encoder_.writeSplitVarint64(d.lo, d.hi)
  6403. }
  6404. this.endDelimited_(a)
  6405. }
  6406. };
  6407. jspb.BinaryWriter.prototype.writePackedSint32 = function(a, b) {
  6408. if (null != b && b.length) {
  6409. a = this.beginDelimited_(a);
  6410. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarint32(b[c]);
  6411. this.endDelimited_(a)
  6412. }
  6413. };
  6414. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSint32", jspb.BinaryWriter.prototype.writePackedSint32);
  6415. jspb.BinaryWriter.prototype.writePackedSint64 = function(a, b) {
  6416. if (null != b && b.length) {
  6417. a = this.beginDelimited_(a);
  6418. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarint64(b[c]);
  6419. this.endDelimited_(a)
  6420. }
  6421. };
  6422. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSint64", jspb.BinaryWriter.prototype.writePackedSint64);
  6423. jspb.BinaryWriter.prototype.writePackedSint64String = function(a, b) {
  6424. if (null != b && b.length) {
  6425. a = this.beginDelimited_(a);
  6426. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(b[
  6427. c]));
  6428. this.endDelimited_(a)
  6429. }
  6430. };
  6431. jspb.BinaryWriter.prototype.writePackedSintHash64 = function(a, b) {
  6432. if (null != b && b.length) {
  6433. a = this.beginDelimited_(a);
  6434. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarintHash64(b[c]);
  6435. this.endDelimited_(a)
  6436. }
  6437. };
  6438. jspb.BinaryWriter.prototype.writePackedFixed32 = function(a, b) {
  6439. if (null != b && b.length)
  6440. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6441. .writeUnsignedVarint32(4 * b.length), a = 0; a < b.length; a++) this.encoder_.writeUint32(b[a])
  6442. };
  6443. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedFixed32", jspb.BinaryWriter.prototype.writePackedFixed32);
  6444. jspb.BinaryWriter.prototype.writePackedFixed64 = function(a, b) {
  6445. if (null != b && b.length)
  6446. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6447. .writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeUint64(b[a])
  6448. };
  6449. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedFixed64", jspb.BinaryWriter.prototype.writePackedFixed64);
  6450. jspb.BinaryWriter.prototype.writePackedFixed64String = function(a, b) {
  6451. if (null != b && b.length)
  6452. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6453. .writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) {
  6454. var c = jspb.arith.UInt64.fromString(b[a]);
  6455. this.encoder_.writeSplitFixed64(c.lo, c.hi)
  6456. }
  6457. };
  6458. jspb.BinaryWriter.prototype.writePackedSfixed32 = function(a, b) {
  6459. if (null != b && b.length)
  6460. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6461. .writeUnsignedVarint32(4 * b.length), a = 0; a < b.length; a++) this.encoder_.writeInt32(b[a])
  6462. };
  6463. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSfixed32", jspb.BinaryWriter.prototype
  6464. .writePackedSfixed32);
  6465. jspb.BinaryWriter.prototype.writePackedSfixed64 = function(a, b) {
  6466. if (null != b && b.length)
  6467. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6468. .writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeInt64(b[a])
  6469. };
  6470. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSfixed64", jspb.BinaryWriter.prototype
  6471. .writePackedSfixed64);
  6472. jspb.BinaryWriter.prototype.writePackedSfixed64String = function(a, b) {
  6473. if (null != b && b.length)
  6474. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6475. .writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeInt64String(b[a])
  6476. };
  6477. jspb.BinaryWriter.prototype.writePackedFloat = function(a, b) {
  6478. if (null != b && b.length)
  6479. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6480. .writeUnsignedVarint32(4 * b.length), a = 0; a < b.length; a++) this.encoder_.writeFloat(b[a])
  6481. };
  6482. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedFloat", jspb.BinaryWriter.prototype.writePackedFloat);
  6483. jspb.BinaryWriter.prototype.writePackedDouble = function(a, b) {
  6484. if (null != b && b.length)
  6485. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6486. .writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeDouble(b[a])
  6487. };
  6488. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedDouble", jspb.BinaryWriter.prototype.writePackedDouble);
  6489. jspb.BinaryWriter.prototype.writePackedBool = function(a, b) {
  6490. if (null != b && b.length)
  6491. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6492. .writeUnsignedVarint32(b.length), a = 0; a < b.length; a++) this.encoder_.writeBool(b[a])
  6493. };
  6494. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedBool", jspb.BinaryWriter.prototype.writePackedBool);
  6495. jspb.BinaryWriter.prototype.writePackedEnum = function(a, b) {
  6496. if (null != b && b.length) {
  6497. a = this.beginDelimited_(a);
  6498. for (var c = 0; c < b.length; c++) this.encoder_.writeEnum(b[c]);
  6499. this.endDelimited_(a)
  6500. }
  6501. };
  6502. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedEnum", jspb.BinaryWriter.prototype.writePackedEnum);
  6503. jspb.BinaryWriter.prototype.writePackedFixedHash64 = function(a, b) {
  6504. if (null != b && b.length)
  6505. for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_
  6506. .writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeFixedHash64(b[a])
  6507. };
  6508. jspb.BinaryWriter.prototype.writePackedVarintHash64 = function(a, b) {
  6509. if (null != b && b.length) {
  6510. a = this.beginDelimited_(a);
  6511. for (var c = 0; c < b.length; c++) this.encoder_.writeVarintHash64(b[c]);
  6512. this.endDelimited_(a)
  6513. }
  6514. };
  6515. jspb.Map = function(a, b) {
  6516. this.arr_ = a;
  6517. this.valueCtor_ = b;
  6518. this.map_ = {};
  6519. this.arrClean = !0;
  6520. 0 < this.arr_.length && this.loadFromArray_()
  6521. };
  6522. goog.exportSymbol("jspb.Map", jspb.Map);
  6523. jspb.Map.prototype.loadFromArray_ = function() {
  6524. for (var a = 0; a < this.arr_.length; a++) {
  6525. var b = this.arr_[a],
  6526. c = b[0];
  6527. this.map_[c.toString()] = new jspb.Map.Entry_(c, b[1])
  6528. }
  6529. this.arrClean = !0
  6530. };
  6531. jspb.Map.prototype.toArray = function() {
  6532. if (this.arrClean) {
  6533. if (this.valueCtor_) {
  6534. var a = this.map_,
  6535. b;
  6536. for (b in a)
  6537. if (Object.prototype.hasOwnProperty.call(a, b)) {
  6538. var c = a[b].valueWrapper;
  6539. c && c.toArray()
  6540. }
  6541. }
  6542. } else {
  6543. this.arr_.length = 0;
  6544. a = this.stringKeys_();
  6545. a.sort();
  6546. for (b = 0; b < a.length; b++) {
  6547. var d = this.map_[a[b]];
  6548. (c = d.valueWrapper) && c.toArray();
  6549. this.arr_.push([d.key, d.value])
  6550. }
  6551. this.arrClean = !0
  6552. }
  6553. return this.arr_
  6554. };
  6555. goog.exportProperty(jspb.Map.prototype, "toArray", jspb.Map.prototype.toArray);
  6556. jspb.Map.prototype.toObject = function(a, b) {
  6557. for (var c = this.toArray(), d = [], e = 0; e < c.length; e++) {
  6558. var f = this.map_[c[e][0].toString()];
  6559. this.wrapEntry_(f);
  6560. var g = f.valueWrapper;
  6561. g ? (jspb.asserts.assert(b), d.push([f.key, b(a, g)])) : d.push([f.key, f.value])
  6562. }
  6563. return d
  6564. };
  6565. goog.exportProperty(jspb.Map.prototype, "toObject", jspb.Map.prototype.toObject);
  6566. jspb.Map.fromObject = function(a, b, c) {
  6567. b = new jspb.Map([], b);
  6568. for (var d = 0; d < a.length; d++) {
  6569. var e = a[d][0],
  6570. f = c(a[d][1]);
  6571. b.set(e, f)
  6572. }
  6573. return b
  6574. };
  6575. goog.exportProperty(jspb.Map, "fromObject", jspb.Map.fromObject);
  6576. jspb.Map.ArrayIteratorIterable_ = function(a) {
  6577. this.idx_ = 0;
  6578. this.arr_ = a
  6579. };
  6580. jspb.Map.ArrayIteratorIterable_.prototype.next = function() {
  6581. return this.idx_ < this.arr_.length ? {
  6582. done: !1,
  6583. value: this.arr_[this.idx_++]
  6584. } : {
  6585. done: !0,
  6586. value: void 0
  6587. }
  6588. };
  6589. "undefined" != typeof Symbol && (jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator] = function() {
  6590. return this
  6591. });
  6592. jspb.Map.prototype.getLength = function() {
  6593. return this.stringKeys_().length
  6594. };
  6595. goog.exportProperty(jspb.Map.prototype, "getLength", jspb.Map.prototype.getLength);
  6596. jspb.Map.prototype.clear = function() {
  6597. this.map_ = {};
  6598. this.arrClean = !1
  6599. };
  6600. goog.exportProperty(jspb.Map.prototype, "clear", jspb.Map.prototype.clear);
  6601. jspb.Map.prototype.del = function(a) {
  6602. a = a.toString();
  6603. var b = this.map_.hasOwnProperty(a);
  6604. delete this.map_[a];
  6605. this.arrClean = !1;
  6606. return b
  6607. };
  6608. goog.exportProperty(jspb.Map.prototype, "del", jspb.Map.prototype.del);
  6609. jspb.Map.prototype.getEntryList = function() {
  6610. var a = [],
  6611. b = this.stringKeys_();
  6612. b.sort();
  6613. for (var c = 0; c < b.length; c++) {
  6614. var d = this.map_[b[c]];
  6615. a.push([d.key, d.value])
  6616. }
  6617. return a
  6618. };
  6619. goog.exportProperty(jspb.Map.prototype, "getEntryList", jspb.Map.prototype.getEntryList);
  6620. jspb.Map.prototype.entries = function() {
  6621. var a = [],
  6622. b = this.stringKeys_();
  6623. b.sort();
  6624. for (var c = 0; c < b.length; c++) {
  6625. var d = this.map_[b[c]];
  6626. a.push([d.key, this.wrapEntry_(d)])
  6627. }
  6628. return new jspb.Map.ArrayIteratorIterable_(a)
  6629. };
  6630. goog.exportProperty(jspb.Map.prototype, "entries", jspb.Map.prototype.entries);
  6631. jspb.Map.prototype.keys = function() {
  6632. var a = [],
  6633. b = this.stringKeys_();
  6634. b.sort();
  6635. for (var c = 0; c < b.length; c++) a.push(this.map_[b[c]].key);
  6636. return new jspb.Map.ArrayIteratorIterable_(a)
  6637. };
  6638. goog.exportProperty(jspb.Map.prototype, "keys", jspb.Map.prototype.keys);
  6639. jspb.Map.prototype.values = function() {
  6640. var a = [],
  6641. b = this.stringKeys_();
  6642. b.sort();
  6643. for (var c = 0; c < b.length; c++) a.push(this.wrapEntry_(this.map_[b[c]]));
  6644. return new jspb.Map.ArrayIteratorIterable_(a)
  6645. };
  6646. goog.exportProperty(jspb.Map.prototype, "values", jspb.Map.prototype.values);
  6647. jspb.Map.prototype.forEach = function(a, b) {
  6648. var c = this.stringKeys_();
  6649. c.sort();
  6650. for (var d = 0; d < c.length; d++) {
  6651. var e = this.map_[c[d]];
  6652. a.call(b, this.wrapEntry_(e), e.key, this)
  6653. }
  6654. };
  6655. goog.exportProperty(jspb.Map.prototype, "forEach", jspb.Map.prototype.forEach);
  6656. jspb.Map.prototype.set = function(a, b) {
  6657. var c = new jspb.Map.Entry_(a);
  6658. this.valueCtor_ ? (c.valueWrapper = b, c.value = b.toArray()) : c.value = b;
  6659. this.map_[a.toString()] = c;
  6660. this.arrClean = !1;
  6661. return this
  6662. };
  6663. goog.exportProperty(jspb.Map.prototype, "set", jspb.Map.prototype.set);
  6664. jspb.Map.prototype.wrapEntry_ = function(a) {
  6665. return this.valueCtor_ ? (a.valueWrapper || (a.valueWrapper = new this.valueCtor_(a.value)), a.valueWrapper) : a
  6666. .value
  6667. };
  6668. jspb.Map.prototype.get = function(a) {
  6669. if (a = this.map_[a.toString()]) return this.wrapEntry_(a)
  6670. };
  6671. goog.exportProperty(jspb.Map.prototype, "get", jspb.Map.prototype.get);
  6672. jspb.Map.prototype.has = function(a) {
  6673. return a.toString() in this.map_
  6674. };
  6675. goog.exportProperty(jspb.Map.prototype, "has", jspb.Map.prototype.has);
  6676. jspb.Map.prototype.serializeBinary = function(a, b, c, d, e) {
  6677. var f = this.stringKeys_();
  6678. f.sort();
  6679. for (var g = 0; g < f.length; g++) {
  6680. var h = this.map_[f[g]];
  6681. b.beginSubMessage(a);
  6682. c.call(b, 1, h.key);
  6683. this.valueCtor_ ? d.call(b, 2, this.wrapEntry_(h), e) : d.call(b, 2, h.value);
  6684. b.endSubMessage()
  6685. }
  6686. };
  6687. goog.exportProperty(jspb.Map.prototype, "serializeBinary", jspb.Map.prototype.serializeBinary);
  6688. jspb.Map.deserializeBinary = function(a, b, c, d, e, f, g) {
  6689. for (; b.nextField() && !b.isEndGroup();) {
  6690. var h = b.getFieldNumber();
  6691. 1 == h ? f = c.call(b) : 2 == h && (a.valueCtor_ ? (jspb.asserts.assert(e), g || (g = new a.valueCtor_), d
  6692. .call(b, g, e)) : g = d.call(b))
  6693. }
  6694. jspb.asserts.assert(void 0 != f);
  6695. jspb.asserts.assert(void 0 != g);
  6696. a.set(f, g)
  6697. };
  6698. goog.exportProperty(jspb.Map, "deserializeBinary", jspb.Map.deserializeBinary);
  6699. jspb.Map.prototype.stringKeys_ = function() {
  6700. var a = this.map_,
  6701. b = [],
  6702. c;
  6703. for (c in a) Object.prototype.hasOwnProperty.call(a, c) && b.push(c);
  6704. return b
  6705. };
  6706. jspb.Map.Entry_ = function(a, b) {
  6707. this.key = a;
  6708. this.value = b;
  6709. this.valueWrapper = void 0
  6710. };
  6711. jspb.ExtensionFieldInfo = function(a, b, c, d, e) {
  6712. this.fieldIndex = a;
  6713. this.fieldName = b;
  6714. this.ctor = c;
  6715. this.toObjectFn = d;
  6716. this.isRepeated = e
  6717. };
  6718. goog.exportSymbol("jspb.ExtensionFieldInfo", jspb.ExtensionFieldInfo);
  6719. jspb.ExtensionFieldBinaryInfo = function(a, b, c, d, e, f) {
  6720. this.fieldInfo = a;
  6721. this.binaryReaderFn = b;
  6722. this.binaryWriterFn = c;
  6723. this.binaryMessageSerializeFn = d;
  6724. this.binaryMessageDeserializeFn = e;
  6725. this.isPacked = f
  6726. };
  6727. goog.exportSymbol("jspb.ExtensionFieldBinaryInfo", jspb.ExtensionFieldBinaryInfo);
  6728. jspb.ExtensionFieldInfo.prototype.isMessageType = function() {
  6729. return !!this.ctor
  6730. };
  6731. goog.exportProperty(jspb.ExtensionFieldInfo.prototype, "isMessageType", jspb.ExtensionFieldInfo.prototype
  6732. .isMessageType);
  6733. jspb.Message = function() {};
  6734. goog.exportSymbol("jspb.Message", jspb.Message);
  6735. jspb.Message.GENERATE_TO_OBJECT = !0;
  6736. goog.exportProperty(jspb.Message, "GENERATE_TO_OBJECT", jspb.Message.GENERATE_TO_OBJECT);
  6737. jspb.Message.GENERATE_FROM_OBJECT = !goog.DISALLOW_TEST_ONLY_CODE;
  6738. goog.exportProperty(jspb.Message, "GENERATE_FROM_OBJECT", jspb.Message.GENERATE_FROM_OBJECT);
  6739. jspb.Message.GENERATE_TO_STRING = !0;
  6740. jspb.Message.ASSUME_LOCAL_ARRAYS = !1;
  6741. jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS = !0;
  6742. jspb.Message.SUPPORTS_UINT8ARRAY_ = "function" == typeof Uint8Array;
  6743. jspb.Message.prototype.getJsPbMessageId = function() {
  6744. return this.messageId_
  6745. };
  6746. goog.exportProperty(jspb.Message.prototype, "getJsPbMessageId", jspb.Message.prototype.getJsPbMessageId);
  6747. jspb.Message.getIndex_ = function(a, b) {
  6748. return b + a.arrayIndexOffset_
  6749. };
  6750. jspb.Message.hiddenES6Property_ = function() {};
  6751. jspb.Message.getFieldNumber_ = function(a, b) {
  6752. return b - a.arrayIndexOffset_
  6753. };
  6754. jspb.Message.initialize = function(a, b, c, d, e, f) {
  6755. a.wrappers_ = null;
  6756. b || (b = c ? [c] : []);
  6757. a.messageId_ = c ? String(c) : void 0;
  6758. a.arrayIndexOffset_ = 0 === c ? -1 : 0;
  6759. a.array = b;
  6760. jspb.Message.initPivotAndExtensionObject_(a, d);
  6761. a.convertedPrimitiveFields_ = {};
  6762. jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS || (a.repeatedFields = e);
  6763. if (e)
  6764. for (b = 0; b < e.length; b++) c = e[b], c < a.pivot_ ? (c = jspb.Message.getIndex_(a, c), a.array[c] = a
  6765. .array[c] || jspb.Message.EMPTY_LIST_SENTINEL_) : (jspb.Message.maybeInitEmptyExtensionObject_(a), a
  6766. .extensionObject_[c] =
  6767. a.extensionObject_[c] || jspb.Message.EMPTY_LIST_SENTINEL_);
  6768. if (f && f.length)
  6769. for (b = 0; b < f.length; b++) jspb.Message.computeOneofCase(a, f[b])
  6770. };
  6771. goog.exportProperty(jspb.Message, "initialize", jspb.Message.initialize);
  6772. jspb.Message.EMPTY_LIST_SENTINEL_ = goog.DEBUG && Object.freeze ? Object.freeze([]) : [];
  6773. jspb.Message.isArray_ = function(a) {
  6774. return jspb.Message.ASSUME_LOCAL_ARRAYS ? a instanceof Array : Array.isArray(a)
  6775. };
  6776. jspb.Message.isExtensionObject_ = function(a) {
  6777. return null !== a && "object" == typeof a && !jspb.Message.isArray_(a) && !(jspb.Message.SUPPORTS_UINT8ARRAY_ &&
  6778. a instanceof Uint8Array)
  6779. };
  6780. jspb.Message.initPivotAndExtensionObject_ = function(a, b) {
  6781. var c = a.array.length,
  6782. d = -1;
  6783. if (c && (d = c - 1, c = a.array[d], jspb.Message.isExtensionObject_(c))) {
  6784. a.pivot_ = jspb.Message.getFieldNumber_(a, d);
  6785. a.extensionObject_ = c;
  6786. return
  6787. } - 1 < b ? (a.pivot_ = Math.max(b, jspb.Message.getFieldNumber_(a, d + 1)), a.extensionObject_ = null) : a
  6788. .pivot_ = Number.MAX_VALUE
  6789. };
  6790. jspb.Message.maybeInitEmptyExtensionObject_ = function(a) {
  6791. var b = jspb.Message.getIndex_(a, a.pivot_);
  6792. a.array[b] || (a.extensionObject_ = a.array[b] = {})
  6793. };
  6794. jspb.Message.toObjectList = function(a, b, c) {
  6795. for (var d = [], e = 0; e < a.length; e++) d[e] = b.call(a[e], c, a[e]);
  6796. return d
  6797. };
  6798. goog.exportProperty(jspb.Message, "toObjectList", jspb.Message.toObjectList);
  6799. jspb.Message.toObjectExtension = function(a, b, c, d, e) {
  6800. for (var f in c) {
  6801. var g = c[f],
  6802. h = d.call(a, g);
  6803. if (null != h) {
  6804. for (var k in g.fieldName)
  6805. if (g.fieldName.hasOwnProperty(k)) break;
  6806. b[k] = g.toObjectFn ? g.isRepeated ? jspb.Message.toObjectList(h, g.toObjectFn, e) : g.toObjectFn(e,
  6807. h) : h
  6808. }
  6809. }
  6810. };
  6811. goog.exportProperty(jspb.Message, "toObjectExtension", jspb.Message.toObjectExtension);
  6812. jspb.Message.serializeBinaryExtensions = function(a, b, c, d) {
  6813. for (var e in c) {
  6814. var f = c[e],
  6815. g = f.fieldInfo;
  6816. if (!f.binaryWriterFn) throw Error(
  6817. "Message extension present that was generated without binary serialization support");
  6818. var h = d.call(a, g);
  6819. if (null != h)
  6820. if (g.isMessageType())
  6821. if (f.binaryMessageSerializeFn) f.binaryWriterFn.call(b, g.fieldIndex, h, f
  6822. .binaryMessageSerializeFn);
  6823. else throw Error(
  6824. "Message extension present holding submessage without binary support enabled, and message is being serialized to binary format"
  6825. );
  6826. else f.binaryWriterFn.call(b, g.fieldIndex, h)
  6827. }
  6828. };
  6829. goog.exportProperty(jspb.Message, "serializeBinaryExtensions", jspb.Message.serializeBinaryExtensions);
  6830. jspb.Message.readBinaryExtension = function(a, b, c, d, e) {
  6831. var f = c[b.getFieldNumber()];
  6832. if (f) {
  6833. c = f.fieldInfo;
  6834. if (!f.binaryReaderFn) throw Error(
  6835. "Deserializing extension whose generated code does not support binary format");
  6836. if (c.isMessageType()) {
  6837. var g = new c.ctor;
  6838. f.binaryReaderFn.call(b, g, f.binaryMessageDeserializeFn)
  6839. } else g = f.binaryReaderFn.call(b);
  6840. c.isRepeated && !f.isPacked ? (b = d.call(a, c)) ? b.push(g) : e.call(a, c, [g]) : e.call(a, c, g)
  6841. } else b.skipField()
  6842. };
  6843. goog.exportProperty(jspb.Message, "readBinaryExtension", jspb.Message.readBinaryExtension);
  6844. jspb.Message.getField = function(a, b) {
  6845. if (b < a.pivot_) {
  6846. b = jspb.Message.getIndex_(a, b);
  6847. var c = a.array[b];
  6848. return c === jspb.Message.EMPTY_LIST_SENTINEL_ ? a.array[b] = [] : c
  6849. }
  6850. if (a.extensionObject_) return c = a.extensionObject_[b], c === jspb.Message.EMPTY_LIST_SENTINEL_ ? a
  6851. .extensionObject_[b] = [] : c
  6852. };
  6853. goog.exportProperty(jspb.Message, "getField", jspb.Message.getField);
  6854. jspb.Message.getRepeatedField = function(a, b) {
  6855. return jspb.Message.getField(a, b)
  6856. };
  6857. goog.exportProperty(jspb.Message, "getRepeatedField", jspb.Message.getRepeatedField);
  6858. jspb.Message.getOptionalFloatingPointField = function(a, b) {
  6859. a = jspb.Message.getField(a, b);
  6860. return null == a ? a : +a
  6861. };
  6862. goog.exportProperty(jspb.Message, "getOptionalFloatingPointField", jspb.Message.getOptionalFloatingPointField);
  6863. jspb.Message.getBooleanField = function(a, b) {
  6864. a = jspb.Message.getField(a, b);
  6865. return null == a ? a : !!a
  6866. };
  6867. goog.exportProperty(jspb.Message, "getBooleanField", jspb.Message.getBooleanField);
  6868. jspb.Message.getRepeatedFloatingPointField = function(a, b) {
  6869. var c = jspb.Message.getRepeatedField(a, b);
  6870. a.convertedPrimitiveFields_ || (a.convertedPrimitiveFields_ = {});
  6871. if (!a.convertedPrimitiveFields_[b]) {
  6872. for (var d = 0; d < c.length; d++) c[d] = +c[d];
  6873. a.convertedPrimitiveFields_[b] = !0
  6874. }
  6875. return c
  6876. };
  6877. goog.exportProperty(jspb.Message, "getRepeatedFloatingPointField", jspb.Message.getRepeatedFloatingPointField);
  6878. jspb.Message.getRepeatedBooleanField = function(a, b) {
  6879. var c = jspb.Message.getRepeatedField(a, b);
  6880. a.convertedPrimitiveFields_ || (a.convertedPrimitiveFields_ = {});
  6881. if (!a.convertedPrimitiveFields_[b]) {
  6882. for (var d = 0; d < c.length; d++) c[d] = !!c[d];
  6883. a.convertedPrimitiveFields_[b] = !0
  6884. }
  6885. return c
  6886. };
  6887. goog.exportProperty(jspb.Message, "getRepeatedBooleanField", jspb.Message.getRepeatedBooleanField);
  6888. jspb.Message.bytesAsB64 = function(a) {
  6889. if (null == a || "string" === typeof a) return a;
  6890. if (jspb.Message.SUPPORTS_UINT8ARRAY_ && a instanceof Uint8Array) return goog.crypt.base64.encodeByteArray(a);
  6891. jspb.asserts.fail("Cannot coerce to b64 string: " + goog.typeOf(a));
  6892. return null
  6893. };
  6894. goog.exportProperty(jspb.Message, "bytesAsB64", jspb.Message.bytesAsB64);
  6895. jspb.Message.bytesAsU8 = function(a) {
  6896. if (null == a || a instanceof Uint8Array) return a;
  6897. if ("string" === typeof a) return goog.crypt.base64.decodeStringToUint8Array(a);
  6898. jspb.asserts.fail("Cannot coerce to Uint8Array: " + goog.typeOf(a));
  6899. return null
  6900. };
  6901. goog.exportProperty(jspb.Message, "bytesAsU8", jspb.Message.bytesAsU8);
  6902. jspb.Message.bytesListAsB64 = function(a) {
  6903. jspb.Message.assertConsistentTypes_(a);
  6904. return a.length && "string" !== typeof a[0] ? goog.array.map(a, jspb.Message.bytesAsB64) : a
  6905. };
  6906. goog.exportProperty(jspb.Message, "bytesListAsB64", jspb.Message.bytesListAsB64);
  6907. jspb.Message.bytesListAsU8 = function(a) {
  6908. jspb.Message.assertConsistentTypes_(a);
  6909. return !a.length || a[0] instanceof Uint8Array ? a : goog.array.map(a, jspb.Message.bytesAsU8)
  6910. };
  6911. goog.exportProperty(jspb.Message, "bytesListAsU8", jspb.Message.bytesListAsU8);
  6912. jspb.Message.assertConsistentTypes_ = function(a) {
  6913. if (goog.DEBUG && a && 1 < a.length) {
  6914. var b = goog.typeOf(a[0]);
  6915. goog.array.forEach(a, function(a) {
  6916. goog.typeOf(a) != b && jspb.asserts.fail(
  6917. "Inconsistent type in JSPB repeated field array. Got " + goog.typeOf(a) + " expected " +
  6918. b)
  6919. })
  6920. }
  6921. };
  6922. jspb.Message.getFieldWithDefault = function(a, b, c) {
  6923. a = jspb.Message.getField(a, b);
  6924. return null == a ? c : a
  6925. };
  6926. goog.exportProperty(jspb.Message, "getFieldWithDefault", jspb.Message.getFieldWithDefault);
  6927. jspb.Message.getBooleanFieldWithDefault = function(a, b, c) {
  6928. a = jspb.Message.getBooleanField(a, b);
  6929. return null == a ? c : a
  6930. };
  6931. goog.exportProperty(jspb.Message, "getBooleanFieldWithDefault", jspb.Message.getBooleanFieldWithDefault);
  6932. jspb.Message.getFloatingPointFieldWithDefault = function(a, b, c) {
  6933. a = jspb.Message.getOptionalFloatingPointField(a, b);
  6934. return null == a ? c : a
  6935. };
  6936. goog.exportProperty(jspb.Message, "getFloatingPointFieldWithDefault", jspb.Message.getFloatingPointFieldWithDefault);
  6937. jspb.Message.getFieldProto3 = jspb.Message.getFieldWithDefault;
  6938. goog.exportProperty(jspb.Message, "getFieldProto3", jspb.Message.getFieldProto3);
  6939. jspb.Message.getMapField = function(a, b, c, d) {
  6940. a.wrappers_ || (a.wrappers_ = {});
  6941. if (b in a.wrappers_) return a.wrappers_[b];
  6942. var e = jspb.Message.getField(a, b);
  6943. if (!e) {
  6944. if (c) return;
  6945. e = [];
  6946. jspb.Message.setField(a, b, e)
  6947. }
  6948. return a.wrappers_[b] = new jspb.Map(e, d)
  6949. };
  6950. goog.exportProperty(jspb.Message, "getMapField", jspb.Message.getMapField);
  6951. jspb.Message.setField = function(a, b, c) {
  6952. jspb.asserts.assertInstanceof(a, jspb.Message);
  6953. b < a.pivot_ ? a.array[jspb.Message.getIndex_(a, b)] = c : (jspb.Message.maybeInitEmptyExtensionObject_(a), a
  6954. .extensionObject_[b] = c);
  6955. return a
  6956. };
  6957. goog.exportProperty(jspb.Message, "setField", jspb.Message.setField);
  6958. jspb.Message.setProto3IntField = function(a, b, c) {
  6959. return jspb.Message.setFieldIgnoringDefault_(a, b, c, 0)
  6960. };
  6961. goog.exportProperty(jspb.Message, "setProto3IntField", jspb.Message.setProto3IntField);
  6962. jspb.Message.setProto3FloatField = function(a, b, c) {
  6963. return jspb.Message.setFieldIgnoringDefault_(a, b, c, 0)
  6964. };
  6965. goog.exportProperty(jspb.Message, "setProto3FloatField", jspb.Message.setProto3FloatField);
  6966. jspb.Message.setProto3BooleanField = function(a, b, c) {
  6967. return jspb.Message.setFieldIgnoringDefault_(a, b, c, !1)
  6968. };
  6969. goog.exportProperty(jspb.Message, "setProto3BooleanField", jspb.Message.setProto3BooleanField);
  6970. jspb.Message.setProto3StringField = function(a, b, c) {
  6971. return jspb.Message.setFieldIgnoringDefault_(a, b, c, "")
  6972. };
  6973. goog.exportProperty(jspb.Message, "setProto3StringField", jspb.Message.setProto3StringField);
  6974. jspb.Message.setProto3BytesField = function(a, b, c) {
  6975. return jspb.Message.setFieldIgnoringDefault_(a, b, c, "")
  6976. };
  6977. goog.exportProperty(jspb.Message, "setProto3BytesField", jspb.Message.setProto3BytesField);
  6978. jspb.Message.setProto3EnumField = function(a, b, c) {
  6979. return jspb.Message.setFieldIgnoringDefault_(a, b, c, 0)
  6980. };
  6981. goog.exportProperty(jspb.Message, "setProto3EnumField", jspb.Message.setProto3EnumField);
  6982. jspb.Message.setProto3StringIntField = function(a, b, c) {
  6983. return jspb.Message.setFieldIgnoringDefault_(a, b, c, "0")
  6984. };
  6985. goog.exportProperty(jspb.Message, "setProto3StringIntField", jspb.Message.setProto3StringIntField);
  6986. jspb.Message.setFieldIgnoringDefault_ = function(a, b, c, d) {
  6987. jspb.asserts.assertInstanceof(a, jspb.Message);
  6988. c !== d ? jspb.Message.setField(a, b, c) : b < a.pivot_ ? a.array[jspb.Message.getIndex_(a, b)] = null : (jspb
  6989. .Message.maybeInitEmptyExtensionObject_(a), delete a.extensionObject_[b]);
  6990. return a
  6991. };
  6992. jspb.Message.addToRepeatedField = function(a, b, c, d) {
  6993. jspb.asserts.assertInstanceof(a, jspb.Message);
  6994. b = jspb.Message.getRepeatedField(a, b);
  6995. void 0 != d ? b.splice(d, 0, c) : b.push(c);
  6996. return a
  6997. };
  6998. goog.exportProperty(jspb.Message, "addToRepeatedField", jspb.Message.addToRepeatedField);
  6999. jspb.Message.setOneofField = function(a, b, c, d) {
  7000. jspb.asserts.assertInstanceof(a, jspb.Message);
  7001. (c = jspb.Message.computeOneofCase(a, c)) && c !== b && void 0 !== d && (a.wrappers_ && c in a.wrappers_ && (a
  7002. .wrappers_[c] = void 0), jspb.Message.setField(a, c, void 0));
  7003. return jspb.Message.setField(a, b, d)
  7004. };
  7005. goog.exportProperty(jspb.Message, "setOneofField", jspb.Message.setOneofField);
  7006. jspb.Message.computeOneofCase = function(a, b) {
  7007. for (var c, d, e = 0; e < b.length; e++) {
  7008. var f = b[e],
  7009. g = jspb.Message.getField(a, f);
  7010. null != g && (c = f, d = g, jspb.Message.setField(a, f, void 0))
  7011. }
  7012. return c ? (jspb.Message.setField(a, c, d), c) : 0
  7013. };
  7014. goog.exportProperty(jspb.Message, "computeOneofCase", jspb.Message.computeOneofCase);
  7015. jspb.Message.getWrapperField = function(a, b, c, d) {
  7016. a.wrappers_ || (a.wrappers_ = {});
  7017. if (!a.wrappers_[c]) {
  7018. var e = jspb.Message.getField(a, c);
  7019. if (d || e) a.wrappers_[c] = new b(e)
  7020. }
  7021. return a.wrappers_[c]
  7022. };
  7023. goog.exportProperty(jspb.Message, "getWrapperField", jspb.Message.getWrapperField);
  7024. jspb.Message.getRepeatedWrapperField = function(a, b, c) {
  7025. jspb.Message.wrapRepeatedField_(a, b, c);
  7026. b = a.wrappers_[c];
  7027. b == jspb.Message.EMPTY_LIST_SENTINEL_ && (b = a.wrappers_[c] = []);
  7028. return b
  7029. };
  7030. goog.exportProperty(jspb.Message, "getRepeatedWrapperField", jspb.Message.getRepeatedWrapperField);
  7031. jspb.Message.wrapRepeatedField_ = function(a, b, c) {
  7032. a.wrappers_ || (a.wrappers_ = {});
  7033. if (!a.wrappers_[c]) {
  7034. for (var d = jspb.Message.getRepeatedField(a, c), e = [], f = 0; f < d.length; f++) e[f] = new b(d[f]);
  7035. a.wrappers_[c] = e
  7036. }
  7037. };
  7038. jspb.Message.setWrapperField = function(a, b, c) {
  7039. jspb.asserts.assertInstanceof(a, jspb.Message);
  7040. a.wrappers_ || (a.wrappers_ = {});
  7041. var d = c ? c.toArray() : c;
  7042. a.wrappers_[b] = c;
  7043. return jspb.Message.setField(a, b, d)
  7044. };
  7045. goog.exportProperty(jspb.Message, "setWrapperField", jspb.Message.setWrapperField);
  7046. jspb.Message.setOneofWrapperField = function(a, b, c, d) {
  7047. jspb.asserts.assertInstanceof(a, jspb.Message);
  7048. a.wrappers_ || (a.wrappers_ = {});
  7049. var e = d ? d.toArray() : d;
  7050. a.wrappers_[b] = d;
  7051. return jspb.Message.setOneofField(a, b, c, e)
  7052. };
  7053. goog.exportProperty(jspb.Message, "setOneofWrapperField", jspb.Message.setOneofWrapperField);
  7054. jspb.Message.setRepeatedWrapperField = function(a, b, c) {
  7055. jspb.asserts.assertInstanceof(a, jspb.Message);
  7056. a.wrappers_ || (a.wrappers_ = {});
  7057. c = c || [];
  7058. for (var d = [], e = 0; e < c.length; e++) d[e] = c[e].toArray();
  7059. a.wrappers_[b] = c;
  7060. return jspb.Message.setField(a, b, d)
  7061. };
  7062. goog.exportProperty(jspb.Message, "setRepeatedWrapperField", jspb.Message.setRepeatedWrapperField);
  7063. jspb.Message.addToRepeatedWrapperField = function(a, b, c, d, e) {
  7064. jspb.Message.wrapRepeatedField_(a, d, b);
  7065. var f = a.wrappers_[b];
  7066. f || (f = a.wrappers_[b] = []);
  7067. c = c ? c : new d;
  7068. a = jspb.Message.getRepeatedField(a, b);
  7069. void 0 != e ? (f.splice(e, 0, c), a.splice(e, 0, c.toArray())) : (f.push(c), a.push(c.toArray()));
  7070. return c
  7071. };
  7072. goog.exportProperty(jspb.Message, "addToRepeatedWrapperField", jspb.Message.addToRepeatedWrapperField);
  7073. jspb.Message.toMap = function(a, b, c, d) {
  7074. for (var e = {}, f = 0; f < a.length; f++) e[b.call(a[f])] = c ? c.call(a[f], d, a[f]) : a[f];
  7075. return e
  7076. };
  7077. goog.exportProperty(jspb.Message, "toMap", jspb.Message.toMap);
  7078. jspb.Message.prototype.syncMapFields_ = function() {
  7079. if (this.wrappers_)
  7080. for (var a in this.wrappers_) {
  7081. var b = this.wrappers_[a];
  7082. if (Array.isArray(b))
  7083. for (var c = 0; c < b.length; c++) b[c] && b[c].toArray();
  7084. else b && b.toArray()
  7085. }
  7086. };
  7087. jspb.Message.prototype.toArray = function() {
  7088. this.syncMapFields_();
  7089. return this.array
  7090. };
  7091. goog.exportProperty(jspb.Message.prototype, "toArray", jspb.Message.prototype.toArray);
  7092. jspb.Message.GENERATE_TO_STRING && (jspb.Message.prototype.toString = function() {
  7093. this.syncMapFields_();
  7094. return this.array.toString()
  7095. });
  7096. jspb.Message.prototype.getExtension = function(a) {
  7097. if (this.extensionObject_) {
  7098. this.wrappers_ || (this.wrappers_ = {});
  7099. var b = a.fieldIndex;
  7100. if (a.isRepeated) {
  7101. if (a.isMessageType()) return this.wrappers_[b] || (this.wrappers_[b] = goog.array.map(this
  7102. .extensionObject_[b] || [],
  7103. function(b) {
  7104. return new a.ctor(b)
  7105. })), this.wrappers_[b]
  7106. } else if (a.isMessageType()) return !this.wrappers_[b] && this.extensionObject_[b] && (this.wrappers_[b] =
  7107. new a.ctor(this.extensionObject_[b])), this.wrappers_[b];
  7108. return this.extensionObject_[b]
  7109. }
  7110. };
  7111. goog.exportProperty(jspb.Message.prototype, "getExtension", jspb.Message.prototype.getExtension);
  7112. jspb.Message.prototype.setExtension = function(a, b) {
  7113. this.wrappers_ || (this.wrappers_ = {});
  7114. jspb.Message.maybeInitEmptyExtensionObject_(this);
  7115. var c = a.fieldIndex;
  7116. a.isRepeated ? (b = b || [], a.isMessageType() ? (this.wrappers_[c] = b, this.extensionObject_[c] = goog.array
  7117. .map(b, function(a) {
  7118. return a.toArray()
  7119. })) : this.extensionObject_[c] = b) : a.isMessageType() ? (this.wrappers_[c] = b, this.extensionObject_[
  7120. c] = b ? b.toArray() : b) : this.extensionObject_[c] = b;
  7121. return this
  7122. };
  7123. goog.exportProperty(jspb.Message.prototype, "setExtension", jspb.Message.prototype.setExtension);
  7124. jspb.Message.difference = function(a, b) {
  7125. if (!(a instanceof b.constructor)) throw Error("Messages have different types.");
  7126. var c = a.toArray();
  7127. b = b.toArray();
  7128. var d = [],
  7129. e = 0,
  7130. f = c.length > b.length ? c.length : b.length;
  7131. a.getJsPbMessageId() && (d[0] = a.getJsPbMessageId(), e = 1);
  7132. for (; e < f; e++) jspb.Message.compareFields(c[e], b[e]) || (d[e] = b[e]);
  7133. return new a.constructor(d)
  7134. };
  7135. goog.exportProperty(jspb.Message, "difference", jspb.Message.difference);
  7136. jspb.Message.equals = function(a, b) {
  7137. return a == b || !(!a || !b) && a instanceof b.constructor && jspb.Message.compareFields(a.toArray(), b
  7138. .toArray())
  7139. };
  7140. goog.exportProperty(jspb.Message, "equals", jspb.Message.equals);
  7141. jspb.Message.compareExtensions = function(a, b) {
  7142. a = a || {};
  7143. b = b || {};
  7144. var c = {},
  7145. d;
  7146. for (d in a) c[d] = 0;
  7147. for (d in b) c[d] = 0;
  7148. for (d in c)
  7149. if (!jspb.Message.compareFields(a[d], b[d])) return !1;
  7150. return !0
  7151. };
  7152. goog.exportProperty(jspb.Message, "compareExtensions", jspb.Message.compareExtensions);
  7153. jspb.Message.compareFields = function(a, b) {
  7154. if (a == b) return !0;
  7155. if (!goog.isObject(a) || !goog.isObject(b)) return "number" === typeof a && isNaN(a) || "number" === typeof b &&
  7156. isNaN(b) ? String(a) == String(b) : !1;
  7157. if (a.constructor != b.constructor) return !1;
  7158. if (jspb.Message.SUPPORTS_UINT8ARRAY_ && a.constructor === Uint8Array) {
  7159. if (a.length != b.length) return !1;
  7160. for (var c = 0; c < a.length; c++)
  7161. if (a[c] != b[c]) return !1;
  7162. return !0
  7163. }
  7164. if (a.constructor === Array) {
  7165. var d = void 0,
  7166. e = void 0,
  7167. f = Math.max(a.length, b.length);
  7168. for (c = 0; c < f; c++) {
  7169. var g = a[c],
  7170. h = b[c];
  7171. g &&
  7172. g.constructor == Object && (jspb.asserts.assert(void 0 === d), jspb.asserts.assert(c === a.length -
  7173. 1), d = g, g = void 0);
  7174. h && h.constructor == Object && (jspb.asserts.assert(void 0 === e), jspb.asserts.assert(c === b.length -
  7175. 1), e = h, h = void 0);
  7176. if (!jspb.Message.compareFields(g, h)) return !1
  7177. }
  7178. return d || e ? (d = d || {}, e = e || {}, jspb.Message.compareExtensions(d, e)) : !0
  7179. }
  7180. if (a.constructor === Object) return jspb.Message.compareExtensions(a, b);
  7181. throw Error("Invalid type in JSPB array");
  7182. };
  7183. goog.exportProperty(jspb.Message, "compareFields", jspb.Message.compareFields);
  7184. jspb.Message.prototype.cloneMessage = function() {
  7185. return jspb.Message.cloneMessage(this)
  7186. };
  7187. goog.exportProperty(jspb.Message.prototype, "cloneMessage", jspb.Message.prototype.cloneMessage);
  7188. jspb.Message.prototype.clone = function() {
  7189. return jspb.Message.cloneMessage(this)
  7190. };
  7191. goog.exportProperty(jspb.Message.prototype, "clone", jspb.Message.prototype.clone);
  7192. jspb.Message.clone = function(a) {
  7193. return jspb.Message.cloneMessage(a)
  7194. };
  7195. goog.exportProperty(jspb.Message, "clone", jspb.Message.clone);
  7196. jspb.Message.cloneMessage = function(a) {
  7197. return new a.constructor(jspb.Message.clone_(a.toArray()))
  7198. };
  7199. jspb.Message.copyInto = function(a, b) {
  7200. jspb.asserts.assertInstanceof(a, jspb.Message);
  7201. jspb.asserts.assertInstanceof(b, jspb.Message);
  7202. jspb.asserts.assert(a.constructor == b.constructor,
  7203. "Copy source and target message should have the same type.");
  7204. a = jspb.Message.clone(a);
  7205. for (var c = b.toArray(), d = a.toArray(), e = c.length = 0; e < d.length; e++) c[e] = d[e];
  7206. b.wrappers_ = a.wrappers_;
  7207. b.extensionObject_ = a.extensionObject_
  7208. };
  7209. goog.exportProperty(jspb.Message, "copyInto", jspb.Message.copyInto);
  7210. jspb.Message.clone_ = function(a) {
  7211. if (Array.isArray(a)) {
  7212. for (var b = Array(a.length), c = 0; c < a.length; c++) {
  7213. var d = a[c];
  7214. null != d && (b[c] = "object" == typeof d ? jspb.Message.clone_(jspb.asserts.assert(d)) : d)
  7215. }
  7216. return b
  7217. }
  7218. if (jspb.Message.SUPPORTS_UINT8ARRAY_ && a instanceof Uint8Array) return new Uint8Array(a);
  7219. b = {};
  7220. for (c in a) d = a[c], null != d && (b[c] = "object" == typeof d ? jspb.Message.clone_(jspb.asserts.assert(d)) :
  7221. d);
  7222. return b
  7223. };
  7224. jspb.Message.registerMessageType = function(a, b) {
  7225. b.messageId = a
  7226. };
  7227. goog.exportProperty(jspb.Message, "registerMessageType", jspb.Message.registerMessageType);
  7228. jspb.Message.messageSetExtensions = {};
  7229. jspb.Message.messageSetExtensionsBinary = {};
  7230. jspb.Export = {};
  7231. "object" === typeof exports && (exports.Map = jspb.Map, exports.Message = jspb.Message, exports.BinaryReader = jspb
  7232. .BinaryReader, exports.BinaryWriter = jspb.BinaryWriter, exports.ExtensionFieldInfo = jspb.ExtensionFieldInfo,
  7233. exports.ExtensionFieldBinaryInfo = jspb.ExtensionFieldBinaryInfo, exports.exportSymbol = goog.exportSymbol,
  7234. exports.inherits = goog.inherits, exports.object = {
  7235. extend: goog.object.extend
  7236. }, exports.typeOf = goog.typeOf);