pdf.combined.js 1.8 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879
  1. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  3. /* Copyright 2012 Mozilla Foundation
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /*jshint globalstrict: false */
  18. // Initializing PDFJS global object (if still undefined)
  19. if (typeof PDFJS === 'undefined') {
  20. (typeof window !== 'undefined' ? window : this).PDFJS = {};
  21. }
  22. PDFJS.version = '1.0.439';
  23. PDFJS.build = '2e98f90';
  24. (function pdfjsWrapper() {
  25. // Use strict in our context only - users might not want it
  26. 'use strict';
  27. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  29. /* Copyright 2012 Mozilla Foundation
  30. *
  31. * Licensed under the Apache License, Version 2.0 (the "License");
  32. * you may not use this file except in compliance with the License.
  33. * You may obtain a copy of the License at
  34. *
  35. * http://www.apache.org/licenses/LICENSE-2.0
  36. *
  37. * Unless required by applicable law or agreed to in writing, software
  38. * distributed under the License is distributed on an "AS IS" BASIS,
  39. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  40. * See the License for the specific language governing permissions and
  41. * limitations under the License.
  42. */
  43. /* globals Cmd, ColorSpace, Dict, MozBlobBuilder, Name, PDFJS, Ref, URL,
  44. Promise */
  45. 'use strict';
  46. var globalScope = (typeof window === 'undefined') ? this : window;
  47. var isWorker = (typeof window == 'undefined');
  48. var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
  49. var TextRenderingMode = {
  50. FILL: 0,
  51. STROKE: 1,
  52. FILL_STROKE: 2,
  53. INVISIBLE: 3,
  54. FILL_ADD_TO_PATH: 4,
  55. STROKE_ADD_TO_PATH: 5,
  56. FILL_STROKE_ADD_TO_PATH: 6,
  57. ADD_TO_PATH: 7,
  58. FILL_STROKE_MASK: 3,
  59. ADD_TO_PATH_FLAG: 4
  60. };
  61. var ImageKind = {
  62. GRAYSCALE_1BPP: 1,
  63. RGB_24BPP: 2,
  64. RGBA_32BPP: 3
  65. };
  66. var AnnotationType = {
  67. WIDGET: 1,
  68. TEXT: 2,
  69. LINK: 3
  70. };
  71. var StreamType = {
  72. UNKNOWN: 0,
  73. FLATE: 1,
  74. LZW: 2,
  75. DCT: 3,
  76. JPX: 4,
  77. JBIG: 5,
  78. A85: 6,
  79. AHX: 7,
  80. CCF: 8,
  81. RL: 9
  82. };
  83. var FontType = {
  84. UNKNOWN: 0,
  85. TYPE1: 1,
  86. TYPE1C: 2,
  87. CIDFONTTYPE0: 3,
  88. CIDFONTTYPE0C: 4,
  89. TRUETYPE: 5,
  90. CIDFONTTYPE2: 6,
  91. TYPE3: 7,
  92. OPENTYPE: 8,
  93. TYPE0: 9,
  94. MMTYPE1: 10
  95. };
  96. // The global PDFJS object exposes the API
  97. // In production, it will be declared outside a global wrapper
  98. // In development, it will be declared here
  99. if (!globalScope.PDFJS) {
  100. globalScope.PDFJS = {};
  101. }
  102. globalScope.PDFJS.pdfBug = false;
  103. PDFJS.VERBOSITY_LEVELS = {
  104. errors: 0,
  105. warnings: 1,
  106. infos: 5
  107. };
  108. // All the possible operations for an operator list.
  109. var OPS = PDFJS.OPS = {
  110. // Intentionally start from 1 so it is easy to spot bad operators that will be
  111. // 0's.
  112. dependency: 1,
  113. setLineWidth: 2,
  114. setLineCap: 3,
  115. setLineJoin: 4,
  116. setMiterLimit: 5,
  117. setDash: 6,
  118. setRenderingIntent: 7,
  119. setFlatness: 8,
  120. setGState: 9,
  121. save: 10,
  122. restore: 11,
  123. transform: 12,
  124. moveTo: 13,
  125. lineTo: 14,
  126. curveTo: 15,
  127. curveTo2: 16,
  128. curveTo3: 17,
  129. closePath: 18,
  130. rectangle: 19,
  131. stroke: 20,
  132. closeStroke: 21,
  133. fill: 22,
  134. eoFill: 23,
  135. fillStroke: 24,
  136. eoFillStroke: 25,
  137. closeFillStroke: 26,
  138. closeEOFillStroke: 27,
  139. endPath: 28,
  140. clip: 29,
  141. eoClip: 30,
  142. beginText: 31,
  143. endText: 32,
  144. setCharSpacing: 33,
  145. setWordSpacing: 34,
  146. setHScale: 35,
  147. setLeading: 36,
  148. setFont: 37,
  149. setTextRenderingMode: 38,
  150. setTextRise: 39,
  151. moveText: 40,
  152. setLeadingMoveText: 41,
  153. setTextMatrix: 42,
  154. nextLine: 43,
  155. showText: 44,
  156. showSpacedText: 45,
  157. nextLineShowText: 46,
  158. nextLineSetSpacingShowText: 47,
  159. setCharWidth: 48,
  160. setCharWidthAndBounds: 49,
  161. setStrokeColorSpace: 50,
  162. setFillColorSpace: 51,
  163. setStrokeColor: 52,
  164. setStrokeColorN: 53,
  165. setFillColor: 54,
  166. setFillColorN: 55,
  167. setStrokeGray: 56,
  168. setFillGray: 57,
  169. setStrokeRGBColor: 58,
  170. setFillRGBColor: 59,
  171. setStrokeCMYKColor: 60,
  172. setFillCMYKColor: 61,
  173. shadingFill: 62,
  174. beginInlineImage: 63,
  175. beginImageData: 64,
  176. endInlineImage: 65,
  177. paintXObject: 66,
  178. markPoint: 67,
  179. markPointProps: 68,
  180. beginMarkedContent: 69,
  181. beginMarkedContentProps: 70,
  182. endMarkedContent: 71,
  183. beginCompat: 72,
  184. endCompat: 73,
  185. paintFormXObjectBegin: 74,
  186. paintFormXObjectEnd: 75,
  187. beginGroup: 76,
  188. endGroup: 77,
  189. beginAnnotations: 78,
  190. endAnnotations: 79,
  191. beginAnnotation: 80,
  192. endAnnotation: 81,
  193. paintJpegXObject: 82,
  194. paintImageMaskXObject: 83,
  195. paintImageMaskXObjectGroup: 84,
  196. paintImageXObject: 85,
  197. paintInlineImageXObject: 86,
  198. paintInlineImageXObjectGroup: 87,
  199. paintImageXObjectRepeat: 88,
  200. paintImageMaskXObjectRepeat: 89,
  201. paintSolidColorImageMask: 90,
  202. constructPath: 91
  203. };
  204. // A notice for devs. These are good for things that are helpful to devs, such
  205. // as warning that Workers were disabled, which is important to devs but not
  206. // end users.
  207. function info(msg) {
  208. if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.infos) {
  209. console.log('Info: ' + msg);
  210. }
  211. }
  212. // Non-fatal warnings.
  213. function warn(msg) {
  214. if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.warnings) {
  215. console.log('Warning: ' + msg);
  216. }
  217. }
  218. // Fatal errors that should trigger the fallback UI and halt execution by
  219. // throwing an exception.
  220. function error(msg) {
  221. // If multiple arguments were passed, pass them all to the log function.
  222. if (arguments.length > 1) {
  223. var logArguments = ['Error:'];
  224. logArguments.push.apply(logArguments, arguments);
  225. console.log.apply(console, logArguments);
  226. // Join the arguments into a single string for the lines below.
  227. msg = [].join.call(arguments, ' ');
  228. } else {
  229. console.log('Error: ' + msg);
  230. }
  231. console.log(backtrace());
  232. UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);
  233. throw new Error(msg);
  234. }
  235. function backtrace() {
  236. try {
  237. throw new Error();
  238. } catch (e) {
  239. return e.stack ? e.stack.split('\n').slice(2).join('\n') : '';
  240. }
  241. }
  242. function assert(cond, msg) {
  243. if (!cond) {
  244. error(msg);
  245. }
  246. }
  247. var UNSUPPORTED_FEATURES = PDFJS.UNSUPPORTED_FEATURES = {
  248. unknown: 'unknown',
  249. forms: 'forms',
  250. javaScript: 'javaScript',
  251. smask: 'smask',
  252. shadingPattern: 'shadingPattern',
  253. font: 'font'
  254. };
  255. var UnsupportedManager = PDFJS.UnsupportedManager =
  256. (function UnsupportedManagerClosure() {
  257. var listeners = [];
  258. return {
  259. listen: function (cb) {
  260. listeners.push(cb);
  261. },
  262. notify: function (featureId) {
  263. warn('Unsupported feature "' + featureId + '"');
  264. for (var i = 0, ii = listeners.length; i < ii; i++) {
  265. listeners[i](featureId);
  266. }
  267. }
  268. };
  269. })();
  270. // Combines two URLs. The baseUrl shall be absolute URL. If the url is an
  271. // absolute URL, it will be returned as is.
  272. function combineUrl(baseUrl, url) {
  273. if (!url) {
  274. return baseUrl;
  275. }
  276. if (/^[a-z][a-z0-9+\-.]*:/i.test(url)) {
  277. return url;
  278. }
  279. var i;
  280. if (url.charAt(0) == '/') {
  281. // absolute path
  282. i = baseUrl.indexOf('://');
  283. if (url.charAt(1) === '/') {
  284. ++i;
  285. } else {
  286. i = baseUrl.indexOf('/', i + 3);
  287. }
  288. return baseUrl.substring(0, i) + url;
  289. } else {
  290. // relative path
  291. var pathLength = baseUrl.length;
  292. i = baseUrl.lastIndexOf('#');
  293. pathLength = i >= 0 ? i : pathLength;
  294. i = baseUrl.lastIndexOf('?', pathLength);
  295. pathLength = i >= 0 ? i : pathLength;
  296. var prefixLength = baseUrl.lastIndexOf('/', pathLength);
  297. return baseUrl.substring(0, prefixLength + 1) + url;
  298. }
  299. }
  300. // Validates if URL is safe and allowed, e.g. to avoid XSS.
  301. function isValidUrl(url, allowRelative) {
  302. if (!url) {
  303. return false;
  304. }
  305. // RFC 3986 (http://tools.ietf.org/html/rfc3986#section-3.1)
  306. // scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  307. var protocol = /^[a-z][a-z0-9+\-.]*(?=:)/i.exec(url);
  308. if (!protocol) {
  309. return allowRelative;
  310. }
  311. protocol = protocol[0].toLowerCase();
  312. switch (protocol) {
  313. case 'http':
  314. case 'https':
  315. case 'ftp':
  316. case 'mailto':
  317. return true;
  318. default:
  319. return false;
  320. }
  321. }
  322. PDFJS.isValidUrl = isValidUrl;
  323. function shadow(obj, prop, value) {
  324. Object.defineProperty(obj, prop, { value: value,
  325. enumerable: true,
  326. configurable: true,
  327. writable: false });
  328. return value;
  329. }
  330. var PasswordResponses = PDFJS.PasswordResponses = {
  331. NEED_PASSWORD: 1,
  332. INCORRECT_PASSWORD: 2
  333. };
  334. var PasswordException = (function PasswordExceptionClosure() {
  335. function PasswordException(msg, code) {
  336. this.name = 'PasswordException';
  337. this.message = msg;
  338. this.code = code;
  339. }
  340. PasswordException.prototype = new Error();
  341. PasswordException.constructor = PasswordException;
  342. return PasswordException;
  343. })();
  344. var UnknownErrorException = (function UnknownErrorExceptionClosure() {
  345. function UnknownErrorException(msg, details) {
  346. this.name = 'UnknownErrorException';
  347. this.message = msg;
  348. this.details = details;
  349. }
  350. UnknownErrorException.prototype = new Error();
  351. UnknownErrorException.constructor = UnknownErrorException;
  352. return UnknownErrorException;
  353. })();
  354. var InvalidPDFException = (function InvalidPDFExceptionClosure() {
  355. function InvalidPDFException(msg) {
  356. this.name = 'InvalidPDFException';
  357. this.message = msg;
  358. }
  359. InvalidPDFException.prototype = new Error();
  360. InvalidPDFException.constructor = InvalidPDFException;
  361. return InvalidPDFException;
  362. })();
  363. var MissingPDFException = (function MissingPDFExceptionClosure() {
  364. function MissingPDFException(msg) {
  365. this.name = 'MissingPDFException';
  366. this.message = msg;
  367. }
  368. MissingPDFException.prototype = new Error();
  369. MissingPDFException.constructor = MissingPDFException;
  370. return MissingPDFException;
  371. })();
  372. var NotImplementedException = (function NotImplementedExceptionClosure() {
  373. function NotImplementedException(msg) {
  374. this.message = msg;
  375. }
  376. NotImplementedException.prototype = new Error();
  377. NotImplementedException.prototype.name = 'NotImplementedException';
  378. NotImplementedException.constructor = NotImplementedException;
  379. return NotImplementedException;
  380. })();
  381. var MissingDataException = (function MissingDataExceptionClosure() {
  382. function MissingDataException(begin, end) {
  383. this.begin = begin;
  384. this.end = end;
  385. this.message = 'Missing data [' + begin + ', ' + end + ')';
  386. }
  387. MissingDataException.prototype = new Error();
  388. MissingDataException.prototype.name = 'MissingDataException';
  389. MissingDataException.constructor = MissingDataException;
  390. return MissingDataException;
  391. })();
  392. var XRefParseException = (function XRefParseExceptionClosure() {
  393. function XRefParseException(msg) {
  394. this.message = msg;
  395. }
  396. XRefParseException.prototype = new Error();
  397. XRefParseException.prototype.name = 'XRefParseException';
  398. XRefParseException.constructor = XRefParseException;
  399. return XRefParseException;
  400. })();
  401. function bytesToString(bytes) {
  402. var length = bytes.length;
  403. var MAX_ARGUMENT_COUNT = 8192;
  404. if (length < MAX_ARGUMENT_COUNT) {
  405. return String.fromCharCode.apply(null, bytes);
  406. }
  407. var strBuf = [];
  408. for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) {
  409. var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);
  410. var chunk = bytes.subarray(i, chunkEnd);
  411. strBuf.push(String.fromCharCode.apply(null, chunk));
  412. }
  413. return strBuf.join('');
  414. }
  415. function stringToArray(str) {
  416. var length = str.length;
  417. var array = [];
  418. for (var i = 0; i < length; ++i) {
  419. array[i] = str.charCodeAt(i);
  420. }
  421. return array;
  422. }
  423. function stringToBytes(str) {
  424. var length = str.length;
  425. var bytes = new Uint8Array(length);
  426. for (var i = 0; i < length; ++i) {
  427. bytes[i] = str.charCodeAt(i) & 0xFF;
  428. }
  429. return bytes;
  430. }
  431. function string32(value) {
  432. return String.fromCharCode((value >> 24) & 0xff, (value >> 16) & 0xff,
  433. (value >> 8) & 0xff, value & 0xff);
  434. }
  435. function log2(x) {
  436. var n = 1, i = 0;
  437. while (x > n) {
  438. n <<= 1;
  439. i++;
  440. }
  441. return i;
  442. }
  443. function readInt8(data, start) {
  444. return (data[start] << 24) >> 24;
  445. }
  446. function readUint16(data, offset) {
  447. return (data[offset] << 8) | data[offset + 1];
  448. }
  449. function readUint32(data, offset) {
  450. return ((data[offset] << 24) | (data[offset + 1] << 16) |
  451. (data[offset + 2] << 8) | data[offset + 3]) >>> 0;
  452. }
  453. // Lazy test the endianness of the platform
  454. // NOTE: This will be 'true' for simulated TypedArrays
  455. function isLittleEndian() {
  456. var buffer8 = new Uint8Array(2);
  457. buffer8[0] = 1;
  458. var buffer16 = new Uint16Array(buffer8.buffer);
  459. return (buffer16[0] === 1);
  460. }
  461. Object.defineProperty(PDFJS, 'isLittleEndian', {
  462. configurable: true,
  463. get: function PDFJS_isLittleEndian() {
  464. return shadow(PDFJS, 'isLittleEndian', isLittleEndian());
  465. }
  466. });
  467. // Lazy test if the userAgant support CanvasTypedArrays
  468. function hasCanvasTypedArrays() {
  469. var canvas = document.createElement('canvas');
  470. canvas.width = canvas.height = 1;
  471. var ctx = canvas.getContext('2d');
  472. var imageData = ctx.createImageData(1, 1);
  473. return (typeof imageData.data.buffer !== 'undefined');
  474. }
  475. Object.defineProperty(PDFJS, 'hasCanvasTypedArrays', {
  476. configurable: true,
  477. get: function PDFJS_hasCanvasTypedArrays() {
  478. return shadow(PDFJS, 'hasCanvasTypedArrays', hasCanvasTypedArrays());
  479. }
  480. });
  481. var Uint32ArrayView = (function Uint32ArrayViewClosure() {
  482. function Uint32ArrayView(buffer, length) {
  483. this.buffer = buffer;
  484. this.byteLength = buffer.length;
  485. this.length = length === undefined ? (this.byteLength >> 2) : length;
  486. ensureUint32ArrayViewProps(this.length);
  487. }
  488. Uint32ArrayView.prototype = Object.create(null);
  489. var uint32ArrayViewSetters = 0;
  490. function createUint32ArrayProp(index) {
  491. return {
  492. get: function () {
  493. var buffer = this.buffer, offset = index << 2;
  494. return (buffer[offset] | (buffer[offset + 1] << 8) |
  495. (buffer[offset + 2] << 16) | (buffer[offset + 3] << 24)) >>> 0;
  496. },
  497. set: function (value) {
  498. var buffer = this.buffer, offset = index << 2;
  499. buffer[offset] = value & 255;
  500. buffer[offset + 1] = (value >> 8) & 255;
  501. buffer[offset + 2] = (value >> 16) & 255;
  502. buffer[offset + 3] = (value >>> 24) & 255;
  503. }
  504. };
  505. }
  506. function ensureUint32ArrayViewProps(length) {
  507. while (uint32ArrayViewSetters < length) {
  508. Object.defineProperty(Uint32ArrayView.prototype,
  509. uint32ArrayViewSetters,
  510. createUint32ArrayProp(uint32ArrayViewSetters));
  511. uint32ArrayViewSetters++;
  512. }
  513. }
  514. return Uint32ArrayView;
  515. })();
  516. var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
  517. var Util = PDFJS.Util = (function UtilClosure() {
  518. function Util() {}
  519. Util.makeCssRgb = function Util_makeCssRgb(rgb) {
  520. return 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')';
  521. };
  522. // Concatenates two transformation matrices together and returns the result.
  523. Util.transform = function Util_transform(m1, m2) {
  524. return [
  525. m1[0] * m2[0] + m1[2] * m2[1],
  526. m1[1] * m2[0] + m1[3] * m2[1],
  527. m1[0] * m2[2] + m1[2] * m2[3],
  528. m1[1] * m2[2] + m1[3] * m2[3],
  529. m1[0] * m2[4] + m1[2] * m2[5] + m1[4],
  530. m1[1] * m2[4] + m1[3] * m2[5] + m1[5]
  531. ];
  532. };
  533. // For 2d affine transforms
  534. Util.applyTransform = function Util_applyTransform(p, m) {
  535. var xt = p[0] * m[0] + p[1] * m[2] + m[4];
  536. var yt = p[0] * m[1] + p[1] * m[3] + m[5];
  537. return [xt, yt];
  538. };
  539. Util.applyInverseTransform = function Util_applyInverseTransform(p, m) {
  540. var d = m[0] * m[3] - m[1] * m[2];
  541. var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
  542. var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
  543. return [xt, yt];
  544. };
  545. // Applies the transform to the rectangle and finds the minimum axially
  546. // aligned bounding box.
  547. Util.getAxialAlignedBoundingBox =
  548. function Util_getAxialAlignedBoundingBox(r, m) {
  549. var p1 = Util.applyTransform(r, m);
  550. var p2 = Util.applyTransform(r.slice(2, 4), m);
  551. var p3 = Util.applyTransform([r[0], r[3]], m);
  552. var p4 = Util.applyTransform([r[2], r[1]], m);
  553. return [
  554. Math.min(p1[0], p2[0], p3[0], p4[0]),
  555. Math.min(p1[1], p2[1], p3[1], p4[1]),
  556. Math.max(p1[0], p2[0], p3[0], p4[0]),
  557. Math.max(p1[1], p2[1], p3[1], p4[1])
  558. ];
  559. };
  560. Util.inverseTransform = function Util_inverseTransform(m) {
  561. var d = m[0] * m[3] - m[1] * m[2];
  562. return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d,
  563. (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
  564. };
  565. // Apply a generic 3d matrix M on a 3-vector v:
  566. // | a b c | | X |
  567. // | d e f | x | Y |
  568. // | g h i | | Z |
  569. // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],
  570. // with v as [X,Y,Z]
  571. Util.apply3dTransform = function Util_apply3dTransform(m, v) {
  572. return [
  573. m[0] * v[0] + m[1] * v[1] + m[2] * v[2],
  574. m[3] * v[0] + m[4] * v[1] + m[5] * v[2],
  575. m[6] * v[0] + m[7] * v[1] + m[8] * v[2]
  576. ];
  577. };
  578. // This calculation uses Singular Value Decomposition.
  579. // The SVD can be represented with formula A = USV. We are interested in the
  580. // matrix S here because it represents the scale values.
  581. Util.singularValueDecompose2dScale =
  582. function Util_singularValueDecompose2dScale(m) {
  583. var transpose = [m[0], m[2], m[1], m[3]];
  584. // Multiply matrix m with its transpose.
  585. var a = m[0] * transpose[0] + m[1] * transpose[2];
  586. var b = m[0] * transpose[1] + m[1] * transpose[3];
  587. var c = m[2] * transpose[0] + m[3] * transpose[2];
  588. var d = m[2] * transpose[1] + m[3] * transpose[3];
  589. // Solve the second degree polynomial to get roots.
  590. var first = (a + d) / 2;
  591. var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2;
  592. var sx = first + second || 1;
  593. var sy = first - second || 1;
  594. // Scale values are the square roots of the eigenvalues.
  595. return [Math.sqrt(sx), Math.sqrt(sy)];
  596. };
  597. // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)
  598. // For coordinate systems whose origin lies in the bottom-left, this
  599. // means normalization to (BL,TR) ordering. For systems with origin in the
  600. // top-left, this means (TL,BR) ordering.
  601. Util.normalizeRect = function Util_normalizeRect(rect) {
  602. var r = rect.slice(0); // clone rect
  603. if (rect[0] > rect[2]) {
  604. r[0] = rect[2];
  605. r[2] = rect[0];
  606. }
  607. if (rect[1] > rect[3]) {
  608. r[1] = rect[3];
  609. r[3] = rect[1];
  610. }
  611. return r;
  612. };
  613. // Returns a rectangle [x1, y1, x2, y2] corresponding to the
  614. // intersection of rect1 and rect2. If no intersection, returns 'false'
  615. // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]
  616. Util.intersect = function Util_intersect(rect1, rect2) {
  617. function compare(a, b) {
  618. return a - b;
  619. }
  620. // Order points along the axes
  621. var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare),
  622. orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare),
  623. result = [];
  624. rect1 = Util.normalizeRect(rect1);
  625. rect2 = Util.normalizeRect(rect2);
  626. // X: first and second points belong to different rectangles?
  627. if ((orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) ||
  628. (orderedX[0] === rect2[0] && orderedX[1] === rect1[0])) {
  629. // Intersection must be between second and third points
  630. result[0] = orderedX[1];
  631. result[2] = orderedX[2];
  632. } else {
  633. return false;
  634. }
  635. // Y: first and second points belong to different rectangles?
  636. if ((orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) ||
  637. (orderedY[0] === rect2[1] && orderedY[1] === rect1[1])) {
  638. // Intersection must be between second and third points
  639. result[1] = orderedY[1];
  640. result[3] = orderedY[2];
  641. } else {
  642. return false;
  643. }
  644. return result;
  645. };
  646. Util.sign = function Util_sign(num) {
  647. return num < 0 ? -1 : 1;
  648. };
  649. Util.appendToArray = function Util_appendToArray(arr1, arr2) {
  650. Array.prototype.push.apply(arr1, arr2);
  651. };
  652. Util.prependToArray = function Util_prependToArray(arr1, arr2) {
  653. Array.prototype.unshift.apply(arr1, arr2);
  654. };
  655. Util.extendObj = function extendObj(obj1, obj2) {
  656. for (var key in obj2) {
  657. obj1[key] = obj2[key];
  658. }
  659. };
  660. Util.getInheritableProperty = function Util_getInheritableProperty(dict,
  661. name) {
  662. while (dict && !dict.has(name)) {
  663. dict = dict.get('Parent');
  664. }
  665. if (!dict) {
  666. return null;
  667. }
  668. return dict.get(name);
  669. };
  670. Util.inherit = function Util_inherit(sub, base, prototype) {
  671. sub.prototype = Object.create(base.prototype);
  672. sub.prototype.constructor = sub;
  673. for (var prop in prototype) {
  674. sub.prototype[prop] = prototype[prop];
  675. }
  676. };
  677. Util.loadScript = function Util_loadScript(src, callback) {
  678. var script = document.createElement('script');
  679. var loaded = false;
  680. script.setAttribute('src', src);
  681. if (callback) {
  682. script.onload = function() {
  683. if (!loaded) {
  684. callback();
  685. }
  686. loaded = true;
  687. };
  688. }
  689. document.getElementsByTagName('head')[0].appendChild(script);
  690. };
  691. return Util;
  692. })();
  693. /**
  694. * PDF page viewport created based on scale, rotation and offset.
  695. * @class
  696. * @alias PDFJS.PageViewport
  697. */
  698. var PageViewport = PDFJS.PageViewport = (function PageViewportClosure() {
  699. /**
  700. * @constructor
  701. * @private
  702. * @param viewBox {Array} xMin, yMin, xMax and yMax coordinates.
  703. * @param scale {number} scale of the viewport.
  704. * @param rotation {number} rotations of the viewport in degrees.
  705. * @param offsetX {number} offset X
  706. * @param offsetY {number} offset Y
  707. * @param dontFlip {boolean} if true, axis Y will not be flipped.
  708. */
  709. function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) {
  710. this.viewBox = viewBox;
  711. this.scale = scale;
  712. this.rotation = rotation;
  713. this.offsetX = offsetX;
  714. this.offsetY = offsetY;
  715. // creating transform to convert pdf coordinate system to the normal
  716. // canvas like coordinates taking in account scale and rotation
  717. var centerX = (viewBox[2] + viewBox[0]) / 2;
  718. var centerY = (viewBox[3] + viewBox[1]) / 2;
  719. var rotateA, rotateB, rotateC, rotateD;
  720. rotation = rotation % 360;
  721. rotation = rotation < 0 ? rotation + 360 : rotation;
  722. switch (rotation) {
  723. case 180:
  724. rotateA = -1; rotateB = 0; rotateC = 0; rotateD = 1;
  725. break;
  726. case 90:
  727. rotateA = 0; rotateB = 1; rotateC = 1; rotateD = 0;
  728. break;
  729. case 270:
  730. rotateA = 0; rotateB = -1; rotateC = -1; rotateD = 0;
  731. break;
  732. //case 0:
  733. default:
  734. rotateA = 1; rotateB = 0; rotateC = 0; rotateD = -1;
  735. break;
  736. }
  737. if (dontFlip) {
  738. rotateC = -rotateC; rotateD = -rotateD;
  739. }
  740. var offsetCanvasX, offsetCanvasY;
  741. var width, height;
  742. if (rotateA === 0) {
  743. offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;
  744. offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;
  745. width = Math.abs(viewBox[3] - viewBox[1]) * scale;
  746. height = Math.abs(viewBox[2] - viewBox[0]) * scale;
  747. } else {
  748. offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;
  749. offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;
  750. width = Math.abs(viewBox[2] - viewBox[0]) * scale;
  751. height = Math.abs(viewBox[3] - viewBox[1]) * scale;
  752. }
  753. // creating transform for the following operations:
  754. // translate(-centerX, -centerY), rotate and flip vertically,
  755. // scale, and translate(offsetCanvasX, offsetCanvasY)
  756. this.transform = [
  757. rotateA * scale,
  758. rotateB * scale,
  759. rotateC * scale,
  760. rotateD * scale,
  761. offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,
  762. offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY
  763. ];
  764. this.width = width;
  765. this.height = height;
  766. this.fontScale = scale;
  767. }
  768. PageViewport.prototype = /** @lends PDFJS.PageViewport.prototype */ {
  769. /**
  770. * Clones viewport with additional properties.
  771. * @param args {Object} (optional) If specified, may contain the 'scale' or
  772. * 'rotation' properties to override the corresponding properties in
  773. * the cloned viewport.
  774. * @returns {PDFJS.PageViewport} Cloned viewport.
  775. */
  776. clone: function PageViewPort_clone(args) {
  777. args = args || {};
  778. var scale = 'scale' in args ? args.scale : this.scale;
  779. var rotation = 'rotation' in args ? args.rotation : this.rotation;
  780. return new PageViewport(this.viewBox.slice(), scale, rotation,
  781. this.offsetX, this.offsetY, args.dontFlip);
  782. },
  783. /**
  784. * Converts PDF point to the viewport coordinates. For examples, useful for
  785. * converting PDF location into canvas pixel coordinates.
  786. * @param x {number} X coordinate.
  787. * @param y {number} Y coordinate.
  788. * @returns {Object} Object that contains 'x' and 'y' properties of the
  789. * point in the viewport coordinate space.
  790. * @see {@link convertToPdfPoint}
  791. * @see {@link convertToViewportRectangle}
  792. */
  793. convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) {
  794. return Util.applyTransform([x, y], this.transform);
  795. },
  796. /**
  797. * Converts PDF rectangle to the viewport coordinates.
  798. * @param rect {Array} xMin, yMin, xMax and yMax coordinates.
  799. * @returns {Array} Contains corresponding coordinates of the rectangle
  800. * in the viewport coordinate space.
  801. * @see {@link convertToViewportPoint}
  802. */
  803. convertToViewportRectangle:
  804. function PageViewport_convertToViewportRectangle(rect) {
  805. var tl = Util.applyTransform([rect[0], rect[1]], this.transform);
  806. var br = Util.applyTransform([rect[2], rect[3]], this.transform);
  807. return [tl[0], tl[1], br[0], br[1]];
  808. },
  809. /**
  810. * Converts viewport coordinates to the PDF location. For examples, useful
  811. * for converting canvas pixel location into PDF one.
  812. * @param x {number} X coordinate.
  813. * @param y {number} Y coordinate.
  814. * @returns {Object} Object that contains 'x' and 'y' properties of the
  815. * point in the PDF coordinate space.
  816. * @see {@link convertToViewportPoint}
  817. */
  818. convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) {
  819. return Util.applyInverseTransform([x, y], this.transform);
  820. }
  821. };
  822. return PageViewport;
  823. })();
  824. var PDFStringTranslateTable = [
  825. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  826. 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,
  827. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  828. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  829. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  830. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014,
  831. 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C,
  832. 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160,
  833. 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC
  834. ];
  835. function stringToPDFString(str) {
  836. var i, n = str.length, strBuf = [];
  837. if (str[0] === '\xFE' && str[1] === '\xFF') {
  838. // UTF16BE BOM
  839. for (i = 2; i < n; i += 2) {
  840. strBuf.push(String.fromCharCode(
  841. (str.charCodeAt(i) << 8) | str.charCodeAt(i + 1)));
  842. }
  843. } else {
  844. for (i = 0; i < n; ++i) {
  845. var code = PDFStringTranslateTable[str.charCodeAt(i)];
  846. strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));
  847. }
  848. }
  849. return strBuf.join('');
  850. }
  851. function stringToUTF8String(str) {
  852. return decodeURIComponent(escape(str));
  853. }
  854. function isEmptyObj(obj) {
  855. for (var key in obj) {
  856. return false;
  857. }
  858. return true;
  859. }
  860. function isBool(v) {
  861. return typeof v == 'boolean';
  862. }
  863. function isInt(v) {
  864. return typeof v === 'number' && ((v | 0) === v);
  865. }
  866. function isNum(v) {
  867. return typeof v === 'number';
  868. }
  869. function isString(v) {
  870. return typeof v === 'string';
  871. }
  872. function isNull(v) {
  873. return v === null;
  874. }
  875. function isName(v) {
  876. return v instanceof Name;
  877. }
  878. function isCmd(v, cmd) {
  879. return v instanceof Cmd && (cmd === undefined || v.cmd === cmd);
  880. }
  881. function isDict(v, type) {
  882. if (!(v instanceof Dict)) {
  883. return false;
  884. }
  885. if (!type) {
  886. return true;
  887. }
  888. var dictType = v.get('Type');
  889. return isName(dictType) && dictType.name === type;
  890. }
  891. function isArray(v) {
  892. return v instanceof Array;
  893. }
  894. function isStream(v) {
  895. return typeof v === 'object' && v !== null && v.getBytes !== undefined;
  896. }
  897. function isArrayBuffer(v) {
  898. return typeof v === 'object' && v !== null && v.byteLength !== undefined;
  899. }
  900. function isRef(v) {
  901. return v instanceof Ref;
  902. }
  903. /**
  904. * Promise Capability object.
  905. *
  906. * @typedef {Object} PromiseCapability
  907. * @property {Promise} promise - A promise object.
  908. * @property {function} resolve - Fullfills the promise.
  909. * @property {function} reject - Rejects the promise.
  910. */
  911. /**
  912. * Creates a promise capability object.
  913. * @alias PDFJS.createPromiseCapability
  914. *
  915. * @return {PromiseCapability} A capability object contains:
  916. * - a Promise, resolve and reject methods.
  917. */
  918. function createPromiseCapability() {
  919. var capability = {};
  920. capability.promise = new Promise(function (resolve, reject) {
  921. capability.resolve = resolve;
  922. capability.reject = reject;
  923. });
  924. return capability;
  925. }
  926. PDFJS.createPromiseCapability = createPromiseCapability;
  927. /**
  928. * Polyfill for Promises:
  929. * The following promise implementation tries to generally implement the
  930. * Promise/A+ spec. Some notable differences from other promise libaries are:
  931. * - There currently isn't a seperate deferred and promise object.
  932. * - Unhandled rejections eventually show an error if they aren't handled.
  933. *
  934. * Based off of the work in:
  935. * https://bugzilla.mozilla.org/show_bug.cgi?id=810490
  936. */
  937. (function PromiseClosure() {
  938. if (globalScope.Promise) {
  939. // Promises existing in the DOM/Worker, checking presence of all/resolve
  940. if (typeof globalScope.Promise.all !== 'function') {
  941. globalScope.Promise.all = function (iterable) {
  942. var count = 0, results = [], resolve, reject;
  943. var promise = new globalScope.Promise(function (resolve_, reject_) {
  944. resolve = resolve_;
  945. reject = reject_;
  946. });
  947. iterable.forEach(function (p, i) {
  948. count++;
  949. p.then(function (result) {
  950. results[i] = result;
  951. count--;
  952. if (count === 0) {
  953. resolve(results);
  954. }
  955. }, reject);
  956. });
  957. if (count === 0) {
  958. resolve(results);
  959. }
  960. return promise;
  961. };
  962. }
  963. if (typeof globalScope.Promise.resolve !== 'function') {
  964. globalScope.Promise.resolve = function (value) {
  965. return new globalScope.Promise(function (resolve) { resolve(value); });
  966. };
  967. }
  968. if (typeof globalScope.Promise.reject !== 'function') {
  969. globalScope.Promise.reject = function (reason) {
  970. return new globalScope.Promise(function (resolve, reject) {
  971. reject(reason);
  972. });
  973. };
  974. }
  975. if (typeof globalScope.Promise.prototype.catch !== 'function') {
  976. globalScope.Promise.prototype.catch = function (onReject) {
  977. return globalScope.Promise.prototype.then(undefined, onReject);
  978. };
  979. }
  980. return;
  981. }
  982. var STATUS_PENDING = 0;
  983. var STATUS_RESOLVED = 1;
  984. var STATUS_REJECTED = 2;
  985. // In an attempt to avoid silent exceptions, unhandled rejections are
  986. // tracked and if they aren't handled in a certain amount of time an
  987. // error is logged.
  988. var REJECTION_TIMEOUT = 500;
  989. var HandlerManager = {
  990. handlers: [],
  991. running: false,
  992. unhandledRejections: [],
  993. pendingRejectionCheck: false,
  994. scheduleHandlers: function scheduleHandlers(promise) {
  995. if (promise._status == STATUS_PENDING) {
  996. return;
  997. }
  998. this.handlers = this.handlers.concat(promise._handlers);
  999. promise._handlers = [];
  1000. if (this.running) {
  1001. return;
  1002. }
  1003. this.running = true;
  1004. setTimeout(this.runHandlers.bind(this), 0);
  1005. },
  1006. runHandlers: function runHandlers() {
  1007. var RUN_TIMEOUT = 1; // ms
  1008. var timeoutAt = Date.now() + RUN_TIMEOUT;
  1009. while (this.handlers.length > 0) {
  1010. var handler = this.handlers.shift();
  1011. var nextStatus = handler.thisPromise._status;
  1012. var nextValue = handler.thisPromise._value;
  1013. try {
  1014. if (nextStatus === STATUS_RESOLVED) {
  1015. if (typeof(handler.onResolve) == 'function') {
  1016. nextValue = handler.onResolve(nextValue);
  1017. }
  1018. } else if (typeof(handler.onReject) === 'function') {
  1019. nextValue = handler.onReject(nextValue);
  1020. nextStatus = STATUS_RESOLVED;
  1021. if (handler.thisPromise._unhandledRejection) {
  1022. this.removeUnhandeledRejection(handler.thisPromise);
  1023. }
  1024. }
  1025. } catch (ex) {
  1026. nextStatus = STATUS_REJECTED;
  1027. nextValue = ex;
  1028. }
  1029. handler.nextPromise._updateStatus(nextStatus, nextValue);
  1030. if (Date.now() >= timeoutAt) {
  1031. break;
  1032. }
  1033. }
  1034. if (this.handlers.length > 0) {
  1035. setTimeout(this.runHandlers.bind(this), 0);
  1036. return;
  1037. }
  1038. this.running = false;
  1039. },
  1040. addUnhandledRejection: function addUnhandledRejection(promise) {
  1041. this.unhandledRejections.push({
  1042. promise: promise,
  1043. time: Date.now()
  1044. });
  1045. this.scheduleRejectionCheck();
  1046. },
  1047. removeUnhandeledRejection: function removeUnhandeledRejection(promise) {
  1048. promise._unhandledRejection = false;
  1049. for (var i = 0; i < this.unhandledRejections.length; i++) {
  1050. if (this.unhandledRejections[i].promise === promise) {
  1051. this.unhandledRejections.splice(i);
  1052. i--;
  1053. }
  1054. }
  1055. },
  1056. scheduleRejectionCheck: function scheduleRejectionCheck() {
  1057. if (this.pendingRejectionCheck) {
  1058. return;
  1059. }
  1060. this.pendingRejectionCheck = true;
  1061. setTimeout(function rejectionCheck() {
  1062. this.pendingRejectionCheck = false;
  1063. var now = Date.now();
  1064. for (var i = 0; i < this.unhandledRejections.length; i++) {
  1065. if (now - this.unhandledRejections[i].time > REJECTION_TIMEOUT) {
  1066. var unhandled = this.unhandledRejections[i].promise._value;
  1067. var msg = 'Unhandled rejection: ' + unhandled;
  1068. if (unhandled.stack) {
  1069. msg += '\n' + unhandled.stack;
  1070. }
  1071. warn(msg);
  1072. this.unhandledRejections.splice(i);
  1073. i--;
  1074. }
  1075. }
  1076. if (this.unhandledRejections.length) {
  1077. this.scheduleRejectionCheck();
  1078. }
  1079. }.bind(this), REJECTION_TIMEOUT);
  1080. }
  1081. };
  1082. function Promise(resolver) {
  1083. this._status = STATUS_PENDING;
  1084. this._handlers = [];
  1085. try {
  1086. resolver.call(this, this._resolve.bind(this), this._reject.bind(this));
  1087. } catch (e) {
  1088. this._reject(e);
  1089. }
  1090. }
  1091. /**
  1092. * Builds a promise that is resolved when all the passed in promises are
  1093. * resolved.
  1094. * @param {array} array of data and/or promises to wait for.
  1095. * @return {Promise} New dependant promise.
  1096. */
  1097. Promise.all = function Promise_all(promises) {
  1098. var resolveAll, rejectAll;
  1099. var deferred = new Promise(function (resolve, reject) {
  1100. resolveAll = resolve;
  1101. rejectAll = reject;
  1102. });
  1103. var unresolved = promises.length;
  1104. var results = [];
  1105. if (unresolved === 0) {
  1106. resolveAll(results);
  1107. return deferred;
  1108. }
  1109. function reject(reason) {
  1110. if (deferred._status === STATUS_REJECTED) {
  1111. return;
  1112. }
  1113. results = [];
  1114. rejectAll(reason);
  1115. }
  1116. for (var i = 0, ii = promises.length; i < ii; ++i) {
  1117. var promise = promises[i];
  1118. var resolve = (function(i) {
  1119. return function(value) {
  1120. if (deferred._status === STATUS_REJECTED) {
  1121. return;
  1122. }
  1123. results[i] = value;
  1124. unresolved--;
  1125. if (unresolved === 0) {
  1126. resolveAll(results);
  1127. }
  1128. };
  1129. })(i);
  1130. if (Promise.isPromise(promise)) {
  1131. promise.then(resolve, reject);
  1132. } else {
  1133. resolve(promise);
  1134. }
  1135. }
  1136. return deferred;
  1137. };
  1138. /**
  1139. * Checks if the value is likely a promise (has a 'then' function).
  1140. * @return {boolean} true if value is thenable
  1141. */
  1142. Promise.isPromise = function Promise_isPromise(value) {
  1143. return value && typeof value.then === 'function';
  1144. };
  1145. /**
  1146. * Creates resolved promise
  1147. * @param value resolve value
  1148. * @returns {Promise}
  1149. */
  1150. Promise.resolve = function Promise_resolve(value) {
  1151. return new Promise(function (resolve) { resolve(value); });
  1152. };
  1153. /**
  1154. * Creates rejected promise
  1155. * @param reason rejection value
  1156. * @returns {Promise}
  1157. */
  1158. Promise.reject = function Promise_reject(reason) {
  1159. return new Promise(function (resolve, reject) { reject(reason); });
  1160. };
  1161. Promise.prototype = {
  1162. _status: null,
  1163. _value: null,
  1164. _handlers: null,
  1165. _unhandledRejection: null,
  1166. _updateStatus: function Promise__updateStatus(status, value) {
  1167. if (this._status === STATUS_RESOLVED ||
  1168. this._status === STATUS_REJECTED) {
  1169. return;
  1170. }
  1171. if (status == STATUS_RESOLVED &&
  1172. Promise.isPromise(value)) {
  1173. value.then(this._updateStatus.bind(this, STATUS_RESOLVED),
  1174. this._updateStatus.bind(this, STATUS_REJECTED));
  1175. return;
  1176. }
  1177. this._status = status;
  1178. this._value = value;
  1179. if (status === STATUS_REJECTED && this._handlers.length === 0) {
  1180. this._unhandledRejection = true;
  1181. HandlerManager.addUnhandledRejection(this);
  1182. }
  1183. HandlerManager.scheduleHandlers(this);
  1184. },
  1185. _resolve: function Promise_resolve(value) {
  1186. this._updateStatus(STATUS_RESOLVED, value);
  1187. },
  1188. _reject: function Promise_reject(reason) {
  1189. this._updateStatus(STATUS_REJECTED, reason);
  1190. },
  1191. then: function Promise_then(onResolve, onReject) {
  1192. var nextPromise = new Promise(function (resolve, reject) {
  1193. this.resolve = reject;
  1194. this.reject = reject;
  1195. });
  1196. this._handlers.push({
  1197. thisPromise: this,
  1198. onResolve: onResolve,
  1199. onReject: onReject,
  1200. nextPromise: nextPromise
  1201. });
  1202. HandlerManager.scheduleHandlers(this);
  1203. return nextPromise;
  1204. },
  1205. catch: function Promise_catch(onReject) {
  1206. return this.then(undefined, onReject);
  1207. }
  1208. };
  1209. globalScope.Promise = Promise;
  1210. })();
  1211. var StatTimer = (function StatTimerClosure() {
  1212. function rpad(str, pad, length) {
  1213. while (str.length < length) {
  1214. str += pad;
  1215. }
  1216. return str;
  1217. }
  1218. function StatTimer() {
  1219. this.started = {};
  1220. this.times = [];
  1221. this.enabled = true;
  1222. }
  1223. StatTimer.prototype = {
  1224. time: function StatTimer_time(name) {
  1225. if (!this.enabled) {
  1226. return;
  1227. }
  1228. if (name in this.started) {
  1229. warn('Timer is already running for ' + name);
  1230. }
  1231. this.started[name] = Date.now();
  1232. },
  1233. timeEnd: function StatTimer_timeEnd(name) {
  1234. if (!this.enabled) {
  1235. return;
  1236. }
  1237. if (!(name in this.started)) {
  1238. warn('Timer has not been started for ' + name);
  1239. }
  1240. this.times.push({
  1241. 'name': name,
  1242. 'start': this.started[name],
  1243. 'end': Date.now()
  1244. });
  1245. // Remove timer from started so it can be called again.
  1246. delete this.started[name];
  1247. },
  1248. toString: function StatTimer_toString() {
  1249. var i, ii;
  1250. var times = this.times;
  1251. var out = '';
  1252. // Find the longest name for padding purposes.
  1253. var longest = 0;
  1254. for (i = 0, ii = times.length; i < ii; ++i) {
  1255. var name = times[i]['name'];
  1256. if (name.length > longest) {
  1257. longest = name.length;
  1258. }
  1259. }
  1260. for (i = 0, ii = times.length; i < ii; ++i) {
  1261. var span = times[i];
  1262. var duration = span.end - span.start;
  1263. out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n';
  1264. }
  1265. return out;
  1266. }
  1267. };
  1268. return StatTimer;
  1269. })();
  1270. PDFJS.createBlob = function createBlob(data, contentType) {
  1271. if (typeof Blob !== 'undefined') {
  1272. return new Blob([data], { type: contentType });
  1273. }
  1274. // Blob builder is deprecated in FF14 and removed in FF18.
  1275. var bb = new MozBlobBuilder();
  1276. bb.append(data);
  1277. return bb.getBlob(contentType);
  1278. };
  1279. PDFJS.createObjectURL = (function createObjectURLClosure() {
  1280. // Blob/createObjectURL is not available, falling back to data schema.
  1281. var digits =
  1282. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1283. return function createObjectURL(data, contentType) {
  1284. if (!PDFJS.disableCreateObjectURL &&
  1285. typeof URL !== 'undefined' && URL.createObjectURL) {
  1286. var blob = PDFJS.createBlob(data, contentType);
  1287. return URL.createObjectURL(blob);
  1288. }
  1289. var buffer = 'data:' + contentType + ';base64,';
  1290. for (var i = 0, ii = data.length; i < ii; i += 3) {
  1291. var b1 = data[i] & 0xFF;
  1292. var b2 = data[i + 1] & 0xFF;
  1293. var b3 = data[i + 2] & 0xFF;
  1294. var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
  1295. var d3 = i + 1 < ii ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
  1296. var d4 = i + 2 < ii ? (b3 & 0x3F) : 64;
  1297. buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];
  1298. }
  1299. return buffer;
  1300. };
  1301. })();
  1302. function MessageHandler(name, comObj) {
  1303. this.name = name;
  1304. this.comObj = comObj;
  1305. this.callbackIndex = 1;
  1306. this.postMessageTransfers = true;
  1307. var callbacksCapabilities = this.callbacksCapabilities = {};
  1308. var ah = this.actionHandler = {};
  1309. ah['console_log'] = [function ahConsoleLog(data) {
  1310. console.log.apply(console, data);
  1311. }];
  1312. ah['console_error'] = [function ahConsoleError(data) {
  1313. console.error.apply(console, data);
  1314. }];
  1315. ah['_unsupported_feature'] = [function ah_unsupportedFeature(data) {
  1316. UnsupportedManager.notify(data);
  1317. }];
  1318. comObj.onmessage = function messageHandlerComObjOnMessage(event) {
  1319. var data = event.data;
  1320. if (data.isReply) {
  1321. var callbackId = data.callbackId;
  1322. if (data.callbackId in callbacksCapabilities) {
  1323. var callback = callbacksCapabilities[callbackId];
  1324. delete callbacksCapabilities[callbackId];
  1325. if ('error' in data) {
  1326. callback.reject(data.error);
  1327. } else {
  1328. callback.resolve(data.data);
  1329. }
  1330. } else {
  1331. error('Cannot resolve callback ' + callbackId);
  1332. }
  1333. } else if (data.action in ah) {
  1334. var action = ah[data.action];
  1335. if (data.callbackId) {
  1336. Promise.resolve().then(function () {
  1337. return action[0].call(action[1], data.data);
  1338. }).then(function (result) {
  1339. comObj.postMessage({
  1340. isReply: true,
  1341. callbackId: data.callbackId,
  1342. data: result
  1343. });
  1344. }, function (reason) {
  1345. comObj.postMessage({
  1346. isReply: true,
  1347. callbackId: data.callbackId,
  1348. error: reason
  1349. });
  1350. });
  1351. } else {
  1352. action[0].call(action[1], data.data);
  1353. }
  1354. } else {
  1355. error('Unknown action from worker: ' + data.action);
  1356. }
  1357. };
  1358. }
  1359. MessageHandler.prototype = {
  1360. on: function messageHandlerOn(actionName, handler, scope) {
  1361. var ah = this.actionHandler;
  1362. if (ah[actionName]) {
  1363. error('There is already an actionName called "' + actionName + '"');
  1364. }
  1365. ah[actionName] = [handler, scope];
  1366. },
  1367. /**
  1368. * Sends a message to the comObj to invoke the action with the supplied data.
  1369. * @param {String} actionName Action to call.
  1370. * @param {JSON} data JSON data to send.
  1371. * @param {Array} [transfers] Optional list of transfers/ArrayBuffers
  1372. */
  1373. send: function messageHandlerSend(actionName, data, transfers) {
  1374. var message = {
  1375. action: actionName,
  1376. data: data
  1377. };
  1378. this.postMessage(message, transfers);
  1379. },
  1380. /**
  1381. * Sends a message to the comObj to invoke the action with the supplied data.
  1382. * Expects that other side will callback with the response.
  1383. * @param {String} actionName Action to call.
  1384. * @param {JSON} data JSON data to send.
  1385. * @param {Array} [transfers] Optional list of transfers/ArrayBuffers.
  1386. * @returns {Promise} Promise to be resolved with response data.
  1387. */
  1388. sendWithPromise:
  1389. function messageHandlerSendWithPromise(actionName, data, transfers) {
  1390. var callbackId = this.callbackIndex++;
  1391. var message = {
  1392. action: actionName,
  1393. data: data,
  1394. callbackId: callbackId
  1395. };
  1396. var capability = createPromiseCapability();
  1397. this.callbacksCapabilities[callbackId] = capability;
  1398. try {
  1399. this.postMessage(message, transfers);
  1400. } catch (e) {
  1401. capability.reject(e);
  1402. }
  1403. return capability.promise;
  1404. },
  1405. /**
  1406. * Sends raw message to the comObj.
  1407. * @private
  1408. * @param message {Object} Raw message.
  1409. * @param transfers List of transfers/ArrayBuffers, or undefined.
  1410. */
  1411. postMessage: function (message, transfers) {
  1412. if (transfers && this.postMessageTransfers) {
  1413. this.comObj.postMessage(message, transfers);
  1414. } else {
  1415. this.comObj.postMessage(message);
  1416. }
  1417. }
  1418. };
  1419. function loadJpegStream(id, imageUrl, objs) {
  1420. var img = new Image();
  1421. img.onload = (function loadJpegStream_onloadClosure() {
  1422. objs.resolve(id, img);
  1423. });
  1424. img.onerror = (function loadJpegStream_onerrorClosure() {
  1425. objs.resolve(id, null);
  1426. warn('Error during JPEG image loading');
  1427. });
  1428. img.src = imageUrl;
  1429. }
  1430. /**
  1431. * The maximum allowed image size in total pixels e.g. width * height. Images
  1432. * above this value will not be drawn. Use -1 for no limit.
  1433. * @var {number}
  1434. */
  1435. PDFJS.maxImageSize = (PDFJS.maxImageSize === undefined ?
  1436. -1 : PDFJS.maxImageSize);
  1437. /**
  1438. * The url of where the predefined Adobe CMaps are located. Include trailing
  1439. * slash.
  1440. * @var {string}
  1441. */
  1442. PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
  1443. /**
  1444. * Specifies if CMaps are binary packed.
  1445. * @var {boolean}
  1446. */
  1447. PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
  1448. /*
  1449. * By default fonts are converted to OpenType fonts and loaded via font face
  1450. * rules. If disabled, the font will be rendered using a built in font renderer
  1451. * that constructs the glyphs with primitive path commands.
  1452. * @var {boolean}
  1453. */
  1454. PDFJS.disableFontFace = (PDFJS.disableFontFace === undefined ?
  1455. false : PDFJS.disableFontFace);
  1456. /**
  1457. * Path for image resources, mainly for annotation icons. Include trailing
  1458. * slash.
  1459. * @var {string}
  1460. */
  1461. PDFJS.imageResourcesPath = (PDFJS.imageResourcesPath === undefined ?
  1462. '' : PDFJS.imageResourcesPath);
  1463. /**
  1464. * Disable the web worker and run all code on the main thread. This will happen
  1465. * automatically if the browser doesn't support workers or sending typed arrays
  1466. * to workers.
  1467. * @var {boolean}
  1468. */
  1469. PDFJS.disableWorker = (PDFJS.disableWorker === undefined ?
  1470. false : PDFJS.disableWorker);
  1471. /**
  1472. * Path and filename of the worker file. Required when the worker is enabled in
  1473. * development mode. If unspecified in the production build, the worker will be
  1474. * loaded based on the location of the pdf.js file.
  1475. * @var {string}
  1476. */
  1477. PDFJS.workerSrc = (PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc);
  1478. /**
  1479. * Disable range request loading of PDF files. When enabled and if the server
  1480. * supports partial content requests then the PDF will be fetched in chunks.
  1481. * Enabled (false) by default.
  1482. * @var {boolean}
  1483. */
  1484. PDFJS.disableRange = (PDFJS.disableRange === undefined ?
  1485. false : PDFJS.disableRange);
  1486. /**
  1487. * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js
  1488. * will automatically keep fetching more data even if it isn't needed to display
  1489. * the current page. This default behavior can be disabled.
  1490. * @var {boolean}
  1491. */
  1492. PDFJS.disableAutoFetch = (PDFJS.disableAutoFetch === undefined ?
  1493. false : PDFJS.disableAutoFetch);
  1494. /**
  1495. * Enables special hooks for debugging PDF.js.
  1496. * @var {boolean}
  1497. */
  1498. PDFJS.pdfBug = (PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug);
  1499. /**
  1500. * Enables transfer usage in postMessage for ArrayBuffers.
  1501. * @var {boolean}
  1502. */
  1503. PDFJS.postMessageTransfers = (PDFJS.postMessageTransfers === undefined ?
  1504. true : PDFJS.postMessageTransfers);
  1505. /**
  1506. * Disables URL.createObjectURL usage.
  1507. * @var {boolean}
  1508. */
  1509. PDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?
  1510. false : PDFJS.disableCreateObjectURL);
  1511. /**
  1512. * Disables WebGL usage.
  1513. * @var {boolean}
  1514. */
  1515. PDFJS.disableWebGL = (PDFJS.disableWebGL === undefined ?
  1516. true : PDFJS.disableWebGL);
  1517. /**
  1518. * Enables CSS only zooming.
  1519. * @var {boolean}
  1520. */
  1521. PDFJS.useOnlyCssZoom = (PDFJS.useOnlyCssZoom === undefined ?
  1522. false : PDFJS.useOnlyCssZoom);
  1523. /**
  1524. * Controls the logging level.
  1525. * The constants from PDFJS.VERBOSITY_LEVELS should be used:
  1526. * - errors
  1527. * - warnings [default]
  1528. * - infos
  1529. * @var {number}
  1530. */
  1531. PDFJS.verbosity = (PDFJS.verbosity === undefined ?
  1532. PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
  1533. /**
  1534. * The maximum supported canvas size in total pixels e.g. width * height.
  1535. * The default value is 4096 * 4096. Use -1 for no limit.
  1536. * @var {number}
  1537. */
  1538. PDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ?
  1539. 16777216 : PDFJS.maxCanvasPixels);
  1540. /**
  1541. * Document initialization / loading parameters object.
  1542. *
  1543. * @typedef {Object} DocumentInitParameters
  1544. * @property {string} url - The URL of the PDF.
  1545. * @property {TypedArray} data - A typed array with PDF data.
  1546. * @property {Object} httpHeaders - Basic authentication headers.
  1547. * @property {boolean} withCredentials - Indicates whether or not cross-site
  1548. * Access-Control requests should be made using credentials such as cookies
  1549. * or authorization headers. The default is false.
  1550. * @property {string} password - For decrypting password-protected PDFs.
  1551. * @property {TypedArray} initialData - A typed array with the first portion or
  1552. * all of the pdf data. Used by the extension since some data is already
  1553. * loaded before the switch to range requests.
  1554. */
  1555. /**
  1556. * @typedef {Object} PDFDocumentStats
  1557. * @property {Array} streamTypes - Used stream types in the document (an item
  1558. * is set to true if specific stream ID was used in the document).
  1559. * @property {Array} fontTypes - Used font type in the document (an item is set
  1560. * to true if specific font ID was used in the document).
  1561. */
  1562. /**
  1563. * This is the main entry point for loading a PDF and interacting with it.
  1564. * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
  1565. * is used, which means it must follow the same origin rules that any XHR does
  1566. * e.g. No cross domain requests without CORS.
  1567. *
  1568. * @param {string|TypedArray|DocumentInitParameters} source Can be a url to
  1569. * where a PDF is located, a typed array (Uint8Array) already populated with
  1570. * data or parameter object.
  1571. *
  1572. * @param {Object} pdfDataRangeTransport is optional. It is used if you want
  1573. * to manually serve range requests for data in the PDF. See viewer.js for
  1574. * an example of pdfDataRangeTransport's interface.
  1575. *
  1576. * @param {function} passwordCallback is optional. It is used to request a
  1577. * password if wrong or no password was provided. The callback receives two
  1578. * parameters: function that needs to be called with new password and reason
  1579. * (see {PasswordResponses}).
  1580. *
  1581. * @return {Promise} A promise that is resolved with {@link PDFDocumentProxy}
  1582. * object.
  1583. */
  1584. PDFJS.getDocument = function getDocument(source,
  1585. pdfDataRangeTransport,
  1586. passwordCallback,
  1587. progressCallback) {
  1588. var workerInitializedCapability, workerReadyCapability, transport;
  1589. if (typeof source === 'string') {
  1590. source = { url: source };
  1591. } else if (isArrayBuffer(source)) {
  1592. source = { data: source };
  1593. } else if (typeof source !== 'object') {
  1594. error('Invalid parameter in getDocument, need either Uint8Array, ' +
  1595. 'string or a parameter object');
  1596. }
  1597. if (!source.url && !source.data) {
  1598. error('Invalid parameter array, need either .data or .url');
  1599. }
  1600. // copy/use all keys as is except 'url' -- full path is required
  1601. var params = {};
  1602. for (var key in source) {
  1603. if (key === 'url' && typeof window !== 'undefined') {
  1604. params[key] = combineUrl(window.location.href, source[key]);
  1605. continue;
  1606. }
  1607. params[key] = source[key];
  1608. }
  1609. workerInitializedCapability = createPromiseCapability();
  1610. workerReadyCapability = createPromiseCapability();
  1611. transport = new WorkerTransport(workerInitializedCapability,
  1612. workerReadyCapability, pdfDataRangeTransport,
  1613. progressCallback);
  1614. workerInitializedCapability.promise.then(function transportInitialized() {
  1615. transport.passwordCallback = passwordCallback;
  1616. transport.fetchDocument(params);
  1617. });
  1618. return workerReadyCapability.promise;
  1619. };
  1620. /**
  1621. * Proxy to a PDFDocument in the worker thread. Also, contains commonly used
  1622. * properties that can be read synchronously.
  1623. * @class
  1624. */
  1625. var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
  1626. function PDFDocumentProxy(pdfInfo, transport) {
  1627. this.pdfInfo = pdfInfo;
  1628. this.transport = transport;
  1629. }
  1630. PDFDocumentProxy.prototype = /** @lends PDFDocumentProxy.prototype */ {
  1631. /**
  1632. * @return {number} Total number of pages the PDF contains.
  1633. */
  1634. get numPages() {
  1635. return this.pdfInfo.numPages;
  1636. },
  1637. /**
  1638. * @return {string} A unique ID to identify a PDF. Not guaranteed to be
  1639. * unique.
  1640. */
  1641. get fingerprint() {
  1642. return this.pdfInfo.fingerprint;
  1643. },
  1644. /**
  1645. * @param {number} pageNumber The page number to get. The first page is 1.
  1646. * @return {Promise} A promise that is resolved with a {@link PDFPageProxy}
  1647. * object.
  1648. */
  1649. getPage: function PDFDocumentProxy_getPage(pageNumber) {
  1650. return this.transport.getPage(pageNumber);
  1651. },
  1652. /**
  1653. * @param {{num: number, gen: number}} ref The page reference. Must have
  1654. * the 'num' and 'gen' properties.
  1655. * @return {Promise} A promise that is resolved with the page index that is
  1656. * associated with the reference.
  1657. */
  1658. getPageIndex: function PDFDocumentProxy_getPageIndex(ref) {
  1659. return this.transport.getPageIndex(ref);
  1660. },
  1661. /**
  1662. * @return {Promise} A promise that is resolved with a lookup table for
  1663. * mapping named destinations to reference numbers.
  1664. */
  1665. getDestinations: function PDFDocumentProxy_getDestinations() {
  1666. return this.transport.getDestinations();
  1667. },
  1668. /**
  1669. * @return {Promise} A promise that is resolved with a lookup table for
  1670. * mapping named attachments to their content.
  1671. */
  1672. getAttachments: function PDFDocumentProxy_getAttachments() {
  1673. return this.transport.getAttachments();
  1674. },
  1675. /**
  1676. * @return {Promise} A promise that is resolved with an array of all the
  1677. * JavaScript strings in the name tree.
  1678. */
  1679. getJavaScript: function PDFDocumentProxy_getJavaScript() {
  1680. return this.transport.getJavaScript();
  1681. },
  1682. /**
  1683. * @return {Promise} A promise that is resolved with an {Array} that is a
  1684. * tree outline (if it has one) of the PDF. The tree is in the format of:
  1685. * [
  1686. * {
  1687. * title: string,
  1688. * bold: boolean,
  1689. * italic: boolean,
  1690. * color: rgb array,
  1691. * dest: dest obj,
  1692. * items: array of more items like this
  1693. * },
  1694. * ...
  1695. * ].
  1696. */
  1697. getOutline: function PDFDocumentProxy_getOutline() {
  1698. return this.transport.getOutline();
  1699. },
  1700. /**
  1701. * @return {Promise} A promise that is resolved with an {Object} that has
  1702. * info and metadata properties. Info is an {Object} filled with anything
  1703. * available in the information dictionary and similarly metadata is a
  1704. * {Metadata} object with information from the metadata section of the PDF.
  1705. */
  1706. getMetadata: function PDFDocumentProxy_getMetadata() {
  1707. return this.transport.getMetadata();
  1708. },
  1709. /**
  1710. * @return {Promise} A promise that is resolved with a TypedArray that has
  1711. * the raw data from the PDF.
  1712. */
  1713. getData: function PDFDocumentProxy_getData() {
  1714. return this.transport.getData();
  1715. },
  1716. /**
  1717. * @return {Promise} A promise that is resolved when the document's data
  1718. * is loaded. It is resolved with an {Object} that contains the length
  1719. * property that indicates size of the PDF data in bytes.
  1720. */
  1721. getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() {
  1722. return this.transport.downloadInfoCapability.promise;
  1723. },
  1724. /**
  1725. * @returns {Promise} A promise this is resolved with current stats about
  1726. * document structures (see {@link PDFDocumentStats}).
  1727. */
  1728. getStats: function PDFDocumentProxy_getStats() {
  1729. return this.transport.getStats();
  1730. },
  1731. /**
  1732. * Cleans up resources allocated by the document, e.g. created @font-face.
  1733. */
  1734. cleanup: function PDFDocumentProxy_cleanup() {
  1735. this.transport.startCleanup();
  1736. },
  1737. /**
  1738. * Destroys current document instance and terminates worker.
  1739. */
  1740. destroy: function PDFDocumentProxy_destroy() {
  1741. this.transport.destroy();
  1742. }
  1743. };
  1744. return PDFDocumentProxy;
  1745. })();
  1746. /**
  1747. * Page text content.
  1748. *
  1749. * @typedef {Object} TextContent
  1750. * @property {array} items - array of {@link TextItem}
  1751. * @property {Object} styles - {@link TextStyles} objects, indexed by font
  1752. * name.
  1753. */
  1754. /**
  1755. * Page text content part.
  1756. *
  1757. * @typedef {Object} TextItem
  1758. * @property {string} str - text content.
  1759. * @property {string} dir - text direction: 'ttb', 'ltr' or 'rtl'.
  1760. * @property {array} transform - transformation matrix.
  1761. * @property {number} width - width in device space.
  1762. * @property {number} height - height in device space.
  1763. * @property {string} fontName - font name used by pdf.js for converted font.
  1764. */
  1765. /**
  1766. * Text style.
  1767. *
  1768. * @typedef {Object} TextStyle
  1769. * @property {number} ascent - font ascent.
  1770. * @property {number} descent - font descent.
  1771. * @property {boolean} vertical - text is in vertical mode.
  1772. * @property {string} fontFamily - possible font family
  1773. */
  1774. /**
  1775. * Page render parameters.
  1776. *
  1777. * @typedef {Object} RenderParameters
  1778. * @property {Object} canvasContext - A 2D context of a DOM Canvas object.
  1779. * @property {PDFJS.PageViewport} viewport - Rendering viewport obtained by
  1780. * calling of PDFPage.getViewport method.
  1781. * @property {string} intent - Rendering intent, can be 'display' or 'print'
  1782. * (default value is 'display').
  1783. * @property {Object} imageLayer - (optional) An object that has beginLayout,
  1784. * endLayout and appendImage functions.
  1785. * @property {function} continueCallback - (optional) A function that will be
  1786. * called each time the rendering is paused. To continue
  1787. * rendering call the function that is the first argument
  1788. * to the callback.
  1789. */
  1790. /**
  1791. * PDF page operator list.
  1792. *
  1793. * @typedef {Object} PDFOperatorList
  1794. * @property {Array} fnArray - Array containing the operator functions.
  1795. * @property {Array} argsArray - Array containing the arguments of the
  1796. * functions.
  1797. */
  1798. /**
  1799. * Proxy to a PDFPage in the worker thread.
  1800. * @class
  1801. */
  1802. var PDFPageProxy = (function PDFPageProxyClosure() {
  1803. function PDFPageProxy(pageIndex, pageInfo, transport) {
  1804. this.pageIndex = pageIndex;
  1805. this.pageInfo = pageInfo;
  1806. this.transport = transport;
  1807. this.stats = new StatTimer();
  1808. this.stats.enabled = !!globalScope.PDFJS.enableStats;
  1809. this.commonObjs = transport.commonObjs;
  1810. this.objs = new PDFObjects();
  1811. this.cleanupAfterRender = false;
  1812. this.pendingDestroy = false;
  1813. this.intentStates = {};
  1814. }
  1815. PDFPageProxy.prototype = /** @lends PDFPageProxy.prototype */ {
  1816. /**
  1817. * @return {number} Page number of the page. First page is 1.
  1818. */
  1819. get pageNumber() {
  1820. return this.pageIndex + 1;
  1821. },
  1822. /**
  1823. * @return {number} The number of degrees the page is rotated clockwise.
  1824. */
  1825. get rotate() {
  1826. return this.pageInfo.rotate;
  1827. },
  1828. /**
  1829. * @return {Object} The reference that points to this page. It has 'num' and
  1830. * 'gen' properties.
  1831. */
  1832. get ref() {
  1833. return this.pageInfo.ref;
  1834. },
  1835. /**
  1836. * @return {Array} An array of the visible portion of the PDF page in the
  1837. * user space units - [x1, y1, x2, y2].
  1838. */
  1839. get view() {
  1840. return this.pageInfo.view;
  1841. },
  1842. /**
  1843. * @param {number} scale The desired scale of the viewport.
  1844. * @param {number} rotate Degrees to rotate the viewport. If omitted this
  1845. * defaults to the page rotation.
  1846. * @return {PDFJS.PageViewport} Contains 'width' and 'height' properties
  1847. * along with transforms required for rendering.
  1848. */
  1849. getViewport: function PDFPageProxy_getViewport(scale, rotate) {
  1850. if (arguments.length < 2) {
  1851. rotate = this.rotate;
  1852. }
  1853. return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
  1854. },
  1855. /**
  1856. * @return {Promise} A promise that is resolved with an {Array} of the
  1857. * annotation objects.
  1858. */
  1859. getAnnotations: function PDFPageProxy_getAnnotations() {
  1860. if (this.annotationsPromise) {
  1861. return this.annotationsPromise;
  1862. }
  1863. var promise = this.transport.getAnnotations(this.pageIndex);
  1864. this.annotationsPromise = promise;
  1865. return promise;
  1866. },
  1867. /**
  1868. * Begins the process of rendering a page to the desired context.
  1869. * @param {RenderParameters} params Page render parameters.
  1870. * @return {RenderTask} An object that contains the promise, which
  1871. * is resolved when the page finishes rendering.
  1872. */
  1873. render: function PDFPageProxy_render(params) {
  1874. var stats = this.stats;
  1875. stats.time('Overall');
  1876. // If there was a pending destroy cancel it so no cleanup happens during
  1877. // this call to render.
  1878. this.pendingDestroy = false;
  1879. var renderingIntent = ('intent' in params ?
  1880. (params.intent == 'print' ? 'print' : 'display') : 'display');
  1881. if (!this.intentStates[renderingIntent]) {
  1882. this.intentStates[renderingIntent] = {};
  1883. }
  1884. var intentState = this.intentStates[renderingIntent];
  1885. // If there's no displayReadyCapability yet, then the operatorList
  1886. // was never requested before. Make the request and create the promise.
  1887. if (!intentState.displayReadyCapability) {
  1888. intentState.receivingOperatorList = true;
  1889. intentState.displayReadyCapability = createPromiseCapability();
  1890. intentState.operatorList = {
  1891. fnArray: [],
  1892. argsArray: [],
  1893. lastChunk: false
  1894. };
  1895. this.stats.time('Page Request');
  1896. this.transport.messageHandler.send('RenderPageRequest', {
  1897. pageIndex: this.pageNumber - 1,
  1898. intent: renderingIntent
  1899. });
  1900. }
  1901. var internalRenderTask = new InternalRenderTask(complete, params,
  1902. this.objs,
  1903. this.commonObjs,
  1904. intentState.operatorList,
  1905. this.pageNumber);
  1906. if (!intentState.renderTasks) {
  1907. intentState.renderTasks = [];
  1908. }
  1909. intentState.renderTasks.push(internalRenderTask);
  1910. var renderTask = new RenderTask(internalRenderTask);
  1911. var self = this;
  1912. intentState.displayReadyCapability.promise.then(
  1913. function pageDisplayReadyPromise(transparency) {
  1914. if (self.pendingDestroy) {
  1915. complete();
  1916. return;
  1917. }
  1918. stats.time('Rendering');
  1919. internalRenderTask.initalizeGraphics(transparency);
  1920. internalRenderTask.operatorListChanged();
  1921. },
  1922. function pageDisplayReadPromiseError(reason) {
  1923. complete(reason);
  1924. }
  1925. );
  1926. function complete(error) {
  1927. var i = intentState.renderTasks.indexOf(internalRenderTask);
  1928. if (i >= 0) {
  1929. intentState.renderTasks.splice(i, 1);
  1930. }
  1931. if (self.cleanupAfterRender) {
  1932. self.pendingDestroy = true;
  1933. }
  1934. self._tryDestroy();
  1935. if (error) {
  1936. internalRenderTask.capability.reject(error);
  1937. } else {
  1938. internalRenderTask.capability.resolve();
  1939. }
  1940. stats.timeEnd('Rendering');
  1941. stats.timeEnd('Overall');
  1942. }
  1943. return renderTask;
  1944. },
  1945. /**
  1946. * @return {Promise} A promise resolved with an {@link PDFOperatorList}
  1947. * object that represents page's operator list.
  1948. */
  1949. getOperatorList: function PDFPageProxy_getOperatorList() {
  1950. function operatorListChanged() {
  1951. if (intentState.operatorList.lastChunk) {
  1952. intentState.opListReadCapability.resolve(intentState.operatorList);
  1953. }
  1954. }
  1955. var renderingIntent = 'oplist';
  1956. if (!this.intentStates[renderingIntent]) {
  1957. this.intentStates[renderingIntent] = {};
  1958. }
  1959. var intentState = this.intentStates[renderingIntent];
  1960. if (!intentState.opListReadCapability) {
  1961. var opListTask = {};
  1962. opListTask.operatorListChanged = operatorListChanged;
  1963. intentState.receivingOperatorList = true;
  1964. intentState.opListReadCapability = createPromiseCapability();
  1965. intentState.renderTasks = [];
  1966. intentState.renderTasks.push(opListTask);
  1967. intentState.operatorList = {
  1968. fnArray: [],
  1969. argsArray: [],
  1970. lastChunk: false
  1971. };
  1972. this.transport.messageHandler.send('RenderPageRequest', {
  1973. pageIndex: this.pageIndex,
  1974. intent: renderingIntent
  1975. });
  1976. }
  1977. return intentState.opListReadCapability.promise;
  1978. },
  1979. /**
  1980. * @return {Promise} That is resolved a {@link TextContent}
  1981. * object that represent the page text content.
  1982. */
  1983. getTextContent: function PDFPageProxy_getTextContent() {
  1984. return this.transport.messageHandler.sendWithPromise('GetTextContent', {
  1985. pageIndex: this.pageNumber - 1
  1986. });
  1987. },
  1988. /**
  1989. * Destroys resources allocated by the page.
  1990. */
  1991. destroy: function PDFPageProxy_destroy() {
  1992. this.pendingDestroy = true;
  1993. this._tryDestroy();
  1994. },
  1995. /**
  1996. * For internal use only. Attempts to clean up if rendering is in a state
  1997. * where that's possible.
  1998. * @ignore
  1999. */
  2000. _tryDestroy: function PDFPageProxy__destroy() {
  2001. if (!this.pendingDestroy ||
  2002. Object.keys(this.intentStates).some(function(intent) {
  2003. var intentState = this.intentStates[intent];
  2004. return (intentState.renderTasks.length !== 0 ||
  2005. intentState.receivingOperatorList);
  2006. }, this)) {
  2007. return;
  2008. }
  2009. Object.keys(this.intentStates).forEach(function(intent) {
  2010. delete this.intentStates[intent];
  2011. }, this);
  2012. this.objs.clear();
  2013. this.annotationsPromise = null;
  2014. this.pendingDestroy = false;
  2015. },
  2016. /**
  2017. * For internal use only.
  2018. * @ignore
  2019. */
  2020. _startRenderPage: function PDFPageProxy_startRenderPage(transparency,
  2021. intent) {
  2022. var intentState = this.intentStates[intent];
  2023. // TODO Refactor RenderPageRequest to separate rendering
  2024. // and operator list logic
  2025. if (intentState.displayReadyCapability) {
  2026. intentState.displayReadyCapability.resolve(transparency);
  2027. }
  2028. },
  2029. /**
  2030. * For internal use only.
  2031. * @ignore
  2032. */
  2033. _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk,
  2034. intent) {
  2035. var intentState = this.intentStates[intent];
  2036. var i, ii;
  2037. // Add the new chunk to the current operator list.
  2038. for (i = 0, ii = operatorListChunk.length; i < ii; i++) {
  2039. intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);
  2040. intentState.operatorList.argsArray.push(
  2041. operatorListChunk.argsArray[i]);
  2042. }
  2043. intentState.operatorList.lastChunk = operatorListChunk.lastChunk;
  2044. // Notify all the rendering tasks there are more operators to be consumed.
  2045. for (i = 0; i < intentState.renderTasks.length; i++) {
  2046. intentState.renderTasks[i].operatorListChanged();
  2047. }
  2048. if (operatorListChunk.lastChunk) {
  2049. intentState.receivingOperatorList = false;
  2050. this._tryDestroy();
  2051. }
  2052. }
  2053. };
  2054. return PDFPageProxy;
  2055. })();
  2056. /**
  2057. * For internal use only.
  2058. * @ignore
  2059. */
  2060. var WorkerTransport = (function WorkerTransportClosure() {
  2061. function WorkerTransport(workerInitializedCapability, workerReadyCapability,
  2062. pdfDataRangeTransport, progressCallback) {
  2063. this.pdfDataRangeTransport = pdfDataRangeTransport;
  2064. this.workerInitializedCapability = workerInitializedCapability;
  2065. this.workerReadyCapability = workerReadyCapability;
  2066. this.progressCallback = progressCallback;
  2067. this.commonObjs = new PDFObjects();
  2068. this.pageCache = [];
  2069. this.pagePromises = [];
  2070. this.downloadInfoCapability = createPromiseCapability();
  2071. this.passwordCallback = null;
  2072. // If worker support isn't disabled explicit and the browser has worker
  2073. // support, create a new web worker and test if it/the browser fullfills
  2074. // all requirements to run parts of pdf.js in a web worker.
  2075. // Right now, the requirement is, that an Uint8Array is still an Uint8Array
  2076. // as it arrives on the worker. Chrome added this with version 15.
  2077. // Either workers are disabled, not supported or have thrown an exception.
  2078. // Thus, we fallback to a faked worker.
  2079. this.setupFakeWorker();
  2080. }
  2081. WorkerTransport.prototype = {
  2082. destroy: function WorkerTransport_destroy() {
  2083. this.pageCache = [];
  2084. this.pagePromises = [];
  2085. var self = this;
  2086. this.messageHandler.sendWithPromise('Terminate', null).then(function () {
  2087. FontLoader.clear();
  2088. if (self.worker) {
  2089. self.worker.terminate();
  2090. }
  2091. });
  2092. },
  2093. setupFakeWorker: function WorkerTransport_setupFakeWorker() {
  2094. globalScope.PDFJS.disableWorker = true;
  2095. if (!PDFJS.fakeWorkerFilesLoadedCapability) {
  2096. PDFJS.fakeWorkerFilesLoadedCapability = createPromiseCapability();
  2097. // In the developer build load worker_loader which in turn loads all the
  2098. // other files and resolves the promise. In production only the
  2099. // pdf.worker.js file is needed.
  2100. PDFJS.fakeWorkerFilesLoadedCapability.resolve();
  2101. }
  2102. PDFJS.fakeWorkerFilesLoadedCapability.promise.then(function () {
  2103. warn('Setting up fake worker.');
  2104. // If we don't use a worker, just post/sendMessage to the main thread.
  2105. var fakeWorker = {
  2106. postMessage: function WorkerTransport_postMessage(obj) {
  2107. fakeWorker.onmessage({data: obj});
  2108. },
  2109. terminate: function WorkerTransport_terminate() {}
  2110. };
  2111. var messageHandler = new MessageHandler('main', fakeWorker);
  2112. this.setupMessageHandler(messageHandler);
  2113. // If the main thread is our worker, setup the handling for the messages
  2114. // the main thread sends to it self.
  2115. PDFJS.WorkerMessageHandler.setup(messageHandler);
  2116. this.workerInitializedCapability.resolve();
  2117. }.bind(this));
  2118. },
  2119. setupMessageHandler:
  2120. function WorkerTransport_setupMessageHandler(messageHandler) {
  2121. this.messageHandler = messageHandler;
  2122. function updatePassword(password) {
  2123. messageHandler.send('UpdatePassword', password);
  2124. }
  2125. var pdfDataRangeTransport = this.pdfDataRangeTransport;
  2126. if (pdfDataRangeTransport) {
  2127. pdfDataRangeTransport.addRangeListener(function(begin, chunk) {
  2128. messageHandler.send('OnDataRange', {
  2129. begin: begin,
  2130. chunk: chunk
  2131. });
  2132. });
  2133. pdfDataRangeTransport.addProgressListener(function(loaded) {
  2134. messageHandler.send('OnDataProgress', {
  2135. loaded: loaded
  2136. });
  2137. });
  2138. messageHandler.on('RequestDataRange',
  2139. function transportDataRange(data) {
  2140. pdfDataRangeTransport.requestDataRange(data.begin, data.end);
  2141. }, this);
  2142. }
  2143. messageHandler.on('GetDoc', function transportDoc(data) {
  2144. var pdfInfo = data.pdfInfo;
  2145. this.numPages = data.pdfInfo.numPages;
  2146. var pdfDocument = new PDFDocumentProxy(pdfInfo, this);
  2147. this.pdfDocument = pdfDocument;
  2148. this.workerReadyCapability.resolve(pdfDocument);
  2149. }, this);
  2150. messageHandler.on('NeedPassword', function transportPassword(data) {
  2151. if (this.passwordCallback) {
  2152. return this.passwordCallback(updatePassword,
  2153. PasswordResponses.NEED_PASSWORD);
  2154. }
  2155. this.workerReadyCapability.reject(data.exception.message,
  2156. data.exception);
  2157. }, this);
  2158. messageHandler.on('IncorrectPassword', function transportBadPass(data) {
  2159. if (this.passwordCallback) {
  2160. return this.passwordCallback(updatePassword,
  2161. PasswordResponses.INCORRECT_PASSWORD);
  2162. }
  2163. this.workerReadyCapability.reject(data.exception.message,
  2164. data.exception);
  2165. }, this);
  2166. messageHandler.on('InvalidPDF', function transportInvalidPDF(data) {
  2167. this.workerReadyCapability.reject(data.exception.name, data.exception);
  2168. }, this);
  2169. messageHandler.on('MissingPDF', function transportMissingPDF(data) {
  2170. this.workerReadyCapability.reject(data.exception.message,
  2171. data.exception);
  2172. }, this);
  2173. messageHandler.on('UnknownError', function transportUnknownError(data) {
  2174. this.workerReadyCapability.reject(data.exception.message,
  2175. data.exception);
  2176. }, this);
  2177. messageHandler.on('DataLoaded', function transportPage(data) {
  2178. this.downloadInfoCapability.resolve(data);
  2179. }, this);
  2180. messageHandler.on('StartRenderPage', function transportRender(data) {
  2181. var page = this.pageCache[data.pageIndex];
  2182. page.stats.timeEnd('Page Request');
  2183. page._startRenderPage(data.transparency, data.intent);
  2184. }, this);
  2185. messageHandler.on('RenderPageChunk', function transportRender(data) {
  2186. var page = this.pageCache[data.pageIndex];
  2187. page._renderPageChunk(data.operatorList, data.intent);
  2188. }, this);
  2189. messageHandler.on('commonobj', function transportObj(data) {
  2190. var id = data[0];
  2191. var type = data[1];
  2192. if (this.commonObjs.hasData(id)) {
  2193. return;
  2194. }
  2195. switch (type) {
  2196. case 'Font':
  2197. var exportedData = data[2];
  2198. var font;
  2199. if ('error' in exportedData) {
  2200. var error = exportedData.error;
  2201. warn('Error during font loading: ' + error);
  2202. this.commonObjs.resolve(id, error);
  2203. break;
  2204. } else {
  2205. font = new FontFace(exportedData);
  2206. }
  2207. FontLoader.bind(
  2208. [font],
  2209. function fontReady(fontObjs) {
  2210. this.commonObjs.resolve(id, font);
  2211. }.bind(this)
  2212. );
  2213. break;
  2214. case 'FontPath':
  2215. this.commonObjs.resolve(id, data[2]);
  2216. break;
  2217. default:
  2218. error('Got unknown common object type ' + type);
  2219. }
  2220. }, this);
  2221. messageHandler.on('obj', function transportObj(data) {
  2222. var id = data[0];
  2223. var pageIndex = data[1];
  2224. var type = data[2];
  2225. var pageProxy = this.pageCache[pageIndex];
  2226. var imageData;
  2227. if (pageProxy.objs.hasData(id)) {
  2228. return;
  2229. }
  2230. switch (type) {
  2231. case 'JpegStream':
  2232. imageData = data[3];
  2233. loadJpegStream(id, imageData, pageProxy.objs);
  2234. break;
  2235. case 'Image':
  2236. imageData = data[3];
  2237. pageProxy.objs.resolve(id, imageData);
  2238. // heuristics that will allow not to store large data
  2239. var MAX_IMAGE_SIZE_TO_STORE = 8000000;
  2240. if (imageData && 'data' in imageData &&
  2241. imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
  2242. pageProxy.cleanupAfterRender = true;
  2243. }
  2244. break;
  2245. default:
  2246. error('Got unknown object type ' + type);
  2247. }
  2248. }, this);
  2249. messageHandler.on('DocProgress', function transportDocProgress(data) {
  2250. if (this.progressCallback) {
  2251. this.progressCallback({
  2252. loaded: data.loaded,
  2253. total: data.total
  2254. });
  2255. }
  2256. }, this);
  2257. messageHandler.on('DocError', function transportDocError(data) {
  2258. this.workerReadyCapability.reject(data);
  2259. }, this);
  2260. messageHandler.on('PageError', function transportError(data) {
  2261. var page = this.pageCache[data.pageNum - 1];
  2262. var intentState = page.intentStates[data.intent];
  2263. if (intentState.displayReadyCapability.promise) {
  2264. intentState.displayReadyCapability.reject(data.error);
  2265. } else {
  2266. error(data.error);
  2267. }
  2268. }, this);
  2269. messageHandler.on('JpegDecode', function(data) {
  2270. var imageUrl = data[0];
  2271. var components = data[1];
  2272. if (components != 3 && components != 1) {
  2273. return Promise.reject(
  2274. new Error('Only 3 components or 1 component can be returned'));
  2275. }
  2276. return new Promise(function (resolve, reject) {
  2277. var img = new Image();
  2278. img.onload = function () {
  2279. var width = img.width;
  2280. var height = img.height;
  2281. var size = width * height;
  2282. var rgbaLength = size * 4;
  2283. var buf = new Uint8Array(size * components);
  2284. var tmpCanvas = createScratchCanvas(width, height);
  2285. var tmpCtx = tmpCanvas.getContext('2d');
  2286. tmpCtx.drawImage(img, 0, 0);
  2287. var data = tmpCtx.getImageData(0, 0, width, height).data;
  2288. var i, j;
  2289. if (components == 3) {
  2290. for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
  2291. buf[j] = data[i];
  2292. buf[j + 1] = data[i + 1];
  2293. buf[j + 2] = data[i + 2];
  2294. }
  2295. } else if (components == 1) {
  2296. for (i = 0, j = 0; i < rgbaLength; i += 4, j++) {
  2297. buf[j] = data[i];
  2298. }
  2299. }
  2300. resolve({ data: buf, width: width, height: height});
  2301. };
  2302. img.onerror = function () {
  2303. reject(new Error('JpegDecode failed to load image'));
  2304. };
  2305. img.src = imageUrl;
  2306. });
  2307. });
  2308. },
  2309. fetchDocument: function WorkerTransport_fetchDocument(source) {
  2310. source.disableAutoFetch = PDFJS.disableAutoFetch;
  2311. source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
  2312. this.messageHandler.send('GetDocRequest', {
  2313. source: source,
  2314. disableRange: PDFJS.disableRange,
  2315. maxImageSize: PDFJS.maxImageSize,
  2316. cMapUrl: PDFJS.cMapUrl,
  2317. cMapPacked: PDFJS.cMapPacked,
  2318. disableFontFace: PDFJS.disableFontFace,
  2319. disableCreateObjectURL: PDFJS.disableCreateObjectURL,
  2320. verbosity: PDFJS.verbosity
  2321. });
  2322. },
  2323. getData: function WorkerTransport_getData() {
  2324. return this.messageHandler.sendWithPromise('GetData', null);
  2325. },
  2326. getPage: function WorkerTransport_getPage(pageNumber, capability) {
  2327. if (pageNumber <= 0 || pageNumber > this.numPages ||
  2328. (pageNumber|0) !== pageNumber) {
  2329. return Promise.reject(new Error('Invalid page request'));
  2330. }
  2331. var pageIndex = pageNumber - 1;
  2332. if (pageIndex in this.pagePromises) {
  2333. return this.pagePromises[pageIndex];
  2334. }
  2335. var promise = this.messageHandler.sendWithPromise('GetPage', {
  2336. pageIndex: pageIndex
  2337. }).then(function (pageInfo) {
  2338. var page = new PDFPageProxy(pageIndex, pageInfo, this);
  2339. this.pageCache[pageIndex] = page;
  2340. return page;
  2341. }.bind(this));
  2342. this.pagePromises[pageIndex] = promise;
  2343. return promise;
  2344. },
  2345. getPageIndex: function WorkerTransport_getPageIndexByRef(ref) {
  2346. return this.messageHandler.sendWithPromise('GetPageIndex', { ref: ref });
  2347. },
  2348. getAnnotations: function WorkerTransport_getAnnotations(pageIndex) {
  2349. return this.messageHandler.sendWithPromise('GetAnnotations',
  2350. { pageIndex: pageIndex });
  2351. },
  2352. getDestinations: function WorkerTransport_getDestinations() {
  2353. return this.messageHandler.sendWithPromise('GetDestinations', null);
  2354. },
  2355. getAttachments: function WorkerTransport_getAttachments() {
  2356. return this.messageHandler.sendWithPromise('GetAttachments', null);
  2357. },
  2358. getJavaScript: function WorkerTransport_getJavaScript() {
  2359. return this.messageHandler.sendWithPromise('GetJavaScript', null);
  2360. },
  2361. getOutline: function WorkerTransport_getOutline() {
  2362. return this.messageHandler.sendWithPromise('GetOutline', null);
  2363. },
  2364. getMetadata: function WorkerTransport_getMetadata() {
  2365. return this.messageHandler.sendWithPromise('GetMetadata', null).
  2366. then(function transportMetadata(results) {
  2367. return {
  2368. info: results[0],
  2369. metadata: (results[1] ? new PDFJS.Metadata(results[1]) : null)
  2370. };
  2371. });
  2372. },
  2373. getStats: function WorkerTransport_getStats() {
  2374. return this.messageHandler.sendWithPromise('GetStats', null);
  2375. },
  2376. startCleanup: function WorkerTransport_startCleanup() {
  2377. this.messageHandler.sendWithPromise('Cleanup', null).
  2378. then(function endCleanup() {
  2379. for (var i = 0, ii = this.pageCache.length; i < ii; i++) {
  2380. var page = this.pageCache[i];
  2381. if (page) {
  2382. page.destroy();
  2383. }
  2384. }
  2385. this.commonObjs.clear();
  2386. FontLoader.clear();
  2387. }.bind(this));
  2388. }
  2389. };
  2390. return WorkerTransport;
  2391. })();
  2392. /**
  2393. * A PDF document and page is built of many objects. E.g. there are objects
  2394. * for fonts, images, rendering code and such. These objects might get processed
  2395. * inside of a worker. The `PDFObjects` implements some basic functions to
  2396. * manage these objects.
  2397. * @ignore
  2398. */
  2399. var PDFObjects = (function PDFObjectsClosure() {
  2400. function PDFObjects() {
  2401. this.objs = {};
  2402. }
  2403. PDFObjects.prototype = {
  2404. /**
  2405. * Internal function.
  2406. * Ensures there is an object defined for `objId`.
  2407. */
  2408. ensureObj: function PDFObjects_ensureObj(objId) {
  2409. if (this.objs[objId]) {
  2410. return this.objs[objId];
  2411. }
  2412. var obj = {
  2413. capability: createPromiseCapability(),
  2414. data: null,
  2415. resolved: false
  2416. };
  2417. this.objs[objId] = obj;
  2418. return obj;
  2419. },
  2420. /**
  2421. * If called *without* callback, this returns the data of `objId` but the
  2422. * object needs to be resolved. If it isn't, this function throws.
  2423. *
  2424. * If called *with* a callback, the callback is called with the data of the
  2425. * object once the object is resolved. That means, if you call this
  2426. * function and the object is already resolved, the callback gets called
  2427. * right away.
  2428. */
  2429. get: function PDFObjects_get(objId, callback) {
  2430. // If there is a callback, then the get can be async and the object is
  2431. // not required to be resolved right now
  2432. if (callback) {
  2433. this.ensureObj(objId).capability.promise.then(callback);
  2434. return null;
  2435. }
  2436. // If there isn't a callback, the user expects to get the resolved data
  2437. // directly.
  2438. var obj = this.objs[objId];
  2439. // If there isn't an object yet or the object isn't resolved, then the
  2440. // data isn't ready yet!
  2441. if (!obj || !obj.resolved) {
  2442. error('Requesting object that isn\'t resolved yet ' + objId);
  2443. }
  2444. return obj.data;
  2445. },
  2446. /**
  2447. * Resolves the object `objId` with optional `data`.
  2448. */
  2449. resolve: function PDFObjects_resolve(objId, data) {
  2450. var obj = this.ensureObj(objId);
  2451. obj.resolved = true;
  2452. obj.data = data;
  2453. obj.capability.resolve(data);
  2454. },
  2455. isResolved: function PDFObjects_isResolved(objId) {
  2456. var objs = this.objs;
  2457. if (!objs[objId]) {
  2458. return false;
  2459. } else {
  2460. return objs[objId].resolved;
  2461. }
  2462. },
  2463. hasData: function PDFObjects_hasData(objId) {
  2464. return this.isResolved(objId);
  2465. },
  2466. /**
  2467. * Returns the data of `objId` if object exists, null otherwise.
  2468. */
  2469. getData: function PDFObjects_getData(objId) {
  2470. var objs = this.objs;
  2471. if (!objs[objId] || !objs[objId].resolved) {
  2472. return null;
  2473. } else {
  2474. return objs[objId].data;
  2475. }
  2476. },
  2477. clear: function PDFObjects_clear() {
  2478. this.objs = {};
  2479. }
  2480. };
  2481. return PDFObjects;
  2482. })();
  2483. /**
  2484. * Allows controlling of the rendering tasks.
  2485. * @class
  2486. */
  2487. var RenderTask = (function RenderTaskClosure() {
  2488. function RenderTask(internalRenderTask) {
  2489. this.internalRenderTask = internalRenderTask;
  2490. /**
  2491. * Promise for rendering task completion.
  2492. * @type {Promise}
  2493. */
  2494. this.promise = this.internalRenderTask.capability.promise;
  2495. }
  2496. RenderTask.prototype = /** @lends RenderTask.prototype */ {
  2497. /**
  2498. * Cancels the rendering task. If the task is currently rendering it will
  2499. * not be cancelled until graphics pauses with a timeout. The promise that
  2500. * this object extends will resolved when cancelled.
  2501. */
  2502. cancel: function RenderTask_cancel() {
  2503. this.internalRenderTask.cancel();
  2504. },
  2505. /**
  2506. * Registers callback to indicate the rendering task completion.
  2507. *
  2508. * @param {function} onFulfilled The callback for the rendering completion.
  2509. * @param {function} onRejected The callback for the rendering failure.
  2510. * @return {Promise} A promise that is resolved after the onFulfilled or
  2511. * onRejected callback.
  2512. */
  2513. then: function RenderTask_then(onFulfilled, onRejected) {
  2514. return this.promise.then(onFulfilled, onRejected);
  2515. }
  2516. };
  2517. return RenderTask;
  2518. })();
  2519. /**
  2520. * For internal use only.
  2521. * @ignore
  2522. */
  2523. var InternalRenderTask = (function InternalRenderTaskClosure() {
  2524. function InternalRenderTask(callback, params, objs, commonObjs, operatorList,
  2525. pageNumber) {
  2526. this.callback = callback;
  2527. this.params = params;
  2528. this.objs = objs;
  2529. this.commonObjs = commonObjs;
  2530. this.operatorListIdx = null;
  2531. this.operatorList = operatorList;
  2532. this.pageNumber = pageNumber;
  2533. this.running = false;
  2534. this.graphicsReadyCallback = null;
  2535. this.graphicsReady = false;
  2536. this.cancelled = false;
  2537. this.capability = createPromiseCapability();
  2538. // caching this-bound methods
  2539. this._continueBound = this._continue.bind(this);
  2540. this._scheduleNextBound = this._scheduleNext.bind(this);
  2541. this._nextBound = this._next.bind(this);
  2542. }
  2543. InternalRenderTask.prototype = {
  2544. initalizeGraphics:
  2545. function InternalRenderTask_initalizeGraphics(transparency) {
  2546. if (this.cancelled) {
  2547. return;
  2548. }
  2549. if (PDFJS.pdfBug && 'StepperManager' in globalScope &&
  2550. globalScope.StepperManager.enabled) {
  2551. this.stepper = globalScope.StepperManager.create(this.pageNumber - 1);
  2552. this.stepper.init(this.operatorList);
  2553. this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
  2554. }
  2555. var params = this.params;
  2556. this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
  2557. this.objs, params.imageLayer);
  2558. this.gfx.beginDrawing(params.viewport, transparency);
  2559. this.operatorListIdx = 0;
  2560. this.graphicsReady = true;
  2561. if (this.graphicsReadyCallback) {
  2562. this.graphicsReadyCallback();
  2563. }
  2564. },
  2565. cancel: function InternalRenderTask_cancel() {
  2566. this.running = false;
  2567. this.cancelled = true;
  2568. this.callback('cancelled');
  2569. },
  2570. operatorListChanged: function InternalRenderTask_operatorListChanged() {
  2571. if (!this.graphicsReady) {
  2572. if (!this.graphicsReadyCallback) {
  2573. this.graphicsReadyCallback = this._continueBound;
  2574. }
  2575. return;
  2576. }
  2577. if (this.stepper) {
  2578. this.stepper.updateOperatorList(this.operatorList);
  2579. }
  2580. if (this.running) {
  2581. return;
  2582. }
  2583. this._continue();
  2584. },
  2585. _continue: function InternalRenderTask__continue() {
  2586. this.running = true;
  2587. if (this.cancelled) {
  2588. return;
  2589. }
  2590. if (this.params.continueCallback) {
  2591. this.params.continueCallback(this._scheduleNextBound);
  2592. } else {
  2593. this._scheduleNext();
  2594. }
  2595. },
  2596. _scheduleNext: function InternalRenderTask__scheduleNext() {
  2597. window.requestAnimationFrame(this._nextBound);
  2598. },
  2599. _next: function InternalRenderTask__next() {
  2600. if (this.cancelled) {
  2601. return;
  2602. }
  2603. this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList,
  2604. this.operatorListIdx,
  2605. this._continueBound,
  2606. this.stepper);
  2607. if (this.operatorListIdx === this.operatorList.argsArray.length) {
  2608. this.running = false;
  2609. if (this.operatorList.lastChunk) {
  2610. this.gfx.endDrawing();
  2611. this.callback();
  2612. }
  2613. }
  2614. }
  2615. };
  2616. return InternalRenderTask;
  2617. })();
  2618. var Metadata = PDFJS.Metadata = (function MetadataClosure() {
  2619. function fixMetadata(meta) {
  2620. return meta.replace(/>\\376\\377([^<]+)/g, function(all, codes) {
  2621. var bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g,
  2622. function(code, d1, d2, d3) {
  2623. return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);
  2624. });
  2625. var chars = '';
  2626. for (var i = 0; i < bytes.length; i += 2) {
  2627. var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1);
  2628. chars += code >= 32 && code < 127 && code != 60 && code != 62 &&
  2629. code != 38 && false ? String.fromCharCode(code) :
  2630. '&#x' + (0x10000 + code).toString(16).substring(1) + ';';
  2631. }
  2632. return '>' + chars;
  2633. });
  2634. }
  2635. function Metadata(meta) {
  2636. if (typeof meta === 'string') {
  2637. // Ghostscript produces invalid metadata
  2638. meta = fixMetadata(meta);
  2639. var parser = new DOMParser();
  2640. meta = parser.parseFromString(meta, 'application/xml');
  2641. } else if (!(meta instanceof Document)) {
  2642. error('Metadata: Invalid metadata object');
  2643. }
  2644. this.metaDocument = meta;
  2645. this.metadata = {};
  2646. this.parse();
  2647. }
  2648. Metadata.prototype = {
  2649. parse: function Metadata_parse() {
  2650. var doc = this.metaDocument;
  2651. var rdf = doc.documentElement;
  2652. if (rdf.nodeName.toLowerCase() !== 'rdf:rdf') { // Wrapped in <xmpmeta>
  2653. rdf = rdf.firstChild;
  2654. while (rdf && rdf.nodeName.toLowerCase() !== 'rdf:rdf') {
  2655. rdf = rdf.nextSibling;
  2656. }
  2657. }
  2658. var nodeName = (rdf) ? rdf.nodeName.toLowerCase() : null;
  2659. if (!rdf || nodeName !== 'rdf:rdf' || !rdf.hasChildNodes()) {
  2660. return;
  2661. }
  2662. var children = rdf.childNodes, desc, entry, name, i, ii, length, iLength;
  2663. for (i = 0, length = children.length; i < length; i++) {
  2664. desc = children[i];
  2665. if (desc.nodeName.toLowerCase() !== 'rdf:description') {
  2666. continue;
  2667. }
  2668. for (ii = 0, iLength = desc.childNodes.length; ii < iLength; ii++) {
  2669. if (desc.childNodes[ii].nodeName.toLowerCase() !== '#text') {
  2670. entry = desc.childNodes[ii];
  2671. name = entry.nodeName.toLowerCase();
  2672. this.metadata[name] = entry.textContent.trim();
  2673. }
  2674. }
  2675. }
  2676. },
  2677. get: function Metadata_get(name) {
  2678. return this.metadata[name] || null;
  2679. },
  2680. has: function Metadata_has(name) {
  2681. return typeof this.metadata[name] !== 'undefined';
  2682. }
  2683. };
  2684. return Metadata;
  2685. })();
  2686. // <canvas> contexts store most of the state we need natively.
  2687. // However, PDF needs a bit more state, which we store here.
  2688. // Minimal font size that would be used during canvas fillText operations.
  2689. var MIN_FONT_SIZE = 16;
  2690. var MAX_GROUP_SIZE = 4096;
  2691. var COMPILE_TYPE3_GLYPHS = true;
  2692. function createScratchCanvas(width, height) {
  2693. var canvas = document.createElement('canvas');
  2694. canvas.width = width;
  2695. canvas.height = height;
  2696. return canvas;
  2697. }
  2698. function addContextCurrentTransform(ctx) {
  2699. // If the context doesn't expose a `mozCurrentTransform`, add a JS based on.
  2700. if (!ctx.mozCurrentTransform) {
  2701. // Store the original context
  2702. ctx._scaleX = ctx._scaleX || 1.0;
  2703. ctx._scaleY = ctx._scaleY || 1.0;
  2704. ctx._originalSave = ctx.save;
  2705. ctx._originalRestore = ctx.restore;
  2706. ctx._originalRotate = ctx.rotate;
  2707. ctx._originalScale = ctx.scale;
  2708. ctx._originalTranslate = ctx.translate;
  2709. ctx._originalTransform = ctx.transform;
  2710. ctx._originalSetTransform = ctx.setTransform;
  2711. ctx._transformMatrix = [ctx._scaleX, 0, 0, ctx._scaleY, 0, 0];
  2712. ctx._transformStack = [];
  2713. Object.defineProperty(ctx, 'mozCurrentTransform', {
  2714. get: function getCurrentTransform() {
  2715. return this._transformMatrix;
  2716. }
  2717. });
  2718. Object.defineProperty(ctx, 'mozCurrentTransformInverse', {
  2719. get: function getCurrentTransformInverse() {
  2720. // Calculation done using WolframAlpha:
  2721. // http://www.wolframalpha.com/input/?
  2722. // i=Inverse+{{a%2C+c%2C+e}%2C+{b%2C+d%2C+f}%2C+{0%2C+0%2C+1}}
  2723. var m = this._transformMatrix;
  2724. var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];
  2725. var ad_bc = a * d - b * c;
  2726. var bc_ad = b * c - a * d;
  2727. return [
  2728. d / ad_bc,
  2729. b / bc_ad,
  2730. c / bc_ad,
  2731. a / ad_bc,
  2732. (d * e - c * f) / bc_ad,
  2733. (b * e - a * f) / ad_bc
  2734. ];
  2735. }
  2736. });
  2737. ctx.save = function ctxSave() {
  2738. var old = this._transformMatrix;
  2739. this._transformStack.push(old);
  2740. this._transformMatrix = old.slice(0, 6);
  2741. this._originalSave();
  2742. };
  2743. ctx.restore = function ctxRestore() {
  2744. var prev = this._transformStack.pop();
  2745. if (prev) {
  2746. this._transformMatrix = prev;
  2747. this._originalRestore();
  2748. }
  2749. };
  2750. ctx.translate = function ctxTranslate(x, y) {
  2751. var m = this._transformMatrix;
  2752. m[4] = m[0] * x + m[2] * y + m[4];
  2753. m[5] = m[1] * x + m[3] * y + m[5];
  2754. this._originalTranslate(x, y);
  2755. };
  2756. ctx.scale = function ctxScale(x, y) {
  2757. var m = this._transformMatrix;
  2758. m[0] = m[0] * x;
  2759. m[1] = m[1] * x;
  2760. m[2] = m[2] * y;
  2761. m[3] = m[3] * y;
  2762. this._originalScale(x, y);
  2763. };
  2764. ctx.transform = function ctxTransform(a, b, c, d, e, f) {
  2765. var m = this._transformMatrix;
  2766. this._transformMatrix = [
  2767. m[0] * a + m[2] * b,
  2768. m[1] * a + m[3] * b,
  2769. m[0] * c + m[2] * d,
  2770. m[1] * c + m[3] * d,
  2771. m[0] * e + m[2] * f + m[4],
  2772. m[1] * e + m[3] * f + m[5]
  2773. ];
  2774. ctx._originalTransform(a, b, c, d, e, f);
  2775. };
  2776. ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {
  2777. this._transformMatrix = [a, b, c, d, e, f];
  2778. ctx._originalSetTransform(a, b, c, d, e, f);
  2779. };
  2780. ctx.rotate = function ctxRotate(angle) {
  2781. var cosValue = Math.cos(angle);
  2782. var sinValue = Math.sin(angle);
  2783. var m = this._transformMatrix;
  2784. this._transformMatrix = [
  2785. m[0] * cosValue + m[2] * sinValue,
  2786. m[1] * cosValue + m[3] * sinValue,
  2787. m[0] * (-sinValue) + m[2] * cosValue,
  2788. m[1] * (-sinValue) + m[3] * cosValue,
  2789. m[4],
  2790. m[5]
  2791. ];
  2792. this._originalRotate(angle);
  2793. };
  2794. }
  2795. }
  2796. var CachedCanvases = (function CachedCanvasesClosure() {
  2797. var cache = {};
  2798. return {
  2799. getCanvas: function CachedCanvases_getCanvas(id, width, height,
  2800. trackTransform) {
  2801. var canvasEntry;
  2802. if (id in cache) {
  2803. canvasEntry = cache[id];
  2804. canvasEntry.canvas.width = width;
  2805. canvasEntry.canvas.height = height;
  2806. // reset canvas transform for emulated mozCurrentTransform, if needed
  2807. canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);
  2808. } else {
  2809. var canvas = createScratchCanvas(width, height);
  2810. var ctx = canvas.getContext('2d');
  2811. if (trackTransform) {
  2812. addContextCurrentTransform(ctx);
  2813. }
  2814. cache[id] = canvasEntry = {canvas: canvas, context: ctx};
  2815. }
  2816. return canvasEntry;
  2817. },
  2818. clear: function () {
  2819. for (var id in cache) {
  2820. var canvasEntry = cache[id];
  2821. // Zeroing the width and height causes Firefox to release graphics
  2822. // resources immediately, which can greatly reduce memory consumption.
  2823. canvasEntry.canvas.width = 0;
  2824. canvasEntry.canvas.height = 0;
  2825. delete cache[id];
  2826. }
  2827. }
  2828. };
  2829. })();
  2830. function compileType3Glyph(imgData) {
  2831. var POINT_TO_PROCESS_LIMIT = 1000;
  2832. var width = imgData.width, height = imgData.height;
  2833. var i, j, j0, width1 = width + 1;
  2834. var points = new Uint8Array(width1 * (height + 1));
  2835. var POINT_TYPES =
  2836. new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
  2837. // decodes bit-packed mask data
  2838. var lineSize = (width + 7) & ~7, data0 = imgData.data;
  2839. var data = new Uint8Array(lineSize * height), pos = 0, ii;
  2840. for (i = 0, ii = data0.length; i < ii; i++) {
  2841. var mask = 128, elem = data0[i];
  2842. while (mask > 0) {
  2843. data[pos++] = (elem & mask) ? 0 : 255;
  2844. mask >>= 1;
  2845. }
  2846. }
  2847. // finding iteresting points: every point is located between mask pixels,
  2848. // so there will be points of the (width + 1)x(height + 1) grid. Every point
  2849. // will have flags assigned based on neighboring mask pixels:
  2850. // 4 | 8
  2851. // --P--
  2852. // 2 | 1
  2853. // We are interested only in points with the flags:
  2854. // - outside corners: 1, 2, 4, 8;
  2855. // - inside corners: 7, 11, 13, 14;
  2856. // - and, intersections: 5, 10.
  2857. var count = 0;
  2858. pos = 0;
  2859. if (data[pos] !== 0) {
  2860. points[0] = 1;
  2861. ++count;
  2862. }
  2863. for (j = 1; j < width; j++) {
  2864. if (data[pos] !== data[pos + 1]) {
  2865. points[j] = data[pos] ? 2 : 1;
  2866. ++count;
  2867. }
  2868. pos++;
  2869. }
  2870. if (data[pos] !== 0) {
  2871. points[j] = 2;
  2872. ++count;
  2873. }
  2874. for (i = 1; i < height; i++) {
  2875. pos = i * lineSize;
  2876. j0 = i * width1;
  2877. if (data[pos - lineSize] !== data[pos]) {
  2878. points[j0] = data[pos] ? 1 : 8;
  2879. ++count;
  2880. }
  2881. // 'sum' is the position of the current pixel configuration in the 'TYPES'
  2882. // array (in order 8-1-2-4, so we can use '>>2' to shift the column).
  2883. var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);
  2884. for (j = 1; j < width; j++) {
  2885. sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) +
  2886. (data[pos - lineSize + 1] ? 8 : 0);
  2887. if (POINT_TYPES[sum]) {
  2888. points[j0 + j] = POINT_TYPES[sum];
  2889. ++count;
  2890. }
  2891. pos++;
  2892. }
  2893. if (data[pos - lineSize] !== data[pos]) {
  2894. points[j0 + j] = data[pos] ? 2 : 4;
  2895. ++count;
  2896. }
  2897. if (count > POINT_TO_PROCESS_LIMIT) {
  2898. return null;
  2899. }
  2900. }
  2901. pos = lineSize * (height - 1);
  2902. j0 = i * width1;
  2903. if (data[pos] !== 0) {
  2904. points[j0] = 8;
  2905. ++count;
  2906. }
  2907. for (j = 1; j < width; j++) {
  2908. if (data[pos] !== data[pos + 1]) {
  2909. points[j0 + j] = data[pos] ? 4 : 8;
  2910. ++count;
  2911. }
  2912. pos++;
  2913. }
  2914. if (data[pos] !== 0) {
  2915. points[j0 + j] = 4;
  2916. ++count;
  2917. }
  2918. if (count > POINT_TO_PROCESS_LIMIT) {
  2919. return null;
  2920. }
  2921. // building outlines
  2922. var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);
  2923. var outlines = [];
  2924. for (i = 0; count && i <= height; i++) {
  2925. var p = i * width1;
  2926. var end = p + width;
  2927. while (p < end && !points[p]) {
  2928. p++;
  2929. }
  2930. if (p === end) {
  2931. continue;
  2932. }
  2933. var coords = [p % width1, i];
  2934. var type = points[p], p0 = p, pp;
  2935. do {
  2936. var step = steps[type];
  2937. do {
  2938. p += step;
  2939. } while (!points[p]);
  2940. pp = points[p];
  2941. if (pp !== 5 && pp !== 10) {
  2942. // set new direction
  2943. type = pp;
  2944. // delete mark
  2945. points[p] = 0;
  2946. } else { // type is 5 or 10, ie, a crossing
  2947. // set new direction
  2948. type = pp & ((0x33 * type) >> 4);
  2949. // set new type for "future hit"
  2950. points[p] &= (type >> 2 | type << 2);
  2951. }
  2952. coords.push(p % width1);
  2953. coords.push((p / width1) | 0);
  2954. --count;
  2955. } while (p0 !== p);
  2956. outlines.push(coords);
  2957. --i;
  2958. }
  2959. var drawOutline = function(c) {
  2960. c.save();
  2961. // the path shall be painted in [0..1]x[0..1] space
  2962. c.scale(1 / width, -1 / height);
  2963. c.translate(0, -height);
  2964. c.beginPath();
  2965. for (var i = 0, ii = outlines.length; i < ii; i++) {
  2966. var o = outlines[i];
  2967. c.moveTo(o[0], o[1]);
  2968. for (var j = 2, jj = o.length; j < jj; j += 2) {
  2969. c.lineTo(o[j], o[j+1]);
  2970. }
  2971. }
  2972. c.fill();
  2973. c.beginPath();
  2974. c.restore();
  2975. };
  2976. return drawOutline;
  2977. }
  2978. var CanvasExtraState = (function CanvasExtraStateClosure() {
  2979. function CanvasExtraState(old) {
  2980. // Are soft masks and alpha values shapes or opacities?
  2981. this.alphaIsShape = false;
  2982. this.fontSize = 0;
  2983. this.fontSizeScale = 1;
  2984. this.textMatrix = IDENTITY_MATRIX;
  2985. this.textMatrixScale = 1;
  2986. this.fontMatrix = FONT_IDENTITY_MATRIX;
  2987. this.leading = 0;
  2988. // Current point (in user coordinates)
  2989. this.x = 0;
  2990. this.y = 0;
  2991. // Start of text line (in text coordinates)
  2992. this.lineX = 0;
  2993. this.lineY = 0;
  2994. // Character and word spacing
  2995. this.charSpacing = 0;
  2996. this.wordSpacing = 0;
  2997. this.textHScale = 1;
  2998. this.textRenderingMode = TextRenderingMode.FILL;
  2999. this.textRise = 0;
  3000. // Default fore and background colors
  3001. this.fillColor = '#000000';
  3002. this.strokeColor = '#000000';
  3003. // Note: fill alpha applies to all non-stroking operations
  3004. this.fillAlpha = 1;
  3005. this.strokeAlpha = 1;
  3006. this.lineWidth = 1;
  3007. this.activeSMask = null; // nonclonable field (see the save method below)
  3008. this.old = old;
  3009. }
  3010. CanvasExtraState.prototype = {
  3011. clone: function CanvasExtraState_clone() {
  3012. return Object.create(this);
  3013. },
  3014. setCurrentPoint: function CanvasExtraState_setCurrentPoint(x, y) {
  3015. this.x = x;
  3016. this.y = y;
  3017. }
  3018. };
  3019. return CanvasExtraState;
  3020. })();
  3021. var CanvasGraphics = (function CanvasGraphicsClosure() {
  3022. // Defines the time the executeOperatorList is going to be executing
  3023. // before it stops and shedules a continue of execution.
  3024. var EXECUTION_TIME = 15;
  3025. // Defines the number of steps before checking the execution time
  3026. var EXECUTION_STEPS = 10;
  3027. function CanvasGraphics(canvasCtx, commonObjs, objs, imageLayer) {
  3028. this.ctx = canvasCtx;
  3029. this.current = new CanvasExtraState();
  3030. this.stateStack = [];
  3031. this.pendingClip = null;
  3032. this.pendingEOFill = false;
  3033. this.res = null;
  3034. this.xobjs = null;
  3035. this.commonObjs = commonObjs;
  3036. this.objs = objs;
  3037. this.imageLayer = imageLayer;
  3038. this.groupStack = [];
  3039. this.processingType3 = null;
  3040. // Patterns are painted relative to the initial page/form transform, see pdf
  3041. // spec 8.7.2 NOTE 1.
  3042. this.baseTransform = null;
  3043. this.baseTransformStack = [];
  3044. this.groupLevel = 0;
  3045. this.smaskStack = [];
  3046. this.smaskCounter = 0;
  3047. this.tempSMask = null;
  3048. if (canvasCtx) {
  3049. addContextCurrentTransform(canvasCtx);
  3050. }
  3051. }
  3052. function putBinaryImageData(ctx, imgData) {
  3053. if (typeof ImageData !== 'undefined' && imgData instanceof ImageData) {
  3054. ctx.putImageData(imgData, 0, 0);
  3055. return;
  3056. }
  3057. // Put the image data to the canvas in chunks, rather than putting the
  3058. // whole image at once. This saves JS memory, because the ImageData object
  3059. // is smaller. It also possibly saves C++ memory within the implementation
  3060. // of putImageData(). (E.g. in Firefox we make two short-lived copies of
  3061. // the data passed to putImageData()). |n| shouldn't be too small, however,
  3062. // because too many putImageData() calls will slow things down.
  3063. //
  3064. // Note: as written, if the last chunk is partial, the putImageData() call
  3065. // will (conceptually) put pixels past the bounds of the canvas. But
  3066. // that's ok; any such pixels are ignored.
  3067. var height = imgData.height, width = imgData.width;
  3068. var fullChunkHeight = 16;
  3069. var fracChunks = height / fullChunkHeight;
  3070. var fullChunks = Math.floor(fracChunks);
  3071. var totalChunks = Math.ceil(fracChunks);
  3072. var partialChunkHeight = height - fullChunks * fullChunkHeight;
  3073. var chunkImgData = ctx.createImageData(width, fullChunkHeight);
  3074. var srcPos = 0, destPos;
  3075. var src = imgData.data;
  3076. var dest = chunkImgData.data;
  3077. var i, j, thisChunkHeight, elemsInThisChunk;
  3078. // There are multiple forms in which the pixel data can be passed, and
  3079. // imgData.kind tells us which one this is.
  3080. if (imgData.kind === ImageKind.GRAYSCALE_1BPP) {
  3081. // Grayscale, 1 bit per pixel (i.e. black-and-white).
  3082. var srcLength = src.byteLength;
  3083. var dest32 = PDFJS.hasCanvasTypedArrays ? new Uint32Array(dest.buffer) :
  3084. new Uint32ArrayView(dest);
  3085. var dest32DataLength = dest32.length;
  3086. var fullSrcDiff = (width + 7) >> 3;
  3087. var white = 0xFFFFFFFF;
  3088. var black = (PDFJS.isLittleEndian || !PDFJS.hasCanvasTypedArrays) ?
  3089. 0xFF000000 : 0x000000FF;
  3090. for (i = 0; i < totalChunks; i++) {
  3091. thisChunkHeight =
  3092. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  3093. destPos = 0;
  3094. for (j = 0; j < thisChunkHeight; j++) {
  3095. var srcDiff = srcLength - srcPos;
  3096. var k = 0;
  3097. var kEnd = (srcDiff > fullSrcDiff) ? width : srcDiff * 8 - 7;
  3098. var kEndUnrolled = kEnd & ~7;
  3099. var mask = 0;
  3100. var srcByte = 0;
  3101. for (; k < kEndUnrolled; k += 8) {
  3102. srcByte = src[srcPos++];
  3103. dest32[destPos++] = (srcByte & 128) ? white : black;
  3104. dest32[destPos++] = (srcByte & 64) ? white : black;
  3105. dest32[destPos++] = (srcByte & 32) ? white : black;
  3106. dest32[destPos++] = (srcByte & 16) ? white : black;
  3107. dest32[destPos++] = (srcByte & 8) ? white : black;
  3108. dest32[destPos++] = (srcByte & 4) ? white : black;
  3109. dest32[destPos++] = (srcByte & 2) ? white : black;
  3110. dest32[destPos++] = (srcByte & 1) ? white : black;
  3111. }
  3112. for (; k < kEnd; k++) {
  3113. if (mask === 0) {
  3114. srcByte = src[srcPos++];
  3115. mask = 128;
  3116. }
  3117. dest32[destPos++] = (srcByte & mask) ? white : black;
  3118. mask >>= 1;
  3119. }
  3120. }
  3121. // We ran out of input. Make all remaining pixels transparent.
  3122. while (destPos < dest32DataLength) {
  3123. dest32[destPos++] = 0;
  3124. }
  3125. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  3126. }
  3127. } else if (imgData.kind === ImageKind.RGBA_32BPP) {
  3128. // RGBA, 32-bits per pixel.
  3129. j = 0;
  3130. elemsInThisChunk = width * fullChunkHeight * 4;
  3131. for (i = 0; i < fullChunks; i++) {
  3132. dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));
  3133. srcPos += elemsInThisChunk;
  3134. ctx.putImageData(chunkImgData, 0, j);
  3135. j += fullChunkHeight;
  3136. }
  3137. if (i < totalChunks) {
  3138. elemsInThisChunk = width * partialChunkHeight * 4;
  3139. dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));
  3140. ctx.putImageData(chunkImgData, 0, j);
  3141. }
  3142. } else if (imgData.kind === ImageKind.RGB_24BPP) {
  3143. // RGB, 24-bits per pixel.
  3144. thisChunkHeight = fullChunkHeight;
  3145. elemsInThisChunk = width * thisChunkHeight;
  3146. for (i = 0; i < totalChunks; i++) {
  3147. if (i >= fullChunks) {
  3148. thisChunkHeight =partialChunkHeight;
  3149. elemsInThisChunk = width * thisChunkHeight;
  3150. }
  3151. destPos = 0;
  3152. for (j = elemsInThisChunk; j--;) {
  3153. dest[destPos++] = src[srcPos++];
  3154. dest[destPos++] = src[srcPos++];
  3155. dest[destPos++] = src[srcPos++];
  3156. dest[destPos++] = 255;
  3157. }
  3158. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  3159. }
  3160. } else {
  3161. error('bad image kind: ' + imgData.kind);
  3162. }
  3163. }
  3164. function putBinaryImageMask(ctx, imgData) {
  3165. var height = imgData.height, width = imgData.width;
  3166. var fullChunkHeight = 16;
  3167. var fracChunks = height / fullChunkHeight;
  3168. var fullChunks = Math.floor(fracChunks);
  3169. var totalChunks = Math.ceil(fracChunks);
  3170. var partialChunkHeight = height - fullChunks * fullChunkHeight;
  3171. var chunkImgData = ctx.createImageData(width, fullChunkHeight);
  3172. var srcPos = 0;
  3173. var src = imgData.data;
  3174. var dest = chunkImgData.data;
  3175. for (var i = 0; i < totalChunks; i++) {
  3176. var thisChunkHeight =
  3177. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  3178. // Expand the mask so it can be used by the canvas. Any required
  3179. // inversion has already been handled.
  3180. var destPos = 3; // alpha component offset
  3181. for (var j = 0; j < thisChunkHeight; j++) {
  3182. var mask = 0;
  3183. for (var k = 0; k < width; k++) {
  3184. if (!mask) {
  3185. var elem = src[srcPos++];
  3186. mask = 128;
  3187. }
  3188. dest[destPos] = (elem & mask) ? 0 : 255;
  3189. destPos += 4;
  3190. mask >>= 1;
  3191. }
  3192. }
  3193. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  3194. }
  3195. }
  3196. function copyCtxState(sourceCtx, destCtx) {
  3197. var properties = ['strokeStyle', 'fillStyle', 'fillRule', 'globalAlpha',
  3198. 'lineWidth', 'lineCap', 'lineJoin', 'miterLimit',
  3199. 'globalCompositeOperation', 'font'];
  3200. for (var i = 0, ii = properties.length; i < ii; i++) {
  3201. var property = properties[i];
  3202. if (property in sourceCtx) {
  3203. destCtx[property] = sourceCtx[property];
  3204. }
  3205. }
  3206. if ('setLineDash' in sourceCtx) {
  3207. destCtx.setLineDash(sourceCtx.getLineDash());
  3208. destCtx.lineDashOffset = sourceCtx.lineDashOffset;
  3209. } else if ('mozDash' in sourceCtx) {
  3210. destCtx.mozDash = sourceCtx.mozDash;
  3211. destCtx.mozDashOffset = sourceCtx.mozDashOffset;
  3212. }
  3213. }
  3214. function composeSMaskBackdrop(bytes, r0, g0, b0) {
  3215. var length = bytes.length;
  3216. for (var i = 3; i < length; i += 4) {
  3217. var alpha = bytes[i];
  3218. if (alpha === 0) {
  3219. bytes[i - 3] = r0;
  3220. bytes[i - 2] = g0;
  3221. bytes[i - 1] = b0;
  3222. } else if (alpha < 255) {
  3223. var alpha_ = 255 - alpha;
  3224. bytes[i - 3] = (bytes[i - 3] * alpha + r0 * alpha_) >> 8;
  3225. bytes[i - 2] = (bytes[i - 2] * alpha + g0 * alpha_) >> 8;
  3226. bytes[i - 1] = (bytes[i - 1] * alpha + b0 * alpha_) >> 8;
  3227. }
  3228. }
  3229. }
  3230. function composeSMaskAlpha(maskData, layerData) {
  3231. var length = maskData.length;
  3232. var scale = 1 / 255;
  3233. for (var i = 3; i < length; i += 4) {
  3234. var alpha = maskData[i];
  3235. layerData[i] = (layerData[i] * alpha * scale) | 0;
  3236. }
  3237. }
  3238. function composeSMaskLuminosity(maskData, layerData) {
  3239. var length = maskData.length;
  3240. for (var i = 3; i < length; i += 4) {
  3241. var y = ((maskData[i - 3] * 77) + // * 0.3 / 255 * 0x10000
  3242. (maskData[i - 2] * 152) + // * 0.59 ....
  3243. (maskData[i - 1] * 28)) | 0; // * 0.11 ....
  3244. layerData[i] = (layerData[i] * y) >> 16;
  3245. }
  3246. }
  3247. function genericComposeSMask(maskCtx, layerCtx, width, height,
  3248. subtype, backdrop) {
  3249. var hasBackdrop = !!backdrop;
  3250. var r0 = hasBackdrop ? backdrop[0] : 0;
  3251. var g0 = hasBackdrop ? backdrop[1] : 0;
  3252. var b0 = hasBackdrop ? backdrop[2] : 0;
  3253. var composeFn;
  3254. if (subtype === 'Luminosity') {
  3255. composeFn = composeSMaskLuminosity;
  3256. } else {
  3257. composeFn = composeSMaskAlpha;
  3258. }
  3259. // processing image in chunks to save memory
  3260. var PIXELS_TO_PROCESS = 65536;
  3261. var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));
  3262. for (var row = 0; row < height; row += chunkSize) {
  3263. var chunkHeight = Math.min(chunkSize, height - row);
  3264. var maskData = maskCtx.getImageData(0, row, width, chunkHeight);
  3265. var layerData = layerCtx.getImageData(0, row, width, chunkHeight);
  3266. if (hasBackdrop) {
  3267. composeSMaskBackdrop(maskData.data, r0, g0, b0);
  3268. }
  3269. composeFn(maskData.data, layerData.data);
  3270. maskCtx.putImageData(layerData, 0, row);
  3271. }
  3272. }
  3273. function composeSMask(ctx, smask, layerCtx) {
  3274. var mask = smask.canvas;
  3275. var maskCtx = smask.context;
  3276. ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY,
  3277. smask.offsetX, smask.offsetY);
  3278. var backdrop = smask.backdrop || null;
  3279. if (WebGLUtils.isEnabled) {
  3280. var composed = WebGLUtils.composeSMask(layerCtx.canvas, mask,
  3281. {subtype: smask.subtype, backdrop: backdrop});
  3282. ctx.setTransform(1, 0, 0, 1, 0, 0);
  3283. ctx.drawImage(composed, smask.offsetX, smask.offsetY);
  3284. return;
  3285. }
  3286. genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height,
  3287. smask.subtype, backdrop);
  3288. ctx.drawImage(mask, 0, 0);
  3289. }
  3290. var LINE_CAP_STYLES = ['butt', 'round', 'square'];
  3291. var LINE_JOIN_STYLES = ['miter', 'round', 'bevel'];
  3292. var NORMAL_CLIP = {};
  3293. var EO_CLIP = {};
  3294. CanvasGraphics.prototype = {
  3295. beginDrawing: function CanvasGraphics_beginDrawing(viewport, transparency) {
  3296. // For pdfs that use blend modes we have to clear the canvas else certain
  3297. // blend modes can look wrong since we'd be blending with a white
  3298. // backdrop. The problem with a transparent backdrop though is we then
  3299. // don't get sub pixel anti aliasing on text, so we fill with white if
  3300. // we can.
  3301. var width = this.ctx.canvas.width;
  3302. var height = this.ctx.canvas.height;
  3303. if (transparency) {
  3304. this.ctx.clearRect(0, 0, width, height);
  3305. } else {
  3306. this.ctx.mozOpaque = true;
  3307. this.ctx.save();
  3308. this.ctx.fillStyle = 'rgb(255, 255, 255)';
  3309. this.ctx.fillRect(0, 0, width, height);
  3310. this.ctx.restore();
  3311. }
  3312. var transform = viewport.transform;
  3313. this.ctx.save();
  3314. this.ctx.transform.apply(this.ctx, transform);
  3315. this.baseTransform = this.ctx.mozCurrentTransform.slice();
  3316. if (this.imageLayer) {
  3317. this.imageLayer.beginLayout();
  3318. }
  3319. },
  3320. executeOperatorList: function CanvasGraphics_executeOperatorList(
  3321. operatorList,
  3322. executionStartIdx, continueCallback,
  3323. stepper) {
  3324. var argsArray = operatorList.argsArray;
  3325. var fnArray = operatorList.fnArray;
  3326. var i = executionStartIdx || 0;
  3327. var argsArrayLen = argsArray.length;
  3328. // Sometimes the OperatorList to execute is empty.
  3329. if (argsArrayLen === i) {
  3330. return i;
  3331. }
  3332. var chunkOperations = (argsArrayLen - i > EXECUTION_STEPS &&
  3333. typeof continueCallback === 'function');
  3334. var endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;
  3335. var steps = 0;
  3336. var commonObjs = this.commonObjs;
  3337. var objs = this.objs;
  3338. var fnId;
  3339. while (true) {
  3340. if (stepper !== undefined && i === stepper.nextBreakPoint) {
  3341. stepper.breakIt(i, continueCallback);
  3342. return i;
  3343. }
  3344. fnId = fnArray[i];
  3345. if (fnId !== OPS.dependency) {
  3346. this[fnId].apply(this, argsArray[i]);
  3347. } else {
  3348. var deps = argsArray[i];
  3349. for (var n = 0, nn = deps.length; n < nn; n++) {
  3350. var depObjId = deps[n];
  3351. var common = depObjId[0] === 'g' && depObjId[1] === '_';
  3352. var objsPool = common ? commonObjs : objs;
  3353. // If the promise isn't resolved yet, add the continueCallback
  3354. // to the promise and bail out.
  3355. if (!objsPool.isResolved(depObjId)) {
  3356. objsPool.get(depObjId, continueCallback);
  3357. return i;
  3358. }
  3359. }
  3360. }
  3361. i++;
  3362. // If the entire operatorList was executed, stop as were done.
  3363. if (i === argsArrayLen) {
  3364. return i;
  3365. }
  3366. // If the execution took longer then a certain amount of time and
  3367. // `continueCallback` is specified, interrupt the execution.
  3368. if (chunkOperations && ++steps > EXECUTION_STEPS) {
  3369. if (Date.now() > endTime) {
  3370. continueCallback();
  3371. return i;
  3372. }
  3373. steps = 0;
  3374. }
  3375. // If the operatorList isn't executed completely yet OR the execution
  3376. // time was short enough, do another execution round.
  3377. }
  3378. },
  3379. endDrawing: function CanvasGraphics_endDrawing() {
  3380. this.ctx.restore();
  3381. CachedCanvases.clear();
  3382. WebGLUtils.clear();
  3383. if (this.imageLayer) {
  3384. this.imageLayer.endLayout();
  3385. }
  3386. },
  3387. // Graphics state
  3388. setLineWidth: function CanvasGraphics_setLineWidth(width) {
  3389. this.current.lineWidth = width;
  3390. this.ctx.lineWidth = width;
  3391. },
  3392. setLineCap: function CanvasGraphics_setLineCap(style) {
  3393. this.ctx.lineCap = LINE_CAP_STYLES[style];
  3394. },
  3395. setLineJoin: function CanvasGraphics_setLineJoin(style) {
  3396. this.ctx.lineJoin = LINE_JOIN_STYLES[style];
  3397. },
  3398. setMiterLimit: function CanvasGraphics_setMiterLimit(limit) {
  3399. this.ctx.miterLimit = limit;
  3400. },
  3401. setDash: function CanvasGraphics_setDash(dashArray, dashPhase) {
  3402. var ctx = this.ctx;
  3403. if ('setLineDash' in ctx) {
  3404. ctx.setLineDash(dashArray);
  3405. ctx.lineDashOffset = dashPhase;
  3406. } else {
  3407. ctx.mozDash = dashArray;
  3408. ctx.mozDashOffset = dashPhase;
  3409. }
  3410. },
  3411. setRenderingIntent: function CanvasGraphics_setRenderingIntent(intent) {
  3412. // Maybe if we one day fully support color spaces this will be important
  3413. // for now we can ignore.
  3414. // TODO set rendering intent?
  3415. },
  3416. setFlatness: function CanvasGraphics_setFlatness(flatness) {
  3417. // There's no way to control this with canvas, but we can safely ignore.
  3418. // TODO set flatness?
  3419. },
  3420. setGState: function CanvasGraphics_setGState(states) {
  3421. for (var i = 0, ii = states.length; i < ii; i++) {
  3422. var state = states[i];
  3423. var key = state[0];
  3424. var value = state[1];
  3425. switch (key) {
  3426. case 'LW':
  3427. this.setLineWidth(value);
  3428. break;
  3429. case 'LC':
  3430. this.setLineCap(value);
  3431. break;
  3432. case 'LJ':
  3433. this.setLineJoin(value);
  3434. break;
  3435. case 'ML':
  3436. this.setMiterLimit(value);
  3437. break;
  3438. case 'D':
  3439. this.setDash(value[0], value[1]);
  3440. break;
  3441. case 'RI':
  3442. this.setRenderingIntent(value);
  3443. break;
  3444. case 'FL':
  3445. this.setFlatness(value);
  3446. break;
  3447. case 'Font':
  3448. this.setFont(value[0], value[1]);
  3449. break;
  3450. case 'CA':
  3451. this.current.strokeAlpha = state[1];
  3452. break;
  3453. case 'ca':
  3454. this.current.fillAlpha = state[1];
  3455. this.ctx.globalAlpha = state[1];
  3456. break;
  3457. case 'BM':
  3458. if (value && value.name && (value.name !== 'Normal')) {
  3459. var mode = value.name.replace(/([A-Z])/g,
  3460. function(c) {
  3461. return '-' + c.toLowerCase();
  3462. }
  3463. ).substring(1);
  3464. this.ctx.globalCompositeOperation = mode;
  3465. if (this.ctx.globalCompositeOperation !== mode) {
  3466. warn('globalCompositeOperation "' + mode +
  3467. '" is not supported');
  3468. }
  3469. } else {
  3470. this.ctx.globalCompositeOperation = 'source-over';
  3471. }
  3472. break;
  3473. case 'SMask':
  3474. if (this.current.activeSMask) {
  3475. this.endSMaskGroup();
  3476. }
  3477. this.current.activeSMask = value ? this.tempSMask : null;
  3478. if (this.current.activeSMask) {
  3479. this.beginSMaskGroup();
  3480. }
  3481. this.tempSMask = null;
  3482. break;
  3483. }
  3484. }
  3485. },
  3486. beginSMaskGroup: function CanvasGraphics_beginSMaskGroup() {
  3487. var activeSMask = this.current.activeSMask;
  3488. var drawnWidth = activeSMask.canvas.width;
  3489. var drawnHeight = activeSMask.canvas.height;
  3490. var cacheId = 'smaskGroupAt' + this.groupLevel;
  3491. var scratchCanvas = CachedCanvases.getCanvas(
  3492. cacheId, drawnWidth, drawnHeight, true);
  3493. var currentCtx = this.ctx;
  3494. var currentTransform = currentCtx.mozCurrentTransform;
  3495. this.ctx.save();
  3496. var groupCtx = scratchCanvas.context;
  3497. groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY);
  3498. groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY);
  3499. groupCtx.transform.apply(groupCtx, currentTransform);
  3500. copyCtxState(currentCtx, groupCtx);
  3501. this.ctx = groupCtx;
  3502. this.setGState([
  3503. ['BM', 'Normal'],
  3504. ['ca', 1],
  3505. ['CA', 1]
  3506. ]);
  3507. this.groupStack.push(currentCtx);
  3508. this.groupLevel++;
  3509. },
  3510. endSMaskGroup: function CanvasGraphics_endSMaskGroup() {
  3511. var groupCtx = this.ctx;
  3512. this.groupLevel--;
  3513. this.ctx = this.groupStack.pop();
  3514. composeSMask(this.ctx, this.current.activeSMask, groupCtx);
  3515. this.ctx.restore();
  3516. },
  3517. save: function CanvasGraphics_save() {
  3518. this.ctx.save();
  3519. var old = this.current;
  3520. this.stateStack.push(old);
  3521. this.current = old.clone();
  3522. this.current.activeSMask = null;
  3523. },
  3524. restore: function CanvasGraphics_restore() {
  3525. if (this.stateStack.length !== 0) {
  3526. if (this.current.activeSMask !== null) {
  3527. this.endSMaskGroup();
  3528. }
  3529. this.current = this.stateStack.pop();
  3530. this.ctx.restore();
  3531. }
  3532. },
  3533. transform: function CanvasGraphics_transform(a, b, c, d, e, f) {
  3534. this.ctx.transform(a, b, c, d, e, f);
  3535. },
  3536. // Path
  3537. constructPath: function CanvasGraphics_constructPath(ops, args) {
  3538. var ctx = this.ctx;
  3539. var current = this.current;
  3540. var x = current.x, y = current.y;
  3541. for (var i = 0, j = 0, ii = ops.length; i < ii; i++) {
  3542. switch (ops[i] | 0) {
  3543. case OPS.rectangle:
  3544. x = args[j++];
  3545. y = args[j++];
  3546. var width = args[j++];
  3547. var height = args[j++];
  3548. if (width === 0) {
  3549. width = this.getSinglePixelWidth();
  3550. }
  3551. if (height === 0) {
  3552. height = this.getSinglePixelWidth();
  3553. }
  3554. var xw = x + width;
  3555. var yh = y + height;
  3556. this.ctx.moveTo(x, y);
  3557. this.ctx.lineTo(xw, y);
  3558. this.ctx.lineTo(xw, yh);
  3559. this.ctx.lineTo(x, yh);
  3560. this.ctx.lineTo(x, y);
  3561. this.ctx.closePath();
  3562. break;
  3563. case OPS.moveTo:
  3564. x = args[j++];
  3565. y = args[j++];
  3566. ctx.moveTo(x, y);
  3567. break;
  3568. case OPS.lineTo:
  3569. x = args[j++];
  3570. y = args[j++];
  3571. ctx.lineTo(x, y);
  3572. break;
  3573. case OPS.curveTo:
  3574. x = args[j + 4];
  3575. y = args[j + 5];
  3576. ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3],
  3577. x, y);
  3578. j += 6;
  3579. break;
  3580. case OPS.curveTo2:
  3581. ctx.bezierCurveTo(x, y, args[j], args[j + 1],
  3582. args[j + 2], args[j + 3]);
  3583. x = args[j + 2];
  3584. y = args[j + 3];
  3585. j += 4;
  3586. break;
  3587. case OPS.curveTo3:
  3588. x = args[j + 2];
  3589. y = args[j + 3];
  3590. ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);
  3591. j += 4;
  3592. break;
  3593. case OPS.closePath:
  3594. ctx.closePath();
  3595. break;
  3596. }
  3597. }
  3598. current.setCurrentPoint(x, y);
  3599. },
  3600. closePath: function CanvasGraphics_closePath() {
  3601. this.ctx.closePath();
  3602. },
  3603. stroke: function CanvasGraphics_stroke(consumePath) {
  3604. consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
  3605. var ctx = this.ctx;
  3606. var strokeColor = this.current.strokeColor;
  3607. if (this.current.lineWidth === 0) {
  3608. ctx.lineWidth = this.getSinglePixelWidth();
  3609. }
  3610. // For stroke we want to temporarily change the global alpha to the
  3611. // stroking alpha.
  3612. ctx.globalAlpha = this.current.strokeAlpha;
  3613. if (strokeColor && strokeColor.hasOwnProperty('type') &&
  3614. strokeColor.type === 'Pattern') {
  3615. // for patterns, we transform to pattern space, calculate
  3616. // the pattern, call stroke, and restore to user space
  3617. ctx.save();
  3618. ctx.strokeStyle = strokeColor.getPattern(ctx, this);
  3619. ctx.stroke();
  3620. ctx.restore();
  3621. } else {
  3622. ctx.stroke();
  3623. }
  3624. if (consumePath) {
  3625. this.consumePath();
  3626. }
  3627. // Restore the global alpha to the fill alpha
  3628. ctx.globalAlpha = this.current.fillAlpha;
  3629. },
  3630. closeStroke: function CanvasGraphics_closeStroke() {
  3631. this.closePath();
  3632. this.stroke();
  3633. },
  3634. fill: function CanvasGraphics_fill(consumePath) {
  3635. consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
  3636. var ctx = this.ctx;
  3637. var fillColor = this.current.fillColor;
  3638. var needRestore = false;
  3639. if (fillColor && fillColor.hasOwnProperty('type') &&
  3640. fillColor.type === 'Pattern') {
  3641. ctx.save();
  3642. ctx.fillStyle = fillColor.getPattern(ctx, this);
  3643. needRestore = true;
  3644. }
  3645. if (this.pendingEOFill) {
  3646. if (ctx.mozFillRule !== undefined) {
  3647. ctx.mozFillRule = 'evenodd';
  3648. ctx.fill();
  3649. ctx.mozFillRule = 'nonzero';
  3650. } else {
  3651. try {
  3652. ctx.fill('evenodd');
  3653. } catch (ex) {
  3654. // shouldn't really happen, but browsers might think differently
  3655. ctx.fill();
  3656. }
  3657. }
  3658. this.pendingEOFill = false;
  3659. } else {
  3660. ctx.fill();
  3661. }
  3662. if (needRestore) {
  3663. ctx.restore();
  3664. }
  3665. if (consumePath) {
  3666. this.consumePath();
  3667. }
  3668. },
  3669. eoFill: function CanvasGraphics_eoFill() {
  3670. this.pendingEOFill = true;
  3671. this.fill();
  3672. },
  3673. fillStroke: function CanvasGraphics_fillStroke() {
  3674. this.fill(false);
  3675. this.stroke(false);
  3676. this.consumePath();
  3677. },
  3678. eoFillStroke: function CanvasGraphics_eoFillStroke() {
  3679. this.pendingEOFill = true;
  3680. this.fillStroke();
  3681. },
  3682. closeFillStroke: function CanvasGraphics_closeFillStroke() {
  3683. this.closePath();
  3684. this.fillStroke();
  3685. },
  3686. closeEOFillStroke: function CanvasGraphics_closeEOFillStroke() {
  3687. this.pendingEOFill = true;
  3688. this.closePath();
  3689. this.fillStroke();
  3690. },
  3691. endPath: function CanvasGraphics_endPath() {
  3692. this.consumePath();
  3693. },
  3694. // Clipping
  3695. clip: function CanvasGraphics_clip() {
  3696. this.pendingClip = NORMAL_CLIP;
  3697. },
  3698. eoClip: function CanvasGraphics_eoClip() {
  3699. this.pendingClip = EO_CLIP;
  3700. },
  3701. // Text
  3702. beginText: function CanvasGraphics_beginText() {
  3703. this.current.textMatrix = IDENTITY_MATRIX;
  3704. this.current.textMatrixScale = 1;
  3705. this.current.x = this.current.lineX = 0;
  3706. this.current.y = this.current.lineY = 0;
  3707. },
  3708. endText: function CanvasGraphics_endText() {
  3709. var paths = this.pendingTextPaths;
  3710. var ctx = this.ctx;
  3711. if (paths === undefined) {
  3712. ctx.beginPath();
  3713. return;
  3714. }
  3715. ctx.save();
  3716. ctx.beginPath();
  3717. for (var i = 0; i < paths.length; i++) {
  3718. var path = paths[i];
  3719. ctx.setTransform.apply(ctx, path.transform);
  3720. ctx.translate(path.x, path.y);
  3721. path.addToPath(ctx, path.fontSize);
  3722. }
  3723. ctx.restore();
  3724. ctx.clip();
  3725. ctx.beginPath();
  3726. delete this.pendingTextPaths;
  3727. },
  3728. setCharSpacing: function CanvasGraphics_setCharSpacing(spacing) {
  3729. this.current.charSpacing = spacing;
  3730. },
  3731. setWordSpacing: function CanvasGraphics_setWordSpacing(spacing) {
  3732. this.current.wordSpacing = spacing;
  3733. },
  3734. setHScale: function CanvasGraphics_setHScale(scale) {
  3735. this.current.textHScale = scale / 100;
  3736. },
  3737. setLeading: function CanvasGraphics_setLeading(leading) {
  3738. this.current.leading = -leading;
  3739. },
  3740. setFont: function CanvasGraphics_setFont(fontRefName, size) {
  3741. var fontObj = this.commonObjs.get(fontRefName);
  3742. var current = this.current;
  3743. if (!fontObj) {
  3744. error('Can\'t find font for ' + fontRefName);
  3745. }
  3746. current.fontMatrix = (fontObj.fontMatrix ?
  3747. fontObj.fontMatrix : FONT_IDENTITY_MATRIX);
  3748. // A valid matrix needs all main diagonal elements to be non-zero
  3749. // This also ensures we bypass FF bugzilla bug #719844.
  3750. if (current.fontMatrix[0] === 0 ||
  3751. current.fontMatrix[3] === 0) {
  3752. warn('Invalid font matrix for font ' + fontRefName);
  3753. }
  3754. // The spec for Tf (setFont) says that 'size' specifies the font 'scale',
  3755. // and in some docs this can be negative (inverted x-y axes).
  3756. if (size < 0) {
  3757. size = -size;
  3758. current.fontDirection = -1;
  3759. } else {
  3760. current.fontDirection = 1;
  3761. }
  3762. this.current.font = fontObj;
  3763. this.current.fontSize = size;
  3764. if (fontObj.isType3Font) {
  3765. return; // we don't need ctx.font for Type3 fonts
  3766. }
  3767. var name = fontObj.loadedName || 'sans-serif';
  3768. var bold = fontObj.black ? (fontObj.bold ? 'bolder' : 'bold') :
  3769. (fontObj.bold ? 'bold' : 'normal');
  3770. var italic = fontObj.italic ? 'italic' : 'normal';
  3771. var typeface = '"' + name + '", ' + fontObj.fallbackName;
  3772. // Some font backends cannot handle fonts below certain size.
  3773. // Keeping the font at minimal size and using the fontSizeScale to change
  3774. // the current transformation matrix before the fillText/strokeText.
  3775. // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227
  3776. var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE;
  3777. this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 :
  3778. size / MIN_FONT_SIZE;
  3779. var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface;
  3780. this.ctx.font = rule;
  3781. },
  3782. setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) {
  3783. this.current.textRenderingMode = mode;
  3784. },
  3785. setTextRise: function CanvasGraphics_setTextRise(rise) {
  3786. this.current.textRise = rise;
  3787. },
  3788. moveText: function CanvasGraphics_moveText(x, y) {
  3789. this.current.x = this.current.lineX += x;
  3790. this.current.y = this.current.lineY += y;
  3791. },
  3792. setLeadingMoveText: function CanvasGraphics_setLeadingMoveText(x, y) {
  3793. this.setLeading(-y);
  3794. this.moveText(x, y);
  3795. },
  3796. setTextMatrix: function CanvasGraphics_setTextMatrix(a, b, c, d, e, f) {
  3797. this.current.textMatrix = [a, b, c, d, e, f];
  3798. this.current.textMatrixScale = Math.sqrt(a * a + b * b);
  3799. this.current.x = this.current.lineX = 0;
  3800. this.current.y = this.current.lineY = 0;
  3801. },
  3802. nextLine: function CanvasGraphics_nextLine() {
  3803. this.moveText(0, this.current.leading);
  3804. },
  3805. paintChar: function CanvasGraphics_paintChar(character, x, y) {
  3806. var ctx = this.ctx;
  3807. var current = this.current;
  3808. var font = current.font;
  3809. var textRenderingMode = current.textRenderingMode;
  3810. var fontSize = current.fontSize / current.fontSizeScale;
  3811. var fillStrokeMode = textRenderingMode &
  3812. TextRenderingMode.FILL_STROKE_MASK;
  3813. var isAddToPathSet = !!(textRenderingMode &
  3814. TextRenderingMode.ADD_TO_PATH_FLAG);
  3815. var addToPath;
  3816. if (font.disableFontFace || isAddToPathSet) {
  3817. addToPath = font.getPathGenerator(this.commonObjs, character);
  3818. }
  3819. if (font.disableFontFace) {
  3820. ctx.save();
  3821. ctx.translate(x, y);
  3822. ctx.beginPath();
  3823. addToPath(ctx, fontSize);
  3824. if (fillStrokeMode === TextRenderingMode.FILL ||
  3825. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  3826. ctx.fill();
  3827. }
  3828. if (fillStrokeMode === TextRenderingMode.STROKE ||
  3829. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  3830. ctx.stroke();
  3831. }
  3832. ctx.restore();
  3833. } else {
  3834. if (fillStrokeMode === TextRenderingMode.FILL ||
  3835. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  3836. ctx.fillText(character, x, y);
  3837. }
  3838. if (fillStrokeMode === TextRenderingMode.STROKE ||
  3839. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  3840. ctx.strokeText(character, x, y);
  3841. }
  3842. }
  3843. if (isAddToPathSet) {
  3844. var paths = this.pendingTextPaths || (this.pendingTextPaths = []);
  3845. paths.push({
  3846. transform: ctx.mozCurrentTransform,
  3847. x: x,
  3848. y: y,
  3849. fontSize: fontSize,
  3850. addToPath: addToPath
  3851. });
  3852. }
  3853. },
  3854. get isFontSubpixelAAEnabled() {
  3855. // Checks if anti-aliasing is enabled when scaled text is painted.
  3856. // On Windows GDI scaled fonts looks bad.
  3857. var ctx = document.createElement('canvas').getContext('2d');
  3858. ctx.scale(1.5, 1);
  3859. ctx.fillText('I', 0, 10);
  3860. var data = ctx.getImageData(0, 0, 10, 10).data;
  3861. var enabled = false;
  3862. for (var i = 3; i < data.length; i += 4) {
  3863. if (data[i] > 0 && data[i] < 255) {
  3864. enabled = true;
  3865. break;
  3866. }
  3867. }
  3868. return shadow(this, 'isFontSubpixelAAEnabled', enabled);
  3869. },
  3870. showText: function CanvasGraphics_showText(glyphs) {
  3871. var current = this.current;
  3872. var font = current.font;
  3873. if (font.isType3Font) {
  3874. return this.showType3Text(glyphs);
  3875. }
  3876. var fontSize = current.fontSize;
  3877. if (fontSize === 0) {
  3878. return;
  3879. }
  3880. var ctx = this.ctx;
  3881. var fontSizeScale = current.fontSizeScale;
  3882. var charSpacing = current.charSpacing;
  3883. var wordSpacing = current.wordSpacing;
  3884. var fontDirection = current.fontDirection;
  3885. var textHScale = current.textHScale * fontDirection;
  3886. var glyphsLength = glyphs.length;
  3887. var vertical = font.vertical;
  3888. var defaultVMetrics = font.defaultVMetrics;
  3889. var widthAdvanceScale = fontSize * current.fontMatrix[0];
  3890. var simpleFillText =
  3891. current.textRenderingMode === TextRenderingMode.FILL &&
  3892. !font.disableFontFace;
  3893. ctx.save();
  3894. ctx.transform.apply(ctx, current.textMatrix);
  3895. ctx.translate(current.x, current.y + current.textRise);
  3896. if (fontDirection > 0) {
  3897. ctx.scale(textHScale, -1);
  3898. } else {
  3899. ctx.scale(textHScale, 1);
  3900. }
  3901. var lineWidth = current.lineWidth;
  3902. var scale = current.textMatrixScale;
  3903. if (scale === 0 || lineWidth === 0) {
  3904. lineWidth = this.getSinglePixelWidth();
  3905. } else {
  3906. lineWidth /= scale;
  3907. }
  3908. if (fontSizeScale != 1.0) {
  3909. ctx.scale(fontSizeScale, fontSizeScale);
  3910. lineWidth /= fontSizeScale;
  3911. }
  3912. ctx.lineWidth = lineWidth;
  3913. var x = 0, i;
  3914. for (i = 0; i < glyphsLength; ++i) {
  3915. var glyph = glyphs[i];
  3916. if (glyph === null) {
  3917. // word break
  3918. x += fontDirection * wordSpacing;
  3919. continue;
  3920. } else if (isNum(glyph)) {
  3921. x += -glyph * fontSize * 0.001;
  3922. continue;
  3923. }
  3924. var restoreNeeded = false;
  3925. var character = glyph.fontChar;
  3926. var accent = glyph.accent;
  3927. var scaledX, scaledY, scaledAccentX, scaledAccentY;
  3928. var width = glyph.width;
  3929. if (vertical) {
  3930. var vmetric, vx, vy;
  3931. vmetric = glyph.vmetric || defaultVMetrics;
  3932. vx = glyph.vmetric ? vmetric[1] : width * 0.5;
  3933. vx = -vx * widthAdvanceScale;
  3934. vy = vmetric[2] * widthAdvanceScale;
  3935. width = vmetric ? -vmetric[0] : width;
  3936. scaledX = vx / fontSizeScale;
  3937. scaledY = (x + vy) / fontSizeScale;
  3938. } else {
  3939. scaledX = x / fontSizeScale;
  3940. scaledY = 0;
  3941. }
  3942. if (font.remeasure && width > 0 && this.isFontSubpixelAAEnabled) {
  3943. // some standard fonts may not have the exact width, trying to
  3944. // rescale per character
  3945. var measuredWidth = ctx.measureText(character).width * 1000 /
  3946. fontSize * fontSizeScale;
  3947. var characterScaleX = width / measuredWidth;
  3948. restoreNeeded = true;
  3949. ctx.save();
  3950. ctx.scale(characterScaleX, 1);
  3951. scaledX /= characterScaleX;
  3952. }
  3953. if (simpleFillText && !accent) {
  3954. // common case
  3955. ctx.fillText(character, scaledX, scaledY);
  3956. } else {
  3957. this.paintChar(character, scaledX, scaledY);
  3958. if (accent) {
  3959. scaledAccentX = scaledX + accent.offset.x / fontSizeScale;
  3960. scaledAccentY = scaledY - accent.offset.y / fontSizeScale;
  3961. this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY);
  3962. }
  3963. }
  3964. var charWidth = width * widthAdvanceScale + charSpacing * fontDirection;
  3965. x += charWidth;
  3966. if (restoreNeeded) {
  3967. ctx.restore();
  3968. }
  3969. }
  3970. if (vertical) {
  3971. current.y -= x * textHScale;
  3972. } else {
  3973. current.x += x * textHScale;
  3974. }
  3975. ctx.restore();
  3976. },
  3977. showType3Text: function CanvasGraphics_showType3Text(glyphs) {
  3978. // Type3 fonts - each glyph is a "mini-PDF"
  3979. var ctx = this.ctx;
  3980. var current = this.current;
  3981. var font = current.font;
  3982. var fontSize = current.fontSize;
  3983. var fontDirection = current.fontDirection;
  3984. var charSpacing = current.charSpacing;
  3985. var wordSpacing = current.wordSpacing;
  3986. var textHScale = current.textHScale * fontDirection;
  3987. var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;
  3988. var glyphsLength = glyphs.length;
  3989. var i, glyph, width;
  3990. if (fontSize === 0) {
  3991. return;
  3992. }
  3993. ctx.save();
  3994. ctx.transform.apply(ctx, current.textMatrix);
  3995. ctx.translate(current.x, current.y);
  3996. ctx.scale(textHScale, 1);
  3997. for (i = 0; i < glyphsLength; ++i) {
  3998. glyph = glyphs[i];
  3999. if (glyph === null) {
  4000. // word break
  4001. this.ctx.translate(wordSpacing, 0);
  4002. current.x += wordSpacing * textHScale;
  4003. continue;
  4004. } else if (isNum(glyph)) {
  4005. var spacingLength = -glyph * 0.001 * fontSize;
  4006. this.ctx.translate(spacingLength, 0);
  4007. current.x += spacingLength * textHScale;
  4008. continue;
  4009. }
  4010. this.processingType3 = glyph;
  4011. this.save();
  4012. ctx.scale(fontSize, fontSize);
  4013. ctx.transform.apply(ctx, fontMatrix);
  4014. var operatorList = font.charProcOperatorList[glyph.operatorListId];
  4015. this.executeOperatorList(operatorList);
  4016. this.restore();
  4017. var transformed = Util.applyTransform([glyph.width, 0], fontMatrix);
  4018. width = ((transformed[0] * fontSize + charSpacing) * fontDirection);
  4019. ctx.translate(width, 0);
  4020. current.x += width * textHScale;
  4021. }
  4022. ctx.restore();
  4023. this.processingType3 = null;
  4024. },
  4025. // Type3 fonts
  4026. setCharWidth: function CanvasGraphics_setCharWidth(xWidth, yWidth) {
  4027. // We can safely ignore this since the width should be the same
  4028. // as the width in the Widths array.
  4029. },
  4030. setCharWidthAndBounds: function CanvasGraphics_setCharWidthAndBounds(xWidth,
  4031. yWidth,
  4032. llx,
  4033. lly,
  4034. urx,
  4035. ury) {
  4036. // TODO According to the spec we're also suppose to ignore any operators
  4037. // that set color or include images while processing this type3 font.
  4038. this.ctx.rect(llx, lly, urx - llx, ury - lly);
  4039. this.clip();
  4040. this.endPath();
  4041. },
  4042. // Color
  4043. getColorN_Pattern: function CanvasGraphics_getColorN_Pattern(IR) {
  4044. var pattern;
  4045. if (IR[0] === 'TilingPattern') {
  4046. var color = IR[1];
  4047. pattern = new TilingPattern(IR, color, this.ctx, this.objs,
  4048. this.commonObjs, this.baseTransform);
  4049. } else {
  4050. pattern = getShadingPatternFromIR(IR);
  4051. }
  4052. return pattern;
  4053. },
  4054. setStrokeColorN: function CanvasGraphics_setStrokeColorN(/*...*/) {
  4055. this.current.strokeColor = this.getColorN_Pattern(arguments);
  4056. },
  4057. setFillColorN: function CanvasGraphics_setFillColorN(/*...*/) {
  4058. this.current.fillColor = this.getColorN_Pattern(arguments);
  4059. },
  4060. setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) {
  4061. var color = Util.makeCssRgb(arguments);
  4062. this.ctx.strokeStyle = color;
  4063. this.current.strokeColor = color;
  4064. },
  4065. setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) {
  4066. var color = Util.makeCssRgb(arguments);
  4067. this.ctx.fillStyle = color;
  4068. this.current.fillColor = color;
  4069. },
  4070. shadingFill: function CanvasGraphics_shadingFill(patternIR) {
  4071. var ctx = this.ctx;
  4072. this.save();
  4073. var pattern = getShadingPatternFromIR(patternIR);
  4074. ctx.fillStyle = pattern.getPattern(ctx, this, true);
  4075. var inv = ctx.mozCurrentTransformInverse;
  4076. if (inv) {
  4077. var canvas = ctx.canvas;
  4078. var width = canvas.width;
  4079. var height = canvas.height;
  4080. var bl = Util.applyTransform([0, 0], inv);
  4081. var br = Util.applyTransform([0, height], inv);
  4082. var ul = Util.applyTransform([width, 0], inv);
  4083. var ur = Util.applyTransform([width, height], inv);
  4084. var x0 = Math.min(bl[0], br[0], ul[0], ur[0]);
  4085. var y0 = Math.min(bl[1], br[1], ul[1], ur[1]);
  4086. var x1 = Math.max(bl[0], br[0], ul[0], ur[0]);
  4087. var y1 = Math.max(bl[1], br[1], ul[1], ur[1]);
  4088. this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
  4089. } else {
  4090. // HACK to draw the gradient onto an infinite rectangle.
  4091. // PDF gradients are drawn across the entire image while
  4092. // Canvas only allows gradients to be drawn in a rectangle
  4093. // The following bug should allow us to remove this.
  4094. // https://bugzilla.mozilla.org/show_bug.cgi?id=664884
  4095. this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);
  4096. }
  4097. this.restore();
  4098. },
  4099. // Images
  4100. beginInlineImage: function CanvasGraphics_beginInlineImage() {
  4101. error('Should not call beginInlineImage');
  4102. },
  4103. beginImageData: function CanvasGraphics_beginImageData() {
  4104. error('Should not call beginImageData');
  4105. },
  4106. paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix,
  4107. bbox) {
  4108. this.save();
  4109. this.baseTransformStack.push(this.baseTransform);
  4110. if (isArray(matrix) && 6 === matrix.length) {
  4111. this.transform.apply(this, matrix);
  4112. }
  4113. this.baseTransform = this.ctx.mozCurrentTransform;
  4114. if (isArray(bbox) && 4 === bbox.length) {
  4115. var width = bbox[2] - bbox[0];
  4116. var height = bbox[3] - bbox[1];
  4117. this.ctx.rect(bbox[0], bbox[1], width, height);
  4118. this.clip();
  4119. this.endPath();
  4120. }
  4121. },
  4122. paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() {
  4123. this.restore();
  4124. this.baseTransform = this.baseTransformStack.pop();
  4125. },
  4126. beginGroup: function CanvasGraphics_beginGroup(group) {
  4127. this.save();
  4128. var currentCtx = this.ctx;
  4129. // TODO non-isolated groups - according to Rik at adobe non-isolated
  4130. // group results aren't usually that different and they even have tools
  4131. // that ignore this setting. Notes from Rik on implmenting:
  4132. // - When you encounter an transparency group, create a new canvas with
  4133. // the dimensions of the bbox
  4134. // - copy the content from the previous canvas to the new canvas
  4135. // - draw as usual
  4136. // - remove the backdrop alpha:
  4137. // alphaNew = 1 - (1 - alpha)/(1 - alphaBackdrop) with 'alpha' the alpha
  4138. // value of your transparency group and 'alphaBackdrop' the alpha of the
  4139. // backdrop
  4140. // - remove background color:
  4141. // colorNew = color - alphaNew *colorBackdrop /(1 - alphaNew)
  4142. if (!group.isolated) {
  4143. info('TODO: Support non-isolated groups.');
  4144. }
  4145. // TODO knockout - supposedly possible with the clever use of compositing
  4146. // modes.
  4147. if (group.knockout) {
  4148. warn('Knockout groups not supported.');
  4149. }
  4150. var currentTransform = currentCtx.mozCurrentTransform;
  4151. if (group.matrix) {
  4152. currentCtx.transform.apply(currentCtx, group.matrix);
  4153. }
  4154. assert(group.bbox, 'Bounding box is required.');
  4155. // Based on the current transform figure out how big the bounding box
  4156. // will actually be.
  4157. var bounds = Util.getAxialAlignedBoundingBox(
  4158. group.bbox,
  4159. currentCtx.mozCurrentTransform);
  4160. // Clip the bounding box to the current canvas.
  4161. var canvasBounds = [0,
  4162. 0,
  4163. currentCtx.canvas.width,
  4164. currentCtx.canvas.height];
  4165. bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];
  4166. // Use ceil in case we're between sizes so we don't create canvas that is
  4167. // too small and make the canvas at least 1x1 pixels.
  4168. var offsetX = Math.floor(bounds[0]);
  4169. var offsetY = Math.floor(bounds[1]);
  4170. var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);
  4171. var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);
  4172. var scaleX = 1, scaleY = 1;
  4173. if (drawnWidth > MAX_GROUP_SIZE) {
  4174. scaleX = drawnWidth / MAX_GROUP_SIZE;
  4175. drawnWidth = MAX_GROUP_SIZE;
  4176. }
  4177. if (drawnHeight > MAX_GROUP_SIZE) {
  4178. scaleY = drawnHeight / MAX_GROUP_SIZE;
  4179. drawnHeight = MAX_GROUP_SIZE;
  4180. }
  4181. var cacheId = 'groupAt' + this.groupLevel;
  4182. if (group.smask) {
  4183. // Using two cache entries is case if masks are used one after another.
  4184. cacheId += '_smask_' + ((this.smaskCounter++) % 2);
  4185. }
  4186. var scratchCanvas = CachedCanvases.getCanvas(
  4187. cacheId, drawnWidth, drawnHeight, true);
  4188. var groupCtx = scratchCanvas.context;
  4189. // Since we created a new canvas that is just the size of the bounding box
  4190. // we have to translate the group ctx.
  4191. groupCtx.scale(1 / scaleX, 1 / scaleY);
  4192. groupCtx.translate(-offsetX, -offsetY);
  4193. groupCtx.transform.apply(groupCtx, currentTransform);
  4194. if (group.smask) {
  4195. // Saving state and cached mask to be used in setGState.
  4196. this.smaskStack.push({
  4197. canvas: scratchCanvas.canvas,
  4198. context: groupCtx,
  4199. offsetX: offsetX,
  4200. offsetY: offsetY,
  4201. scaleX: scaleX,
  4202. scaleY: scaleY,
  4203. subtype: group.smask.subtype,
  4204. backdrop: group.smask.backdrop
  4205. });
  4206. } else {
  4207. // Setup the current ctx so when the group is popped we draw it at the
  4208. // right location.
  4209. currentCtx.setTransform(1, 0, 0, 1, 0, 0);
  4210. currentCtx.translate(offsetX, offsetY);
  4211. currentCtx.scale(scaleX, scaleY);
  4212. }
  4213. // The transparency group inherits all off the current graphics state
  4214. // except the blend mode, soft mask, and alpha constants.
  4215. copyCtxState(currentCtx, groupCtx);
  4216. this.ctx = groupCtx;
  4217. this.setGState([
  4218. ['BM', 'Normal'],
  4219. ['ca', 1],
  4220. ['CA', 1]
  4221. ]);
  4222. this.groupStack.push(currentCtx);
  4223. this.groupLevel++;
  4224. },
  4225. endGroup: function CanvasGraphics_endGroup(group) {
  4226. this.groupLevel--;
  4227. var groupCtx = this.ctx;
  4228. this.ctx = this.groupStack.pop();
  4229. // Turn off image smoothing to avoid sub pixel interpolation which can
  4230. // look kind of blurry for some pdfs.
  4231. if (this.ctx.imageSmoothingEnabled !== undefined) {
  4232. this.ctx.imageSmoothingEnabled = false;
  4233. } else {
  4234. this.ctx.mozImageSmoothingEnabled = false;
  4235. }
  4236. if (group.smask) {
  4237. this.tempSMask = this.smaskStack.pop();
  4238. } else {
  4239. this.ctx.drawImage(groupCtx.canvas, 0, 0);
  4240. }
  4241. this.restore();
  4242. },
  4243. beginAnnotations: function CanvasGraphics_beginAnnotations() {
  4244. this.save();
  4245. this.current = new CanvasExtraState();
  4246. },
  4247. endAnnotations: function CanvasGraphics_endAnnotations() {
  4248. this.restore();
  4249. },
  4250. beginAnnotation: function CanvasGraphics_beginAnnotation(rect, transform,
  4251. matrix) {
  4252. this.save();
  4253. if (isArray(rect) && 4 === rect.length) {
  4254. var width = rect[2] - rect[0];
  4255. var height = rect[3] - rect[1];
  4256. this.ctx.rect(rect[0], rect[1], width, height);
  4257. this.clip();
  4258. this.endPath();
  4259. }
  4260. this.transform.apply(this, transform);
  4261. this.transform.apply(this, matrix);
  4262. },
  4263. endAnnotation: function CanvasGraphics_endAnnotation() {
  4264. this.restore();
  4265. },
  4266. paintJpegXObject: function CanvasGraphics_paintJpegXObject(objId, w, h) {
  4267. var domImage = this.objs.get(objId);
  4268. if (!domImage) {
  4269. warn('Dependent image isn\'t ready yet');
  4270. return;
  4271. }
  4272. this.save();
  4273. var ctx = this.ctx;
  4274. // scale the image to the unit square
  4275. ctx.scale(1 / w, -1 / h);
  4276. ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height,
  4277. 0, -h, w, h);
  4278. if (this.imageLayer) {
  4279. var currentTransform = ctx.mozCurrentTransformInverse;
  4280. var position = this.getCanvasPosition(0, 0);
  4281. this.imageLayer.appendImage({
  4282. objId: objId,
  4283. left: position[0],
  4284. top: position[1],
  4285. width: w / currentTransform[0],
  4286. height: h / currentTransform[3]
  4287. });
  4288. }
  4289. this.restore();
  4290. },
  4291. paintImageMaskXObject: function CanvasGraphics_paintImageMaskXObject(img) {
  4292. var ctx = this.ctx;
  4293. var width = img.width, height = img.height;
  4294. var glyph = this.processingType3;
  4295. if (COMPILE_TYPE3_GLYPHS && glyph && !('compiled' in glyph)) {
  4296. var MAX_SIZE_TO_COMPILE = 1000;
  4297. if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) {
  4298. glyph.compiled =
  4299. compileType3Glyph({data: img.data, width: width, height: height});
  4300. } else {
  4301. glyph.compiled = null;
  4302. }
  4303. }
  4304. if (glyph && glyph.compiled) {
  4305. glyph.compiled(ctx);
  4306. return;
  4307. }
  4308. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  4309. var maskCtx = maskCanvas.context;
  4310. maskCtx.save();
  4311. putBinaryImageMask(maskCtx, img);
  4312. maskCtx.globalCompositeOperation = 'source-in';
  4313. var fillColor = this.current.fillColor;
  4314. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  4315. fillColor.type === 'Pattern') ?
  4316. fillColor.getPattern(maskCtx, this) : fillColor;
  4317. maskCtx.fillRect(0, 0, width, height);
  4318. maskCtx.restore();
  4319. this.paintInlineImageXObject(maskCanvas.canvas);
  4320. },
  4321. paintImageMaskXObjectRepeat:
  4322. function CanvasGraphics_paintImageMaskXObjectRepeat(imgData, scaleX,
  4323. scaleY, positions) {
  4324. var width = imgData.width;
  4325. var height = imgData.height;
  4326. var ctx = this.ctx;
  4327. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  4328. var maskCtx = maskCanvas.context;
  4329. maskCtx.save();
  4330. putBinaryImageMask(maskCtx, imgData);
  4331. maskCtx.globalCompositeOperation = 'source-in';
  4332. var fillColor = this.current.fillColor;
  4333. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  4334. fillColor.type === 'Pattern') ?
  4335. fillColor.getPattern(maskCtx, this) : fillColor;
  4336. maskCtx.fillRect(0, 0, width, height);
  4337. maskCtx.restore();
  4338. for (var i = 0, ii = positions.length; i < ii; i += 2) {
  4339. ctx.save();
  4340. ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]);
  4341. ctx.scale(1, -1);
  4342. ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,
  4343. 0, -1, 1, 1);
  4344. ctx.restore();
  4345. }
  4346. },
  4347. paintImageMaskXObjectGroup:
  4348. function CanvasGraphics_paintImageMaskXObjectGroup(images) {
  4349. var ctx = this.ctx;
  4350. for (var i = 0, ii = images.length; i < ii; i++) {
  4351. var image = images[i];
  4352. var width = image.width, height = image.height;
  4353. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  4354. var maskCtx = maskCanvas.context;
  4355. maskCtx.save();
  4356. putBinaryImageMask(maskCtx, image);
  4357. maskCtx.globalCompositeOperation = 'source-in';
  4358. var fillColor = this.current.fillColor;
  4359. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  4360. fillColor.type === 'Pattern') ?
  4361. fillColor.getPattern(maskCtx, this) : fillColor;
  4362. maskCtx.fillRect(0, 0, width, height);
  4363. maskCtx.restore();
  4364. ctx.save();
  4365. ctx.transform.apply(ctx, image.transform);
  4366. ctx.scale(1, -1);
  4367. ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,
  4368. 0, -1, 1, 1);
  4369. ctx.restore();
  4370. }
  4371. },
  4372. paintImageXObject: function CanvasGraphics_paintImageXObject(objId) {
  4373. var imgData = this.objs.get(objId);
  4374. if (!imgData) {
  4375. warn('Dependent image isn\'t ready yet');
  4376. return;
  4377. }
  4378. this.paintInlineImageXObject(imgData);
  4379. },
  4380. paintImageXObjectRepeat:
  4381. function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY,
  4382. positions) {
  4383. var imgData = this.objs.get(objId);
  4384. if (!imgData) {
  4385. warn('Dependent image isn\'t ready yet');
  4386. return;
  4387. }
  4388. var width = imgData.width;
  4389. var height = imgData.height;
  4390. var map = [];
  4391. for (var i = 0, ii = positions.length; i < ii; i += 2) {
  4392. map.push({transform: [scaleX, 0, 0, scaleY, positions[i],
  4393. positions[i + 1]], x: 0, y: 0, w: width, h: height});
  4394. }
  4395. this.paintInlineImageXObjectGroup(imgData, map);
  4396. },
  4397. paintInlineImageXObject:
  4398. function CanvasGraphics_paintInlineImageXObject(imgData) {
  4399. var width = imgData.width;
  4400. var height = imgData.height;
  4401. var ctx = this.ctx;
  4402. this.save();
  4403. // scale the image to the unit square
  4404. ctx.scale(1 / width, -1 / height);
  4405. var currentTransform = ctx.mozCurrentTransformInverse;
  4406. var a = currentTransform[0], b = currentTransform[1];
  4407. var widthScale = Math.max(Math.sqrt(a * a + b * b), 1);
  4408. var c = currentTransform[2], d = currentTransform[3];
  4409. var heightScale = Math.max(Math.sqrt(c * c + d * d), 1);
  4410. var imgToPaint, tmpCanvas;
  4411. // instanceof HTMLElement does not work in jsdom node.js module
  4412. if (imgData instanceof HTMLElement || !imgData.data) {
  4413. imgToPaint = imgData;
  4414. } else {
  4415. tmpCanvas = CachedCanvases.getCanvas('inlineImage', width, height);
  4416. var tmpCtx = tmpCanvas.context;
  4417. putBinaryImageData(tmpCtx, imgData);
  4418. imgToPaint = tmpCanvas.canvas;
  4419. }
  4420. var paintWidth = width, paintHeight = height;
  4421. var tmpCanvasId = 'prescale1';
  4422. // Vertial or horizontal scaling shall not be more than 2 to not loose the
  4423. // pixels during drawImage operation, painting on the temporary canvas(es)
  4424. // that are twice smaller in size
  4425. while ((widthScale > 2 && paintWidth > 1) ||
  4426. (heightScale > 2 && paintHeight > 1)) {
  4427. var newWidth = paintWidth, newHeight = paintHeight;
  4428. if (widthScale > 2 && paintWidth > 1) {
  4429. newWidth = Math.ceil(paintWidth / 2);
  4430. widthScale /= paintWidth / newWidth;
  4431. }
  4432. if (heightScale > 2 && paintHeight > 1) {
  4433. newHeight = Math.ceil(paintHeight / 2);
  4434. heightScale /= paintHeight / newHeight;
  4435. }
  4436. tmpCanvas = CachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight);
  4437. tmpCtx = tmpCanvas.context;
  4438. tmpCtx.clearRect(0, 0, newWidth, newHeight);
  4439. tmpCtx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,
  4440. 0, 0, newWidth, newHeight);
  4441. imgToPaint = tmpCanvas.canvas;
  4442. paintWidth = newWidth;
  4443. paintHeight = newHeight;
  4444. tmpCanvasId = tmpCanvasId === 'prescale1' ? 'prescale2' : 'prescale1';
  4445. }
  4446. ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,
  4447. 0, -height, width, height);
  4448. if (this.imageLayer) {
  4449. var position = this.getCanvasPosition(0, -height);
  4450. this.imageLayer.appendImage({
  4451. imgData: imgData,
  4452. left: position[0],
  4453. top: position[1],
  4454. width: width / currentTransform[0],
  4455. height: height / currentTransform[3]
  4456. });
  4457. }
  4458. this.restore();
  4459. },
  4460. paintInlineImageXObjectGroup:
  4461. function CanvasGraphics_paintInlineImageXObjectGroup(imgData, map) {
  4462. var ctx = this.ctx;
  4463. var w = imgData.width;
  4464. var h = imgData.height;
  4465. var tmpCanvas = CachedCanvases.getCanvas('inlineImage', w, h);
  4466. var tmpCtx = tmpCanvas.context;
  4467. putBinaryImageData(tmpCtx, imgData);
  4468. for (var i = 0, ii = map.length; i < ii; i++) {
  4469. var entry = map[i];
  4470. ctx.save();
  4471. ctx.transform.apply(ctx, entry.transform);
  4472. ctx.scale(1, -1);
  4473. ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h,
  4474. 0, -1, 1, 1);
  4475. if (this.imageLayer) {
  4476. var position = this.getCanvasPosition(entry.x, entry.y);
  4477. this.imageLayer.appendImage({
  4478. imgData: imgData,
  4479. left: position[0],
  4480. top: position[1],
  4481. width: w,
  4482. height: h
  4483. });
  4484. }
  4485. ctx.restore();
  4486. }
  4487. },
  4488. paintSolidColorImageMask:
  4489. function CanvasGraphics_paintSolidColorImageMask() {
  4490. this.ctx.fillRect(0, 0, 1, 1);
  4491. },
  4492. // Marked content
  4493. markPoint: function CanvasGraphics_markPoint(tag) {
  4494. // TODO Marked content.
  4495. },
  4496. markPointProps: function CanvasGraphics_markPointProps(tag, properties) {
  4497. // TODO Marked content.
  4498. },
  4499. beginMarkedContent: function CanvasGraphics_beginMarkedContent(tag) {
  4500. // TODO Marked content.
  4501. },
  4502. beginMarkedContentProps: function CanvasGraphics_beginMarkedContentProps(
  4503. tag, properties) {
  4504. // TODO Marked content.
  4505. },
  4506. endMarkedContent: function CanvasGraphics_endMarkedContent() {
  4507. // TODO Marked content.
  4508. },
  4509. // Compatibility
  4510. beginCompat: function CanvasGraphics_beginCompat() {
  4511. // TODO ignore undefined operators (should we do that anyway?)
  4512. },
  4513. endCompat: function CanvasGraphics_endCompat() {
  4514. // TODO stop ignoring undefined operators
  4515. },
  4516. // Helper functions
  4517. consumePath: function CanvasGraphics_consumePath() {
  4518. var ctx = this.ctx;
  4519. if (this.pendingClip) {
  4520. if (this.pendingClip === EO_CLIP) {
  4521. if (ctx.mozFillRule !== undefined) {
  4522. ctx.mozFillRule = 'evenodd';
  4523. ctx.clip();
  4524. ctx.mozFillRule = 'nonzero';
  4525. } else {
  4526. try {
  4527. ctx.clip('evenodd');
  4528. } catch (ex) {
  4529. // shouldn't really happen, but browsers might think differently
  4530. ctx.clip();
  4531. }
  4532. }
  4533. } else {
  4534. ctx.clip();
  4535. }
  4536. this.pendingClip = null;
  4537. }
  4538. ctx.beginPath();
  4539. },
  4540. getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) {
  4541. var inverse = this.ctx.mozCurrentTransformInverse;
  4542. // max of the current horizontal and vertical scale
  4543. return Math.sqrt(Math.max(
  4544. (inverse[0] * inverse[0] + inverse[1] * inverse[1]),
  4545. (inverse[2] * inverse[2] + inverse[3] * inverse[3])));
  4546. },
  4547. getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) {
  4548. var transform = this.ctx.mozCurrentTransform;
  4549. return [
  4550. transform[0] * x + transform[2] * y + transform[4],
  4551. transform[1] * x + transform[3] * y + transform[5]
  4552. ];
  4553. }
  4554. };
  4555. for (var op in OPS) {
  4556. CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];
  4557. }
  4558. return CanvasGraphics;
  4559. })();
  4560. var WebGLUtils = (function WebGLUtilsClosure() {
  4561. function loadShader(gl, code, shaderType) {
  4562. var shader = gl.createShader(shaderType);
  4563. gl.shaderSource(shader, code);
  4564. gl.compileShader(shader);
  4565. var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
  4566. if (!compiled) {
  4567. var errorMsg = gl.getShaderInfoLog(shader);
  4568. throw new Error('Error during shader compilation: ' + errorMsg);
  4569. }
  4570. return shader;
  4571. }
  4572. function createVertexShader(gl, code) {
  4573. return loadShader(gl, code, gl.VERTEX_SHADER);
  4574. }
  4575. function createFragmentShader(gl, code) {
  4576. return loadShader(gl, code, gl.FRAGMENT_SHADER);
  4577. }
  4578. function createProgram(gl, shaders) {
  4579. var program = gl.createProgram();
  4580. for (var i = 0, ii = shaders.length; i < ii; ++i) {
  4581. gl.attachShader(program, shaders[i]);
  4582. }
  4583. gl.linkProgram(program);
  4584. var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
  4585. if (!linked) {
  4586. var errorMsg = gl.getProgramInfoLog(program);
  4587. throw new Error('Error during program linking: ' + errorMsg);
  4588. }
  4589. return program;
  4590. }
  4591. function createTexture(gl, image, textureId) {
  4592. gl.activeTexture(textureId);
  4593. var texture = gl.createTexture();
  4594. gl.bindTexture(gl.TEXTURE_2D, texture);
  4595. // Set the parameters so we can render any size image.
  4596. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
  4597. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
  4598. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
  4599. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
  4600. // Upload the image into the texture.
  4601. gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
  4602. return texture;
  4603. }
  4604. var currentGL, currentCanvas;
  4605. function generageGL() {
  4606. if (currentGL) {
  4607. return;
  4608. }
  4609. currentCanvas = document.createElement('canvas');
  4610. currentGL = currentCanvas.getContext('webgl',
  4611. { premultipliedalpha: false });
  4612. }
  4613. var smaskVertexShaderCode = '\
  4614. attribute vec2 a_position; \
  4615. attribute vec2 a_texCoord; \
  4616. \
  4617. uniform vec2 u_resolution; \
  4618. \
  4619. varying vec2 v_texCoord; \
  4620. \
  4621. void main() { \
  4622. vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; \
  4623. gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \
  4624. \
  4625. v_texCoord = a_texCoord; \
  4626. } ';
  4627. var smaskFragmentShaderCode = '\
  4628. precision mediump float; \
  4629. \
  4630. uniform vec4 u_backdrop; \
  4631. uniform int u_subtype; \
  4632. uniform sampler2D u_image; \
  4633. uniform sampler2D u_mask; \
  4634. \
  4635. varying vec2 v_texCoord; \
  4636. \
  4637. void main() { \
  4638. vec4 imageColor = texture2D(u_image, v_texCoord); \
  4639. vec4 maskColor = texture2D(u_mask, v_texCoord); \
  4640. if (u_backdrop.a > 0.0) { \
  4641. maskColor.rgb = maskColor.rgb * maskColor.a + \
  4642. u_backdrop.rgb * (1.0 - maskColor.a); \
  4643. } \
  4644. float lum; \
  4645. if (u_subtype == 0) { \
  4646. lum = maskColor.a; \
  4647. } else { \
  4648. lum = maskColor.r * 0.3 + maskColor.g * 0.59 + \
  4649. maskColor.b * 0.11; \
  4650. } \
  4651. imageColor.a *= lum; \
  4652. imageColor.rgb *= imageColor.a; \
  4653. gl_FragColor = imageColor; \
  4654. } ';
  4655. var smaskCache = null;
  4656. function initSmaskGL() {
  4657. var canvas, gl;
  4658. generageGL();
  4659. canvas = currentCanvas;
  4660. currentCanvas = null;
  4661. gl = currentGL;
  4662. currentGL = null;
  4663. // setup a GLSL program
  4664. var vertexShader = createVertexShader(gl, smaskVertexShaderCode);
  4665. var fragmentShader = createFragmentShader(gl, smaskFragmentShaderCode);
  4666. var program = createProgram(gl, [vertexShader, fragmentShader]);
  4667. gl.useProgram(program);
  4668. var cache = {};
  4669. cache.gl = gl;
  4670. cache.canvas = canvas;
  4671. cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');
  4672. cache.positionLocation = gl.getAttribLocation(program, 'a_position');
  4673. cache.backdropLocation = gl.getUniformLocation(program, 'u_backdrop');
  4674. cache.subtypeLocation = gl.getUniformLocation(program, 'u_subtype');
  4675. var texCoordLocation = gl.getAttribLocation(program, 'a_texCoord');
  4676. var texLayerLocation = gl.getUniformLocation(program, 'u_image');
  4677. var texMaskLocation = gl.getUniformLocation(program, 'u_mask');
  4678. // provide texture coordinates for the rectangle.
  4679. var texCoordBuffer = gl.createBuffer();
  4680. gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
  4681. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
  4682. 0.0, 0.0,
  4683. 1.0, 0.0,
  4684. 0.0, 1.0,
  4685. 0.0, 1.0,
  4686. 1.0, 0.0,
  4687. 1.0, 1.0]), gl.STATIC_DRAW);
  4688. gl.enableVertexAttribArray(texCoordLocation);
  4689. gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0);
  4690. gl.uniform1i(texLayerLocation, 0);
  4691. gl.uniform1i(texMaskLocation, 1);
  4692. smaskCache = cache;
  4693. }
  4694. function composeSMask(layer, mask, properties) {
  4695. var width = layer.width, height = layer.height;
  4696. if (!smaskCache) {
  4697. initSmaskGL();
  4698. }
  4699. var cache = smaskCache,canvas = cache.canvas, gl = cache.gl;
  4700. canvas.width = width;
  4701. canvas.height = height;
  4702. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  4703. gl.uniform2f(cache.resolutionLocation, width, height);
  4704. if (properties.backdrop) {
  4705. gl.uniform4f(cache.resolutionLocation, properties.backdrop[0],
  4706. properties.backdrop[1], properties.backdrop[2], 1);
  4707. } else {
  4708. gl.uniform4f(cache.resolutionLocation, 0, 0, 0, 0);
  4709. }
  4710. gl.uniform1i(cache.subtypeLocation,
  4711. properties.subtype === 'Luminosity' ? 1 : 0);
  4712. // Create a textures
  4713. var texture = createTexture(gl, layer, gl.TEXTURE0);
  4714. var maskTexture = createTexture(gl, mask, gl.TEXTURE1);
  4715. // Create a buffer and put a single clipspace rectangle in
  4716. // it (2 triangles)
  4717. var buffer = gl.createBuffer();
  4718. gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
  4719. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
  4720. 0, 0,
  4721. width, 0,
  4722. 0, height,
  4723. 0, height,
  4724. width, 0,
  4725. width, height]), gl.STATIC_DRAW);
  4726. gl.enableVertexAttribArray(cache.positionLocation);
  4727. gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);
  4728. // draw
  4729. gl.clearColor(0, 0, 0, 0);
  4730. gl.enable(gl.BLEND);
  4731. gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
  4732. gl.clear(gl.COLOR_BUFFER_BIT);
  4733. gl.drawArrays(gl.TRIANGLES, 0, 6);
  4734. gl.flush();
  4735. gl.deleteTexture(texture);
  4736. gl.deleteTexture(maskTexture);
  4737. gl.deleteBuffer(buffer);
  4738. return canvas;
  4739. }
  4740. var figuresVertexShaderCode = '\
  4741. attribute vec2 a_position; \
  4742. attribute vec3 a_color; \
  4743. \
  4744. uniform vec2 u_resolution; \
  4745. uniform vec2 u_scale; \
  4746. uniform vec2 u_offset; \
  4747. \
  4748. varying vec4 v_color; \
  4749. \
  4750. void main() { \
  4751. vec2 position = (a_position + u_offset) * u_scale; \
  4752. vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; \
  4753. gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \
  4754. \
  4755. v_color = vec4(a_color / 255.0, 1.0); \
  4756. } ';
  4757. var figuresFragmentShaderCode = '\
  4758. precision mediump float; \
  4759. \
  4760. varying vec4 v_color; \
  4761. \
  4762. void main() { \
  4763. gl_FragColor = v_color; \
  4764. } ';
  4765. var figuresCache = null;
  4766. function initFiguresGL() {
  4767. var canvas, gl;
  4768. generageGL();
  4769. canvas = currentCanvas;
  4770. currentCanvas = null;
  4771. gl = currentGL;
  4772. currentGL = null;
  4773. // setup a GLSL program
  4774. var vertexShader = createVertexShader(gl, figuresVertexShaderCode);
  4775. var fragmentShader = createFragmentShader(gl, figuresFragmentShaderCode);
  4776. var program = createProgram(gl, [vertexShader, fragmentShader]);
  4777. gl.useProgram(program);
  4778. var cache = {};
  4779. cache.gl = gl;
  4780. cache.canvas = canvas;
  4781. cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');
  4782. cache.scaleLocation = gl.getUniformLocation(program, 'u_scale');
  4783. cache.offsetLocation = gl.getUniformLocation(program, 'u_offset');
  4784. cache.positionLocation = gl.getAttribLocation(program, 'a_position');
  4785. cache.colorLocation = gl.getAttribLocation(program, 'a_color');
  4786. figuresCache = cache;
  4787. }
  4788. function drawFigures(width, height, backgroundColor, figures, context) {
  4789. if (!figuresCache) {
  4790. initFiguresGL();
  4791. }
  4792. var cache = figuresCache, canvas = cache.canvas, gl = cache.gl;
  4793. canvas.width = width;
  4794. canvas.height = height;
  4795. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  4796. gl.uniform2f(cache.resolutionLocation, width, height);
  4797. // count triangle points
  4798. var count = 0;
  4799. var i, ii, rows;
  4800. for (i = 0, ii = figures.length; i < ii; i++) {
  4801. switch (figures[i].type) {
  4802. case 'lattice':
  4803. rows = (figures[i].coords.length / figures[i].verticesPerRow) | 0;
  4804. count += (rows - 1) * (figures[i].verticesPerRow - 1) * 6;
  4805. break;
  4806. case 'triangles':
  4807. count += figures[i].coords.length;
  4808. break;
  4809. }
  4810. }
  4811. // transfer data
  4812. var coords = new Float32Array(count * 2);
  4813. var colors = new Uint8Array(count * 3);
  4814. var coordsMap = context.coords, colorsMap = context.colors;
  4815. var pIndex = 0, cIndex = 0;
  4816. for (i = 0, ii = figures.length; i < ii; i++) {
  4817. var figure = figures[i], ps = figure.coords, cs = figure.colors;
  4818. switch (figure.type) {
  4819. case 'lattice':
  4820. var cols = figure.verticesPerRow;
  4821. rows = (ps.length / cols) | 0;
  4822. for (var row = 1; row < rows; row++) {
  4823. var offset = row * cols + 1;
  4824. for (var col = 1; col < cols; col++, offset++) {
  4825. coords[pIndex] = coordsMap[ps[offset - cols - 1]];
  4826. coords[pIndex + 1] = coordsMap[ps[offset - cols - 1] + 1];
  4827. coords[pIndex + 2] = coordsMap[ps[offset - cols]];
  4828. coords[pIndex + 3] = coordsMap[ps[offset - cols] + 1];
  4829. coords[pIndex + 4] = coordsMap[ps[offset - 1]];
  4830. coords[pIndex + 5] = coordsMap[ps[offset - 1] + 1];
  4831. colors[cIndex] = colorsMap[cs[offset - cols - 1]];
  4832. colors[cIndex + 1] = colorsMap[cs[offset - cols - 1] + 1];
  4833. colors[cIndex + 2] = colorsMap[cs[offset - cols - 1] + 2];
  4834. colors[cIndex + 3] = colorsMap[cs[offset - cols]];
  4835. colors[cIndex + 4] = colorsMap[cs[offset - cols] + 1];
  4836. colors[cIndex + 5] = colorsMap[cs[offset - cols] + 2];
  4837. colors[cIndex + 6] = colorsMap[cs[offset - 1]];
  4838. colors[cIndex + 7] = colorsMap[cs[offset - 1] + 1];
  4839. colors[cIndex + 8] = colorsMap[cs[offset - 1] + 2];
  4840. coords[pIndex + 6] = coords[pIndex + 2];
  4841. coords[pIndex + 7] = coords[pIndex + 3];
  4842. coords[pIndex + 8] = coords[pIndex + 4];
  4843. coords[pIndex + 9] = coords[pIndex + 5];
  4844. coords[pIndex + 10] = coordsMap[ps[offset]];
  4845. coords[pIndex + 11] = coordsMap[ps[offset] + 1];
  4846. colors[cIndex + 9] = colors[cIndex + 3];
  4847. colors[cIndex + 10] = colors[cIndex + 4];
  4848. colors[cIndex + 11] = colors[cIndex + 5];
  4849. colors[cIndex + 12] = colors[cIndex + 6];
  4850. colors[cIndex + 13] = colors[cIndex + 7];
  4851. colors[cIndex + 14] = colors[cIndex + 8];
  4852. colors[cIndex + 15] = colorsMap[cs[offset]];
  4853. colors[cIndex + 16] = colorsMap[cs[offset] + 1];
  4854. colors[cIndex + 17] = colorsMap[cs[offset] + 2];
  4855. pIndex += 12;
  4856. cIndex += 18;
  4857. }
  4858. }
  4859. break;
  4860. case 'triangles':
  4861. for (var j = 0, jj = ps.length; j < jj; j++) {
  4862. coords[pIndex] = coordsMap[ps[j]];
  4863. coords[pIndex + 1] = coordsMap[ps[j] + 1];
  4864. colors[cIndex] = colorsMap[cs[i]];
  4865. colors[cIndex + 1] = colorsMap[cs[j] + 1];
  4866. colors[cIndex + 2] = colorsMap[cs[j] + 2];
  4867. pIndex += 2;
  4868. cIndex += 3;
  4869. }
  4870. break;
  4871. }
  4872. }
  4873. // draw
  4874. if (backgroundColor) {
  4875. gl.clearColor(backgroundColor[0] / 255, backgroundColor[1] / 255,
  4876. backgroundColor[2] / 255, 1.0);
  4877. } else {
  4878. gl.clearColor(0, 0, 0, 0);
  4879. }
  4880. gl.clear(gl.COLOR_BUFFER_BIT);
  4881. var coordsBuffer = gl.createBuffer();
  4882. gl.bindBuffer(gl.ARRAY_BUFFER, coordsBuffer);
  4883. gl.bufferData(gl.ARRAY_BUFFER, coords, gl.STATIC_DRAW);
  4884. gl.enableVertexAttribArray(cache.positionLocation);
  4885. gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);
  4886. var colorsBuffer = gl.createBuffer();
  4887. gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer);
  4888. gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
  4889. gl.enableVertexAttribArray(cache.colorLocation);
  4890. gl.vertexAttribPointer(cache.colorLocation, 3, gl.UNSIGNED_BYTE, false,
  4891. 0, 0);
  4892. gl.uniform2f(cache.scaleLocation, context.scaleX, context.scaleY);
  4893. gl.uniform2f(cache.offsetLocation, context.offsetX, context.offsetY);
  4894. gl.drawArrays(gl.TRIANGLES, 0, count);
  4895. gl.flush();
  4896. gl.deleteBuffer(coordsBuffer);
  4897. gl.deleteBuffer(colorsBuffer);
  4898. return canvas;
  4899. }
  4900. function cleanup() {
  4901. smaskCache = null;
  4902. figuresCache = null;
  4903. }
  4904. return {
  4905. get isEnabled() {
  4906. if (PDFJS.disableWebGL) {
  4907. return false;
  4908. }
  4909. var enabled = false;
  4910. try {
  4911. generageGL();
  4912. enabled = !!currentGL;
  4913. } catch (e) { }
  4914. return shadow(this, 'isEnabled', enabled);
  4915. },
  4916. composeSMask: composeSMask,
  4917. drawFigures: drawFigures,
  4918. clear: cleanup
  4919. };
  4920. })();
  4921. var ShadingIRs = {};
  4922. ShadingIRs.RadialAxial = {
  4923. fromIR: function RadialAxial_fromIR(raw) {
  4924. var type = raw[1];
  4925. var colorStops = raw[2];
  4926. var p0 = raw[3];
  4927. var p1 = raw[4];
  4928. var r0 = raw[5];
  4929. var r1 = raw[6];
  4930. return {
  4931. type: 'Pattern',
  4932. getPattern: function RadialAxial_getPattern(ctx) {
  4933. var grad;
  4934. if (type === 'axial') {
  4935. grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]);
  4936. } else if (type === 'radial') {
  4937. grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1);
  4938. }
  4939. for (var i = 0, ii = colorStops.length; i < ii; ++i) {
  4940. var c = colorStops[i];
  4941. grad.addColorStop(c[0], c[1]);
  4942. }
  4943. return grad;
  4944. }
  4945. };
  4946. }
  4947. };
  4948. var createMeshCanvas = (function createMeshCanvasClosure() {
  4949. function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {
  4950. // Very basic Gouraud-shaded triangle rasterization algorithm.
  4951. var coords = context.coords, colors = context.colors;
  4952. var bytes = data.data, rowSize = data.width * 4;
  4953. var tmp;
  4954. if (coords[p1 + 1] > coords[p2 + 1]) {
  4955. tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;
  4956. }
  4957. if (coords[p2 + 1] > coords[p3 + 1]) {
  4958. tmp = p2; p2 = p3; p3 = tmp; tmp = c2; c2 = c3; c3 = tmp;
  4959. }
  4960. if (coords[p1 + 1] > coords[p2 + 1]) {
  4961. tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;
  4962. }
  4963. var x1 = (coords[p1] + context.offsetX) * context.scaleX;
  4964. var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;
  4965. var x2 = (coords[p2] + context.offsetX) * context.scaleX;
  4966. var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;
  4967. var x3 = (coords[p3] + context.offsetX) * context.scaleX;
  4968. var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;
  4969. if (y1 >= y3) {
  4970. return;
  4971. }
  4972. var c1r = colors[c1], c1g = colors[c1 + 1], c1b = colors[c1 + 2];
  4973. var c2r = colors[c2], c2g = colors[c2 + 1], c2b = colors[c2 + 2];
  4974. var c3r = colors[c3], c3g = colors[c3 + 1], c3b = colors[c3 + 2];
  4975. var minY = Math.round(y1), maxY = Math.round(y3);
  4976. var xa, car, cag, cab;
  4977. var xb, cbr, cbg, cbb;
  4978. var k;
  4979. for (var y = minY; y <= maxY; y++) {
  4980. if (y < y2) {
  4981. k = y < y1 ? 0 : y1 === y2 ? 1 : (y1 - y) / (y1 - y2);
  4982. xa = x1 - (x1 - x2) * k;
  4983. car = c1r - (c1r - c2r) * k;
  4984. cag = c1g - (c1g - c2g) * k;
  4985. cab = c1b - (c1b - c2b) * k;
  4986. } else {
  4987. k = y > y3 ? 1 : y2 === y3 ? 0 : (y2 - y) / (y2 - y3);
  4988. xa = x2 - (x2 - x3) * k;
  4989. car = c2r - (c2r - c3r) * k;
  4990. cag = c2g - (c2g - c3g) * k;
  4991. cab = c2b - (c2b - c3b) * k;
  4992. }
  4993. k = y < y1 ? 0 : y > y3 ? 1 : (y1 - y) / (y1 - y3);
  4994. xb = x1 - (x1 - x3) * k;
  4995. cbr = c1r - (c1r - c3r) * k;
  4996. cbg = c1g - (c1g - c3g) * k;
  4997. cbb = c1b - (c1b - c3b) * k;
  4998. var x1_ = Math.round(Math.min(xa, xb));
  4999. var x2_ = Math.round(Math.max(xa, xb));
  5000. var j = rowSize * y + x1_ * 4;
  5001. for (var x = x1_; x <= x2_; x++) {
  5002. k = (xa - x) / (xa - xb);
  5003. k = k < 0 ? 0 : k > 1 ? 1 : k;
  5004. bytes[j++] = (car - (car - cbr) * k) | 0;
  5005. bytes[j++] = (cag - (cag - cbg) * k) | 0;
  5006. bytes[j++] = (cab - (cab - cbb) * k) | 0;
  5007. bytes[j++] = 255;
  5008. }
  5009. }
  5010. }
  5011. function drawFigure(data, figure, context) {
  5012. var ps = figure.coords;
  5013. var cs = figure.colors;
  5014. var i, ii;
  5015. switch (figure.type) {
  5016. case 'lattice':
  5017. var verticesPerRow = figure.verticesPerRow;
  5018. var rows = Math.floor(ps.length / verticesPerRow) - 1;
  5019. var cols = verticesPerRow - 1;
  5020. for (i = 0; i < rows; i++) {
  5021. var q = i * verticesPerRow;
  5022. for (var j = 0; j < cols; j++, q++) {
  5023. drawTriangle(data, context,
  5024. ps[q], ps[q + 1], ps[q + verticesPerRow],
  5025. cs[q], cs[q + 1], cs[q + verticesPerRow]);
  5026. drawTriangle(data, context,
  5027. ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow],
  5028. cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);
  5029. }
  5030. }
  5031. break;
  5032. case 'triangles':
  5033. for (i = 0, ii = ps.length; i < ii; i += 3) {
  5034. drawTriangle(data, context,
  5035. ps[i], ps[i + 1], ps[i + 2],
  5036. cs[i], cs[i + 1], cs[i + 2]);
  5037. }
  5038. break;
  5039. default:
  5040. error('illigal figure');
  5041. break;
  5042. }
  5043. }
  5044. function createMeshCanvas(bounds, combinesScale, coords, colors, figures,
  5045. backgroundColor) {
  5046. // we will increase scale on some weird factor to let antialiasing take
  5047. // care of "rough" edges
  5048. var EXPECTED_SCALE = 1.1;
  5049. // MAX_PATTERN_SIZE is used to avoid OOM situation.
  5050. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough
  5051. var offsetX = Math.floor(bounds[0]);
  5052. var offsetY = Math.floor(bounds[1]);
  5053. var boundsWidth = Math.ceil(bounds[2]) - offsetX;
  5054. var boundsHeight = Math.ceil(bounds[3]) - offsetY;
  5055. var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinesScale[0] *
  5056. EXPECTED_SCALE)), MAX_PATTERN_SIZE);
  5057. var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinesScale[1] *
  5058. EXPECTED_SCALE)), MAX_PATTERN_SIZE);
  5059. var scaleX = boundsWidth / width;
  5060. var scaleY = boundsHeight / height;
  5061. var context = {
  5062. coords: coords,
  5063. colors: colors,
  5064. offsetX: -offsetX,
  5065. offsetY: -offsetY,
  5066. scaleX: 1 / scaleX,
  5067. scaleY: 1 / scaleY
  5068. };
  5069. var canvas, tmpCanvas, i, ii;
  5070. if (WebGLUtils.isEnabled) {
  5071. canvas = WebGLUtils.drawFigures(width, height, backgroundColor,
  5072. figures, context);
  5073. // https://bugzilla.mozilla.org/show_bug.cgi?id=972126
  5074. tmpCanvas = CachedCanvases.getCanvas('mesh', width, height, false);
  5075. tmpCanvas.context.drawImage(canvas, 0, 0);
  5076. canvas = tmpCanvas.canvas;
  5077. } else {
  5078. tmpCanvas = CachedCanvases.getCanvas('mesh', width, height, false);
  5079. var tmpCtx = tmpCanvas.context;
  5080. var data = tmpCtx.createImageData(width, height);
  5081. if (backgroundColor) {
  5082. var bytes = data.data;
  5083. for (i = 0, ii = bytes.length; i < ii; i += 4) {
  5084. bytes[i] = backgroundColor[0];
  5085. bytes[i + 1] = backgroundColor[1];
  5086. bytes[i + 2] = backgroundColor[2];
  5087. bytes[i + 3] = 255;
  5088. }
  5089. }
  5090. for (i = 0; i < figures.length; i++) {
  5091. drawFigure(data, figures[i], context);
  5092. }
  5093. tmpCtx.putImageData(data, 0, 0);
  5094. canvas = tmpCanvas.canvas;
  5095. }
  5096. return {canvas: canvas, offsetX: offsetX, offsetY: offsetY,
  5097. scaleX: scaleX, scaleY: scaleY};
  5098. }
  5099. return createMeshCanvas;
  5100. })();
  5101. ShadingIRs.Mesh = {
  5102. fromIR: function Mesh_fromIR(raw) {
  5103. //var type = raw[1];
  5104. var coords = raw[2];
  5105. var colors = raw[3];
  5106. var figures = raw[4];
  5107. var bounds = raw[5];
  5108. var matrix = raw[6];
  5109. //var bbox = raw[7];
  5110. var background = raw[8];
  5111. return {
  5112. type: 'Pattern',
  5113. getPattern: function Mesh_getPattern(ctx, owner, shadingFill) {
  5114. var combinedScale;
  5115. // Obtain scale from matrix and current transformation matrix.
  5116. if (shadingFill) {
  5117. combinedScale = Util.singularValueDecompose2dScale(
  5118. ctx.mozCurrentTransform);
  5119. } else {
  5120. var matrixScale = Util.singularValueDecompose2dScale(matrix);
  5121. var curMatrixScale = Util.singularValueDecompose2dScale(
  5122. owner.baseTransform);
  5123. combinedScale = [matrixScale[0] * curMatrixScale[0],
  5124. matrixScale[1] * curMatrixScale[1]];
  5125. }
  5126. // Rasterizing on the main thread since sending/queue large canvases
  5127. // might cause OOM.
  5128. var temporaryPatternCanvas = createMeshCanvas(bounds, combinedScale,
  5129. coords, colors, figures, shadingFill ? null : background);
  5130. if (!shadingFill) {
  5131. ctx.setTransform.apply(ctx, owner.baseTransform);
  5132. if (matrix) {
  5133. ctx.transform.apply(ctx, matrix);
  5134. }
  5135. }
  5136. ctx.translate(temporaryPatternCanvas.offsetX,
  5137. temporaryPatternCanvas.offsetY);
  5138. ctx.scale(temporaryPatternCanvas.scaleX,
  5139. temporaryPatternCanvas.scaleY);
  5140. return ctx.createPattern(temporaryPatternCanvas.canvas, 'no-repeat');
  5141. }
  5142. };
  5143. }
  5144. };
  5145. ShadingIRs.Dummy = {
  5146. fromIR: function Dummy_fromIR() {
  5147. return {
  5148. type: 'Pattern',
  5149. getPattern: function Dummy_fromIR_getPattern() {
  5150. return 'hotpink';
  5151. }
  5152. };
  5153. }
  5154. };
  5155. function getShadingPatternFromIR(raw) {
  5156. var shadingIR = ShadingIRs[raw[0]];
  5157. if (!shadingIR) {
  5158. error('Unknown IR type: ' + raw[0]);
  5159. }
  5160. return shadingIR.fromIR(raw);
  5161. }
  5162. var TilingPattern = (function TilingPatternClosure() {
  5163. var PaintType = {
  5164. COLORED: 1,
  5165. UNCOLORED: 2
  5166. };
  5167. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough
  5168. function TilingPattern(IR, color, ctx, objs, commonObjs, baseTransform) {
  5169. this.operatorList = IR[2];
  5170. this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];
  5171. this.bbox = IR[4];
  5172. this.xstep = IR[5];
  5173. this.ystep = IR[6];
  5174. this.paintType = IR[7];
  5175. this.tilingType = IR[8];
  5176. this.color = color;
  5177. this.objs = objs;
  5178. this.commonObjs = commonObjs;
  5179. this.baseTransform = baseTransform;
  5180. this.type = 'Pattern';
  5181. this.ctx = ctx;
  5182. }
  5183. TilingPattern.prototype = {
  5184. createPatternCanvas: function TilinPattern_createPatternCanvas(owner) {
  5185. var operatorList = this.operatorList;
  5186. var bbox = this.bbox;
  5187. var xstep = this.xstep;
  5188. var ystep = this.ystep;
  5189. var paintType = this.paintType;
  5190. var tilingType = this.tilingType;
  5191. var color = this.color;
  5192. var objs = this.objs;
  5193. var commonObjs = this.commonObjs;
  5194. info('TilingType: ' + tilingType);
  5195. var x0 = bbox[0], y0 = bbox[1], x1 = bbox[2], y1 = bbox[3];
  5196. var topLeft = [x0, y0];
  5197. // we want the canvas to be as large as the step size
  5198. var botRight = [x0 + xstep, y0 + ystep];
  5199. var width = botRight[0] - topLeft[0];
  5200. var height = botRight[1] - topLeft[1];
  5201. // Obtain scale from matrix and current transformation matrix.
  5202. var matrixScale = Util.singularValueDecompose2dScale(this.matrix);
  5203. var curMatrixScale = Util.singularValueDecompose2dScale(
  5204. this.baseTransform);
  5205. var combinedScale = [matrixScale[0] * curMatrixScale[0],
  5206. matrixScale[1] * curMatrixScale[1]];
  5207. // MAX_PATTERN_SIZE is used to avoid OOM situation.
  5208. // Use width and height values that are as close as possible to the end
  5209. // result when the pattern is used. Too low value makes the pattern look
  5210. // blurry. Too large value makes it look too crispy.
  5211. width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])),
  5212. MAX_PATTERN_SIZE);
  5213. height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])),
  5214. MAX_PATTERN_SIZE);
  5215. var tmpCanvas = CachedCanvases.getCanvas('pattern', width, height, true);
  5216. var tmpCtx = tmpCanvas.context;
  5217. var graphics = new CanvasGraphics(tmpCtx, commonObjs, objs);
  5218. graphics.groupLevel = owner.groupLevel;
  5219. this.setFillAndStrokeStyleToContext(tmpCtx, paintType, color);
  5220. this.setScale(width, height, xstep, ystep);
  5221. this.transformToScale(graphics);
  5222. // transform coordinates to pattern space
  5223. var tmpTranslate = [1, 0, 0, 1, -topLeft[0], -topLeft[1]];
  5224. graphics.transform.apply(graphics, tmpTranslate);
  5225. this.clipBbox(graphics, bbox, x0, y0, x1, y1);
  5226. graphics.executeOperatorList(operatorList);
  5227. return tmpCanvas.canvas;
  5228. },
  5229. setScale: function TilingPattern_setScale(width, height, xstep, ystep) {
  5230. this.scale = [width / xstep, height / ystep];
  5231. },
  5232. transformToScale: function TilingPattern_transformToScale(graphics) {
  5233. var scale = this.scale;
  5234. var tmpScale = [scale[0], 0, 0, scale[1], 0, 0];
  5235. graphics.transform.apply(graphics, tmpScale);
  5236. },
  5237. scaleToContext: function TilingPattern_scaleToContext() {
  5238. var scale = this.scale;
  5239. this.ctx.scale(1 / scale[0], 1 / scale[1]);
  5240. },
  5241. clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {
  5242. if (bbox && isArray(bbox) && 4 == bbox.length) {
  5243. var bboxWidth = x1 - x0;
  5244. var bboxHeight = y1 - y0;
  5245. graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);
  5246. graphics.clip();
  5247. graphics.endPath();
  5248. }
  5249. },
  5250. setFillAndStrokeStyleToContext:
  5251. function setFillAndStrokeStyleToContext(context, paintType, color) {
  5252. switch (paintType) {
  5253. case PaintType.COLORED:
  5254. var ctx = this.ctx;
  5255. context.fillStyle = ctx.fillStyle;
  5256. context.strokeStyle = ctx.strokeStyle;
  5257. break;
  5258. case PaintType.UNCOLORED:
  5259. var cssColor = Util.makeCssRgb(color);
  5260. context.fillStyle = cssColor;
  5261. context.strokeStyle = cssColor;
  5262. break;
  5263. default:
  5264. error('Unsupported paint type: ' + paintType);
  5265. }
  5266. },
  5267. getPattern: function TilingPattern_getPattern(ctx, owner) {
  5268. var temporaryPatternCanvas = this.createPatternCanvas(owner);
  5269. ctx = this.ctx;
  5270. ctx.setTransform.apply(ctx, this.baseTransform);
  5271. ctx.transform.apply(ctx, this.matrix);
  5272. this.scaleToContext();
  5273. return ctx.createPattern(temporaryPatternCanvas, 'repeat');
  5274. }
  5275. };
  5276. return TilingPattern;
  5277. })();
  5278. PDFJS.disableFontFace = false;
  5279. var FontLoader = {
  5280. insertRule: function fontLoaderInsertRule(rule) {
  5281. var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
  5282. if (!styleElement) {
  5283. styleElement = document.createElement('style');
  5284. styleElement.id = 'PDFJS_FONT_STYLE_TAG';
  5285. document.documentElement.getElementsByTagName('head')[0].appendChild(
  5286. styleElement);
  5287. }
  5288. var styleSheet = styleElement.sheet;
  5289. styleSheet.insertRule(rule, styleSheet.cssRules.length);
  5290. },
  5291. clear: function fontLoaderClear() {
  5292. var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
  5293. if (styleElement) {
  5294. styleElement.parentNode.removeChild(styleElement);
  5295. }
  5296. },
  5297. get loadTestFont() {
  5298. // This is a CFF font with 1 glyph for '.' that fills its entire width and
  5299. // height.
  5300. return shadow(this, 'loadTestFont', atob(
  5301. 'T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQ' +
  5302. 'AABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwA' +
  5303. 'AAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbm' +
  5304. 'FtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAA' +
  5305. 'AADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6A' +
  5306. 'ABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAA' +
  5307. 'MQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAA' +
  5308. 'AAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAA' +
  5309. 'AAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQ' +
  5310. 'AAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMA' +
  5311. 'AQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAA' +
  5312. 'EAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAA' +
  5313. 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAA' +
  5314. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  5315. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  5316. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  5317. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAA' +
  5318. 'AAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgc' +
  5319. 'A/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF' +
  5320. 'hYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQA' +
  5321. 'AAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAg' +
  5322. 'ABAAAAAAAAAAAD6AAAAAAAAA=='
  5323. ));
  5324. },
  5325. loadTestFontId: 0,
  5326. loadingContext: {
  5327. requests: [],
  5328. nextRequestId: 0
  5329. },
  5330. isSyncFontLoadingSupported: (function detectSyncFontLoadingSupport() {
  5331. if (isWorker) {
  5332. return false;
  5333. }
  5334. // User agent string sniffing is bad, but there is no reliable way to tell
  5335. // if font is fully loaded and ready to be used with canvas.
  5336. var userAgent = window.navigator.userAgent;
  5337. var m = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(userAgent);
  5338. if (m && m[1] >= 14) {
  5339. return true;
  5340. }
  5341. // TODO other browsers
  5342. return false;
  5343. })(),
  5344. bind: function fontLoaderBind(fonts, callback) {
  5345. assert(!isWorker, 'bind() shall be called from main thread');
  5346. var rules = [], fontsToLoad = [];
  5347. for (var i = 0, ii = fonts.length; i < ii; i++) {
  5348. var font = fonts[i];
  5349. // Add the font to the DOM only once or skip if the font
  5350. // is already loaded.
  5351. if (font.attached || font.loading === false) {
  5352. continue;
  5353. }
  5354. font.attached = true;
  5355. var rule = font.bindDOM();
  5356. if (rule) {
  5357. rules.push(rule);
  5358. fontsToLoad.push(font);
  5359. }
  5360. }
  5361. var request = FontLoader.queueLoadingCallback(callback);
  5362. if (rules.length > 0 && !this.isSyncFontLoadingSupported) {
  5363. FontLoader.prepareFontLoadEvent(rules, fontsToLoad, request);
  5364. } else {
  5365. request.complete();
  5366. }
  5367. },
  5368. queueLoadingCallback: function FontLoader_queueLoadingCallback(callback) {
  5369. function LoadLoader_completeRequest() {
  5370. assert(!request.end, 'completeRequest() cannot be called twice');
  5371. request.end = Date.now();
  5372. // sending all completed requests in order how they were queued
  5373. while (context.requests.length > 0 && context.requests[0].end) {
  5374. var otherRequest = context.requests.shift();
  5375. setTimeout(otherRequest.callback, 0);
  5376. }
  5377. }
  5378. var context = FontLoader.loadingContext;
  5379. var requestId = 'pdfjs-font-loading-' + (context.nextRequestId++);
  5380. var request = {
  5381. id: requestId,
  5382. complete: LoadLoader_completeRequest,
  5383. callback: callback,
  5384. started: Date.now()
  5385. };
  5386. context.requests.push(request);
  5387. return request;
  5388. },
  5389. prepareFontLoadEvent: function fontLoaderPrepareFontLoadEvent(rules,
  5390. fonts,
  5391. request) {
  5392. /** Hack begin */
  5393. // There's currently no event when a font has finished downloading so the
  5394. // following code is a dirty hack to 'guess' when a font is
  5395. // ready. It's assumed fonts are loaded in order, so add a known test
  5396. // font after the desired fonts and then test for the loading of that
  5397. // test font.
  5398. function int32(data, offset) {
  5399. return (data.charCodeAt(offset) << 24) |
  5400. (data.charCodeAt(offset + 1) << 16) |
  5401. (data.charCodeAt(offset + 2) << 8) |
  5402. (data.charCodeAt(offset + 3) & 0xff);
  5403. }
  5404. function spliceString(s, offset, remove, insert) {
  5405. var chunk1 = s.substr(0, offset);
  5406. var chunk2 = s.substr(offset + remove);
  5407. return chunk1 + insert + chunk2;
  5408. }
  5409. var i, ii;
  5410. var canvas = document.createElement('canvas');
  5411. canvas.width = 1;
  5412. canvas.height = 1;
  5413. var ctx = canvas.getContext('2d');
  5414. var called = 0;
  5415. function isFontReady(name, callback) {
  5416. called++;
  5417. // With setTimeout clamping this gives the font ~100ms to load.
  5418. if(called > 30) {
  5419. warn('Load test font never loaded.');
  5420. callback();
  5421. return;
  5422. }
  5423. ctx.font = '30px ' + name;
  5424. ctx.fillText('.', 0, 20);
  5425. var imageData = ctx.getImageData(0, 0, 1, 1);
  5426. if (imageData.data[3] > 0) {
  5427. callback();
  5428. return;
  5429. }
  5430. setTimeout(isFontReady.bind(null, name, callback));
  5431. }
  5432. var loadTestFontId = 'lt' + Date.now() + this.loadTestFontId++;
  5433. // Chromium seems to cache fonts based on a hash of the actual font data,
  5434. // so the font must be modified for each load test else it will appear to
  5435. // be loaded already.
  5436. // TODO: This could maybe be made faster by avoiding the btoa of the full
  5437. // font by splitting it in chunks before hand and padding the font id.
  5438. var data = this.loadTestFont;
  5439. var COMMENT_OFFSET = 976; // has to be on 4 byte boundary (for checksum)
  5440. data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length,
  5441. loadTestFontId);
  5442. // CFF checksum is important for IE, adjusting it
  5443. var CFF_CHECKSUM_OFFSET = 16;
  5444. var XXXX_VALUE = 0x58585858; // the "comment" filled with 'X'
  5445. var checksum = int32(data, CFF_CHECKSUM_OFFSET);
  5446. for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {
  5447. checksum = (checksum - XXXX_VALUE + int32(loadTestFontId, i)) | 0;
  5448. }
  5449. if (i < loadTestFontId.length) { // align to 4 bytes boundary
  5450. checksum = (checksum - XXXX_VALUE +
  5451. int32(loadTestFontId + 'XXX', i)) | 0;
  5452. }
  5453. data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));
  5454. var url = 'url(data:font/opentype;base64,' + btoa(data) + ');';
  5455. var rule = '@font-face { font-family:"' + loadTestFontId + '";src:' +
  5456. url + '}';
  5457. FontLoader.insertRule(rule);
  5458. var names = [];
  5459. for (i = 0, ii = fonts.length; i < ii; i++) {
  5460. names.push(fonts[i].loadedName);
  5461. }
  5462. names.push(loadTestFontId);
  5463. var div = document.createElement('div');
  5464. div.setAttribute('style',
  5465. 'visibility: hidden;' +
  5466. 'width: 10px; height: 10px;' +
  5467. 'position: absolute; top: 0px; left: 0px;');
  5468. for (i = 0, ii = names.length; i < ii; ++i) {
  5469. var span = document.createElement('span');
  5470. span.textContent = 'Hi';
  5471. span.style.fontFamily = names[i];
  5472. div.appendChild(span);
  5473. }
  5474. document.body.appendChild(div);
  5475. isFontReady(loadTestFontId, function() {
  5476. document.body.removeChild(div);
  5477. request.complete();
  5478. });
  5479. /** Hack end */
  5480. }
  5481. };
  5482. var FontFace = (function FontFaceClosure() {
  5483. function FontFace(name, file, properties) {
  5484. this.compiledGlyphs = {};
  5485. if (arguments.length === 1) {
  5486. // importing translated data
  5487. var data = arguments[0];
  5488. for (var i in data) {
  5489. this[i] = data[i];
  5490. }
  5491. return;
  5492. }
  5493. }
  5494. FontFace.prototype = {
  5495. bindDOM: function FontFace_bindDOM() {
  5496. if (!this.data) {
  5497. return null;
  5498. }
  5499. if (PDFJS.disableFontFace) {
  5500. this.disableFontFace = true;
  5501. return null;
  5502. }
  5503. var data = bytesToString(new Uint8Array(this.data));
  5504. var fontName = this.loadedName;
  5505. // Add the font-face rule to the document
  5506. var url = ('url(data:' + this.mimetype + ';base64,' +
  5507. window.btoa(data) + ');');
  5508. var rule = '@font-face { font-family:"' + fontName + '";src:' + url + '}';
  5509. FontLoader.insertRule(rule);
  5510. if (PDFJS.pdfBug && 'FontInspector' in globalScope &&
  5511. globalScope['FontInspector'].enabled) {
  5512. globalScope['FontInspector'].fontAdded(this, url);
  5513. }
  5514. return rule;
  5515. },
  5516. getPathGenerator: function (objs, character) {
  5517. if (!(character in this.compiledGlyphs)) {
  5518. var js = objs.get(this.loadedName + '_path_' + character);
  5519. /*jshint -W054 */
  5520. this.compiledGlyphs[character] = new Function('c', 'size', js);
  5521. }
  5522. return this.compiledGlyphs[character];
  5523. }
  5524. };
  5525. return FontFace;
  5526. })();
  5527. var HIGHLIGHT_OFFSET = 4; // px
  5528. var ANNOT_MIN_SIZE = 10; // px
  5529. var AnnotationUtils = (function AnnotationUtilsClosure() {
  5530. // TODO(mack): This dupes some of the logic in CanvasGraphics.setFont()
  5531. function setTextStyles(element, item, fontObj) {
  5532. var style = element.style;
  5533. style.fontSize = item.fontSize + 'px';
  5534. style.direction = item.fontDirection < 0 ? 'rtl': 'ltr';
  5535. if (!fontObj) {
  5536. return;
  5537. }
  5538. style.fontWeight = fontObj.black ?
  5539. (fontObj.bold ? 'bolder' : 'bold') :
  5540. (fontObj.bold ? 'bold' : 'normal');
  5541. style.fontStyle = fontObj.italic ? 'italic' : 'normal';
  5542. var fontName = fontObj.loadedName;
  5543. var fontFamily = fontName ? '"' + fontName + '", ' : '';
  5544. // Use a reasonable default font if the font doesn't specify a fallback
  5545. var fallbackName = fontObj.fallbackName || 'Helvetica, sans-serif';
  5546. style.fontFamily = fontFamily + fallbackName;
  5547. }
  5548. // TODO(mack): Remove this, it's not really that helpful.
  5549. function getEmptyContainer(tagName, rect, borderWidth) {
  5550. var bWidth = borderWidth || 0;
  5551. var element = document.createElement(tagName);
  5552. element.style.borderWidth = bWidth + 'px';
  5553. var width = rect[2] - rect[0] - 2 * bWidth;
  5554. var height = rect[3] - rect[1] - 2 * bWidth;
  5555. element.style.width = width + 'px';
  5556. element.style.height = height + 'px';
  5557. return element;
  5558. }
  5559. function initContainer(item) {
  5560. var container = getEmptyContainer('section', item.rect, item.borderWidth);
  5561. container.style.backgroundColor = item.color;
  5562. var color = item.color;
  5563. var rgb = [];
  5564. for (var i = 0; i < 3; ++i) {
  5565. rgb[i] = Math.round(color[i] * 255);
  5566. }
  5567. item.colorCssRgb = Util.makeCssRgb(rgb);
  5568. var highlight = document.createElement('div');
  5569. highlight.className = 'annotationHighlight';
  5570. highlight.style.left = highlight.style.top = -HIGHLIGHT_OFFSET + 'px';
  5571. highlight.style.right = highlight.style.bottom = -HIGHLIGHT_OFFSET + 'px';
  5572. highlight.setAttribute('hidden', true);
  5573. item.highlightElement = highlight;
  5574. container.appendChild(item.highlightElement);
  5575. return container;
  5576. }
  5577. function getHtmlElementForTextWidgetAnnotation(item, commonObjs) {
  5578. var element = getEmptyContainer('div', item.rect, 0);
  5579. element.style.display = 'table';
  5580. var content = document.createElement('div');
  5581. content.textContent = item.fieldValue;
  5582. var textAlignment = item.textAlignment;
  5583. content.style.textAlign = ['left', 'center', 'right'][textAlignment];
  5584. content.style.verticalAlign = 'middle';
  5585. content.style.display = 'table-cell';
  5586. var fontObj = item.fontRefName ?
  5587. commonObjs.getData(item.fontRefName) : null;
  5588. setTextStyles(content, item, fontObj);
  5589. element.appendChild(content);
  5590. return element;
  5591. }
  5592. function getHtmlElementForTextAnnotation(item, commonObjs) {
  5593. var rect = item.rect;
  5594. // sanity check because of OOo-generated PDFs
  5595. if ((rect[3] - rect[1]) < ANNOT_MIN_SIZE) {
  5596. rect[3] = rect[1] + ANNOT_MIN_SIZE;
  5597. }
  5598. if ((rect[2] - rect[0]) < ANNOT_MIN_SIZE) {
  5599. rect[2] = rect[0] + (rect[3] - rect[1]); // make it square
  5600. }
  5601. var container = initContainer(item);
  5602. container.className = 'annotText';
  5603. var image = document.createElement('img');
  5604. image.style.height = container.style.height;
  5605. image.style.width = container.style.width;
  5606. var iconName = item.name;
  5607. image.src = PDFJS.imageResourcesPath + 'annotation-' +
  5608. iconName.toLowerCase() + '.svg';
  5609. image.alt = '[{{type}} Annotation]';
  5610. image.dataset.l10nId = 'text_annotation_type';
  5611. image.dataset.l10nArgs = JSON.stringify({type: iconName});
  5612. var contentWrapper = document.createElement('div');
  5613. contentWrapper.className = 'annotTextContentWrapper';
  5614. contentWrapper.style.left = Math.floor(rect[2] - rect[0] + 5) + 'px';
  5615. contentWrapper.style.top = '-10px';
  5616. var content = document.createElement('div');
  5617. content.className = 'annotTextContent';
  5618. content.setAttribute('hidden', true);
  5619. var i, ii;
  5620. if (item.hasBgColor) {
  5621. var color = item.color;
  5622. var rgb = [];
  5623. for (i = 0; i < 3; ++i) {
  5624. // Enlighten the color (70%)
  5625. var c = Math.round(color[i] * 255);
  5626. rgb[i] = Math.round((255 - c) * 0.7) + c;
  5627. }
  5628. content.style.backgroundColor = Util.makeCssRgb(rgb);
  5629. }
  5630. var title = document.createElement('h1');
  5631. var text = document.createElement('p');
  5632. title.textContent = item.title;
  5633. if (!item.content && !item.title) {
  5634. content.setAttribute('hidden', true);
  5635. } else {
  5636. var e = document.createElement('span');
  5637. var lines = item.content.split(/(?:\r\n?|\n)/);
  5638. for (i = 0, ii = lines.length; i < ii; ++i) {
  5639. var line = lines[i];
  5640. e.appendChild(document.createTextNode(line));
  5641. if (i < (ii - 1)) {
  5642. e.appendChild(document.createElement('br'));
  5643. }
  5644. }
  5645. text.appendChild(e);
  5646. var pinned = false;
  5647. var showAnnotation = function showAnnotation(pin) {
  5648. if (pin) {
  5649. pinned = true;
  5650. }
  5651. if (content.hasAttribute('hidden')) {
  5652. container.style.zIndex += 1;
  5653. content.removeAttribute('hidden');
  5654. }
  5655. };
  5656. var hideAnnotation = function hideAnnotation(unpin) {
  5657. if (unpin) {
  5658. pinned = false;
  5659. }
  5660. if (!content.hasAttribute('hidden') && !pinned) {
  5661. container.style.zIndex -= 1;
  5662. content.setAttribute('hidden', true);
  5663. }
  5664. };
  5665. var toggleAnnotation = function toggleAnnotation() {
  5666. if (pinned) {
  5667. hideAnnotation(true);
  5668. } else {
  5669. showAnnotation(true);
  5670. }
  5671. };
  5672. image.addEventListener('click', function image_clickHandler() {
  5673. toggleAnnotation();
  5674. }, false);
  5675. image.addEventListener('mouseover', function image_mouseOverHandler() {
  5676. showAnnotation();
  5677. }, false);
  5678. image.addEventListener('mouseout', function image_mouseOutHandler() {
  5679. hideAnnotation();
  5680. }, false);
  5681. content.addEventListener('click', function content_clickHandler() {
  5682. hideAnnotation(true);
  5683. }, false);
  5684. }
  5685. content.appendChild(title);
  5686. content.appendChild(text);
  5687. contentWrapper.appendChild(content);
  5688. container.appendChild(image);
  5689. container.appendChild(contentWrapper);
  5690. return container;
  5691. }
  5692. function getHtmlElementForLinkAnnotation(item, commonObjs) {
  5693. var container = initContainer(item);
  5694. container.className = 'annotLink';
  5695. container.style.borderColor = item.colorCssRgb;
  5696. container.style.borderStyle = 'solid';
  5697. var link = document.createElement('a');
  5698. link.href = link.title = item.url || '';
  5699. container.appendChild(link);
  5700. return container;
  5701. }
  5702. function getHtmlElement(data, objs) {
  5703. switch (data.annotationType) {
  5704. case AnnotationType.WIDGET:
  5705. return getHtmlElementForTextWidgetAnnotation(data, objs);
  5706. case AnnotationType.TEXT:
  5707. return getHtmlElementForTextAnnotation(data, objs);
  5708. case AnnotationType.LINK:
  5709. return getHtmlElementForLinkAnnotation(data, objs);
  5710. default:
  5711. throw new Error('Unsupported annotationType: ' + data.annotationType);
  5712. }
  5713. }
  5714. return {
  5715. getHtmlElement: getHtmlElement
  5716. };
  5717. })();
  5718. PDFJS.AnnotationUtils = AnnotationUtils;
  5719. var NetworkManager = (function NetworkManagerClosure() {
  5720. var OK_RESPONSE = 200;
  5721. var PARTIAL_CONTENT_RESPONSE = 206;
  5722. function NetworkManager(url, args) {
  5723. this.url = url;
  5724. args = args || {};
  5725. this.isHttp = /^https?:/i.test(url);
  5726. this.httpHeaders = (this.isHttp && args.httpHeaders) || {};
  5727. this.withCredentials = args.withCredentials || false;
  5728. this.getXhr = args.getXhr ||
  5729. function NetworkManager_getXhr() {
  5730. return new XMLHttpRequest();
  5731. };
  5732. this.currXhrId = 0;
  5733. this.pendingRequests = {};
  5734. this.loadedRequests = {};
  5735. }
  5736. function getArrayBuffer(xhr) {
  5737. var data = xhr.response;
  5738. if (typeof data !== 'string') {
  5739. return data;
  5740. }
  5741. var length = data.length;
  5742. var buffer = new Uint8Array(length);
  5743. for (var i = 0; i < length; i++) {
  5744. buffer[i] = data.charCodeAt(i) & 0xFF;
  5745. }
  5746. return buffer;
  5747. }
  5748. NetworkManager.prototype = {
  5749. requestRange: function NetworkManager_requestRange(begin, end, listeners) {
  5750. var args = {
  5751. begin: begin,
  5752. end: end
  5753. };
  5754. for (var prop in listeners) {
  5755. args[prop] = listeners[prop];
  5756. }
  5757. return this.request(args);
  5758. },
  5759. requestFull: function NetworkManager_requestRange(listeners) {
  5760. return this.request(listeners);
  5761. },
  5762. request: function NetworkManager_requestRange(args) {
  5763. var xhr = this.getXhr();
  5764. var xhrId = this.currXhrId++;
  5765. var pendingRequest = this.pendingRequests[xhrId] = {
  5766. xhr: xhr
  5767. };
  5768. xhr.open('GET', this.url);
  5769. xhr.withCredentials = this.withCredentials;
  5770. for (var property in this.httpHeaders) {
  5771. var value = this.httpHeaders[property];
  5772. if (typeof value === 'undefined') {
  5773. continue;
  5774. }
  5775. xhr.setRequestHeader(property, value);
  5776. }
  5777. if (this.isHttp && 'begin' in args && 'end' in args) {
  5778. var rangeStr = args.begin + '-' + (args.end - 1);
  5779. xhr.setRequestHeader('Range', 'bytes=' + rangeStr);
  5780. pendingRequest.expectedStatus = 206;
  5781. } else {
  5782. pendingRequest.expectedStatus = 200;
  5783. }
  5784. xhr.responseType = 'arraybuffer';
  5785. if (args.onProgress) {
  5786. xhr.onprogress = args.onProgress;
  5787. }
  5788. if (args.onError) {
  5789. xhr.onerror = function(evt) {
  5790. args.onError(xhr.status);
  5791. };
  5792. }
  5793. xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);
  5794. pendingRequest.onHeadersReceived = args.onHeadersReceived;
  5795. pendingRequest.onDone = args.onDone;
  5796. pendingRequest.onError = args.onError;
  5797. xhr.send(null);
  5798. return xhrId;
  5799. },
  5800. onStateChange: function NetworkManager_onStateChange(xhrId, evt) {
  5801. var pendingRequest = this.pendingRequests[xhrId];
  5802. if (!pendingRequest) {
  5803. // Maybe abortRequest was called...
  5804. return;
  5805. }
  5806. var xhr = pendingRequest.xhr;
  5807. if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {
  5808. pendingRequest.onHeadersReceived();
  5809. delete pendingRequest.onHeadersReceived;
  5810. }
  5811. if (xhr.readyState !== 4) {
  5812. return;
  5813. }
  5814. if (!(xhrId in this.pendingRequests)) {
  5815. // The XHR request might have been aborted in onHeadersReceived()
  5816. // callback, in which case we should abort request
  5817. return;
  5818. }
  5819. delete this.pendingRequests[xhrId];
  5820. // success status == 0 can be on ftp, file and other protocols
  5821. if (xhr.status === 0 && this.isHttp) {
  5822. if (pendingRequest.onError) {
  5823. pendingRequest.onError(xhr.status);
  5824. }
  5825. return;
  5826. }
  5827. var xhrStatus = xhr.status || OK_RESPONSE;
  5828. // From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:
  5829. // "A server MAY ignore the Range header". This means it's possible to
  5830. // get a 200 rather than a 206 response from a range request.
  5831. var ok_response_on_range_request =
  5832. xhrStatus === OK_RESPONSE &&
  5833. pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;
  5834. if (!ok_response_on_range_request &&
  5835. xhrStatus !== pendingRequest.expectedStatus) {
  5836. if (pendingRequest.onError) {
  5837. pendingRequest.onError(xhr.status);
  5838. }
  5839. return;
  5840. }
  5841. this.loadedRequests[xhrId] = true;
  5842. var chunk = getArrayBuffer(xhr);
  5843. if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {
  5844. var rangeHeader = xhr.getResponseHeader('Content-Range');
  5845. var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader);
  5846. var begin = parseInt(matches[1], 10);
  5847. pendingRequest.onDone({
  5848. begin: begin,
  5849. chunk: chunk
  5850. });
  5851. } else {
  5852. pendingRequest.onDone({
  5853. begin: 0,
  5854. chunk: chunk
  5855. });
  5856. }
  5857. },
  5858. hasPendingRequests: function NetworkManager_hasPendingRequests() {
  5859. for (var xhrId in this.pendingRequests) {
  5860. return true;
  5861. }
  5862. return false;
  5863. },
  5864. getRequestXhr: function NetworkManager_getXhr(xhrId) {
  5865. return this.pendingRequests[xhrId].xhr;
  5866. },
  5867. isPendingRequest: function NetworkManager_isPendingRequest(xhrId) {
  5868. return xhrId in this.pendingRequests;
  5869. },
  5870. isLoadedRequest: function NetworkManager_isLoadedRequest(xhrId) {
  5871. return xhrId in this.loadedRequests;
  5872. },
  5873. abortAllRequests: function NetworkManager_abortAllRequests() {
  5874. for (var xhrId in this.pendingRequests) {
  5875. this.abortRequest(xhrId | 0);
  5876. }
  5877. },
  5878. abortRequest: function NetworkManager_abortRequest(xhrId) {
  5879. var xhr = this.pendingRequests[xhrId].xhr;
  5880. delete this.pendingRequests[xhrId];
  5881. xhr.abort();
  5882. }
  5883. };
  5884. return NetworkManager;
  5885. })();
  5886. var ChunkedStream = (function ChunkedStreamClosure() {
  5887. function ChunkedStream(length, chunkSize, manager) {
  5888. this.bytes = new Uint8Array(length);
  5889. this.start = 0;
  5890. this.pos = 0;
  5891. this.end = length;
  5892. this.chunkSize = chunkSize;
  5893. this.loadedChunks = [];
  5894. this.numChunksLoaded = 0;
  5895. this.numChunks = Math.ceil(length / chunkSize);
  5896. this.manager = manager;
  5897. this.initialDataLength = 0;
  5898. this.lastSuccessfulEnsureByteChunk = -1; // a single-entry cache
  5899. }
  5900. // required methods for a stream. if a particular stream does not
  5901. // implement these, an error should be thrown
  5902. ChunkedStream.prototype = {
  5903. getMissingChunks: function ChunkedStream_getMissingChunks() {
  5904. var chunks = [];
  5905. for (var chunk = 0, n = this.numChunks; chunk < n; ++chunk) {
  5906. if (!(chunk in this.loadedChunks)) {
  5907. chunks.push(chunk);
  5908. }
  5909. }
  5910. return chunks;
  5911. },
  5912. getBaseStreams: function ChunkedStream_getBaseStreams() {
  5913. return [this];
  5914. },
  5915. allChunksLoaded: function ChunkedStream_allChunksLoaded() {
  5916. return this.numChunksLoaded === this.numChunks;
  5917. },
  5918. onReceiveData: function ChunkedStream_onReceiveData(begin, chunk) {
  5919. var end = begin + chunk.byteLength;
  5920. assert(begin % this.chunkSize === 0, 'Bad begin offset: ' + begin);
  5921. // Using this.length is inaccurate here since this.start can be moved
  5922. // See ChunkedStream.moveStart()
  5923. var length = this.bytes.length;
  5924. assert(end % this.chunkSize === 0 || end === length,
  5925. 'Bad end offset: ' + end);
  5926. this.bytes.set(new Uint8Array(chunk), begin);
  5927. var chunkSize = this.chunkSize;
  5928. var beginChunk = Math.floor(begin / chunkSize);
  5929. var endChunk = Math.floor((end - 1) / chunkSize) + 1;
  5930. var curChunk;
  5931. for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) {
  5932. if (!(curChunk in this.loadedChunks)) {
  5933. this.loadedChunks[curChunk] = true;
  5934. ++this.numChunksLoaded;
  5935. }
  5936. }
  5937. },
  5938. onReceiveInitialData: function ChunkedStream_onReceiveInitialData(data) {
  5939. this.bytes.set(data);
  5940. this.initialDataLength = data.length;
  5941. var endChunk = (this.end === data.length ?
  5942. this.numChunks : Math.floor(data.length / this.chunkSize));
  5943. for (var i = 0; i < endChunk; i++) {
  5944. this.loadedChunks[i] = true;
  5945. ++this.numChunksLoaded;
  5946. }
  5947. },
  5948. ensureByte: function ChunkedStream_ensureRange(pos) {
  5949. var chunk = Math.floor(pos / this.chunkSize);
  5950. if (chunk === this.lastSuccessfulEnsureByteChunk) {
  5951. return;
  5952. }
  5953. if (!(chunk in this.loadedChunks)) {
  5954. throw new MissingDataException(pos, pos + 1);
  5955. }
  5956. this.lastSuccessfulEnsureByteChunk = chunk;
  5957. },
  5958. ensureRange: function ChunkedStream_ensureRange(begin, end) {
  5959. if (begin >= end) {
  5960. return;
  5961. }
  5962. if (end <= this.initialDataLength) {
  5963. return;
  5964. }
  5965. var chunkSize = this.chunkSize;
  5966. var beginChunk = Math.floor(begin / chunkSize);
  5967. var endChunk = Math.floor((end - 1) / chunkSize) + 1;
  5968. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  5969. if (!(chunk in this.loadedChunks)) {
  5970. throw new MissingDataException(begin, end);
  5971. }
  5972. }
  5973. },
  5974. nextEmptyChunk: function ChunkedStream_nextEmptyChunk(beginChunk) {
  5975. var chunk, n;
  5976. for (chunk = beginChunk, n = this.numChunks; chunk < n; ++chunk) {
  5977. if (!(chunk in this.loadedChunks)) {
  5978. return chunk;
  5979. }
  5980. }
  5981. // Wrap around to beginning
  5982. for (chunk = 0; chunk < beginChunk; ++chunk) {
  5983. if (!(chunk in this.loadedChunks)) {
  5984. return chunk;
  5985. }
  5986. }
  5987. return null;
  5988. },
  5989. hasChunk: function ChunkedStream_hasChunk(chunk) {
  5990. return chunk in this.loadedChunks;
  5991. },
  5992. get length() {
  5993. return this.end - this.start;
  5994. },
  5995. get isEmpty() {
  5996. return this.length === 0;
  5997. },
  5998. getByte: function ChunkedStream_getByte() {
  5999. var pos = this.pos;
  6000. if (pos >= this.end) {
  6001. return -1;
  6002. }
  6003. this.ensureByte(pos);
  6004. return this.bytes[this.pos++];
  6005. },
  6006. getUint16: function ChunkedStream_getUint16() {
  6007. var b0 = this.getByte();
  6008. var b1 = this.getByte();
  6009. return (b0 << 8) + b1;
  6010. },
  6011. getInt32: function ChunkedStream_getInt32() {
  6012. var b0 = this.getByte();
  6013. var b1 = this.getByte();
  6014. var b2 = this.getByte();
  6015. var b3 = this.getByte();
  6016. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  6017. },
  6018. // returns subarray of original buffer
  6019. // should only be read
  6020. getBytes: function ChunkedStream_getBytes(length) {
  6021. var bytes = this.bytes;
  6022. var pos = this.pos;
  6023. var strEnd = this.end;
  6024. if (!length) {
  6025. this.ensureRange(pos, strEnd);
  6026. return bytes.subarray(pos, strEnd);
  6027. }
  6028. var end = pos + length;
  6029. if (end > strEnd) {
  6030. end = strEnd;
  6031. }
  6032. this.ensureRange(pos, end);
  6033. this.pos = end;
  6034. return bytes.subarray(pos, end);
  6035. },
  6036. peekBytes: function ChunkedStream_peekBytes(length) {
  6037. var bytes = this.getBytes(length);
  6038. this.pos -= bytes.length;
  6039. return bytes;
  6040. },
  6041. getByteRange: function ChunkedStream_getBytes(begin, end) {
  6042. this.ensureRange(begin, end);
  6043. return this.bytes.subarray(begin, end);
  6044. },
  6045. skip: function ChunkedStream_skip(n) {
  6046. if (!n) {
  6047. n = 1;
  6048. }
  6049. this.pos += n;
  6050. },
  6051. reset: function ChunkedStream_reset() {
  6052. this.pos = this.start;
  6053. },
  6054. moveStart: function ChunkedStream_moveStart() {
  6055. this.start = this.pos;
  6056. },
  6057. makeSubStream: function ChunkedStream_makeSubStream(start, length, dict) {
  6058. this.ensureRange(start, start + length);
  6059. function ChunkedStreamSubstream() {}
  6060. ChunkedStreamSubstream.prototype = Object.create(this);
  6061. ChunkedStreamSubstream.prototype.getMissingChunks = function() {
  6062. var chunkSize = this.chunkSize;
  6063. var beginChunk = Math.floor(this.start / chunkSize);
  6064. var endChunk = Math.floor((this.end - 1) / chunkSize) + 1;
  6065. var missingChunks = [];
  6066. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6067. if (!(chunk in this.loadedChunks)) {
  6068. missingChunks.push(chunk);
  6069. }
  6070. }
  6071. return missingChunks;
  6072. };
  6073. var subStream = new ChunkedStreamSubstream();
  6074. subStream.pos = subStream.start = start;
  6075. subStream.end = start + length || this.end;
  6076. subStream.dict = dict;
  6077. return subStream;
  6078. },
  6079. isStream: true
  6080. };
  6081. return ChunkedStream;
  6082. })();
  6083. var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
  6084. function ChunkedStreamManager(length, chunkSize, url, args) {
  6085. this.stream = new ChunkedStream(length, chunkSize, this);
  6086. this.length = length;
  6087. this.chunkSize = chunkSize;
  6088. this.url = url;
  6089. this.disableAutoFetch = args.disableAutoFetch;
  6090. var msgHandler = this.msgHandler = args.msgHandler;
  6091. if (args.chunkedViewerLoading) {
  6092. msgHandler.on('OnDataRange', this.onReceiveData.bind(this));
  6093. msgHandler.on('OnDataProgress', this.onProgress.bind(this));
  6094. this.sendRequest = function ChunkedStreamManager_sendRequest(begin, end) {
  6095. msgHandler.send('RequestDataRange', { begin: begin, end: end });
  6096. };
  6097. } else {
  6098. var getXhr = function getXhr() {
  6099. return new XMLHttpRequest();
  6100. };
  6101. this.networkManager = new NetworkManager(this.url, {
  6102. getXhr: getXhr,
  6103. httpHeaders: args.httpHeaders,
  6104. withCredentials: args.withCredentials
  6105. });
  6106. this.sendRequest = function ChunkedStreamManager_sendRequest(begin, end) {
  6107. this.networkManager.requestRange(begin, end, {
  6108. onDone: this.onReceiveData.bind(this),
  6109. onProgress: this.onProgress.bind(this)
  6110. });
  6111. };
  6112. }
  6113. this.currRequestId = 0;
  6114. this.chunksNeededByRequest = {};
  6115. this.requestsByChunk = {};
  6116. this.callbacksByRequest = {};
  6117. this._loadedStreamCapability = createPromiseCapability();
  6118. if (args.initialData) {
  6119. this.setInitialData(args.initialData);
  6120. }
  6121. }
  6122. ChunkedStreamManager.prototype = {
  6123. setInitialData: function ChunkedStreamManager_setInitialData(data) {
  6124. this.stream.onReceiveInitialData(data);
  6125. if (this.stream.allChunksLoaded()) {
  6126. this._loadedStreamCapability.resolve(this.stream);
  6127. } else if (this.msgHandler) {
  6128. this.msgHandler.send('DocProgress', {
  6129. loaded: data.length,
  6130. total: this.length
  6131. });
  6132. }
  6133. },
  6134. onLoadedStream: function ChunkedStreamManager_getLoadedStream() {
  6135. return this._loadedStreamCapability.promise;
  6136. },
  6137. // Get all the chunks that are not yet loaded and groups them into
  6138. // contiguous ranges to load in as few requests as possible
  6139. requestAllChunks: function ChunkedStreamManager_requestAllChunks() {
  6140. var missingChunks = this.stream.getMissingChunks();
  6141. this.requestChunks(missingChunks);
  6142. return this._loadedStreamCapability.promise;
  6143. },
  6144. requestChunks: function ChunkedStreamManager_requestChunks(chunks,
  6145. callback) {
  6146. var requestId = this.currRequestId++;
  6147. var chunksNeeded;
  6148. var i, ii;
  6149. this.chunksNeededByRequest[requestId] = chunksNeeded = {};
  6150. for (i = 0, ii = chunks.length; i < ii; i++) {
  6151. if (!this.stream.hasChunk(chunks[i])) {
  6152. chunksNeeded[chunks[i]] = true;
  6153. }
  6154. }
  6155. if (isEmptyObj(chunksNeeded)) {
  6156. if (callback) {
  6157. callback();
  6158. }
  6159. return;
  6160. }
  6161. this.callbacksByRequest[requestId] = callback;
  6162. var chunksToRequest = [];
  6163. for (var chunk in chunksNeeded) {
  6164. chunk = chunk | 0;
  6165. if (!(chunk in this.requestsByChunk)) {
  6166. this.requestsByChunk[chunk] = [];
  6167. chunksToRequest.push(chunk);
  6168. }
  6169. this.requestsByChunk[chunk].push(requestId);
  6170. }
  6171. if (!chunksToRequest.length) {
  6172. return;
  6173. }
  6174. var groupedChunksToRequest = this.groupChunks(chunksToRequest);
  6175. for (i = 0; i < groupedChunksToRequest.length; ++i) {
  6176. var groupedChunk = groupedChunksToRequest[i];
  6177. var begin = groupedChunk.beginChunk * this.chunkSize;
  6178. var end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length);
  6179. this.sendRequest(begin, end);
  6180. }
  6181. },
  6182. getStream: function ChunkedStreamManager_getStream() {
  6183. return this.stream;
  6184. },
  6185. // Loads any chunks in the requested range that are not yet loaded
  6186. requestRange: function ChunkedStreamManager_requestRange(
  6187. begin, end, callback) {
  6188. end = Math.min(end, this.length);
  6189. var beginChunk = this.getBeginChunk(begin);
  6190. var endChunk = this.getEndChunk(end);
  6191. var chunks = [];
  6192. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6193. chunks.push(chunk);
  6194. }
  6195. this.requestChunks(chunks, callback);
  6196. },
  6197. requestRanges: function ChunkedStreamManager_requestRanges(ranges,
  6198. callback) {
  6199. ranges = ranges || [];
  6200. var chunksToRequest = [];
  6201. for (var i = 0; i < ranges.length; i++) {
  6202. var beginChunk = this.getBeginChunk(ranges[i].begin);
  6203. var endChunk = this.getEndChunk(ranges[i].end);
  6204. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6205. if (chunksToRequest.indexOf(chunk) < 0) {
  6206. chunksToRequest.push(chunk);
  6207. }
  6208. }
  6209. }
  6210. chunksToRequest.sort(function(a, b) { return a - b; });
  6211. this.requestChunks(chunksToRequest, callback);
  6212. },
  6213. // Groups a sorted array of chunks into as few continguous larger
  6214. // chunks as possible
  6215. groupChunks: function ChunkedStreamManager_groupChunks(chunks) {
  6216. var groupedChunks = [];
  6217. var beginChunk = -1;
  6218. var prevChunk = -1;
  6219. for (var i = 0; i < chunks.length; ++i) {
  6220. var chunk = chunks[i];
  6221. if (beginChunk < 0) {
  6222. beginChunk = chunk;
  6223. }
  6224. if (prevChunk >= 0 && prevChunk + 1 !== chunk) {
  6225. groupedChunks.push({ beginChunk: beginChunk,
  6226. endChunk: prevChunk + 1 });
  6227. beginChunk = chunk;
  6228. }
  6229. if (i + 1 === chunks.length) {
  6230. groupedChunks.push({ beginChunk: beginChunk,
  6231. endChunk: chunk + 1 });
  6232. }
  6233. prevChunk = chunk;
  6234. }
  6235. return groupedChunks;
  6236. },
  6237. onProgress: function ChunkedStreamManager_onProgress(args) {
  6238. var bytesLoaded = (this.stream.numChunksLoaded * this.chunkSize +
  6239. args.loaded);
  6240. this.msgHandler.send('DocProgress', {
  6241. loaded: bytesLoaded,
  6242. total: this.length
  6243. });
  6244. },
  6245. onReceiveData: function ChunkedStreamManager_onReceiveData(args) {
  6246. var chunk = args.chunk;
  6247. var begin = args.begin;
  6248. var end = begin + chunk.byteLength;
  6249. var beginChunk = this.getBeginChunk(begin);
  6250. var endChunk = this.getEndChunk(end);
  6251. this.stream.onReceiveData(begin, chunk);
  6252. if (this.stream.allChunksLoaded()) {
  6253. this._loadedStreamCapability.resolve(this.stream);
  6254. }
  6255. var loadedRequests = [];
  6256. var i, requestId;
  6257. for (chunk = beginChunk; chunk < endChunk; ++chunk) {
  6258. // The server might return more chunks than requested
  6259. var requestIds = this.requestsByChunk[chunk] || [];
  6260. delete this.requestsByChunk[chunk];
  6261. for (i = 0; i < requestIds.length; ++i) {
  6262. requestId = requestIds[i];
  6263. var chunksNeeded = this.chunksNeededByRequest[requestId];
  6264. if (chunk in chunksNeeded) {
  6265. delete chunksNeeded[chunk];
  6266. }
  6267. if (!isEmptyObj(chunksNeeded)) {
  6268. continue;
  6269. }
  6270. loadedRequests.push(requestId);
  6271. }
  6272. }
  6273. // If there are no pending requests, automatically fetch the next
  6274. // unfetched chunk of the PDF
  6275. if (!this.disableAutoFetch && isEmptyObj(this.requestsByChunk)) {
  6276. var nextEmptyChunk;
  6277. if (this.stream.numChunksLoaded === 1) {
  6278. // This is a special optimization so that after fetching the first
  6279. // chunk, rather than fetching the second chunk, we fetch the last
  6280. // chunk.
  6281. var lastChunk = this.stream.numChunks - 1;
  6282. if (!this.stream.hasChunk(lastChunk)) {
  6283. nextEmptyChunk = lastChunk;
  6284. }
  6285. } else {
  6286. nextEmptyChunk = this.stream.nextEmptyChunk(endChunk);
  6287. }
  6288. if (isInt(nextEmptyChunk)) {
  6289. this.requestChunks([nextEmptyChunk]);
  6290. }
  6291. }
  6292. for (i = 0; i < loadedRequests.length; ++i) {
  6293. requestId = loadedRequests[i];
  6294. var callback = this.callbacksByRequest[requestId];
  6295. delete this.callbacksByRequest[requestId];
  6296. if (callback) {
  6297. callback();
  6298. }
  6299. }
  6300. this.msgHandler.send('DocProgress', {
  6301. loaded: this.stream.numChunksLoaded * this.chunkSize,
  6302. total: this.length
  6303. });
  6304. },
  6305. onError: function ChunkedStreamManager_onError(err) {
  6306. this._loadedStreamCapability.reject(err);
  6307. },
  6308. getBeginChunk: function ChunkedStreamManager_getBeginChunk(begin) {
  6309. var chunk = Math.floor(begin / this.chunkSize);
  6310. return chunk;
  6311. },
  6312. getEndChunk: function ChunkedStreamManager_getEndChunk(end) {
  6313. if (end % this.chunkSize === 0) {
  6314. return end / this.chunkSize;
  6315. }
  6316. // 0 -> 0
  6317. // 1 -> 1
  6318. // 99 -> 1
  6319. // 100 -> 1
  6320. // 101 -> 2
  6321. var chunk = Math.floor((end - 1) / this.chunkSize) + 1;
  6322. return chunk;
  6323. }
  6324. };
  6325. return ChunkedStreamManager;
  6326. })();
  6327. // The maximum number of bytes fetched per range request
  6328. var RANGE_CHUNK_SIZE = 65536;
  6329. // TODO(mack): Make use of PDFJS.Util.inherit() when it becomes available
  6330. var BasePdfManager = (function BasePdfManagerClosure() {
  6331. function BasePdfManager() {
  6332. throw new Error('Cannot initialize BaseManagerManager');
  6333. }
  6334. BasePdfManager.prototype = {
  6335. onLoadedStream: function BasePdfManager_onLoadedStream() {
  6336. throw new NotImplementedException();
  6337. },
  6338. ensureDoc: function BasePdfManager_ensureDoc(prop, args) {
  6339. return this.ensure(this.pdfDocument, prop, args);
  6340. },
  6341. ensureXRef: function BasePdfManager_ensureXRef(prop, args) {
  6342. return this.ensure(this.pdfDocument.xref, prop, args);
  6343. },
  6344. ensureCatalog: function BasePdfManager_ensureCatalog(prop, args) {
  6345. return this.ensure(this.pdfDocument.catalog, prop, args);
  6346. },
  6347. getPage: function BasePdfManager_pagePage(pageIndex) {
  6348. return this.pdfDocument.getPage(pageIndex);
  6349. },
  6350. cleanup: function BasePdfManager_cleanup() {
  6351. return this.pdfDocument.cleanup();
  6352. },
  6353. ensure: function BasePdfManager_ensure(obj, prop, args) {
  6354. return new NotImplementedException();
  6355. },
  6356. requestRange: function BasePdfManager_ensure(begin, end) {
  6357. return new NotImplementedException();
  6358. },
  6359. requestLoadedStream: function BasePdfManager_requestLoadedStream() {
  6360. return new NotImplementedException();
  6361. },
  6362. updatePassword: function BasePdfManager_updatePassword(password) {
  6363. this.pdfDocument.xref.password = this.password = password;
  6364. if (this._passwordChangedCapability) {
  6365. this._passwordChangedCapability.resolve();
  6366. }
  6367. },
  6368. passwordChanged: function BasePdfManager_passwordChanged() {
  6369. this._passwordChangedCapability = createPromiseCapability();
  6370. return this._passwordChangedCapability.promise;
  6371. },
  6372. terminate: function BasePdfManager_terminate() {
  6373. return new NotImplementedException();
  6374. }
  6375. };
  6376. return BasePdfManager;
  6377. })();
  6378. var LocalPdfManager = (function LocalPdfManagerClosure() {
  6379. function LocalPdfManager(data, password) {
  6380. var stream = new Stream(data);
  6381. this.pdfDocument = new PDFDocument(this, stream, password);
  6382. this._loadedStreamCapability = createPromiseCapability();
  6383. this._loadedStreamCapability.resolve(stream);
  6384. }
  6385. LocalPdfManager.prototype = Object.create(BasePdfManager.prototype);
  6386. LocalPdfManager.prototype.constructor = LocalPdfManager;
  6387. LocalPdfManager.prototype.ensure =
  6388. function LocalPdfManager_ensure(obj, prop, args) {
  6389. return new Promise(function (resolve, reject) {
  6390. try {
  6391. var value = obj[prop];
  6392. var result;
  6393. if (typeof value === 'function') {
  6394. result = value.apply(obj, args);
  6395. } else {
  6396. result = value;
  6397. }
  6398. resolve(result);
  6399. } catch (e) {
  6400. reject(e);
  6401. }
  6402. });
  6403. };
  6404. LocalPdfManager.prototype.requestRange =
  6405. function LocalPdfManager_requestRange(begin, end) {
  6406. return Promise.resolve();
  6407. };
  6408. LocalPdfManager.prototype.requestLoadedStream =
  6409. function LocalPdfManager_requestLoadedStream() {
  6410. };
  6411. LocalPdfManager.prototype.onLoadedStream =
  6412. function LocalPdfManager_getLoadedStream() {
  6413. return this._loadedStreamCapability.promise;
  6414. };
  6415. LocalPdfManager.prototype.terminate =
  6416. function LocalPdfManager_terminate() {
  6417. return;
  6418. };
  6419. return LocalPdfManager;
  6420. })();
  6421. var NetworkPdfManager = (function NetworkPdfManagerClosure() {
  6422. function NetworkPdfManager(args, msgHandler) {
  6423. this.msgHandler = msgHandler;
  6424. var params = {
  6425. msgHandler: msgHandler,
  6426. httpHeaders: args.httpHeaders,
  6427. withCredentials: args.withCredentials,
  6428. chunkedViewerLoading: args.chunkedViewerLoading,
  6429. disableAutoFetch: args.disableAutoFetch,
  6430. initialData: args.initialData
  6431. };
  6432. this.streamManager = new ChunkedStreamManager(args.length, RANGE_CHUNK_SIZE,
  6433. args.url, params);
  6434. this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
  6435. args.password);
  6436. }
  6437. NetworkPdfManager.prototype = Object.create(BasePdfManager.prototype);
  6438. NetworkPdfManager.prototype.constructor = NetworkPdfManager;
  6439. NetworkPdfManager.prototype.ensure =
  6440. function NetworkPdfManager_ensure(obj, prop, args) {
  6441. var pdfManager = this;
  6442. return new Promise(function (resolve, reject) {
  6443. function ensureHelper() {
  6444. try {
  6445. var result;
  6446. var value = obj[prop];
  6447. if (typeof value === 'function') {
  6448. result = value.apply(obj, args);
  6449. } else {
  6450. result = value;
  6451. }
  6452. resolve(result);
  6453. } catch(e) {
  6454. if (!(e instanceof MissingDataException)) {
  6455. reject(e);
  6456. return;
  6457. }
  6458. pdfManager.streamManager.requestRange(e.begin, e.end, ensureHelper);
  6459. }
  6460. }
  6461. ensureHelper();
  6462. });
  6463. };
  6464. NetworkPdfManager.prototype.requestRange =
  6465. function NetworkPdfManager_requestRange(begin, end) {
  6466. return new Promise(function (resolve) {
  6467. this.streamManager.requestRange(begin, end, function() {
  6468. resolve();
  6469. });
  6470. }.bind(this));
  6471. };
  6472. NetworkPdfManager.prototype.requestLoadedStream =
  6473. function NetworkPdfManager_requestLoadedStream() {
  6474. this.streamManager.requestAllChunks();
  6475. };
  6476. NetworkPdfManager.prototype.onLoadedStream =
  6477. function NetworkPdfManager_getLoadedStream() {
  6478. return this.streamManager.onLoadedStream();
  6479. };
  6480. NetworkPdfManager.prototype.terminate =
  6481. function NetworkPdfManager_terminate() {
  6482. this.streamManager.networkManager.abortAllRequests();
  6483. };
  6484. return NetworkPdfManager;
  6485. })();
  6486. var Page = (function PageClosure() {
  6487. var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];
  6488. function Page(pdfManager, xref, pageIndex, pageDict, ref, fontCache) {
  6489. this.pdfManager = pdfManager;
  6490. this.pageIndex = pageIndex;
  6491. this.pageDict = pageDict;
  6492. this.xref = xref;
  6493. this.ref = ref;
  6494. this.fontCache = fontCache;
  6495. this.idCounters = {
  6496. obj: 0
  6497. };
  6498. this.resourcesPromise = null;
  6499. }
  6500. Page.prototype = {
  6501. getPageProp: function Page_getPageProp(key) {
  6502. return this.pageDict.get(key);
  6503. },
  6504. getInheritedPageProp: function Page_inheritPageProp(key) {
  6505. var dict = this.pageDict;
  6506. var value = dict.get(key);
  6507. while (value === undefined) {
  6508. dict = dict.get('Parent');
  6509. if (!dict) {
  6510. break;
  6511. }
  6512. value = dict.get(key);
  6513. }
  6514. return value;
  6515. },
  6516. get content() {
  6517. return this.getPageProp('Contents');
  6518. },
  6519. get resources() {
  6520. var value = this.getInheritedPageProp('Resources');
  6521. // For robustness: The spec states that a \Resources entry has to be
  6522. // present, but can be empty. Some document omit it still. In this case
  6523. // return an empty dictionary:
  6524. if (value === undefined) {
  6525. value = Dict.empty;
  6526. }
  6527. return shadow(this, 'resources', value);
  6528. },
  6529. get mediaBox() {
  6530. var obj = this.getInheritedPageProp('MediaBox');
  6531. // Reset invalid media box to letter size.
  6532. if (!isArray(obj) || obj.length !== 4) {
  6533. obj = LETTER_SIZE_MEDIABOX;
  6534. }
  6535. return shadow(this, 'mediaBox', obj);
  6536. },
  6537. get view() {
  6538. var mediaBox = this.mediaBox;
  6539. var cropBox = this.getInheritedPageProp('CropBox');
  6540. if (!isArray(cropBox) || cropBox.length !== 4) {
  6541. return shadow(this, 'view', mediaBox);
  6542. }
  6543. // From the spec, 6th ed., p.963:
  6544. // "The crop, bleed, trim, and art boxes should not ordinarily
  6545. // extend beyond the boundaries of the media box. If they do, they are
  6546. // effectively reduced to their intersection with the media box."
  6547. cropBox = Util.intersect(cropBox, mediaBox);
  6548. if (!cropBox) {
  6549. return shadow(this, 'view', mediaBox);
  6550. }
  6551. return shadow(this, 'view', cropBox);
  6552. },
  6553. get annotationRefs() {
  6554. return shadow(this, 'annotationRefs',
  6555. this.getInheritedPageProp('Annots'));
  6556. },
  6557. get rotate() {
  6558. var rotate = this.getInheritedPageProp('Rotate') || 0;
  6559. // Normalize rotation so it's a multiple of 90 and between 0 and 270
  6560. if (rotate % 90 !== 0) {
  6561. rotate = 0;
  6562. } else if (rotate >= 360) {
  6563. rotate = rotate % 360;
  6564. } else if (rotate < 0) {
  6565. // The spec doesn't cover negatives, assume its counterclockwise
  6566. // rotation. The following is the other implementation of modulo.
  6567. rotate = ((rotate % 360) + 360) % 360;
  6568. }
  6569. return shadow(this, 'rotate', rotate);
  6570. },
  6571. getContentStream: function Page_getContentStream() {
  6572. var content = this.content;
  6573. var stream;
  6574. if (isArray(content)) {
  6575. // fetching items
  6576. var xref = this.xref;
  6577. var i, n = content.length;
  6578. var streams = [];
  6579. for (i = 0; i < n; ++i) {
  6580. streams.push(xref.fetchIfRef(content[i]));
  6581. }
  6582. stream = new StreamsSequenceStream(streams);
  6583. } else if (isStream(content)) {
  6584. stream = content;
  6585. } else {
  6586. // replacing non-existent page content with empty one
  6587. stream = new NullStream();
  6588. }
  6589. return stream;
  6590. },
  6591. loadResources: function Page_loadResources(keys) {
  6592. if (!this.resourcesPromise) {
  6593. // TODO: add async getInheritedPageProp and remove this.
  6594. this.resourcesPromise = this.pdfManager.ensure(this, 'resources');
  6595. }
  6596. return this.resourcesPromise.then(function resourceSuccess() {
  6597. var objectLoader = new ObjectLoader(this.resources.map,
  6598. keys,
  6599. this.xref);
  6600. return objectLoader.load();
  6601. }.bind(this));
  6602. },
  6603. getOperatorList: function Page_getOperatorList(handler, intent) {
  6604. var self = this;
  6605. var pdfManager = this.pdfManager;
  6606. var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
  6607. []);
  6608. var resourcesPromise = this.loadResources([
  6609. 'ExtGState',
  6610. 'ColorSpace',
  6611. 'Pattern',
  6612. 'Shading',
  6613. 'XObject',
  6614. 'Font'
  6615. // ProcSet
  6616. // Properties
  6617. ]);
  6618. var partialEvaluator = new PartialEvaluator(pdfManager, this.xref,
  6619. handler, this.pageIndex,
  6620. 'p' + this.pageIndex + '_',
  6621. this.idCounters,
  6622. this.fontCache);
  6623. var dataPromises = Promise.all([contentStreamPromise, resourcesPromise]);
  6624. var pageListPromise = dataPromises.then(function(data) {
  6625. var contentStream = data[0];
  6626. var opList = new OperatorList(intent, handler, self.pageIndex);
  6627. handler.send('StartRenderPage', {
  6628. transparency: partialEvaluator.hasBlendModes(self.resources),
  6629. pageIndex: self.pageIndex,
  6630. intent: intent
  6631. });
  6632. return partialEvaluator.getOperatorList(contentStream, self.resources,
  6633. opList).then(function () {
  6634. return opList;
  6635. });
  6636. });
  6637. var annotationsPromise = pdfManager.ensure(this, 'annotations');
  6638. return Promise.all([pageListPromise, annotationsPromise]).then(
  6639. function(datas) {
  6640. var pageOpList = datas[0];
  6641. var annotations = datas[1];
  6642. if (annotations.length === 0) {
  6643. pageOpList.flush(true);
  6644. return pageOpList;
  6645. }
  6646. var annotationsReadyPromise = Annotation.appendToOperatorList(
  6647. annotations, pageOpList, pdfManager, partialEvaluator, intent);
  6648. return annotationsReadyPromise.then(function () {
  6649. pageOpList.flush(true);
  6650. return pageOpList;
  6651. });
  6652. });
  6653. },
  6654. extractTextContent: function Page_extractTextContent() {
  6655. var handler = {
  6656. on: function nullHandlerOn() {},
  6657. send: function nullHandlerSend() {}
  6658. };
  6659. var self = this;
  6660. var pdfManager = this.pdfManager;
  6661. var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
  6662. []);
  6663. var resourcesPromise = this.loadResources([
  6664. 'ExtGState',
  6665. 'XObject',
  6666. 'Font'
  6667. ]);
  6668. var dataPromises = Promise.all([contentStreamPromise,
  6669. resourcesPromise]);
  6670. return dataPromises.then(function(data) {
  6671. var contentStream = data[0];
  6672. var partialEvaluator = new PartialEvaluator(pdfManager, self.xref,
  6673. handler, self.pageIndex,
  6674. 'p' + self.pageIndex + '_',
  6675. self.idCounters,
  6676. self.fontCache);
  6677. return partialEvaluator.getTextContent(contentStream,
  6678. self.resources);
  6679. });
  6680. },
  6681. getAnnotationsData: function Page_getAnnotationsData() {
  6682. var annotations = this.annotations;
  6683. var annotationsData = [];
  6684. for (var i = 0, n = annotations.length; i < n; ++i) {
  6685. annotationsData.push(annotations[i].getData());
  6686. }
  6687. return annotationsData;
  6688. },
  6689. get annotations() {
  6690. var annotations = [];
  6691. var annotationRefs = (this.annotationRefs || []);
  6692. for (var i = 0, n = annotationRefs.length; i < n; ++i) {
  6693. var annotationRef = annotationRefs[i];
  6694. var annotation = Annotation.fromRef(this.xref, annotationRef);
  6695. if (annotation) {
  6696. annotations.push(annotation);
  6697. }
  6698. }
  6699. return shadow(this, 'annotations', annotations);
  6700. }
  6701. };
  6702. return Page;
  6703. })();
  6704. /**
  6705. * The `PDFDocument` holds all the data of the PDF file. Compared to the
  6706. * `PDFDoc`, this one doesn't have any job management code.
  6707. * Right now there exists one PDFDocument on the main thread + one object
  6708. * for each worker. If there is no worker support enabled, there are two
  6709. * `PDFDocument` objects on the main thread created.
  6710. */
  6711. var PDFDocument = (function PDFDocumentClosure() {
  6712. function PDFDocument(pdfManager, arg, password) {
  6713. if (isStream(arg)) {
  6714. init.call(this, pdfManager, arg, password);
  6715. } else if (isArrayBuffer(arg)) {
  6716. init.call(this, pdfManager, new Stream(arg), password);
  6717. } else {
  6718. error('PDFDocument: Unknown argument type');
  6719. }
  6720. }
  6721. function init(pdfManager, stream, password) {
  6722. assert(stream.length > 0, 'stream must have data');
  6723. this.pdfManager = pdfManager;
  6724. this.stream = stream;
  6725. var xref = new XRef(this.stream, password, pdfManager);
  6726. this.xref = xref;
  6727. }
  6728. function find(stream, needle, limit, backwards) {
  6729. var pos = stream.pos;
  6730. var end = stream.end;
  6731. var strBuf = [];
  6732. if (pos + limit > end) {
  6733. limit = end - pos;
  6734. }
  6735. for (var n = 0; n < limit; ++n) {
  6736. strBuf.push(String.fromCharCode(stream.getByte()));
  6737. }
  6738. var str = strBuf.join('');
  6739. stream.pos = pos;
  6740. var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle);
  6741. if (index == -1) {
  6742. return false; /* not found */
  6743. }
  6744. stream.pos += index;
  6745. return true; /* found */
  6746. }
  6747. var DocumentInfoValidators = {
  6748. get entries() {
  6749. // Lazily build this since all the validation functions below are not
  6750. // defined until after this file loads.
  6751. return shadow(this, 'entries', {
  6752. Title: isString,
  6753. Author: isString,
  6754. Subject: isString,
  6755. Keywords: isString,
  6756. Creator: isString,
  6757. Producer: isString,
  6758. CreationDate: isString,
  6759. ModDate: isString,
  6760. Trapped: isName
  6761. });
  6762. }
  6763. };
  6764. PDFDocument.prototype = {
  6765. parse: function PDFDocument_parse(recoveryMode) {
  6766. this.setup(recoveryMode);
  6767. try {
  6768. // checking if AcroForm is present
  6769. this.acroForm = this.catalog.catDict.get('AcroForm');
  6770. if (this.acroForm) {
  6771. this.xfa = this.acroForm.get('XFA');
  6772. var fields = this.acroForm.get('Fields');
  6773. if ((!fields || !isArray(fields) || fields.length === 0) &&
  6774. !this.xfa) {
  6775. // no fields and no XFA -- not a form (?)
  6776. this.acroForm = null;
  6777. }
  6778. }
  6779. } catch (ex) {
  6780. info('Something wrong with AcroForm entry');
  6781. this.acroForm = null;
  6782. }
  6783. },
  6784. get linearization() {
  6785. var length = this.stream.length;
  6786. var linearization = false;
  6787. if (length) {
  6788. try {
  6789. linearization = new Linearization(this.stream);
  6790. if (linearization.length != length) {
  6791. linearization = false;
  6792. }
  6793. } catch (err) {
  6794. if (err instanceof MissingDataException) {
  6795. throw err;
  6796. }
  6797. info('The linearization data is not available ' +
  6798. 'or unreadable PDF data is found');
  6799. linearization = false;
  6800. }
  6801. }
  6802. // shadow the prototype getter with a data property
  6803. return shadow(this, 'linearization', linearization);
  6804. },
  6805. get startXRef() {
  6806. var stream = this.stream;
  6807. var startXRef = 0;
  6808. var linearization = this.linearization;
  6809. if (linearization) {
  6810. // Find end of first obj.
  6811. stream.reset();
  6812. if (find(stream, 'endobj', 1024)) {
  6813. startXRef = stream.pos + 6;
  6814. }
  6815. } else {
  6816. // Find startxref by jumping backward from the end of the file.
  6817. var step = 1024;
  6818. var found = false, pos = stream.end;
  6819. while (!found && pos > 0) {
  6820. pos -= step - 'startxref'.length;
  6821. if (pos < 0) {
  6822. pos = 0;
  6823. }
  6824. stream.pos = pos;
  6825. found = find(stream, 'startxref', step, true);
  6826. }
  6827. if (found) {
  6828. stream.skip(9);
  6829. var ch;
  6830. do {
  6831. ch = stream.getByte();
  6832. } while (Lexer.isSpace(ch));
  6833. var str = '';
  6834. while (ch >= 0x20 && ch <= 0x39) { // < '9'
  6835. str += String.fromCharCode(ch);
  6836. ch = stream.getByte();
  6837. }
  6838. startXRef = parseInt(str, 10);
  6839. if (isNaN(startXRef)) {
  6840. startXRef = 0;
  6841. }
  6842. }
  6843. }
  6844. // shadow the prototype getter with a data property
  6845. return shadow(this, 'startXRef', startXRef);
  6846. },
  6847. get mainXRefEntriesOffset() {
  6848. var mainXRefEntriesOffset = 0;
  6849. var linearization = this.linearization;
  6850. if (linearization) {
  6851. mainXRefEntriesOffset = linearization.mainXRefEntriesOffset;
  6852. }
  6853. // shadow the prototype getter with a data property
  6854. return shadow(this, 'mainXRefEntriesOffset', mainXRefEntriesOffset);
  6855. },
  6856. // Find the header, remove leading garbage and setup the stream
  6857. // starting from the header.
  6858. checkHeader: function PDFDocument_checkHeader() {
  6859. var stream = this.stream;
  6860. stream.reset();
  6861. if (find(stream, '%PDF-', 1024)) {
  6862. // Found the header, trim off any garbage before it.
  6863. stream.moveStart();
  6864. // Reading file format version
  6865. var MAX_VERSION_LENGTH = 12;
  6866. var version = '', ch;
  6867. while ((ch = stream.getByte()) > 0x20) { // SPACE
  6868. if (version.length >= MAX_VERSION_LENGTH) {
  6869. break;
  6870. }
  6871. version += String.fromCharCode(ch);
  6872. }
  6873. // removing "%PDF-"-prefix
  6874. this.pdfFormatVersion = version.substring(5);
  6875. return;
  6876. }
  6877. // May not be a PDF file, continue anyway.
  6878. },
  6879. parseStartXRef: function PDFDocument_parseStartXRef() {
  6880. var startXRef = this.startXRef;
  6881. this.xref.setStartXRef(startXRef);
  6882. },
  6883. setup: function PDFDocument_setup(recoveryMode) {
  6884. this.xref.parse(recoveryMode);
  6885. this.catalog = new Catalog(this.pdfManager, this.xref);
  6886. },
  6887. get numPages() {
  6888. var linearization = this.linearization;
  6889. var num = linearization ? linearization.numPages : this.catalog.numPages;
  6890. // shadow the prototype getter
  6891. return shadow(this, 'numPages', num);
  6892. },
  6893. get documentInfo() {
  6894. var docInfo = {
  6895. PDFFormatVersion: this.pdfFormatVersion,
  6896. IsAcroFormPresent: !!this.acroForm,
  6897. IsXFAPresent: !!this.xfa
  6898. };
  6899. var infoDict;
  6900. try {
  6901. infoDict = this.xref.trailer.get('Info');
  6902. } catch (err) {
  6903. info('The document information dictionary is invalid.');
  6904. }
  6905. if (infoDict) {
  6906. var validEntries = DocumentInfoValidators.entries;
  6907. // Only fill the document info with valid entries from the spec.
  6908. for (var key in validEntries) {
  6909. if (infoDict.has(key)) {
  6910. var value = infoDict.get(key);
  6911. // Make sure the value conforms to the spec.
  6912. if (validEntries[key](value)) {
  6913. docInfo[key] = (typeof value !== 'string' ?
  6914. value : stringToPDFString(value));
  6915. } else {
  6916. info('Bad value in document info for "' + key + '"');
  6917. }
  6918. }
  6919. }
  6920. }
  6921. return shadow(this, 'documentInfo', docInfo);
  6922. },
  6923. get fingerprint() {
  6924. var xref = this.xref, hash, fileID = '';
  6925. if (xref.trailer.has('ID')) {
  6926. hash = stringToBytes(xref.trailer.get('ID')[0]);
  6927. } else {
  6928. hash = calculateMD5(this.stream.bytes.subarray(0, 100), 0, 100);
  6929. }
  6930. for (var i = 0, n = hash.length; i < n; i++) {
  6931. fileID += hash[i].toString(16);
  6932. }
  6933. return shadow(this, 'fingerprint', fileID);
  6934. },
  6935. getPage: function PDFDocument_getPage(pageIndex) {
  6936. return this.catalog.getPage(pageIndex);
  6937. },
  6938. cleanup: function PDFDocument_cleanup() {
  6939. return this.catalog.cleanup();
  6940. }
  6941. };
  6942. return PDFDocument;
  6943. })();
  6944. var Name = (function NameClosure() {
  6945. function Name(name) {
  6946. this.name = name;
  6947. }
  6948. Name.prototype = {};
  6949. var nameCache = {};
  6950. Name.get = function Name_get(name) {
  6951. var nameValue = nameCache[name];
  6952. return (nameValue ? nameValue : (nameCache[name] = new Name(name)));
  6953. };
  6954. return Name;
  6955. })();
  6956. var Cmd = (function CmdClosure() {
  6957. function Cmd(cmd) {
  6958. this.cmd = cmd;
  6959. }
  6960. Cmd.prototype = {};
  6961. var cmdCache = {};
  6962. Cmd.get = function Cmd_get(cmd) {
  6963. var cmdValue = cmdCache[cmd];
  6964. return (cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd)));
  6965. };
  6966. return Cmd;
  6967. })();
  6968. var Dict = (function DictClosure() {
  6969. var nonSerializable = function nonSerializableClosure() {
  6970. return nonSerializable; // creating closure on some variable
  6971. };
  6972. var GETALL_DICTIONARY_TYPES_WHITELIST = {
  6973. 'Background': true,
  6974. 'ExtGState': true,
  6975. 'Halftone': true,
  6976. 'Layout': true,
  6977. 'Mask': true,
  6978. 'Pagination': true,
  6979. 'Printing': true
  6980. };
  6981. function isRecursionAllowedFor(dict) {
  6982. if (!isName(dict.Type)) {
  6983. return true;
  6984. }
  6985. var dictType = dict.Type.name;
  6986. return GETALL_DICTIONARY_TYPES_WHITELIST[dictType] === true;
  6987. }
  6988. // xref is optional
  6989. function Dict(xref) {
  6990. // Map should only be used internally, use functions below to access.
  6991. this.map = Object.create(null);
  6992. this.xref = xref;
  6993. this.objId = null;
  6994. this.__nonSerializable__ = nonSerializable; // disable cloning of the Dict
  6995. }
  6996. Dict.prototype = {
  6997. assignXref: function Dict_assignXref(newXref) {
  6998. this.xref = newXref;
  6999. },
  7000. // automatically dereferences Ref objects
  7001. get: function Dict_get(key1, key2, key3) {
  7002. var value;
  7003. var xref = this.xref;
  7004. if (typeof (value = this.map[key1]) != 'undefined' || key1 in this.map ||
  7005. typeof key2 == 'undefined') {
  7006. return xref ? xref.fetchIfRef(value) : value;
  7007. }
  7008. if (typeof (value = this.map[key2]) != 'undefined' || key2 in this.map ||
  7009. typeof key3 == 'undefined') {
  7010. return xref ? xref.fetchIfRef(value) : value;
  7011. }
  7012. value = this.map[key3] || null;
  7013. return xref ? xref.fetchIfRef(value) : value;
  7014. },
  7015. // Same as get(), but returns a promise and uses fetchIfRefAsync().
  7016. getAsync: function Dict_getAsync(key1, key2, key3) {
  7017. var value;
  7018. var xref = this.xref;
  7019. if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
  7020. typeof key2 === 'undefined') {
  7021. if (xref) {
  7022. return xref.fetchIfRefAsync(value);
  7023. }
  7024. return Promise.resolve(value);
  7025. }
  7026. if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
  7027. typeof key3 === 'undefined') {
  7028. if (xref) {
  7029. return xref.fetchIfRefAsync(value);
  7030. }
  7031. return Promise.resolve(value);
  7032. }
  7033. value = this.map[key3] || null;
  7034. if (xref) {
  7035. return xref.fetchIfRefAsync(value);
  7036. }
  7037. return Promise.resolve(value);
  7038. },
  7039. // no dereferencing
  7040. getRaw: function Dict_getRaw(key) {
  7041. return this.map[key];
  7042. },
  7043. // creates new map and dereferences all Refs
  7044. getAll: function Dict_getAll() {
  7045. var all = Object.create(null);
  7046. var queue = null;
  7047. var key, obj;
  7048. for (key in this.map) {
  7049. obj = this.get(key);
  7050. if (obj instanceof Dict) {
  7051. if (isRecursionAllowedFor(obj)) {
  7052. (queue || (queue = [])).push({target: all, key: key, obj: obj});
  7053. } else {
  7054. all[key] = this.getRaw(key);
  7055. }
  7056. } else {
  7057. all[key] = obj;
  7058. }
  7059. }
  7060. if (!queue) {
  7061. return all;
  7062. }
  7063. // trying to take cyclic references into the account
  7064. var processed = Object.create(null);
  7065. while (queue.length > 0) {
  7066. var item = queue.shift();
  7067. var itemObj = item.obj;
  7068. var objId = itemObj.objId;
  7069. if (objId && objId in processed) {
  7070. item.target[item.key] = processed[objId];
  7071. continue;
  7072. }
  7073. var dereferenced = Object.create(null);
  7074. for (key in itemObj.map) {
  7075. obj = itemObj.get(key);
  7076. if (obj instanceof Dict) {
  7077. if (isRecursionAllowedFor(obj)) {
  7078. queue.push({target: dereferenced, key: key, obj: obj});
  7079. } else {
  7080. dereferenced[key] = itemObj.getRaw(key);
  7081. }
  7082. } else {
  7083. dereferenced[key] = obj;
  7084. }
  7085. }
  7086. if (objId) {
  7087. processed[objId] = dereferenced;
  7088. }
  7089. item.target[item.key] = dereferenced;
  7090. }
  7091. return all;
  7092. },
  7093. set: function Dict_set(key, value) {
  7094. this.map[key] = value;
  7095. },
  7096. has: function Dict_has(key) {
  7097. return key in this.map;
  7098. },
  7099. forEach: function Dict_forEach(callback) {
  7100. for (var key in this.map) {
  7101. callback(key, this.get(key));
  7102. }
  7103. }
  7104. };
  7105. Dict.empty = new Dict(null);
  7106. return Dict;
  7107. })();
  7108. var Ref = (function RefClosure() {
  7109. function Ref(num, gen) {
  7110. this.num = num;
  7111. this.gen = gen;
  7112. }
  7113. Ref.prototype = {
  7114. toString: function Ref_toString() {
  7115. return 'R' + this.num + '.' + this.gen;
  7116. }
  7117. };
  7118. return Ref;
  7119. })();
  7120. // The reference is identified by number and generation.
  7121. // This structure stores only one instance of the reference.
  7122. var RefSet = (function RefSetClosure() {
  7123. function RefSet() {
  7124. this.dict = {};
  7125. }
  7126. RefSet.prototype = {
  7127. has: function RefSet_has(ref) {
  7128. return ref.toString() in this.dict;
  7129. },
  7130. put: function RefSet_put(ref) {
  7131. this.dict[ref.toString()] = true;
  7132. },
  7133. remove: function RefSet_remove(ref) {
  7134. delete this.dict[ref.toString()];
  7135. }
  7136. };
  7137. return RefSet;
  7138. })();
  7139. var RefSetCache = (function RefSetCacheClosure() {
  7140. function RefSetCache() {
  7141. this.dict = Object.create(null);
  7142. }
  7143. RefSetCache.prototype = {
  7144. get: function RefSetCache_get(ref) {
  7145. return this.dict[ref.toString()];
  7146. },
  7147. has: function RefSetCache_has(ref) {
  7148. return ref.toString() in this.dict;
  7149. },
  7150. put: function RefSetCache_put(ref, obj) {
  7151. this.dict[ref.toString()] = obj;
  7152. },
  7153. putAlias: function RefSetCache_putAlias(ref, aliasRef) {
  7154. this.dict[ref.toString()] = this.get(aliasRef);
  7155. },
  7156. forEach: function RefSetCache_forEach(fn, thisArg) {
  7157. for (var i in this.dict) {
  7158. fn.call(thisArg, this.dict[i]);
  7159. }
  7160. },
  7161. clear: function RefSetCache_clear() {
  7162. this.dict = Object.create(null);
  7163. }
  7164. };
  7165. return RefSetCache;
  7166. })();
  7167. var Catalog = (function CatalogClosure() {
  7168. function Catalog(pdfManager, xref) {
  7169. this.pdfManager = pdfManager;
  7170. this.xref = xref;
  7171. this.catDict = xref.getCatalogObj();
  7172. this.fontCache = new RefSetCache();
  7173. assert(isDict(this.catDict),
  7174. 'catalog object is not a dictionary');
  7175. this.pagePromises = [];
  7176. }
  7177. Catalog.prototype = {
  7178. get metadata() {
  7179. var streamRef = this.catDict.getRaw('Metadata');
  7180. if (!isRef(streamRef)) {
  7181. return shadow(this, 'metadata', null);
  7182. }
  7183. var encryptMetadata = (!this.xref.encrypt ? false :
  7184. this.xref.encrypt.encryptMetadata);
  7185. var stream = this.xref.fetch(streamRef, !encryptMetadata);
  7186. var metadata;
  7187. if (stream && isDict(stream.dict)) {
  7188. var type = stream.dict.get('Type');
  7189. var subtype = stream.dict.get('Subtype');
  7190. if (isName(type) && isName(subtype) &&
  7191. type.name === 'Metadata' && subtype.name === 'XML') {
  7192. // XXX: This should examine the charset the XML document defines,
  7193. // however since there are currently no real means to decode
  7194. // arbitrary charsets, let's just hope that the author of the PDF
  7195. // was reasonable enough to stick with the XML default charset,
  7196. // which is UTF-8.
  7197. try {
  7198. metadata = stringToUTF8String(bytesToString(stream.getBytes()));
  7199. } catch (e) {
  7200. info('Skipping invalid metadata.');
  7201. }
  7202. }
  7203. }
  7204. return shadow(this, 'metadata', metadata);
  7205. },
  7206. get toplevelPagesDict() {
  7207. var pagesObj = this.catDict.get('Pages');
  7208. assert(isDict(pagesObj), 'invalid top-level pages dictionary');
  7209. // shadow the prototype getter
  7210. return shadow(this, 'toplevelPagesDict', pagesObj);
  7211. },
  7212. get documentOutline() {
  7213. var obj = null;
  7214. try {
  7215. obj = this.readDocumentOutline();
  7216. } catch (ex) {
  7217. if (ex instanceof MissingDataException) {
  7218. throw ex;
  7219. }
  7220. warn('Unable to read document outline');
  7221. }
  7222. return shadow(this, 'documentOutline', obj);
  7223. },
  7224. readDocumentOutline: function Catalog_readDocumentOutline() {
  7225. var xref = this.xref;
  7226. var obj = this.catDict.get('Outlines');
  7227. var root = { items: [] };
  7228. if (isDict(obj)) {
  7229. obj = obj.getRaw('First');
  7230. var processed = new RefSet();
  7231. if (isRef(obj)) {
  7232. var queue = [{obj: obj, parent: root}];
  7233. // to avoid recursion keeping track of the items
  7234. // in the processed dictionary
  7235. processed.put(obj);
  7236. while (queue.length > 0) {
  7237. var i = queue.shift();
  7238. var outlineDict = xref.fetchIfRef(i.obj);
  7239. if (outlineDict === null) {
  7240. continue;
  7241. }
  7242. if (!outlineDict.has('Title')) {
  7243. error('Invalid outline item');
  7244. }
  7245. var dest = outlineDict.get('A');
  7246. if (dest) {
  7247. dest = dest.get('D');
  7248. } else if (outlineDict.has('Dest')) {
  7249. dest = outlineDict.getRaw('Dest');
  7250. if (isName(dest)) {
  7251. dest = dest.name;
  7252. }
  7253. }
  7254. var title = outlineDict.get('Title');
  7255. var outlineItem = {
  7256. dest: dest,
  7257. title: stringToPDFString(title),
  7258. color: outlineDict.get('C') || [0, 0, 0],
  7259. count: outlineDict.get('Count'),
  7260. bold: !!(outlineDict.get('F') & 2),
  7261. italic: !!(outlineDict.get('F') & 1),
  7262. items: []
  7263. };
  7264. i.parent.items.push(outlineItem);
  7265. obj = outlineDict.getRaw('First');
  7266. if (isRef(obj) && !processed.has(obj)) {
  7267. queue.push({obj: obj, parent: outlineItem});
  7268. processed.put(obj);
  7269. }
  7270. obj = outlineDict.getRaw('Next');
  7271. if (isRef(obj) && !processed.has(obj)) {
  7272. queue.push({obj: obj, parent: i.parent});
  7273. processed.put(obj);
  7274. }
  7275. }
  7276. }
  7277. }
  7278. return (root.items.length > 0 ? root.items : null);
  7279. },
  7280. get numPages() {
  7281. var obj = this.toplevelPagesDict.get('Count');
  7282. assert(
  7283. isInt(obj),
  7284. 'page count in top level pages object is not an integer'
  7285. );
  7286. // shadow the prototype getter
  7287. return shadow(this, 'num', obj);
  7288. },
  7289. get destinations() {
  7290. function fetchDestination(dest) {
  7291. return isDict(dest) ? dest.get('D') : dest;
  7292. }
  7293. var xref = this.xref;
  7294. var dests = {}, nameTreeRef, nameDictionaryRef;
  7295. var obj = this.catDict.get('Names');
  7296. if (obj && obj.has('Dests')) {
  7297. nameTreeRef = obj.getRaw('Dests');
  7298. } else if (this.catDict.has('Dests')) {
  7299. nameDictionaryRef = this.catDict.get('Dests');
  7300. }
  7301. if (nameDictionaryRef) {
  7302. // reading simple destination dictionary
  7303. obj = nameDictionaryRef;
  7304. obj.forEach(function catalogForEach(key, value) {
  7305. if (!value) {
  7306. return;
  7307. }
  7308. dests[key] = fetchDestination(value);
  7309. });
  7310. }
  7311. if (nameTreeRef) {
  7312. var nameTree = new NameTree(nameTreeRef, xref);
  7313. var names = nameTree.getAll();
  7314. for (var name in names) {
  7315. if (!names.hasOwnProperty(name)) {
  7316. continue;
  7317. }
  7318. dests[name] = fetchDestination(names[name]);
  7319. }
  7320. }
  7321. return shadow(this, 'destinations', dests);
  7322. },
  7323. get attachments() {
  7324. var xref = this.xref;
  7325. var attachments = null, nameTreeRef;
  7326. var obj = this.catDict.get('Names');
  7327. if (obj) {
  7328. nameTreeRef = obj.getRaw('EmbeddedFiles');
  7329. }
  7330. if (nameTreeRef) {
  7331. var nameTree = new NameTree(nameTreeRef, xref);
  7332. var names = nameTree.getAll();
  7333. for (var name in names) {
  7334. if (!names.hasOwnProperty(name)) {
  7335. continue;
  7336. }
  7337. var fs = new FileSpec(names[name], xref);
  7338. if (!attachments) {
  7339. attachments = {};
  7340. }
  7341. attachments[stringToPDFString(name)] = fs.serializable;
  7342. }
  7343. }
  7344. return shadow(this, 'attachments', attachments);
  7345. },
  7346. get javaScript() {
  7347. var xref = this.xref;
  7348. var obj = this.catDict.get('Names');
  7349. var javaScript = [];
  7350. if (obj && obj.has('JavaScript')) {
  7351. var nameTree = new NameTree(obj.getRaw('JavaScript'), xref);
  7352. var names = nameTree.getAll();
  7353. for (var name in names) {
  7354. if (!names.hasOwnProperty(name)) {
  7355. continue;
  7356. }
  7357. // We don't really use the JavaScript right now. This code is
  7358. // defensive so we don't cause errors on document load.
  7359. var jsDict = names[name];
  7360. if (!isDict(jsDict)) {
  7361. continue;
  7362. }
  7363. var type = jsDict.get('S');
  7364. if (!isName(type) || type.name !== 'JavaScript') {
  7365. continue;
  7366. }
  7367. var js = jsDict.get('JS');
  7368. if (!isString(js) && !isStream(js)) {
  7369. continue;
  7370. }
  7371. if (isStream(js)) {
  7372. js = bytesToString(js.getBytes());
  7373. }
  7374. javaScript.push(stringToPDFString(js));
  7375. }
  7376. }
  7377. // Append OpenAction actions to javaScript array
  7378. var openactionDict = this.catDict.get('OpenAction');
  7379. if (isDict(openactionDict)) {
  7380. var objType = openactionDict.get('Type');
  7381. var actionType = openactionDict.get('S');
  7382. var action = openactionDict.get('N');
  7383. var isPrintAction = (isName(objType) && objType.name === 'Action' &&
  7384. isName(actionType) && actionType.name === 'Named' &&
  7385. isName(action) && action.name === 'Print');
  7386. if (isPrintAction) {
  7387. javaScript.push('print(true);');
  7388. }
  7389. }
  7390. return shadow(this, 'javaScript', javaScript);
  7391. },
  7392. cleanup: function Catalog_cleanup() {
  7393. var promises = [];
  7394. this.fontCache.forEach(function (promise) {
  7395. promises.push(promise);
  7396. });
  7397. return Promise.all(promises).then(function (translatedFonts) {
  7398. for (var i = 0, ii = translatedFonts.length; i < ii; i++) {
  7399. var font = translatedFonts[i].dict;
  7400. delete font.translated;
  7401. }
  7402. this.fontCache.clear();
  7403. }.bind(this));
  7404. },
  7405. getPage: function Catalog_getPage(pageIndex) {
  7406. if (!(pageIndex in this.pagePromises)) {
  7407. this.pagePromises[pageIndex] = this.getPageDict(pageIndex).then(
  7408. function (a) {
  7409. var dict = a[0];
  7410. var ref = a[1];
  7411. return new Page(this.pdfManager, this.xref, pageIndex, dict, ref,
  7412. this.fontCache);
  7413. }.bind(this)
  7414. );
  7415. }
  7416. return this.pagePromises[pageIndex];
  7417. },
  7418. getPageDict: function Catalog_getPageDict(pageIndex) {
  7419. var capability = createPromiseCapability();
  7420. var nodesToVisit = [this.catDict.getRaw('Pages')];
  7421. var currentPageIndex = 0;
  7422. var xref = this.xref;
  7423. function next() {
  7424. while (nodesToVisit.length) {
  7425. var currentNode = nodesToVisit.pop();
  7426. if (isRef(currentNode)) {
  7427. xref.fetchAsync(currentNode).then(function (obj) {
  7428. if ((isDict(obj, 'Page') || (isDict(obj) && !obj.has('Kids')))) {
  7429. if (pageIndex === currentPageIndex) {
  7430. capability.resolve([obj, currentNode]);
  7431. } else {
  7432. currentPageIndex++;
  7433. next();
  7434. }
  7435. return;
  7436. }
  7437. nodesToVisit.push(obj);
  7438. next();
  7439. }.bind(this), capability.reject.bind(capability));
  7440. return;
  7441. }
  7442. // must be a child page dictionary
  7443. assert(
  7444. isDict(currentNode),
  7445. 'page dictionary kid reference points to wrong type of object'
  7446. );
  7447. var count = currentNode.get('Count');
  7448. // Skip nodes where the page can't be.
  7449. if (currentPageIndex + count <= pageIndex) {
  7450. currentPageIndex += count;
  7451. continue;
  7452. }
  7453. var kids = currentNode.get('Kids');
  7454. assert(isArray(kids), 'page dictionary kids object is not an array');
  7455. if (count === kids.length) {
  7456. // Nodes that don't have the page have been skipped and this is the
  7457. // bottom of the tree which means the page requested must be a
  7458. // descendant of this pages node. Ideally we would just resolve the
  7459. // promise with the page ref here, but there is the case where more
  7460. // pages nodes could link to single a page (see issue 3666 pdf). To
  7461. // handle this push it back on the queue so if it is a pages node it
  7462. // will be descended into.
  7463. nodesToVisit = [kids[pageIndex - currentPageIndex]];
  7464. currentPageIndex = pageIndex;
  7465. continue;
  7466. } else {
  7467. for (var last = kids.length - 1; last >= 0; last--) {
  7468. nodesToVisit.push(kids[last]);
  7469. }
  7470. }
  7471. }
  7472. capability.reject('Page index ' + pageIndex + ' not found.');
  7473. }
  7474. next();
  7475. return capability.promise;
  7476. },
  7477. getPageIndex: function Catalog_getPageIndex(ref) {
  7478. // The page tree nodes have the count of all the leaves below them. To get
  7479. // how many pages are before we just have to walk up the tree and keep
  7480. // adding the count of siblings to the left of the node.
  7481. var xref = this.xref;
  7482. function pagesBeforeRef(kidRef) {
  7483. var total = 0;
  7484. var parentRef;
  7485. return xref.fetchAsync(kidRef).then(function (node) {
  7486. if (!node) {
  7487. return null;
  7488. }
  7489. parentRef = node.getRaw('Parent');
  7490. return node.getAsync('Parent');
  7491. }).then(function (parent) {
  7492. if (!parent) {
  7493. return null;
  7494. }
  7495. return parent.getAsync('Kids');
  7496. }).then(function (kids) {
  7497. if (!kids) {
  7498. return null;
  7499. }
  7500. var kidPromises = [];
  7501. var found = false;
  7502. for (var i = 0; i < kids.length; i++) {
  7503. var kid = kids[i];
  7504. assert(isRef(kid), 'kids must be a ref');
  7505. if (kid.num == kidRef.num) {
  7506. found = true;
  7507. break;
  7508. }
  7509. kidPromises.push(xref.fetchAsync(kid).then(function (kid) {
  7510. if (kid.has('Count')) {
  7511. var count = kid.get('Count');
  7512. total += count;
  7513. } else { // page leaf node
  7514. total++;
  7515. }
  7516. }));
  7517. }
  7518. if (!found) {
  7519. error('kid ref not found in parents kids');
  7520. }
  7521. return Promise.all(kidPromises).then(function () {
  7522. return [total, parentRef];
  7523. });
  7524. });
  7525. }
  7526. var total = 0;
  7527. function next(ref) {
  7528. return pagesBeforeRef(ref).then(function (args) {
  7529. if (!args) {
  7530. return total;
  7531. }
  7532. var count = args[0];
  7533. var parentRef = args[1];
  7534. total += count;
  7535. return next(parentRef);
  7536. });
  7537. }
  7538. return next(ref);
  7539. }
  7540. };
  7541. return Catalog;
  7542. })();
  7543. var XRef = (function XRefClosure() {
  7544. function XRef(stream, password) {
  7545. this.stream = stream;
  7546. this.entries = [];
  7547. this.xrefstms = {};
  7548. // prepare the XRef cache
  7549. this.cache = [];
  7550. this.password = password;
  7551. this.stats = {
  7552. streamTypes: [],
  7553. fontTypes: []
  7554. };
  7555. }
  7556. XRef.prototype = {
  7557. setStartXRef: function XRef_setStartXRef(startXRef) {
  7558. // Store the starting positions of xref tables as we process them
  7559. // so we can recover from missing data errors
  7560. this.startXRefQueue = [startXRef];
  7561. },
  7562. parse: function XRef_parse(recoveryMode) {
  7563. var trailerDict;
  7564. if (!recoveryMode) {
  7565. trailerDict = this.readXRef();
  7566. } else {
  7567. warn('Indexing all PDF objects');
  7568. trailerDict = this.indexObjects();
  7569. }
  7570. trailerDict.assignXref(this);
  7571. this.trailer = trailerDict;
  7572. var encrypt = trailerDict.get('Encrypt');
  7573. if (encrypt) {
  7574. var ids = trailerDict.get('ID');
  7575. var fileId = (ids && ids.length) ? ids[0] : '';
  7576. this.encrypt = new CipherTransformFactory(encrypt, fileId,
  7577. this.password);
  7578. }
  7579. // get the root dictionary (catalog) object
  7580. if (!(this.root = trailerDict.get('Root'))) {
  7581. error('Invalid root reference');
  7582. }
  7583. },
  7584. processXRefTable: function XRef_processXRefTable(parser) {
  7585. if (!('tableState' in this)) {
  7586. // Stores state of the table as we process it so we can resume
  7587. // from middle of table in case of missing data error
  7588. this.tableState = {
  7589. entryNum: 0,
  7590. streamPos: parser.lexer.stream.pos,
  7591. parserBuf1: parser.buf1,
  7592. parserBuf2: parser.buf2
  7593. };
  7594. }
  7595. var obj = this.readXRefTable(parser);
  7596. // Sanity check
  7597. if (!isCmd(obj, 'trailer')) {
  7598. error('Invalid XRef table: could not find trailer dictionary');
  7599. }
  7600. // Read trailer dictionary, e.g.
  7601. // trailer
  7602. // << /Size 22
  7603. // /Root 20R
  7604. // /Info 10R
  7605. // /ID [ <81b14aafa313db63dbd6f981e49f94f4> ]
  7606. // >>
  7607. // The parser goes through the entire stream << ... >> and provides
  7608. // a getter interface for the key-value table
  7609. var dict = parser.getObj();
  7610. // The pdflib PDF generator can generate a nested trailer dictionary
  7611. if (!isDict(dict) && dict.dict) {
  7612. dict = dict.dict;
  7613. }
  7614. if (!isDict(dict)) {
  7615. error('Invalid XRef table: could not parse trailer dictionary');
  7616. }
  7617. delete this.tableState;
  7618. return dict;
  7619. },
  7620. readXRefTable: function XRef_readXRefTable(parser) {
  7621. // Example of cross-reference table:
  7622. // xref
  7623. // 0 1 <-- subsection header (first obj #, obj count)
  7624. // 0000000000 65535 f <-- actual object (offset, generation #, f/n)
  7625. // 23 2 <-- subsection header ... and so on ...
  7626. // 0000025518 00002 n
  7627. // 0000025635 00000 n
  7628. // trailer
  7629. // ...
  7630. var stream = parser.lexer.stream;
  7631. var tableState = this.tableState;
  7632. stream.pos = tableState.streamPos;
  7633. parser.buf1 = tableState.parserBuf1;
  7634. parser.buf2 = tableState.parserBuf2;
  7635. // Outer loop is over subsection headers
  7636. var obj;
  7637. while (true) {
  7638. if (!('firstEntryNum' in tableState) || !('entryCount' in tableState)) {
  7639. if (isCmd(obj = parser.getObj(), 'trailer')) {
  7640. break;
  7641. }
  7642. tableState.firstEntryNum = obj;
  7643. tableState.entryCount = parser.getObj();
  7644. }
  7645. var first = tableState.firstEntryNum;
  7646. var count = tableState.entryCount;
  7647. if (!isInt(first) || !isInt(count)) {
  7648. error('Invalid XRef table: wrong types in subsection header');
  7649. }
  7650. // Inner loop is over objects themselves
  7651. for (var i = tableState.entryNum; i < count; i++) {
  7652. tableState.streamPos = stream.pos;
  7653. tableState.entryNum = i;
  7654. tableState.parserBuf1 = parser.buf1;
  7655. tableState.parserBuf2 = parser.buf2;
  7656. var entry = {};
  7657. entry.offset = parser.getObj();
  7658. entry.gen = parser.getObj();
  7659. var type = parser.getObj();
  7660. if (isCmd(type, 'f')) {
  7661. entry.free = true;
  7662. } else if (isCmd(type, 'n')) {
  7663. entry.uncompressed = true;
  7664. }
  7665. // Validate entry obj
  7666. if (!isInt(entry.offset) || !isInt(entry.gen) ||
  7667. !(entry.free || entry.uncompressed)) {
  7668. console.log(entry.offset, entry.gen, entry.free,
  7669. entry.uncompressed);
  7670. error('Invalid entry in XRef subsection: ' + first + ', ' + count);
  7671. }
  7672. if (!this.entries[i + first]) {
  7673. this.entries[i + first] = entry;
  7674. }
  7675. }
  7676. tableState.entryNum = 0;
  7677. tableState.streamPos = stream.pos;
  7678. tableState.parserBuf1 = parser.buf1;
  7679. tableState.parserBuf2 = parser.buf2;
  7680. delete tableState.firstEntryNum;
  7681. delete tableState.entryCount;
  7682. }
  7683. // Per issue 3248: hp scanners generate bad XRef
  7684. if (first === 1 && this.entries[1] && this.entries[1].free) {
  7685. // shifting the entries
  7686. this.entries.shift();
  7687. }
  7688. // Sanity check: as per spec, first object must be free
  7689. if (this.entries[0] && !this.entries[0].free) {
  7690. error('Invalid XRef table: unexpected first object');
  7691. }
  7692. return obj;
  7693. },
  7694. processXRefStream: function XRef_processXRefStream(stream) {
  7695. if (!('streamState' in this)) {
  7696. // Stores state of the stream as we process it so we can resume
  7697. // from middle of stream in case of missing data error
  7698. var streamParameters = stream.dict;
  7699. var byteWidths = streamParameters.get('W');
  7700. var range = streamParameters.get('Index');
  7701. if (!range) {
  7702. range = [0, streamParameters.get('Size')];
  7703. }
  7704. this.streamState = {
  7705. entryRanges: range,
  7706. byteWidths: byteWidths,
  7707. entryNum: 0,
  7708. streamPos: stream.pos
  7709. };
  7710. }
  7711. this.readXRefStream(stream);
  7712. delete this.streamState;
  7713. return stream.dict;
  7714. },
  7715. readXRefStream: function XRef_readXRefStream(stream) {
  7716. var i, j;
  7717. var streamState = this.streamState;
  7718. stream.pos = streamState.streamPos;
  7719. var byteWidths = streamState.byteWidths;
  7720. var typeFieldWidth = byteWidths[0];
  7721. var offsetFieldWidth = byteWidths[1];
  7722. var generationFieldWidth = byteWidths[2];
  7723. var entryRanges = streamState.entryRanges;
  7724. while (entryRanges.length > 0) {
  7725. var first = entryRanges[0];
  7726. var n = entryRanges[1];
  7727. if (!isInt(first) || !isInt(n)) {
  7728. error('Invalid XRef range fields: ' + first + ', ' + n);
  7729. }
  7730. if (!isInt(typeFieldWidth) || !isInt(offsetFieldWidth) ||
  7731. !isInt(generationFieldWidth)) {
  7732. error('Invalid XRef entry fields length: ' + first + ', ' + n);
  7733. }
  7734. for (i = streamState.entryNum; i < n; ++i) {
  7735. streamState.entryNum = i;
  7736. streamState.streamPos = stream.pos;
  7737. var type = 0, offset = 0, generation = 0;
  7738. for (j = 0; j < typeFieldWidth; ++j) {
  7739. type = (type << 8) | stream.getByte();
  7740. }
  7741. // if type field is absent, its default value is 1
  7742. if (typeFieldWidth === 0) {
  7743. type = 1;
  7744. }
  7745. for (j = 0; j < offsetFieldWidth; ++j) {
  7746. offset = (offset << 8) | stream.getByte();
  7747. }
  7748. for (j = 0; j < generationFieldWidth; ++j) {
  7749. generation = (generation << 8) | stream.getByte();
  7750. }
  7751. var entry = {};
  7752. entry.offset = offset;
  7753. entry.gen = generation;
  7754. switch (type) {
  7755. case 0:
  7756. entry.free = true;
  7757. break;
  7758. case 1:
  7759. entry.uncompressed = true;
  7760. break;
  7761. case 2:
  7762. break;
  7763. default:
  7764. error('Invalid XRef entry type: ' + type);
  7765. }
  7766. if (!this.entries[first + i]) {
  7767. this.entries[first + i] = entry;
  7768. }
  7769. }
  7770. streamState.entryNum = 0;
  7771. streamState.streamPos = stream.pos;
  7772. entryRanges.splice(0, 2);
  7773. }
  7774. },
  7775. indexObjects: function XRef_indexObjects() {
  7776. // Simple scan through the PDF content to find objects,
  7777. // trailers and XRef streams.
  7778. function readToken(data, offset) {
  7779. var token = '', ch = data[offset];
  7780. while (ch !== 13 && ch !== 10) {
  7781. if (++offset >= data.length) {
  7782. break;
  7783. }
  7784. token += String.fromCharCode(ch);
  7785. ch = data[offset];
  7786. }
  7787. return token;
  7788. }
  7789. function skipUntil(data, offset, what) {
  7790. var length = what.length, dataLength = data.length;
  7791. var skipped = 0;
  7792. // finding byte sequence
  7793. while (offset < dataLength) {
  7794. var i = 0;
  7795. while (i < length && data[offset + i] == what[i]) {
  7796. ++i;
  7797. }
  7798. if (i >= length) {
  7799. break; // sequence found
  7800. }
  7801. offset++;
  7802. skipped++;
  7803. }
  7804. return skipped;
  7805. }
  7806. var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]);
  7807. var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114,
  7808. 101, 102]);
  7809. var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]);
  7810. var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]);
  7811. var stream = this.stream;
  7812. stream.pos = 0;
  7813. var buffer = stream.getBytes();
  7814. var position = stream.start, length = buffer.length;
  7815. var trailers = [], xrefStms = [];
  7816. while (position < length) {
  7817. var ch = buffer[position];
  7818. if (ch === 32 || ch === 9 || ch === 13 || ch === 10) {
  7819. ++position;
  7820. continue;
  7821. }
  7822. if (ch === 37) { // %-comment
  7823. do {
  7824. ++position;
  7825. if (position >= length) {
  7826. break;
  7827. }
  7828. ch = buffer[position];
  7829. } while (ch !== 13 && ch !== 10);
  7830. continue;
  7831. }
  7832. var token = readToken(buffer, position);
  7833. var m;
  7834. if (token === 'xref') {
  7835. position += skipUntil(buffer, position, trailerBytes);
  7836. trailers.push(position);
  7837. position += skipUntil(buffer, position, startxrefBytes);
  7838. } else if ((m = /^(\d+)\s+(\d+)\s+obj\b/.exec(token))) {
  7839. this.entries[m[1]] = {
  7840. offset: position,
  7841. gen: m[2] | 0,
  7842. uncompressed: true
  7843. };
  7844. var contentLength = skipUntil(buffer, position, endobjBytes) + 7;
  7845. var content = buffer.subarray(position, position + contentLength);
  7846. // checking XRef stream suspect
  7847. // (it shall have '/XRef' and next char is not a letter)
  7848. var xrefTagOffset = skipUntil(content, 0, xrefBytes);
  7849. if (xrefTagOffset < contentLength &&
  7850. content[xrefTagOffset + 5] < 64) {
  7851. xrefStms.push(position);
  7852. this.xrefstms[position] = 1; // don't read it recursively
  7853. }
  7854. position += contentLength;
  7855. } else {
  7856. position += token.length + 1;
  7857. }
  7858. }
  7859. // reading XRef streams
  7860. var i, ii;
  7861. for (i = 0, ii = xrefStms.length; i < ii; ++i) {
  7862. this.startXRefQueue.push(xrefStms[i]);
  7863. this.readXRef(/* recoveryMode */ true);
  7864. }
  7865. // finding main trailer
  7866. var dict;
  7867. for (i = 0, ii = trailers.length; i < ii; ++i) {
  7868. stream.pos = trailers[i];
  7869. var parser = new Parser(new Lexer(stream), true, this);
  7870. var obj = parser.getObj();
  7871. if (!isCmd(obj, 'trailer')) {
  7872. continue;
  7873. }
  7874. // read the trailer dictionary
  7875. if (!isDict(dict = parser.getObj())) {
  7876. continue;
  7877. }
  7878. // taking the first one with 'ID'
  7879. if (dict.has('ID')) {
  7880. return dict;
  7881. }
  7882. }
  7883. // no tailer with 'ID', taking last one (if exists)
  7884. if (dict) {
  7885. return dict;
  7886. }
  7887. // nothing helps
  7888. // calling error() would reject worker with an UnknownErrorException.
  7889. throw new InvalidPDFException('Invalid PDF structure');
  7890. },
  7891. readXRef: function XRef_readXRef(recoveryMode) {
  7892. var stream = this.stream;
  7893. try {
  7894. while (this.startXRefQueue.length) {
  7895. var startXRef = this.startXRefQueue[0];
  7896. stream.pos = startXRef + stream.start;
  7897. var parser = new Parser(new Lexer(stream), true, this);
  7898. var obj = parser.getObj();
  7899. var dict;
  7900. // Get dictionary
  7901. if (isCmd(obj, 'xref')) {
  7902. // Parse end-of-file XRef
  7903. dict = this.processXRefTable(parser);
  7904. if (!this.topDict) {
  7905. this.topDict = dict;
  7906. }
  7907. // Recursively get other XRefs 'XRefStm', if any
  7908. obj = dict.get('XRefStm');
  7909. if (isInt(obj)) {
  7910. var pos = obj;
  7911. // ignore previously loaded xref streams
  7912. // (possible infinite recursion)
  7913. if (!(pos in this.xrefstms)) {
  7914. this.xrefstms[pos] = 1;
  7915. this.startXRefQueue.push(pos);
  7916. }
  7917. }
  7918. } else if (isInt(obj)) {
  7919. // Parse in-stream XRef
  7920. if (!isInt(parser.getObj()) ||
  7921. !isCmd(parser.getObj(), 'obj') ||
  7922. !isStream(obj = parser.getObj())) {
  7923. error('Invalid XRef stream');
  7924. }
  7925. dict = this.processXRefStream(obj);
  7926. if (!this.topDict) {
  7927. this.topDict = dict;
  7928. }
  7929. if (!dict) {
  7930. error('Failed to read XRef stream');
  7931. }
  7932. } else {
  7933. error('Invalid XRef stream header');
  7934. }
  7935. // Recursively get previous dictionary, if any
  7936. obj = dict.get('Prev');
  7937. if (isInt(obj)) {
  7938. this.startXRefQueue.push(obj);
  7939. } else if (isRef(obj)) {
  7940. // The spec says Prev must not be a reference, i.e. "/Prev NNN"
  7941. // This is a fallback for non-compliant PDFs, i.e. "/Prev NNN 0 R"
  7942. this.startXRefQueue.push(obj.num);
  7943. }
  7944. this.startXRefQueue.shift();
  7945. }
  7946. return this.topDict;
  7947. } catch (e) {
  7948. if (e instanceof MissingDataException) {
  7949. throw e;
  7950. }
  7951. info('(while reading XRef): ' + e);
  7952. }
  7953. if (recoveryMode) {
  7954. return;
  7955. }
  7956. throw new XRefParseException();
  7957. },
  7958. getEntry: function XRef_getEntry(i) {
  7959. var xrefEntry = this.entries[i];
  7960. if (xrefEntry && !xrefEntry.free && xrefEntry.offset) {
  7961. return xrefEntry;
  7962. }
  7963. return null;
  7964. },
  7965. fetchIfRef: function XRef_fetchIfRef(obj) {
  7966. if (!isRef(obj)) {
  7967. return obj;
  7968. }
  7969. return this.fetch(obj);
  7970. },
  7971. fetch: function XRef_fetch(ref, suppressEncryption) {
  7972. assert(isRef(ref), 'ref object is not a reference');
  7973. var num = ref.num;
  7974. if (num in this.cache) {
  7975. var cacheEntry = this.cache[num];
  7976. return cacheEntry;
  7977. }
  7978. var xrefEntry = this.getEntry(num);
  7979. // the referenced entry can be free
  7980. if (xrefEntry === null) {
  7981. return (this.cache[num] = null);
  7982. }
  7983. if (xrefEntry.uncompressed) {
  7984. xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption);
  7985. } else {
  7986. xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption);
  7987. }
  7988. if (isDict(xrefEntry)){
  7989. xrefEntry.objId = ref.toString();
  7990. } else if (isStream(xrefEntry)) {
  7991. xrefEntry.dict.objId = ref.toString();
  7992. }
  7993. return xrefEntry;
  7994. },
  7995. fetchUncompressed: function XRef_fetchUncompressed(ref, xrefEntry,
  7996. suppressEncryption) {
  7997. var gen = ref.gen;
  7998. var num = ref.num;
  7999. if (xrefEntry.gen !== gen) {
  8000. error('inconsistent generation in XRef');
  8001. }
  8002. var stream = this.stream.makeSubStream(xrefEntry.offset +
  8003. this.stream.start);
  8004. var parser = new Parser(new Lexer(stream), true, this);
  8005. var obj1 = parser.getObj();
  8006. var obj2 = parser.getObj();
  8007. var obj3 = parser.getObj();
  8008. if (!isInt(obj1) || parseInt(obj1, 10) !== num ||
  8009. !isInt(obj2) || parseInt(obj2, 10) !== gen ||
  8010. !isCmd(obj3)) {
  8011. error('bad XRef entry');
  8012. }
  8013. if (!isCmd(obj3, 'obj')) {
  8014. // some bad PDFs use "obj1234" and really mean 1234
  8015. if (obj3.cmd.indexOf('obj') === 0) {
  8016. num = parseInt(obj3.cmd.substring(3), 10);
  8017. if (!isNaN(num)) {
  8018. return num;
  8019. }
  8020. }
  8021. error('bad XRef entry');
  8022. }
  8023. if (this.encrypt && !suppressEncryption) {
  8024. xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num, gen));
  8025. } else {
  8026. xrefEntry = parser.getObj();
  8027. }
  8028. if (!isStream(xrefEntry)) {
  8029. this.cache[num] = xrefEntry;
  8030. }
  8031. return xrefEntry;
  8032. },
  8033. fetchCompressed: function XRef_fetchCompressed(xrefEntry,
  8034. suppressEncryption) {
  8035. var tableOffset = xrefEntry.offset;
  8036. var stream = this.fetch(new Ref(tableOffset, 0));
  8037. if (!isStream(stream)) {
  8038. error('bad ObjStm stream');
  8039. }
  8040. var first = stream.dict.get('First');
  8041. var n = stream.dict.get('N');
  8042. if (!isInt(first) || !isInt(n)) {
  8043. error('invalid first and n parameters for ObjStm stream');
  8044. }
  8045. var parser = new Parser(new Lexer(stream), false, this);
  8046. parser.allowStreams = true;
  8047. var i, entries = [], num, nums = [];
  8048. // read the object numbers to populate cache
  8049. for (i = 0; i < n; ++i) {
  8050. num = parser.getObj();
  8051. if (!isInt(num)) {
  8052. error('invalid object number in the ObjStm stream: ' + num);
  8053. }
  8054. nums.push(num);
  8055. var offset = parser.getObj();
  8056. if (!isInt(offset)) {
  8057. error('invalid object offset in the ObjStm stream: ' + offset);
  8058. }
  8059. }
  8060. // read stream objects for cache
  8061. for (i = 0; i < n; ++i) {
  8062. entries.push(parser.getObj());
  8063. num = nums[i];
  8064. var entry = this.entries[num];
  8065. if (entry && entry.offset === tableOffset && entry.gen === i) {
  8066. this.cache[num] = entries[i];
  8067. }
  8068. }
  8069. xrefEntry = entries[xrefEntry.gen];
  8070. if (xrefEntry === undefined) {
  8071. error('bad XRef entry for compressed object');
  8072. }
  8073. return xrefEntry;
  8074. },
  8075. fetchIfRefAsync: function XRef_fetchIfRefAsync(obj) {
  8076. if (!isRef(obj)) {
  8077. return Promise.resolve(obj);
  8078. }
  8079. return this.fetchAsync(obj);
  8080. },
  8081. fetchAsync: function XRef_fetchAsync(ref, suppressEncryption) {
  8082. return new Promise(function (resolve, reject) {
  8083. var tryFetch = function () {
  8084. try {
  8085. resolve(this.fetch(ref, suppressEncryption));
  8086. } catch (e) {
  8087. if (e instanceof MissingDataException) {
  8088. this.stream.manager.requestRange(e.begin, e.end, tryFetch);
  8089. return;
  8090. }
  8091. reject(e);
  8092. }
  8093. }.bind(this);
  8094. tryFetch();
  8095. }.bind(this));
  8096. },
  8097. getCatalogObj: function XRef_getCatalogObj() {
  8098. return this.root;
  8099. }
  8100. };
  8101. return XRef;
  8102. })();
  8103. /**
  8104. * A NameTree is like a Dict but has some advantageous properties, see the
  8105. * spec (7.9.6) for more details.
  8106. * TODO: implement all the Dict functions and make this more efficent.
  8107. */
  8108. var NameTree = (function NameTreeClosure() {
  8109. function NameTree(root, xref) {
  8110. this.root = root;
  8111. this.xref = xref;
  8112. }
  8113. NameTree.prototype = {
  8114. getAll: function NameTree_getAll() {
  8115. var dict = {};
  8116. if (!this.root) {
  8117. return dict;
  8118. }
  8119. var xref = this.xref;
  8120. // reading name tree
  8121. var processed = new RefSet();
  8122. processed.put(this.root);
  8123. var queue = [this.root];
  8124. while (queue.length > 0) {
  8125. var i, n;
  8126. var obj = xref.fetchIfRef(queue.shift());
  8127. if (!isDict(obj)) {
  8128. continue;
  8129. }
  8130. if (obj.has('Kids')) {
  8131. var kids = obj.get('Kids');
  8132. for (i = 0, n = kids.length; i < n; i++) {
  8133. var kid = kids[i];
  8134. if (processed.has(kid)) {
  8135. error('invalid destinations');
  8136. }
  8137. queue.push(kid);
  8138. processed.put(kid);
  8139. }
  8140. continue;
  8141. }
  8142. var names = obj.get('Names');
  8143. if (names) {
  8144. for (i = 0, n = names.length; i < n; i += 2) {
  8145. dict[names[i]] = xref.fetchIfRef(names[i + 1]);
  8146. }
  8147. }
  8148. }
  8149. return dict;
  8150. }
  8151. };
  8152. return NameTree;
  8153. })();
  8154. /**
  8155. * "A PDF file can refer to the contents of another file by using a File
  8156. * Specification (PDF 1.1)", see the spec (7.11) for more details.
  8157. * NOTE: Only embedded files are supported (as part of the attachments support)
  8158. * TODO: support the 'URL' file system (with caching if !/V), portable
  8159. * collections attributes and related files (/RF)
  8160. */
  8161. var FileSpec = (function FileSpecClosure() {
  8162. function FileSpec(root, xref) {
  8163. if (!root || !isDict(root)) {
  8164. return;
  8165. }
  8166. this.xref = xref;
  8167. this.root = root;
  8168. if (root.has('FS')) {
  8169. this.fs = root.get('FS');
  8170. }
  8171. this.description = root.has('Desc') ?
  8172. stringToPDFString(root.get('Desc')) :
  8173. '';
  8174. if (root.has('RF')) {
  8175. warn('Related file specifications are not supported');
  8176. }
  8177. this.contentAvailable = true;
  8178. if (!root.has('EF')) {
  8179. this.contentAvailable = false;
  8180. warn('Non-embedded file specifications are not supported');
  8181. }
  8182. }
  8183. function pickPlatformItem(dict) {
  8184. // Look for the filename in this order:
  8185. // UF, F, Unix, Mac, DOS
  8186. if (dict.has('UF')) {
  8187. return dict.get('UF');
  8188. } else if (dict.has('F')) {
  8189. return dict.get('F');
  8190. } else if (dict.has('Unix')) {
  8191. return dict.get('Unix');
  8192. } else if (dict.has('Mac')) {
  8193. return dict.get('Mac');
  8194. } else if (dict.has('DOS')) {
  8195. return dict.get('DOS');
  8196. } else {
  8197. return null;
  8198. }
  8199. }
  8200. FileSpec.prototype = {
  8201. get filename() {
  8202. if (!this._filename && this.root) {
  8203. var filename = pickPlatformItem(this.root) || 'unnamed';
  8204. this._filename = stringToPDFString(filename).
  8205. replace(/\\\\/g, '\\').
  8206. replace(/\\\//g, '/').
  8207. replace(/\\/g, '/');
  8208. }
  8209. return this._filename;
  8210. },
  8211. get content() {
  8212. if (!this.contentAvailable) {
  8213. return null;
  8214. }
  8215. if (!this.contentRef && this.root) {
  8216. this.contentRef = pickPlatformItem(this.root.get('EF'));
  8217. }
  8218. var content = null;
  8219. if (this.contentRef) {
  8220. var xref = this.xref;
  8221. var fileObj = xref.fetchIfRef(this.contentRef);
  8222. if (fileObj && isStream(fileObj)) {
  8223. content = fileObj.getBytes();
  8224. } else {
  8225. warn('Embedded file specification points to non-existing/invalid ' +
  8226. 'content');
  8227. }
  8228. } else {
  8229. warn('Embedded file specification does not have a content');
  8230. }
  8231. return content;
  8232. },
  8233. get serializable() {
  8234. return {
  8235. filename: this.filename,
  8236. content: this.content
  8237. };
  8238. }
  8239. };
  8240. return FileSpec;
  8241. })();
  8242. /**
  8243. * A helper for loading missing data in object graphs. It traverses the graph
  8244. * depth first and queues up any objects that have missing data. Once it has
  8245. * has traversed as many objects that are available it attempts to bundle the
  8246. * missing data requests and then resume from the nodes that weren't ready.
  8247. *
  8248. * NOTE: It provides protection from circular references by keeping track of
  8249. * of loaded references. However, you must be careful not to load any graphs
  8250. * that have references to the catalog or other pages since that will cause the
  8251. * entire PDF document object graph to be traversed.
  8252. */
  8253. var ObjectLoader = (function() {
  8254. function mayHaveChildren(value) {
  8255. return isRef(value) || isDict(value) || isArray(value) || isStream(value);
  8256. }
  8257. function addChildren(node, nodesToVisit) {
  8258. var value;
  8259. if (isDict(node) || isStream(node)) {
  8260. var map;
  8261. if (isDict(node)) {
  8262. map = node.map;
  8263. } else {
  8264. map = node.dict.map;
  8265. }
  8266. for (var key in map) {
  8267. value = map[key];
  8268. if (mayHaveChildren(value)) {
  8269. nodesToVisit.push(value);
  8270. }
  8271. }
  8272. } else if (isArray(node)) {
  8273. for (var i = 0, ii = node.length; i < ii; i++) {
  8274. value = node[i];
  8275. if (mayHaveChildren(value)) {
  8276. nodesToVisit.push(value);
  8277. }
  8278. }
  8279. }
  8280. }
  8281. function ObjectLoader(obj, keys, xref) {
  8282. this.obj = obj;
  8283. this.keys = keys;
  8284. this.xref = xref;
  8285. this.refSet = null;
  8286. }
  8287. ObjectLoader.prototype = {
  8288. load: function ObjectLoader_load() {
  8289. var keys = this.keys;
  8290. this.capability = createPromiseCapability();
  8291. // Don't walk the graph if all the data is already loaded.
  8292. if (!(this.xref.stream instanceof ChunkedStream) ||
  8293. this.xref.stream.getMissingChunks().length === 0) {
  8294. this.capability.resolve();
  8295. return this.capability.promise;
  8296. }
  8297. this.refSet = new RefSet();
  8298. // Setup the initial nodes to visit.
  8299. var nodesToVisit = [];
  8300. for (var i = 0; i < keys.length; i++) {
  8301. nodesToVisit.push(this.obj[keys[i]]);
  8302. }
  8303. this.walk(nodesToVisit);
  8304. return this.capability.promise;
  8305. },
  8306. walk: function ObjectLoader_walk(nodesToVisit) {
  8307. var nodesToRevisit = [];
  8308. var pendingRequests = [];
  8309. // DFS walk of the object graph.
  8310. while (nodesToVisit.length) {
  8311. var currentNode = nodesToVisit.pop();
  8312. // Only references or chunked streams can cause missing data exceptions.
  8313. if (isRef(currentNode)) {
  8314. // Skip nodes that have already been visited.
  8315. if (this.refSet.has(currentNode)) {
  8316. continue;
  8317. }
  8318. try {
  8319. var ref = currentNode;
  8320. this.refSet.put(ref);
  8321. currentNode = this.xref.fetch(currentNode);
  8322. } catch (e) {
  8323. if (!(e instanceof MissingDataException)) {
  8324. throw e;
  8325. }
  8326. nodesToRevisit.push(currentNode);
  8327. pendingRequests.push({ begin: e.begin, end: e.end });
  8328. }
  8329. }
  8330. if (currentNode && currentNode.getBaseStreams) {
  8331. var baseStreams = currentNode.getBaseStreams();
  8332. var foundMissingData = false;
  8333. for (var i = 0; i < baseStreams.length; i++) {
  8334. var stream = baseStreams[i];
  8335. if (stream.getMissingChunks && stream.getMissingChunks().length) {
  8336. foundMissingData = true;
  8337. pendingRequests.push({
  8338. begin: stream.start,
  8339. end: stream.end
  8340. });
  8341. }
  8342. }
  8343. if (foundMissingData) {
  8344. nodesToRevisit.push(currentNode);
  8345. }
  8346. }
  8347. addChildren(currentNode, nodesToVisit);
  8348. }
  8349. if (pendingRequests.length) {
  8350. this.xref.stream.manager.requestRanges(pendingRequests,
  8351. function pendingRequestCallback() {
  8352. nodesToVisit = nodesToRevisit;
  8353. for (var i = 0; i < nodesToRevisit.length; i++) {
  8354. var node = nodesToRevisit[i];
  8355. // Remove any reference nodes from the currrent refset so they
  8356. // aren't skipped when we revist them.
  8357. if (isRef(node)) {
  8358. this.refSet.remove(node);
  8359. }
  8360. }
  8361. this.walk(nodesToVisit);
  8362. }.bind(this));
  8363. return;
  8364. }
  8365. // Everything is loaded.
  8366. this.refSet = null;
  8367. this.capability.resolve();
  8368. }
  8369. };
  8370. return ObjectLoader;
  8371. })();
  8372. var ISOAdobeCharset = [
  8373. '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
  8374. 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
  8375. 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',
  8376. 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
  8377. 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',
  8378. 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  8379. 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  8380. 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',
  8381. 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
  8382. 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
  8383. 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',
  8384. 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  8385. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  8386. 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',
  8387. 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',
  8388. 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',
  8389. 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',
  8390. 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',
  8391. 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',
  8392. 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',
  8393. 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',
  8394. 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',
  8395. 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',
  8396. 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',
  8397. 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',
  8398. 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',
  8399. 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',
  8400. 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',
  8401. 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',
  8402. 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',
  8403. 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',
  8404. 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',
  8405. 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',
  8406. 'ugrave', 'yacute', 'ydieresis', 'zcaron'
  8407. ];
  8408. var ExpertCharset = [
  8409. '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',
  8410. 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
  8411. 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',
  8412. 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',
  8413. 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',
  8414. 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',
  8415. 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',
  8416. 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',
  8417. 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',
  8418. 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  8419. 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',
  8420. 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
  8421. 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
  8422. 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
  8423. 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
  8424. 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
  8425. 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',
  8426. 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',
  8427. 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',
  8428. 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',
  8429. 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',
  8430. 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
  8431. 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',
  8432. 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',
  8433. 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',
  8434. 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',
  8435. 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',
  8436. 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
  8437. 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',
  8438. 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',
  8439. 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
  8440. 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
  8441. 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
  8442. 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
  8443. 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
  8444. 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
  8445. 'Ydieresissmall'
  8446. ];
  8447. var ExpertSubsetCharset = [
  8448. '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',
  8449. 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  8450. 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',
  8451. 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',
  8452. 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',
  8453. 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',
  8454. 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',
  8455. 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',
  8456. 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  8457. 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',
  8458. 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',
  8459. 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',
  8460. 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',
  8461. 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',
  8462. 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',
  8463. 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',
  8464. 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',
  8465. 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',
  8466. 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
  8467. 'periodinferior', 'commainferior'
  8468. ];
  8469. var CIDToUnicodeMaps = {
  8470. 'Adobe-Japan1': [[32, 160], {f: 12, c: 33}, [45, 8209], {f: 46, c: 46}, 165,
  8471. {f: 2, c: 93}, [95, 818], [96, 768], {f: 27, c: 97}, 166, 125, [732, 771],
  8472. [700, 8217], 92, [699, 8216], 124, [126, 8764], {f: 3, c: 161}, 8260, 402,
  8473. 0, 164, 8220, 171, {f: 2, c: 8249}, {f: 2, c: 64257}, [8210, 8211], 0, 0,
  8474. [183, 8729], 0, 8226, 8218, 8222, 8221, 187, 0, 0, 191, {f: 2, c: 769},
  8475. [175, 772], {f: 3, c: 774}, 778, [184, 807], 779, 808, 780, [822, 8212],
  8476. 198, 170, 321, 216, 338, 186, 230, 305, 322, 248, 339, 223, 173, 169, 172,
  8477. 174, 0, 0, {f: 2, c: 178}, 181, 185, {f: 3, c: 188}, {f: 6, c: 192},
  8478. {f: 16, c: 199}, 0, {f: 6, c: 217}, {f: 6, c: 224}, {f: 16, c: 231}, 0,
  8479. {f: 7, c: 249}, 352, 376, 381, [773, 8254], 353, 8482, 382, 0, 8194,
  8480. {f: 59, c: 33}, 165, {f: 31, c: 93}, 65512, {f: 2, c: 125}, 0,
  8481. {f: 63, c: 65377}, {s: 243}, [8195, 12288],
  8482. {f: 2, c: 12289}, 65292, 65294, 12539, {f: 2, c: 65306}, 65311, 65281,
  8483. {f: 2, c: 12443}, 180, 65344, 168, 65342, 65507, 65343, {f: 2, c: 12541},
  8484. {f: 2, c: 12445}, 12291, 20189, {f: 3, c: 12293}, 12540, 8213, 8208, 65295,
  8485. 65340, [12316, 65374], 8214, 65372, 8230, 8229, {s: 4}, {f: 2, c: 65288},
  8486. {f: 2, c: 12308}, 65339, 65341, 65371, 65373, {f: 10, c: 12296}, 65291,
  8487. [8722, 65293], 177, 215, 247, 65309, 8800, 65308, 65310, {f: 2, c: 8806},
  8488. 8734, 8756, 9794, 9792, 176, {f: 2, c: 8242}, 8451, 65509, 65284,
  8489. {f: 2, c: 65504}, 65285, 65283, 65286, 65290, 65312, 167, 9734, 9733, 9675,
  8490. 9679, 9678, 9671, 9670, 9633, 9632, 9651, 9650, 9661, 9660, 8251, 12306,
  8491. 8594, {f: 2, c: 8592}, 8595, 12307, 8712, 8715, {f: 2, c: 8838},
  8492. {f: 2, c: 8834}, 8746, 8745, {f: 2, c: 8743}, 65506, 8658, 8660, 8704,
  8493. 8707, 8736, 8869, 8978, 8706, 8711, 8801, 8786, {f: 2, c: 8810}, 8730,
  8494. 8765, 8733, 8757, {f: 2, c: 8747}, 8491, 8240, 9839, 9837, 9834,
  8495. {f: 2, c: 8224}, 182, 9711, {f: 10, c: 65296}, {f: 26, c: 65313},
  8496. {f: 26, c: 65345}, {f: 83, c: 12353}, {f: 86, c: 12449}, {f: 17, c: 913},
  8497. {f: 7, c: 931}, {f: 17, c: 945}, {f: 7, c: 963}, {f: 6, c: 1040}, 1025,
  8498. {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, 20124, 21782, 23043, 38463,
  8499. 21696, 24859, 25384, 23030, 36898, 33909, 33564, 31312, 24746, 25569,
  8500. 28197, 26093, 33894, 33446, 39925, 26771, 22311, 26017, 25201, 23451,
  8501. 22992, 34427, 39156, 32098, 32190, 39822, 25110, 31903, 34999, 23433,
  8502. 24245, 25353, 26263, 26696, 38343, 38797, 26447, 20197, 20234, 20301,
  8503. 20381, 20553, 22258, 22839, 22996, 23041, 23561, 24799, 24847, 24944,
  8504. 26131, 26885, 28858, 30031, 30064, 31227, 32173, 32239, 32963, 33806,
  8505. [12176, 34915], 35586, 36949, 36986, 21307, 20117, 20133, 22495, 32946,
  8506. 37057, 30959, [12032, 19968], 22769, 28322, 36920, 31282, 33576, 33419,
  8507. 39983, 20801, 21360, 21693, 21729, 22240, 23035, 24341, 39154, 28139,
  8508. 32996, 34093, 38498, 38512, 38560, 38907, 21515, 21491, 23431, 28879,
  8509. [12155, 32701], 36802, [12204, 38632], 21359, 40284, 31418, 19985, 30867,
  8510. [12165, 33276], 28198, 22040, 21764, 27421, 34074, 39995, 23013, 21417,
  8511. 28006, [12128, 29916], 38287, 22082, 20113, 36939, 38642, 33615, 39180,
  8512. 21473, 21942, 23344, 24433, 26144, 26355, 26628, 27704, 27891, 27945,
  8513. 29787, 30408, 31310, 38964, 33521, 34907, 35424, 37613, 28082, 30123,
  8514. 30410, 39365, 24742, 35585, 36234, 38322, 27022, 21421, 20870, 22290,
  8515. 22576, 22852, 23476, 24310, 24616, 25513, 25588, 27839, 28436, 28814,
  8516. 28948, 29017, 29141, 29503, 32257, 33398, 33489, 34199, 36960, 37467,
  8517. 40219, 22633, 26044, 27738, 29989, 20985, 22830, 22885, 24448, 24540,
  8518. 25276, 26106, 27178, 27431, 27572, 29579, 32705, 35158, 40236, 40206,
  8519. [12009, 40644], 23713, 27798, 33659, 20740, 23627, 25014, 33222, 26742,
  8520. 29281, [12036, 20057], 20474, 21368, 24681, 28201, 31311, [12211, 38899],
  8521. 19979, 21270, 20206, 20309, 20285, 20385, 20339, 21152, 21487, 22025,
  8522. 22799, 23233, 23478, 23521, 31185, 26247, 26524, 26550, 27468, 27827,
  8523. [12117, 28779], 29634, 31117, [12146, 31166], 31292, 31623, 33457, 33499,
  8524. 33540, 33655, 33775, 33747, 34662, 35506, 22057, 36008, 36838, 36942,
  8525. 38686, 34442, 20420, 23784, 25105, [12123, 29273], 30011, 33253, 33469,
  8526. 34558, 36032, 38597, 39187, 39381, 20171, 20250, 35299, 22238, 22602,
  8527. 22730, 24315, 24555, 24618, 24724, 24674, 25040, 25106, 25296, 25913,
  8528. 39745, 26214, 26800, 28023, 28784, 30028, 30342, 32117, 33445, 34809,
  8529. 38283, 38542, [12185, 35997], 20977, 21182, 22806, 21683, 23475, 23830,
  8530. 24936, 27010, 28079, 30861, 33995, 34903, 35442, 37799, 39608, 28012,
  8531. 39336, 34521, 22435, 26623, 34510, 37390, 21123, 22151, 21508, 24275,
  8532. 25313, 25785, 26684, 26680, 27579, 29554, 30906, 31339, 35226,
  8533. [12179, 35282], 36203, 36611, 37101, 38307, 38548, [12208, 38761], 23398,
  8534. 23731, 27005, {f: 2, c: 38989}, 25499, 31520, 27179, 27263, 26806, 39949,
  8535. 28511, 21106, 21917, 24688, 25324, 27963, 28167, 28369, 33883, 35088,
  8536. 36676, 19988, 39993, 21494, 26907, 27194, 38788, 26666, 20828, 31427,
  8537. 33970, 37340, 37772, 22107, 40232, 26658, 33541, 33841, 31909, 21000,
  8538. 33477, [12129, 29926], 20094, 20355, 20896, 23506, 21002, 21208, 21223,
  8539. 24059, 21914, 22570, 23014, 23436, 23448, 23515, [12082, 24178], 24185,
  8540. 24739, 24863, 24931, 25022, 25563, 25954, 26577, 26707, 26874, 27454,
  8541. 27475, 27735, 28450, 28567, 28485, 29872, [12130, 29976], 30435, 30475,
  8542. 31487, 31649, 31777, 32233, [12152, 32566], 32752, 32925, 33382, 33694,
  8543. 35251, 35532, 36011, 36996, 37969, 38291, 38289, 38306, 38501, 38867,
  8544. 39208, 33304, 20024, 21547, 23736, 24012, 29609, 30284, 30524, 23721,
  8545. 32747, 36107, 38593, 38929, 38996, 39000, 20225, 20238, 21361, 21916,
  8546. 22120, 22522, 22855, 23305, 23492, 23696, 24076, 24190, 24524, 25582,
  8547. 26426, 26071, 26082, 26399, 26827, 26820, 27231, 24112, 27589, 27671,
  8548. 27773, 30079, 31048, 23395, 31232, 32000, 24509, 35215, 35352, 36020,
  8549. 36215, 36556, 36637, 39138, 39438, [12004, 12225, 39740], [12018, 20096],
  8550. 20605, 20736, 22931, 23452, 25135, 25216, 25836, 27450, 29344, 30097,
  8551. 31047, 32681, 34811, 35516, 35696, 25516, 33738, 38816, 21513, 21507,
  8552. 21931, 26708, 27224, 35440, 30759, 26485, [12233, 40653], 21364, 23458,
  8553. 33050, 34384, 36870, 19992, 20037, 20167, 20241, 21450, 21560, 23470,
  8554. [12088, 24339], 24613, 25937, 26429, 27714, 27762, 27875, 28792, 29699,
  8555. 31350, 31406, 31496, 32026, 31998, 32102, 26087, [12124, 29275], 21435,
  8556. 23621, 24040, 25298, 25312, 25369, 28192, 34394, 35377, 36317, 37624,
  8557. 28417, 31142, [12226, 39770], 20136, {f: 2, c: 20139}, 20379, 20384, 20689,
  8558. 20807, 31478, 20849, 20982, 21332, 21281, 21375, 21483, 21932, 22659,
  8559. 23777, 24375, 24394, 24623, 24656, 24685, 25375, 25945, 27211, 27841,
  8560. 29378, 29421, 30703, 33016, 33029, 33288, 34126, 37111, 37857, 38911,
  8561. 39255, 39514, 20208, 20957, 23597, 26241, 26989, 23616, 26354, 26997,
  8562. [12127, 29577], 26704, 31873, 20677, 21220, 22343, [12081, 24062], 37670,
  8563. [12100, 26020], 27427, 27453, 29748, 31105, 31165, 31563, 32202, 33465,
  8564. 33740, 34943, 35167, 35641, 36817, [12198, 37329], 21535, 37504, 20061,
  8565. 20534, 21477, 21306, 29399, 29590, 30697, 33510, 36527, 39366, 39368,
  8566. 39378, 20855, 24858, 34398, 21936, 31354, 20598, 23507, 36935, 38533,
  8567. 20018, 27355, 37351, 23633, 23624, 25496, 31391, 27795, 38772, 36705,
  8568. 31402, 29066, 38536, 31874, 26647, 32368, 26705, 37740, 21234, 21531,
  8569. 34219, 35347, 32676, 36557, 37089, 21350, 34952, 31041, 20418, 20670,
  8570. 21009, 20804, 21843, 22317, 29674, 22411, 22865, 24418, 24452, 24693,
  8571. 24950, 24935, 25001, 25522, 25658, 25964, 26223, 26690, 28179, 30054,
  8572. 31293, 31995, 32076, 32153, 32331, 32619, 33550, 33610, 34509, 35336,
  8573. 35427, 35686, 36605, 38938, 40335, 33464, 36814, 39912, 21127, 25119,
  8574. 25731, 28608, 38553, 26689, 20625, [12107, 27424], 27770, 28500,
  8575. [12147, 31348], 32080, [12174, 34880], 35363, [12105, 26376], 20214, 20537,
  8576. 20518, 20581, 20860, 21048, 21091, 21927, 22287, 22533, 23244, 24314,
  8577. 25010, 25080, 25331, 25458, 26908, 27177, 29309, [12125, 29356], 29486,
  8578. 30740, 30831, 32121, 30476, 32937, [12178, 35211], 35609, 36066, 36562,
  8579. 36963, 37749, 38522, 38997, 39443, 40568, 20803, 21407, 21427, 24187,
  8580. 24358, 28187, 28304, [12126, 29572], 29694, 32067, 33335, [12180, 35328],
  8581. 35578, 38480, 20046, 20491, 21476, 21628, 22266, 22993, 23396,
  8582. [12080, 24049], 24235, 24359, [12094, 25144], 25925, 26543, 28246, 29392,
  8583. 31946, 34996, 32929, 32993, 33776, [11969, 34382], 35463, 36328, 37431,
  8584. 38599, 39015, [12238, 40723], 20116, 20114, 20237, 21320, 21577, 21566,
  8585. 23087, 24460, 24481, 24735, 26791, 27278, 29786, 30849, 35486, 35492,
  8586. 35703, 37264, 20062, 39881, 20132, 20348, 20399, 20505, 20502, 20809,
  8587. 20844, 21151, 21177, 21246, 21402, [12061, 21475], 21521, 21518, 21897,
  8588. 22353, 22434, 22909, 23380, 23389, 23439, [12079, 24037], 24039, 24055,
  8589. 24184, 24195, 24218, 24247, 24344, 24658, 24908, 25239, 25304, 25511,
  8590. 25915, 26114, 26179, 26356, 26477, 26657, 26775, 27083, 27743, 27946,
  8591. 28009, 28207, 28317, 30002, 30343, 30828, 31295, 31968, 32005, 32024,
  8592. 32094, 32177, 32789, 32771, 32943, 32945, 33108, 33167, 33322, 33618,
  8593. [12175, 34892], 34913, 35611, 36002, 36092, 37066, 37237, 37489, 30783,
  8594. 37628, 38308, 38477, 38917, [12217, 39321], [12220, 39640], 40251, 21083,
  8595. 21163, 21495, 21512, 22741, 25335, 28640, 35946, 36703, 40633, 20811,
  8596. 21051, 21578, 22269, 31296, 37239, 40288, [12234, 40658], 29508, 28425,
  8597. 33136, 29969, 24573, 24794, [12219, 39592], 29403, 36796, 27492, 38915,
  8598. 20170, 22256, 22372, 22718, 23130, 24680, 25031, 26127, 26118, 26681,
  8599. 26801, 28151, 30165, 32058, [12169, 33390], 39746, 20123, 20304, 21449,
  8600. 21766, 23919, 24038, 24046, 26619, 27801, 29811, 30722, 35408, 37782,
  8601. 35039, 22352, 24231, 25387, 20661, 20652, 20877, 26368, 21705, 22622,
  8602. 22971, 23472, 24425, 25165, 25505, 26685, 27507, 28168, 28797, 37319,
  8603. 29312, 30741, 30758, 31085, 25998, 32048, 33756, 35009, 36617, 38555,
  8604. 21092, 22312, 26448, 32618, 36001, 20916, 22338, 38442, 22586, 27018,
  8605. 32948, 21682, 23822, 22524, 30869, 40442, 20316, 21066, 21643, 25662,
  8606. 26152, 26388, 26613, 31364, 31574, 32034, 37679, 26716, 39853, 31545,
  8607. 21273, 20874, 21047, 23519, 25334, 25774, 25830, 26413, 27578, 34217,
  8608. 38609, 30352, 39894, 25420, 37638, 39851, [12139, 30399], 26194, 19977,
  8609. 20632, 21442, [12077, 23665], 24808, 25746, 25955, 26719, 29158, 29642,
  8610. 29987, 31639, 32386, 34453, 35715, 36059, 37240, 39184, 26028, 26283,
  8611. 27531, 20181, 20180, 20282, 20351, 21050, 21496, 21490, 21987, 22235,
  8612. [12064, 22763], 22987, 22985, 23039, [12070, 23376], 23629, 24066, 24107,
  8613. 24535, 24605, 25351, [12096, 25903], 23388, 26031, 26045, 26088, 26525,
  8614. [12108, 27490], 27515, [12114, 27663], 29509, 31049, 31169, [12151, 31992],
  8615. 32025, 32043, 32930, 33026, [12164, 33267], 35222, 35422, 35433, 35430,
  8616. 35468, 35566, 36039, 36060, 38604, 39164, [12013, 27503], 20107, 20284,
  8617. 20365, 20816, 23383, 23546, 24904, 25345, 26178, 27425, 28363, 27835,
  8618. 29246, 29885, 30164, 30913, [12144, 31034], [12157, 32780], [12159, 32819],
  8619. [12163, 33258], 33940, 36766, 27728, [12229, 40575], 24335, 35672, 40235,
  8620. 31482, 36600, 23437, 38635, 19971, 21489, 22519, 22833, 23241, 23460,
  8621. 24713, 28287, 28422, 30142, 36074, 23455, 34048, 31712, 20594, 26612,
  8622. 33437, 23649, 34122, 32286, 33294, 20889, 23556, 25448, 36198, 26012,
  8623. 29038, 31038, 32023, 32773, 35613, [12190, 36554], 36974, 34503, 37034,
  8624. 20511, 21242, 23610, 26451, 28796, 29237, 37196, 37320, 37675, 33509,
  8625. 23490, 24369, 24825, 20027, 21462, 23432, [12095, 25163], 26417, 27530,
  8626. 29417, 29664, 31278, 33131, 36259, 37202, [12216, 39318], 20754, 21463,
  8627. 21610, 23551, 25480, 27193, 32172, 38656, 22234, 21454, 21608, 23447,
  8628. 23601, 24030, 20462, 24833, 25342, 27954, 31168, 31179, 32066, 32333,
  8629. 32722, 33261, [12168, 33311], 33936, 34886, 35186, 35728, 36468, 36655,
  8630. 36913, 37195, 37228, 38598, 37276, 20160, 20303, 20805, [12055, 21313],
  8631. 24467, 25102, 26580, 27713, 28171, 29539, 32294, 37325, 37507, 21460,
  8632. 22809, 23487, 28113, 31069, 32302, 31899, 22654, 29087, 20986, 34899,
  8633. 36848, 20426, 23803, 26149, 30636, 31459, 33308, 39423, 20934, 24490,
  8634. 26092, 26991, 27529, 28147, 28310, 28516, 30462, 32020, 24033, 36981,
  8635. 37255, 38918, 20966, 21021, 25152, 26257, 26329, 28186, 24246, 32210,
  8636. 32626, 26360, 34223, 34295, 35576, 21161, 21465, [12069, 22899], 24207,
  8637. 24464, 24661, 37604, 38500, 20663, 20767, 21213, 21280, 21319, 21484,
  8638. 21736, 21830, 21809, 22039, 22888, 22974, 23100, 23477, 23558,
  8639. [12073, 23567], 23569, 23578, 24196, 24202, 24288, 24432, 25215, 25220,
  8640. 25307, 25484, 25463, 26119, 26124, 26157, 26230, 26494, 26786, 27167,
  8641. 27189, 27836, 28040, 28169, 28248, 28988, 28966, 29031, 30151, 30465,
  8642. 30813, 30977, 31077, 31216, 31456, 31505, 31911, 32057, 32918, 33750,
  8643. 33931, 34121, 34909, 35059, 35359, 35388, 35412, 35443, 35937, 36062,
  8644. 37284, 37478, 37758, 37912, 38556, 38808, 19978, 19976, 19998, 20055,
  8645. 20887, 21104, 22478, 22580, 22732, 23330, 24120, 24773, 25854, 26465,
  8646. 26454, 27972, 29366, 30067, 31331, 33976, 35698, 37304, 37664, 22065,
  8647. 22516, 39166, 25325, 26893, 27542, 29165, 32340, 32887, [12170, 33394],
  8648. 35302, [12215, 39135], 34645, 36785, 23611, 20280, 20449, 20405, 21767,
  8649. 23072, 23517, 23529, [12092, 24515], 24910, 25391, 26032, 26187, 26862,
  8650. 27035, 28024, 28145, 30003, 30137, 30495, 31070, 31206, 32051,
  8651. [12162, 33251], 33455, 34218, 35242, 35386, [12189, 36523], [12191, 36763],
  8652. 36914, 37341, 38663, [12040, 20154], 20161, 20995, 22645, 22764, 23563,
  8653. 29978, 23613, 33102, 35338, 36805, 38499, 38765, 31525, 35535, 38920,
  8654. 37218, 22259, 21416, 36887, 21561, 22402, 24101, 25512, [12116, 27700],
  8655. 28810, 30561, 31883, 32736, 34928, 36930, 37204, 37648, 37656, 38543,
  8656. 29790, 39620, 23815, 23913, 25968, 26530, 36264, 38619, 25454, 26441,
  8657. 26905, 33733, 38935, 38592, 35070, 28548, 25722, [12072, 23544], 19990,
  8658. 28716, 30045, 26159, 20932, 21046, 21218, 22995, 24449, 24615, 25104,
  8659. 25919, 25972, 26143, 26228, 26866, 26646, 27491, 28165, 29298,
  8660. [12131, 29983], 30427, 31934, 32854, 22768, 35069, [11972, 35199], 35488,
  8661. 35475, 35531, 36893, 37266, [11992, 38738], 38745, [12011, 25993], 31246,
  8662. 33030, 38587, 24109, 24796, 25114, 26021, 26132, 26512, [12143, 30707],
  8663. 31309, 31821, 32318, 33034, 36012, [12186, 36196], 36321, 36447, 30889,
  8664. 20999, 25305, 25509, 25666, 25240, 35373, 31363, 31680, 35500, 38634,
  8665. 32118, [12166, 33292], 34633, 20185, 20808, 21315, 21344, 23459, 23554,
  8666. 23574, 24029, 25126, 25159, 25776, 26643, 26676, 27849, 27973, 27927,
  8667. 26579, 28508, 29006, 29053, 26059, 31359, 31661, 32218, 32330, 32680,
  8668. 33146, [12167, 33307], 33337, 34214, 35438, 36046, 36341, 36984, 36983,
  8669. 37549, 37521, 38275, 39854, 21069, 21892, 28472, 28982, 20840, 31109,
  8670. 32341, 33203, 31950, 22092, 22609, 23720, 25514, 26366, 26365, 26970,
  8671. 29401, 30095, 30094, 30990, 31062, 31199, 31895, 32032, 32068, 34311,
  8672. 35380, 38459, 36961, [12239, 40736], 20711, 21109, 21452, 21474, 20489,
  8673. 21930, 22766, 22863, 29245, 23435, 23652, 21277, 24803, 24819, 25436,
  8674. 25475, 25407, 25531, 25805, 26089, 26361, 24035, 27085, 27133, 28437,
  8675. 29157, 20105, 30185, 30456, 31379, 31967, 32207, 32156, 32865, 33609,
  8676. 33624, 33900, 33980, 34299, 35013, [12187, 36208], 36865, 36973, 37783,
  8677. 38684, 39442, 20687, 22679, 24974, 33235, 34101, 36104, 36896, 20419,
  8678. 20596, 21063, 21363, 24687, 25417, 26463, 28204, [12188, 36275], 36895,
  8679. 20439, 23646, 36042, 26063, 32154, 21330, 34966, 20854, 25539, 23384,
  8680. 23403, 23562, 25613, 26449, 36956, 20182, 22810, 22826, 27760, 35409,
  8681. 21822, 22549, 22949, 24816, 25171, 26561, 33333, 26965, 38464, 39364,
  8682. 39464, 20307, 22534, 23550, 32784, 23729, 24111, 24453, 24608, 24907,
  8683. 25140, 26367, 27888, 28382, 32974, 33151, 33492, 34955, 36024, 36864,
  8684. 36910, 38538, 40667, 39899, 20195, 21488, [12068, 22823], 31532, 37261,
  8685. 38988, 40441, 28381, 28711, 21331, 21828, 23429, 25176, 25246, 25299,
  8686. 27810, 28655, 29730, 35351, 37944, 28609, 35582, 33592, 20967, 34552,
  8687. 21482, 21481, 20294, 36948, [12192, 36784], 22890, 33073, 24061, 31466,
  8688. 36799, 26842, [12181, 35895], 29432, 40008, 27197, 35504, 20025, 21336,
  8689. 22022, 22374, 25285, 25506, 26086, 27470, 28129, 28251, 28845, 30701,
  8690. 31471, 31658, 32187, 32829, 32966, 34507, 35477, 37723, 22243, 22727,
  8691. 24382, 26029, 26262, 27264, 27573, 30007, 35527, 20516, 30693, 22320,
  8692. 24347, 24677, 26234, 27744, 30196, 31258, 32622, 33268, 34584, 36933,
  8693. 39347, 31689, 30044, [12149, 31481], 31569, 33988, 36880, 31209, 31378,
  8694. 33590, 23265, 30528, 20013, 20210, 23449, 24544, 25277, 26172, 26609,
  8695. 27880, [12173, 34411], 34935, 35387, 37198, 37619, 39376, 27159, 28710,
  8696. 29482, 33511, 33879, 36015, 19969, 20806, 20939, 21899, 23541, 24086,
  8697. 24115, 24193, 24340, 24373, 24427, 24500, 25074, 25361, 26274, 26397,
  8698. 28526, 29266, 30010, 30522, 32884, 33081, 33144, 34678, 35519, 35548,
  8699. 36229, 36339, 37530, [11985, 12199, 38263], 38914, [12227, 40165], 21189,
  8700. 25431, 30452, 26389, 27784, 29645, 36035, 37806, 38515, 27941, 22684,
  8701. 26894, 27084, 36861, 37786, 30171, 36890, 22618, 26626, 25524, 27131,
  8702. 20291, 28460, 26584, 36795, 34086, 32180, 37716, 26943, 28528, 22378,
  8703. 22775, 23340, 32044, [12118, 29226], 21514, 37347, 40372, 20141, 20302,
  8704. 20572, 20597, 21059, 35998, 21576, 22564, 23450, 24093, 24213, 24237,
  8705. 24311, 24351, 24716, 25269, 25402, 25552, 26799, 27712, 30855, 31118,
  8706. 31243, 32224, 33351, 35330, 35558, 36420, 36883, 37048, 37165, 37336,
  8707. [12237, 40718], 27877, 25688, 25826, 25973, 28404, 30340, 31515, 36969,
  8708. 37841, 28346, 21746, 24505, 25764, 36685, 36845, 37444, 20856, 22635,
  8709. 22825, 23637, 24215, 28155, 32399, 29980, 36028, 36578, 39003, 28857,
  8710. 20253, 27583, 28593, [12133, 30000], 38651, 20814, 21520, 22581, 22615,
  8711. 22956, 23648, 24466, [12099, 26007], 26460, 28193, 30331, 33759, 36077,
  8712. 36884, 37117, 37709, 30757, 30778, 21162, 24230, [12063, 22303], 22900,
  8713. 24594, 20498, 20826, 20908, 20941, [12049, 20992], 21776, 22612, 22616,
  8714. 22871, 23445, 23798, 23947, 24764, 25237, 25645, 26481, 26691, 26812,
  8715. 26847, 30423, 28120, 28271, 28059, 28783, 29128, 24403, 30168, 31095,
  8716. 31561, 31572, 31570, 31958, 32113, 21040, 33891, 34153, 34276, 35342,
  8717. 35588, [12182, 35910], 36367, 36867, 36879, 37913, 38518, 38957, 39472,
  8718. 38360, 20685, 21205, 21516, 22530, 23566, 24999, 25758, 27934, 30643,
  8719. 31461, 33012, 33796, 36947, 37509, 23776, 40199, 21311, 24471, 24499,
  8720. 28060, 29305, 30563, 31167, 31716, 27602, 29420, 35501, 26627, 27233,
  8721. 20984, 31361, 26932, 23626, 40182, 33515, 23493, [12195, 37193], 28702,
  8722. 22136, 23663, 24775, 25958, 27788, 35930, 36929, 38931, 21585, 26311,
  8723. 37389, 22856, 37027, 20869, 20045, 20970, 34201, 35598, 28760, 25466,
  8724. 37707, 26978, 39348, 32260, 30071, 21335, 26976, 36575, 38627, 27741,
  8725. [12038, 20108], 23612, 24336, 36841, 21250, 36049, [12161, 32905], 34425,
  8726. 24319, [12103, 26085], 20083, [12042, 20837], 22914, 23615, 38894, 20219,
  8727. 22922, 24525, 35469, 28641, 31152, 31074, 23527, 33905, 29483, 29105,
  8728. 24180, 24565, 25467, 25754, 29123, 31896, 20035, 24316, 20043, 22492,
  8729. 22178, 24745, 28611, 32013, 33021, 33075, 33215, 36786, 35223, 34468,
  8730. 24052, 25226, 25773, 35207, 26487, 27874, 27966, 29750, 30772, 23110,
  8731. 32629, 33453, [12218, 39340], 20467, 24259, 25309, 25490, 25943, 26479,
  8732. 30403, 29260, 32972, 32954, 36649, 37197, 20493, 22521, 23186, 26757,
  8733. 26995, 29028, 29437, 36023, 22770, 36064, 38506, 36889, 34687, 31204,
  8734. 30695, 33833, 20271, 21093, 21338, 25293, 26575, 27850, [12137, 30333],
  8735. 31636, 31893, 33334, 34180, 36843, 26333, 28448, 29190, 32283, 33707,
  8736. 39361, [12008, 40614], 20989, 31665, 30834, 31672, 32903, 31560, 27368,
  8737. 24161, 32908, 30033, 30048, [12043, 20843], 37474, 28300, 30330, 37271,
  8738. 39658, 20240, 32624, 25244, 31567, 38309, 40169, 22138, 22617, 34532,
  8739. 38588, 20276, 21028, 21322, 21453, 21467, 24070, 25644, 26001, 26495,
  8740. 27710, 27726, 29256, 29359, 29677, 30036, 32321, 33324, 34281, 36009,
  8741. 31684, [12196, 37318], 29033, 38930, 39151, 25405, 26217, 30058, 30436,
  8742. 30928, 34115, 34542, 21290, 21329, 21542, 22915, 24199, 24444, 24754,
  8743. 25161, 25209, 25259, 26000, [12112, 27604], 27852, 30130, [12138, 30382],
  8744. 30865, 31192, 32203, 32631, 32933, 34987, 35513, 36027, 36991,
  8745. [12206, 38750], [12214, 39131], 27147, 31800, 20633, 23614, 24494, 26503,
  8746. 27608, 29749, 30473, 32654, [12240, 40763], 26570, 31255, 21305,
  8747. [12134, 30091], 39661, 24422, 33181, 33777, 32920, 24380, 24517, 30050,
  8748. 31558, 36924, 26727, 23019, 23195, 32016, 30334, 35628, 20469, 24426,
  8749. 27161, 27703, 28418, 29922, 31080, 34920, 35413, 35961, 24287, 25551,
  8750. 30149, 31186, 33495, 37672, 37618, 33948, 34541, 39981, 21697, 24428,
  8751. 25996, 27996, 28693, 36007, 36051, 38971, 25935, 29942, 19981, 20184,
  8752. 22496, 22827, 23142, 23500, 20904, 24067, 24220, 24598, 25206, 25975,
  8753. 26023, 26222, 28014, [12119, 29238], 31526, 33104, 33178, 33433, 35676,
  8754. 36000, 36070, 36212, [12201, 38428], 38468, 20398, 25771, 27494, 33310,
  8755. 33889, 34154, 37096, 23553, 26963, [12213, 39080], 33914, 34135, 20239,
  8756. 21103, 24489, 24133, 26381, 31119, 33145, 35079, 35206, 28149, 24343,
  8757. 25173, 27832, 20175, 29289, 39826, 20998, 21563, 22132, 22707, 24996,
  8758. 25198, 28954, 22894, 31881, 31966, 32027, 38640, [12098, 25991], 32862,
  8759. 19993, 20341, 20853, 22592, 24163, 24179, 24330, 26564, 20006, 34109,
  8760. 38281, 38491, [12150, 31859], [12212, 38913], 20731, 22721, 30294, 30887,
  8761. 21029, 30629, 34065, 31622, 20559, 22793, [12122, 29255], 31687, 32232,
  8762. 36794, 36820, 36941, 20415, 21193, 23081, 24321, 38829, 20445, 33303,
  8763. 37610, 22275, 25429, 27497, 29995, 35036, 36628, 31298, 21215, 22675,
  8764. 24917, 25098, 26286, [11935, 27597], 31807, 33769, 20515, 20472, 21253,
  8765. 21574, 22577, 22857, 23453, 23792, 23791, 23849, 24214, 25265, 25447,
  8766. 25918, [12101, 26041], 26379, 27861, 27873, 28921, 30770, 32299, 32990,
  8767. 33459, 33804, 34028, 34562, 35090, 35370, 35914, 37030, 37586, 39165,
  8768. 40179, 40300, 20047, 20129, 20621, 21078, 22346, 22952, 24125,
  8769. {f: 2, c: 24536}, 25151, 26292, 26395, 26576, 26834, 20882, 32033, 32938,
  8770. 33192, 35584, 35980, 36031, 37502, 38450, 21536, 38956, 21271, 20693,
  8771. [12056, 21340], 22696, 25778, 26420, 29287, 30566, 31302, 37350, 21187,
  8772. 27809, 27526, 22528, 24140, 22868, 26412, 32763, 20961, 30406, 25705,
  8773. 30952, 39764, [12231, 40635], 22475, 22969, 26151, 26522, 27598, 21737,
  8774. 27097, 24149, 33180, 26517, 39850, 26622, 40018, 26717, 20134, 20451,
  8775. [12060, 21448], 25273, 26411, 27819, 36804, 20397, 32365, 40639, 19975,
  8776. 24930, 28288, 28459, 34067, 21619, 26410, 39749, [11922, 24051], 31637,
  8777. 23724, 23494, 34588, 28234, 34001, 31252, 33032, 22937, 31885,
  8778. [11936, 27665], 30496, 21209, 22818, 28961, 29279, [12141, 30683], 38695,
  8779. 40289, 26891, 23167, 23064, 20901, 21517, 21629, 26126, 30431, 36855,
  8780. 37528, 40180, 23018, 29277, 28357, 20813, 26825, 32191, 32236,
  8781. [12207, 38754], 40634, 25720, 27169, 33538, 22916, 23391, [12113, 27611],
  8782. 29467, 30450, 32178, 32791, 33945, 20786, [12106, 26408], 40665,
  8783. [12140, 30446], 26466, 21247, 39173, 23588, 25147, 31870, 36016, 21839,
  8784. 24758, 32011, [12200, 38272], 21249, 20063, 20918, 22812, 29242, 32822,
  8785. 37326, 24357, [12142, 30690], 21380, 24441, 32004, 34220, 35379, 36493,
  8786. 38742, 26611, 34222, 37971, 24841, 24840, 27833, 30290, 35565, 36664,
  8787. 21807, 20305, 20778, 21191, 21451, 23461, 24189, 24736, 24962, 25558,
  8788. 26377, 26586, 28263, 28044, {f: 2, c: 29494}, 30001, 31056, 35029, 35480,
  8789. 36938, [12194, 37009], 37109, 38596, 34701, [12067, 22805], 20104, 20313,
  8790. 19982, 35465, 36671, 38928, 20653, 24188, 22934, 23481, 24248, 25562,
  8791. 25594, 25793, 26332, 26954, 27096, 27915, 28342, 29076, [12132, 29992],
  8792. 31407, [12154, 32650], 32768, 33865, 33993, 35201, 35617, 36362, 36965,
  8793. 38525, 39178, 24958, 25233, 27442, 27779, 28020, 32716, 32764, 28096,
  8794. 32645, 34746, 35064, 26469, 33713, 38972, 38647, 27931, 32097, 33853,
  8795. 37226, 20081, 21365, 23888, 27396, 28651, 34253, 34349, 35239, 21033,
  8796. 21519, 23653, 26446, 26792, 29702, 29827, 30178, 35023, 35041,
  8797. [12197, 37324], 38626, 38520, 24459, 29575, [12148, 31435], 33870, 25504,
  8798. 30053, 21129, 27969, 28316, 29705, 30041, 30827, 31890, 38534,
  8799. [12015, 31452], [12243, 40845], 20406, 24942, 26053, 34396, 20102, 20142,
  8800. 20698, 20001, 20940, 23534, 26009, 26753, 28092, 29471, 30274, 30637,
  8801. 31260, 31975, 33391, 35538, 36988, 37327, 38517, 38936, [12050, 21147],
  8802. 32209, 20523, 21400, 26519, 28107, 29136, 29747, 33256, 36650, 38563,
  8803. 40023, 40607, 29792, 22593, 28057, 32047, 39006, 20196, 20278, 20363,
  8804. 20919, 21169, 23994, 24604, 29618, 31036, 33491, 37428, 38583, 38646,
  8805. 38666, 40599, 40802, 26278, 27508, 21015, 21155, 28872, 35010, 24265,
  8806. 24651, 24976, 28451, 29001, 31806, 32244, 32879, 34030, 36899, 37676,
  8807. 21570, 39791, 27347, 28809, 36034, 36335, 38706, 21172, 23105, 24266,
  8808. 24324, 26391, 27004, 27028, 28010, 28431, 29282, 29436, 31725,
  8809. [12156, 32769], 32894, 34635, 37070, 20845, 40595, 31108, 32907, 37682,
  8810. 35542, 20525, 21644, 35441, 27498, 36036, 33031, 24785, 26528, 40434,
  8811. 20121, 20120, 39952, 35435, 34241, 34152, 26880, 28286, 30871, 33109,
  8812. 24332, 19984, 19989, 20010, 20017, [12034, 20022], 20028, [12035, 20031],
  8813. 20034, 20054, 20056, 20098, [12037, 20101], 35947, 20106, 33298, 24333,
  8814. 20110, {f: 2, c: 20126}, [12039, 20128], 20130, 20144, 20147, 20150, 20174,
  8815. 20173, 20164, 20166, 20162, 20183, 20190, 20205, 20191, 20215, 20233,
  8816. 20314, 20272, 20315, 20317, 20311, 20295, 20342, 20360, 20367, 20376,
  8817. 20347, 20329, 20336, 20369, 20335, 20358, 20374, 20760, 20436, 20447,
  8818. 20430, 20440, 20443, 20433, 20442, 20432, {f: 2, c: 20452}, 20506, 20520,
  8819. 20500, 20522, 20517, 20485, 20252, 20470, 20513, 20521, 20524, 20478,
  8820. 20463, 20497, 20486, 20547, 20551, 26371, 20565, 20560, 20552, 20570,
  8821. 20566, 20588, 20600, 20608, 20634, 20613, 20660, 20658, {f: 2, c: 20681},
  8822. 20659, 20674, 20694, 20702, 20709, 20717, 20707, 20718, 20729, 20725,
  8823. 20745, {f: 2, c: 20737}, 20758, 20757, 20756, 20762, 20769, 20794, 20791,
  8824. 20796, 20795, [12041, 20799], [11918, 20800], 20818, 20812, 20820, 20834,
  8825. 31480, {f: 2, c: 20841}, 20846, 20864, [12044, 20866], 22232, 20876, 20873,
  8826. 20879, 20881, 20883, 20885, [12045, 20886], 20900, 20902, 20898,
  8827. {f: 2, c: 20905}, [12046, 20907], 20915, {f: 2, c: 20913}, 20912, 20917,
  8828. 20925, 20933, 20937, 20955, [12047, 20960], 34389, 20969, 20973, 20976,
  8829. [12048, 20981], 20990, 20996, 21003, 21012, 21006, 21031, 21034, 21038,
  8830. 21043, 21049, 21071, 21060, {f: 2, c: 21067}, 21086, 21076, 21098, 21108,
  8831. 21097, 21107, 21119, 21117, 21133, 21140, 21138, 21105, 21128, 21137,
  8832. 36776, 36775, {f: 2, c: 21164}, 21180, 21173, 21185, 21197, 21207, 21214,
  8833. 21219, 21222, 39149, 21216, 21235, 21237, 21240, [12051, 21241], 21254,
  8834. 21256, 30008, 21261, 21264, 21263, [12052, 21269], [12053, 21274], 21283,
  8835. 21295, 21297, 21299, [12054, 21304], 21312, 21318, 21317, 19991, 21321,
  8836. 21325, 20950, 21342, [12057, 21353], 21358, 22808, 21371, 21367,
  8837. [12058, 21378], 21398, 21408, 21414, 21413, 21422, 21424, [12059, 21430],
  8838. 21443, 31762, 38617, 21471, 26364, 29166, 21486, 21480, 21485, 21498,
  8839. 21505, 21565, 21568, {f: 2, c: 21548}, 21564, 21550, 21558, 21545, 21533,
  8840. 21582, 21647, 21621, 21646, 21599, 21617, 21623, 21616, 21650, 21627,
  8841. 21632, 21622, 21636, 21648, 21638, 21703, 21666, 21688, 21669, 21676,
  8842. 21700, 21704, 21672, 21675, 21698, 21668, 21694, 21692, 21720,
  8843. {f: 2, c: 21733}, 21775, 21780, 21757, 21742, 21741, 21754, 21730, 21817,
  8844. 21824, 21859, 21836, 21806, 21852, 21829, {f: 2, c: 21846}, 21816, 21811,
  8845. 21853, 21913, 21888, 21679, 21898, 21919, 21883, 21886, 21912, 21918,
  8846. 21934, 21884, 21891, 21929, 21895, 21928, 21978, 21957, 21983, 21956,
  8847. 21980, 21988, 21972, 22036, 22007, 22038, 22014, 22013, 22043, 22009,
  8848. 22094, 22096, 29151, 22068, 22070, 22066, 22072, 22123, 22116, 22063,
  8849. 22124, 22122, 22150, 22144, 22154, 22176, 22164, 22159, 22181, 22190,
  8850. 22198, 22196, 22210, 22204, 22209, 22211, 22208, 22216, 22222, 22225,
  8851. 22227, [12062, 22231], 22254, 22265, 22272, 22271, 22276, 22281, 22280,
  8852. 22283, 22285, 22291, 22296, 22294, 21959, 22300, 22310, {f: 2, c: 22327},
  8853. 22350, 22331, 22336, 22351, 22377, 22464, 22408, 22369, 22399, 22409,
  8854. 22419, 22432, 22451, 22436, 22442, 22448, 22467, 22470, 22484,
  8855. {f: 2, c: 22482}, 22538, 22486, 22499, 22539, 22553, 22557, 22642, 22561,
  8856. 22626, 22603, 22640, 27584, 22610, 22589, 22649, 22661, 22713, 22687,
  8857. 22699, 22714, 22750, 22715, 22712, 22702, 22725, 22739, 22737, 22743,
  8858. 22745, 22744, 22757, 22748, 22756, 22751, 22767, 22778, 22777,
  8859. {f: 3, c: 22779}, [12065, 22786], [12066, 22794], 22800, 22811, 26790,
  8860. 22821, {f: 2, c: 22828}, 22834, 22840, 22846, 31442, 22869, 22864, 22862,
  8861. 22874, 22872, 22882, 22880, 22887, 22892, 22889, 22904, 22913, 22941,
  8862. 20318, 20395, 22947, 22962, 22982, 23016, 23004, 22925, {f: 2, c: 23001},
  8863. 23077, 23071, 23057, 23068, 23049, 23066, 23104, 23148, 23113,
  8864. {f: 2, c: 23093}, 23138, 23146, 23194, 23228, 23230, 23243, 23234, 23229,
  8865. 23267, 23255, 23270, 23273, 23254, {f: 2, c: 23290}, 23308, 23307, 23318,
  8866. 23346, 23248, 23338, 23350, 23358, 23363, 23365, 23360, 23377, 23381,
  8867. {f: 2, c: 23386}, 23397, 23401, 23408, 23411, 23413, 23416, 25992, 23418,
  8868. [12071, 23424], 23427, 23462, 23480, 23491, 23495, 23497, 23508, 23504,
  8869. 23524, 23526, 23522, 23518, 23525, 23531, 23536, 23542, 23539, 23557,
  8870. {f: 2, c: 23559}, 23565, 23571, 23584, [11920, 12074, 23586], 23592,
  8871. [12075, 23608], 23609, 23617, 23622, 23630, 23635, 23632, 23631, 23409,
  8872. 23660, [12076, 23662], 20066, 23670, 23673, 23692, 23697, 23700, 22939,
  8873. 23723, 23739, 23734, 23740, 23735, 23749, 23742, 23751, 23769, 23785,
  8874. 23805, 23802, 23789, 23948, 23786, 23819, 23829, 23831, 23900, 23839,
  8875. 23835, 23825, 23828, 23842, 23834, 23833, 23832, 23884, 23890, 23886,
  8876. 23883, 23916, 23923, 23926, 23943, 23940, 23938, 23970, 23965, 23980,
  8877. 23982, 23997, 23952, 23991, 23996, 24009, 24013, 24019, 24018, 24022,
  8878. [12078, 24027], 24043, 24050, 24053, 24075, 24090, 24089, 24081, 24091,
  8879. {f: 2, c: 24118}, 24132, 24131, 24128, 24142, 24151, 24148, 24159, 24162,
  8880. 24164, 24135, {f: 2, c: 24181}, [11923, 12083, 24186], 40636,
  8881. [12084, 24191], 24224, {f: 2, c: 24257}, 24264, 24272, 24271, 24278, 24291,
  8882. 24285, {f: 2, c: 24282}, 24290, 24289, {f: 2, c: 24296}, 24300, 24305,
  8883. 24307, 24304, [12085, 24308], 24312, [12086, 24318], 24323, 24329, 24413,
  8884. 24412, [12087, 24331], 24337, 24342, 24361, 24365, 24376, 24385, 24392,
  8885. 24396, 24398, 24367, [11924, 24401], {f: 2, c: 24406}, 24409,
  8886. [12090, 24417], 24429, [12091, 24435], 24439, 24451, 24450, 24447, 24458,
  8887. 24456, 24465, 24455, 24478, 24473, 24472, 24480, 24488, 24493, 24508,
  8888. 24534, 24571, 24548, 24568, 24561, 24541, 24755, 24575, 24609, 24672,
  8889. 24601, 24592, 24617, 24590, 24625, 24603, 24597, 24619, 24614, 24591,
  8890. 24634, 24666, 24641, 24682, 24695, 24671, 24650, 24646, 24653, 24675,
  8891. 24643, 24676, 24642, 24684, 24683, 24665, 24705, 24717, 24807, 24707,
  8892. 24730, 24708, 24731, {f: 2, c: 24726}, 24722, 24743, 24715, 24801, 24760,
  8893. 24800, 24787, 24756, 24560, 24765, 24774, 24757, 24792, 24909, 24853,
  8894. 24838, {f: 2, c: 24822}, 24832, 24820, 24826, 24835, 24865, 24827, 24817,
  8895. {f: 2, c: 24845}, 24903, 24894, 24872, 24871, 24906, 24895, 24892, 24876,
  8896. 24884, 24893, 24898, 24900, 24947, 24951, {f: 3, c: 24920}, 24939, 24948,
  8897. 24943, 24933, 24945, 24927, 24925, 24915, 24949, 24985, 24982, 24967,
  8898. 25004, 24980, 24986, 24970, 24977, 25003, 25006, 25036, 25034, 25033,
  8899. 25079, 25032, 25027, 25030, 25018, 25035, 32633, 25037, 25062, 25059,
  8900. 25078, 25082, 25076, 25087, 25085, 25084, 25086, 25088, [12093, 25096],
  8901. 25097, 25101, 25100, 25108, 25115, 25118, 25121, 25130, 25134, 25136,
  8902. {f: 2, c: 25138}, 25153, 25166, 25182, 25187, 25179, 25184, 25192, 25212,
  8903. 25218, 25225, 25214, {f: 2, c: 25234}, 25238, 25300, 25219, 25236, 25303,
  8904. 25297, 25275, 25295, 25343, 25286, 25812, 25288, 25308, 25292, 25290,
  8905. 25282, 25287, 25243, 25289, 25356, 25326, 25329, 25383, 25346, 25352,
  8906. 25327, 25333, 25424, 25406, 25421, 25628, 25423, 25494, 25486, 25472,
  8907. 25515, 25462, 25507, 25487, 25481, 25503, 25525, 25451, 25449, 25534,
  8908. 25577, 25536, 25542, 25571, 25545, 25554, 25590, 25540, 25622, 25652,
  8909. 25606, 25619, 25638, 25654, 25885, 25623, 25640, 25615, 25703, 25711,
  8910. 25718, 25678, 25898, 25749, 25747, 25765, 25769, 25736, 25788, 25818,
  8911. 25810, 25797, 25799, 25787, 25816, 25794, 25841, 25831, 33289,
  8912. {f: 2, c: 25824}, 25260, 25827, 25839, 25900, 25846, 25844, 25842, 25850,
  8913. 25856, 25853, 25880, 25884, 25861, 25892, 25891, 25899, [12097, 25908],
  8914. [11929, 25909], 25911, 25910, 25912, 30027, 25928, 25942, 25941, 25933,
  8915. 25944, 25950, 25949, 25970, 25976, {f: 2, c: 25986}, 35722, 26011, 26015,
  8916. 26027, 26039, 26051, 26054, 26049, 26052, 26060, 26066, 26075, 26073,
  8917. [12102, 26080], [11931, 26081], 26097, 26482, 26122, 26115, 26107, 26483,
  8918. {f: 2, c: 26165}, 26164, 26140, 26191, 26180, 26185, 26177, 26206, 26205,
  8919. 26212, {f: 2, c: 26215}, 26207, 26210, 26224, 26243, 26248, 26254, 26249,
  8920. 26244, 26264, 26269, 26305, 26297, 26313, 26302, 26300, 26308, 26296,
  8921. 26326, 26330, 26336, 26175, 26342, 26345, [12104, 26352], 26357, 26359,
  8922. 26383, 26390, 26398, {f: 2, c: 26406}, 38712, 26414, 26431, 26422, 26433,
  8923. 26424, 26423, 26438, 26462, 26464, 26457, {f: 2, c: 26467}, 26505, 26480,
  8924. 26537, 26492, 26474, 26508, 26507, 26534, 26529, 26501, 26551, 26607,
  8925. 26548, 26604, 26547, 26601, 26552, 26596, 26590, 26589, 26594, 26606,
  8926. 26553, 26574, 26566, 26599, 27292, 26654, 26694, 26665, 26688, 26701,
  8927. 26674, 26702, 26803, 26667, 26713, 26723, 26743, 26751, 26783, 26767,
  8928. 26797, 26772, 26781, 26779, 26755, 27310, 26809, 26740, 26805, 26784,
  8929. 26810, 26895, 26765, 26750, 26881, 26826, 26888, 26840, 26914, 26918,
  8930. 26849, 26892, 26829, 26836, 26855, 26837, 26934, 26898, 26884, 26839,
  8931. 26851, 26917, 26873, 26848, 26863, 26920, 26922, 26906, 26915, 26913,
  8932. 26822, 27001, 26999, 26972, 27000, 26987, 26964, 27006, 26990, 26937,
  8933. 26996, 26941, 26969, 26928, 26977, 26974, 26973, 27009, 26986, 27058,
  8934. 27054, 27088, 27071, 27073, 27091, 27070, 27086, 23528, 27082, 27101,
  8935. 27067, 27075, 27047, 27182, 27025, 27040, 27036, 27029, 27060, 27102,
  8936. 27112, 27138, 27163, 27135, 27402, 27129, 27122, 27111, 27141, 27057,
  8937. 27166, 27117, 27156, 27115, 27146, 27154, 27329, 27171, 27155, 27204,
  8938. 27148, 27250, 27190, 27256, 27207, 27234, 27225, 27238, 27208, 27192,
  8939. 27170, 27280, 27277, 27296, 27268, {f: 2, c: 27298}, 27287, 34327, 27323,
  8940. 27331, 27330, 27320, 27315, 27308, 27358, 27345, 27359, 27306, 27354,
  8941. 27370, 27387, 27397, 34326, 27386, 27410, 27414, 39729, 27423, 27448,
  8942. 27447, 30428, 27449, 39150, 27463, 27459, 27465, 27472, 27481, 27476,
  8943. 27483, 27487, 27489, 27512, [12109, 27513], {f: 2, c: 27519}, 27524, 27523,
  8944. 27533, 27544, 27541, 27550, 27556, {f: 2, c: 27562}, 27567, 27570, 27569,
  8945. [12110, 27571], 27575, 27580, 27590, [12111, 27595], 27603, 27615, 27628,
  8946. 27627, 27635, 27631, 40638, 27656, 27667, [12115, 27668], 27675, 27684,
  8947. 27683, 27742, 27733, 27746, 27754, 27778, 27789, 27802, 27777, 27803,
  8948. 27774, 27752, 27763, 27794, 27792, 27844, 27889, 27859, 27837, 27863,
  8949. 27845, 27869, 27822, 27825, 27838, 27834, 27867, 27887, 27865, 27882,
  8950. 27935, 34893, 27958, 27947, 27965, 27960, 27929, 27957, 27955, 27922,
  8951. 27916, 28003, 28051, 28004, 27994, 28025, 27993, 28046, 28053, 28644,
  8952. 28037, 28153, 28181, 28170, 28085, 28103, 28134, 28088, 28102, 28140,
  8953. 28126, 28108, 28136, 28114, 28101, 28154, 28121, 28132, 28117, 28138,
  8954. 28142, 28205, 28270, 28206, 28185, 28274, 28255, 28222, 28195, 28267,
  8955. 28203, 28278, 28237, 28191, 28227, 28218, 28238, 28196, 28415, 28189,
  8956. 28216, 28290, 28330, 28312, 28361, 28343, 28371, 28349, 28335, 28356,
  8957. 28338, {f: 2, c: 28372}, 28303, 28325, 28354, 28319, 28481, 28433, 28748,
  8958. 28396, 28408, 28414, 28479, 28402, 28465, 28399, 28466, 28364, 28478,
  8959. 28435, 28407, 28550, 28538, 28536, 28545, 28544, 28527, 28507, 28659,
  8960. 28525, 28546, 28540, 28504, 28558, 28561, 28610, 28518, 28595, 28579,
  8961. 28577, 28580, 28601, 28614, 28586, 28639, 28629, 28652, 28628, 28632,
  8962. 28657, 28654, 28635, 28681, 28683, 28666, 28689, 28673, 28687, 28670,
  8963. 28699, 28698, 28532, 28701, 28696, 28703, 28720, 28734, 28722, 28753,
  8964. 28771, 28825, 28818, 28847, 28913, 28844, 28856, 28851, 28846, 28895,
  8965. 28875, 28893, 28889, 28937, 28925, 28956, 28953, 29029, 29013, 29064,
  8966. 29030, 29026, 29004, 29014, 29036, 29071, 29179, 29060, 29077, 29096,
  8967. 29100, 29143, 29113, 29118, 29138, 29129, 29140, 29134, 29152, 29164,
  8968. 29159, 29173, 29180, 29177, 29183, 29197, 29200, 29211, 29224, 29229,
  8969. 29228, 29232, 29234, [12120, 29243], 29244, [12121, 29247], 29248, 29254,
  8970. 29259, 29272, 29300, 29310, 29314, 29313, 29319, 29330, 29334, 29346,
  8971. 29351, 29369, 29362, 29379, 29382, 29380, 29390, 29394, 29410,
  8972. {f: 2, c: 29408}, 29433, 29431, 20495, 29463, 29450, 29468, 29462, 29469,
  8973. 29492, 29487, 29481, 29477, 29502, {f: 2, c: 29518}, 40664, 29527, 29546,
  8974. 29544, 29552, 29560, 29557, 29563, 29562, 29640, 29619, 29646, 29627,
  8975. 29632, 29669, 29678, 29662, 29858, 29701, 29807, 29733, 29688, 29746,
  8976. 29754, 29781, 29759, 29791, 29785, 29761, 29788, 29801, 29808, 29795,
  8977. 29802, 29814, 29822, 29835, 29854, 29863, 29898, 29903, 29908, 29681,
  8978. 29920, 29923, 29927, 29929, 29934, 29938, {f: 2, c: 29936}, 29944, 29943,
  8979. 29956, 29955, 29957, 29964, 29966, 29965, 29973, 29971, 29982, 29990,
  8980. 29996, 30012, 30020, 30029, 30026, 30025, 30043, 30022, 30042, 30057,
  8981. 30052, 30055, 30059, 30061, 30072, 30070, {f: 2, c: 30086}, 30068, 30090,
  8982. 30089, 30082, 30100, 30106, 30109, 30117, 30115, 30146, 30131, 30147,
  8983. 30133, 30141, 30136, 30140, 30129, 30157, 30154, 30162, 30169, 30179,
  8984. 30174, {f: 2, c: 30206}, 30204, 30209, 30192, 30202, {f: 2, c: 30194},
  8985. 30219, 30221, 30217, 30239, 30247, {f: 3, c: 30240}, 30244, 30260, 30256,
  8986. 30267, {f: 2, c: 30279}, 30278, 30300, 30296, {f: 2, c: 30305},
  8987. {f: 3, c: 30312}, 30311, 30316, 30320, 30322, [12136, 30326], 30328, 30332,
  8988. 30336, 30339, 30344, 30347, 30350, 30358, 30355, {f: 2, c: 30361}, 30384,
  8989. 30388, {f: 3, c: 30392}, 30402, 30413, 30422, 30418, 30430, 30433, 30437,
  8990. 30439, 30442, 34351, 30459, 30472, 30471, 30468, 30505, 30500, 30494,
  8991. {f: 2, c: 30501}, 30491, {f: 2, c: 30519}, 30535, 30554, 30568, 30571,
  8992. 30555, 30565, 30591, 30590, 30585, 30606, 30603, 30609, 30624, 30622,
  8993. 30640, 30646, 30649, 30655, {f: 2, c: 30652}, 30651, 30663, 30669, 30679,
  8994. 30682, 30684, 30691, 30702, 30716, 30732, 30738, 31014, 30752, 31018,
  8995. 30789, 30862, 30836, 30854, 30844, 30874, 30860, 30883, 30901, 30890,
  8996. 30895, 30929, 30918, 30923, 30932, 30910, 30908, 30917, 30922, 30956,
  8997. 30951, 30938, 30973, 30964, 30983, 30994, 30993, 31001, 31020, 31019,
  8998. 31040, 31072, 31063, 31071, 31066, 31061, 31059, 31098, 31103, 31114,
  8999. 31133, 31143, 40779, 31146, 31150, 31155, {f: 2, c: 31161}, 31177, 31189,
  9000. 31207, 31212, 31201, 31203, 31240, 31245, {f: 2, c: 31256}, 31264, 31263,
  9001. 31104, 31281, 31291, 31294, 31287, 31299, 31319, 31305, {f: 2, c: 31329},
  9002. 31337, 40861, 31344, 31353, 31357, 31368, 31383, 31381, 31384, 31382,
  9003. 31401, 31432, 31408, 31414, 31429, 31428, 31423, 36995, 31431, 31434,
  9004. 31437, 31439, 31445, 31443, {f: 2, c: 31449}, 31453, {f: 2, c: 31457},
  9005. 31462, 31469, 31472, 31490, 31503, 31498, 31494, 31539, {f: 2, c: 31512},
  9006. 31518, 31541, 31528, 31542, 31568, 31610, 31492, 31565, 31499, 31564,
  9007. 31557, 31605, 31589, 31604, 31591, {f: 2, c: 31600}, 31596, 31598, 31645,
  9008. 31640, 31647, 31629, 31644, 31642, 31627, 31634, 31631, 31581, 31641,
  9009. 31691, 31681, 31692, 31695, 31668, 31686, 31709, 31721, 31761, 31764,
  9010. 31718, 31717, 31840, 31744, 31751, 31763, 31731, 31735, 31767, 31757,
  9011. 31734, 31779, 31783, 31786, 31775, 31799, 31787, 31805, 31820, 31811,
  9012. 31828, 31823, 31808, 31824, 31832, 31839, 31844, 31830, 31845, 31852,
  9013. 31861, 31875, 31888, 31908, 31917, 31906, 31915, 31905, 31912, 31923,
  9014. 31922, 31921, 31918, 31929, 31933, 31936, 31941, 31938, 31960, 31954,
  9015. 31964, 31970, 39739, 31983, 31986, 31988, 31990, 31994, 32006, 32002,
  9016. 32028, 32021, 32010, 32069, 32075, 32046, 32050, 32063, 32053, 32070,
  9017. 32115, 32086, 32078, 32114, 32104, 32110, 32079, 32099, 32147, 32137,
  9018. 32091, 32143, 32125, 32155, 32186, 32174, 32163, 32181, 32199, 32189,
  9019. 32171, 32317, 32162, 32175, 32220, 32184, 32159, 32176, 32216, 32221,
  9020. 32228, 32222, 32251, 32242, 32225, 32261, 32266, 32291, 32289, 32274,
  9021. 32305, 32287, 32265, 32267, 32290, 32326, 32358, 32315, 32309, 32313,
  9022. 32323, 32311, 32306, 32314, 32359, 32349, 32342, 32350, {f: 2, c: 32345},
  9023. 32377, 32362, 32361, 32380, 32379, 32387, 32213, 32381, 36782, 32383,
  9024. {f: 2, c: 32392}, 32396, 32402, 32400, {f: 2, c: 32403}, 32406, 32398,
  9025. {f: 2, c: 32411}, 32568, 32570, 32581, {f: 3, c: 32588}, 32592,
  9026. [12153, 32593], 32597, 32596, 32600, {f: 2, c: 32607}, {f: 2, c: 32616},
  9027. 32615, 32632, 32642, 32646, 32643, 32648, 32647, 32652, 32660, 32670,
  9028. 32669, 32666, 32675, 32687, 32690, 32697, 32686, 32694, 32696, 35697,
  9029. {f: 2, c: 32709}, 32714, 32725, 32724, 32737, 32742, 32745, 32755, 32761,
  9030. 39132, 32774, 32772, 32779, [12158, 32786], {f: 2, c: 32792}, 32796, 32801,
  9031. 32808, 32831, 32827, 32842, 32838, 32850, 32856, 32858, 32863, 32866,
  9032. 32872, 32883, 32882, 32880, 32886, 32889, 32893, [12160, 32895], 32900,
  9033. 32902, 32901, 32923, 32915, 32922, 32941, 20880, 32940, 32987, 32997,
  9034. 32985, 32989, 32964, 32986, 32982, 33033, 33007, 33009, 33051, 33065,
  9035. 33059, 33071, 33099, 38539, 33094, 33086, 33107, 33105, 33020, 33137,
  9036. 33134, {f: 2, c: 33125}, 33140, 33155, 33160, 33162, 33152, 33154, 33184,
  9037. 33173, 33188, 33187, 33119, 33171, 33193, 33200, 33205, 33214, 33208,
  9038. 33213, 33216, 33218, 33210, 33225, 33229, 33233, 33241, 33240, 33224,
  9039. 33242, {f: 2, c: 33247}, 33255, {f: 2, c: 33274}, 33278, {f: 2, c: 33281},
  9040. 33285, 33287, 33290, 33293, 33296, 33302, 33321, 33323, 33336, 33331,
  9041. 33344, 33369, 33368, 33373, 33370, 33375, 33380, 33378, 33384,
  9042. {f: 2, c: 33386}, 33326, 33393, 33399, [12171, 33400], 33406, 33421, 33426,
  9043. 33451, 33439, 33467, 33452, 33505, 33507, 33503, 33490, 33524, 33523,
  9044. 33530, 33683, 33539, 33531, 33529, 33502, 33542, 33500, 33545, 33497,
  9045. 33589, 33588, 33558, 33586, 33585, 33600, 33593, 33616, 33605, 33583,
  9046. 33579, {f: 2, c: 33559}, 33669, 33690, 33706, 33695, 33698, 33686, 33571,
  9047. 33678, 33671, 33674, 33660, 33717, 33651, 33653, 33696, 33673, 33704,
  9048. 33780, 33811, 33771, 33742, 33789, 33795, 33752, 33803, 33729, 33783,
  9049. 33799, 33760, 33778, 33805, 33826, 33824, 33725, 33848, 34054, 33787,
  9050. 33901, 33834, 33852, 34138, 33924, 33911, 33899, 33965, 33902, 33922,
  9051. 33897, 33862, 33836, 33903, 33913, 33845, 33994, 33890, 33977, 33983,
  9052. 33951, 34009, 33997, 33979, 34010, 34000, 33985, 33990, 34006, 33953,
  9053. 34081, 34047, 34036, {f: 2, c: 34071}, 34092, 34079, 34069, 34068, 34044,
  9054. 34112, 34147, 34136, 34120, 34113, 34306, 34123, 34133, 34176, 34212,
  9055. 34184, 34193, 34186, 34216, 34157, 34196, 34203, 34282, 34183, 34204,
  9056. 34167, 34174, 34192, 34249, 34234, 34255, 34233, 34256, 34261, 34269,
  9057. 34277, 34268, 34297, 34314, 34323, 34315, 34302, 34298, 34310, 34338,
  9058. 34330, 34352, 34367, [12172, 34381], 20053, 34388, 34399, 34407, 34417,
  9059. 34451, 34467, {f: 2, c: 34473}, {f: 2, c: 34443}, 34486, 34479, 34500,
  9060. 34502, 34480, 34505, 34851, 34475, 34516, 34526, 34537, 34540, 34527,
  9061. 34523, 34543, 34578, 34566, 34568, 34560, 34563, 34555, 34577, 34569,
  9062. 34573, 34553, 34570, 34612, 34623, 34615, 34619, 34597, 34601, 34586,
  9063. 34656, 34655, 34680, 34636, 34638, 34676, 34647, 34664, 34670, 34649,
  9064. 34643, 34659, 34666, 34821, 34722, 34719, 34690, 34735, 34763, 34749,
  9065. 34752, 34768, 38614, 34731, 34756, 34739, 34759, 34758, 34747, 34799,
  9066. 34802, 34784, 34831, 34829, 34814, {f: 2, c: 34806}, 34830, 34770, 34833,
  9067. 34838, 34837, 34850, 34849, 34865, 34870, 34873, 34855, 34875, 34884,
  9068. 34882, 34898, 34905, 34910, 34914, 34923, 34945, 34942, 34974, 34933,
  9069. 34941, 34997, 34930, 34946, 34967, 34962, 34990, 34969, 34978, 34957,
  9070. 34980, 34992, 35007, 34993, {f: 2, c: 35011}, 35028, {f: 2, c: 35032},
  9071. 35037, 35065, 35074, 35068, 35060, 35048, 35058, 35076, 35084, 35082,
  9072. 35091, 35139, 35102, 35109, {f: 2, c: 35114}, 35137, 35140, 35131, 35126,
  9073. 35128, 35148, 35101, 35168, 35166, 35174, 35172, 35181, 35178, 35183,
  9074. 35188, 35191, [12177, 35198], 35203, 35208, 35210, 35219, 35224, 35233,
  9075. 35241, 35238, 35244, 35247, 35250, 35258, 35261, {f: 2, c: 35263}, 35290,
  9076. {f: 2, c: 35292}, 35303, 35316, 35320, 35331, 35350, 35344, 35340, 35355,
  9077. 35357, 35365, 35382, 35393, 35419, 35410, 35398, 35400, 35452, 35437,
  9078. 35436, 35426, 35461, 35458, 35460, 35496, 35489, 35473, {f: 2, c: 35493},
  9079. 35482, 35491, 35524, 35533, 35522, 35546, 35563, 35571, 35559, 35556,
  9080. 35569, 35604, 35552, 35554, 35575, 35550, 35547, 35596, 35591, 35610,
  9081. 35553, 35606, 35600, 35607, 35616, 35635, 38827, 35622, 35627, 35646,
  9082. 35624, 35649, 35660, 35663, 35662, 35657, 35670, 35675, 35674, 35691,
  9083. 35679, 35692, 35695, 35700, 35709, 35712, 35724, 35726, {f: 2, c: 35730},
  9084. 35734, {f: 2, c: 35737}, 35898, 35905, 35903, 35912, 35916, 35918, 35920,
  9085. [12183, 35925], 35938, 35948, [12184, 35960], 35962, 35970, 35977, 35973,
  9086. 35978, {f: 2, c: 35981}, 35988, 35964, 35992, 25117, 36013, 36010, 36029,
  9087. {f: 2, c: 36018}, 36014, 36022, 36040, 36033, 36068, 36067, 36058, 36093,
  9088. {f: 2, c: 36090}, {f: 2, c: 36100}, 36106, 36103, 36111, 36109, 36112,
  9089. 40782, 36115, 36045, 36116, 36118, 36199, 36205, 36209, 36211, 36225,
  9090. 36249, 36290, 36286, 36282, 36303, 36314, 36310, 36300, 36315, 36299,
  9091. {f: 2, c: 36330}, 36319, 36323, 36348, {f: 2, c: 36360}, 36351,
  9092. {f: 2, c: 36381}, 36368, 36383, 36418, 36405, 36400, 36404, 36426, 36423,
  9093. 36425, 36428, 36432, 36424, 36441, 36452, 36448, 36394, 36451, 36437,
  9094. 36470, 36466, 36476, 36481, 36487, 36485, 36484, 36491, 36490, 36499,
  9095. 36497, 36500, 36505, 36522, 36513, 36524, 36528, 36550, 36529, 36542,
  9096. 36549, 36552, 36555, 36571, 36579, 36604, 36603, 36587, 36606, 36618,
  9097. 36613, 36629, 36626, 36633, 36627, 36636, 36639, 36635, 36620, 36646,
  9098. 36659, 36667, 36665, 36677, 36674, 36670, 36684, 36681, 36678, 36686,
  9099. 36695, 36700, {f: 3, c: 36706}, 36764, 36767, 36771, 36781, 36783, 36791,
  9100. 36826, 36837, 36834, 36842, 36847, 36999, 36852, 36869, {f: 2, c: 36857},
  9101. 36881, 36885, 36897, 36877, 36894, 36886, 36875, 36903, 36918, 36917,
  9102. 36921, 36856, {f: 4, c: 36943}, 36878, 36937, 36926, 36950, 36952, 36958,
  9103. 36968, 36975, 36982, 38568, 36978, 36994, 36989, 36993, 36992, 37002,
  9104. 37001, 37007, 37032, 37039, 37041, 37045, 37090, 37092, 25160, 37083,
  9105. 37122, 37138, 37145, 37170, 37168, 37194, 37206, 37208, 37219, 37221,
  9106. 37225, 37235, 37234, 37259, 37257, 37250, 37282, 37291, 37295, 37290,
  9107. 37301, 37300, 37306, {f: 2, c: 37312}, 37321, 37323, 37328, 37334, 37343,
  9108. 37345, 37339, 37372, {f: 2, c: 37365}, 37406, 37375, 37396, 37420, 37397,
  9109. 37393, 37470, 37463, 37445, 37449, 37476, 37448, 37525, 37439, 37451,
  9110. 37456, 37532, 37526, 37523, 37531, 37466, 37583, 37561, 37559, 37609,
  9111. 37647, 37626, 37700, 37678, 37657, 37666, 37658, 37667, 37690, 37685,
  9112. 37691, 37724, 37728, 37756, 37742, 37718, 37808, {f: 2, c: 37804}, 37780,
  9113. 37817, {f: 2, c: 37846}, 37864, 37861, 37848, 37827, 37853, 37840, 37832,
  9114. 37860, 37914, 37908, 37907, 37891, 37895, 37904, 37942, 37931, 37941,
  9115. 37921, 37946, 37953, 37970, 37956, 37979, 37984, 37986, 37982, 37994,
  9116. 37417, 38000, 38005, 38007, 38013, 37978, 38012, 38014, 38017, 38015,
  9117. 38274, 38279, 38282, 38292, 38294, {f: 2, c: 38296}, 38304, 38312, 38311,
  9118. 38317, 38332, 38331, 38329, 38334, 38346, 28662, 38339, 38349, 38348,
  9119. 38357, 38356, 38358, 38364, 38369, 38373, 38370, 38433, 38440,
  9120. {f: 2, c: 38446}, 38466, 38476, 38479, 38475, 38519, 38492, 38494, 38493,
  9121. 38495, 38502, 38514, 38508, 38541, 38552, 38549, 38551, 38570, 38567,
  9122. {f: 2, c: 38577}, 38576, 38580, [12202, 38582], 38584, [12203, 38585],
  9123. 38606, 38603, 38601, 38605, 35149, 38620, 38669, 38613, 38649, 38660,
  9124. 38662, 38664, 38675, 38670, 38673, 38671, 38678, 38681, 38692, 38698,
  9125. 38704, 38713, {f: 2, c: 38717}, 38724, 38726, 38728, 38722, 38729, 38748,
  9126. 38752, 38756, 38758, 38760, 21202, 38763, 38769, 38777, 38789, 38780,
  9127. 38785, 38778, 38790, 38795, {f: 2, c: 38799}, 38812, 38824, 38822, 38819,
  9128. {f: 2, c: 38835}, 38851, 38854, 38856, [12209, 38859], 38876,
  9129. [12210, 38893], 40783, 38898, 31455, 38902, 38901, 38927, 38924, 38968,
  9130. 38948, 38945, 38967, 38973, 38982, 38991, 38987, 39019, {f: 3, c: 39023},
  9131. 39028, 39027, 39082, 39087, 39089, 39094, 39108, 39107, 39110, 39145,
  9132. 39147, 39171, 39177, 39186, 39188, 39192, 39201, {f: 2, c: 39197}, 39204,
  9133. 39200, 39212, 39214, {f: 2, c: 39229}, 39234, 39241, 39237, 39248, 39243,
  9134. {f: 2, c: 39249}, 39244, 39253, {f: 2, c: 39319}, 39333, {f: 2, c: 39341},
  9135. 39356, 39391, 39387, 39389, 39384, 39377, {f: 2, c: 39405},
  9136. {f: 2, c: 39409}, 39419, 39416, 39425, 39439, 39429, 39394, 39449, 39467,
  9137. 39479, 39493, 39490, 39488, 39491, 39486, 39509, 39501, 39515, 39511,
  9138. 39519, 39522, 39525, 39524, 39529, 39531, 39530, 39597, 39600, 39612,
  9139. 39616, 39631, 39633, {f: 2, c: 39635}, 39646, [12221, 39647],
  9140. {f: 2, c: 39650}, 39654, 39663, 39659, 39662, 39668, 39665, 39671, 39675,
  9141. 39686, 39704, 39706, 39711, {f: 2, c: 39714}, [12222, 39717],
  9142. {f: 4, c: 39719}, 39726, [12223, 39727], [12224, 39730], 39748, 39747,
  9143. 39759, {f: 2, c: 39757}, 39761, 39768, 39796, 39827, 39811, 39825,
  9144. {f: 2, c: 39830}, {f: 2, c: 39839}, 39848, 39860, 39872, 39882, 39865,
  9145. 39878, 39887, {f: 2, c: 39889}, 39907, 39906, 39908, 39892, 39905, 39994,
  9146. 39922, 39921, 39920, 39957, 39956, 39945, 39955, 39948, 39942, 39944,
  9147. 39954, 39946, 39940, 39982, 39963, 39973, 39972, 39969, 39984, 40007,
  9148. 39986, 40006, 39998, 40026, 40032, 40039, 40054, 40056, 40167, 40172,
  9149. 40176, 40201, 40200, 40171, 40195, 40198, 40234, 40230, 40367, 40227,
  9150. 40223, 40260, 40213, 40210, 40257, 40255, 40254, 40262, 40264,
  9151. {f: 2, c: 40285}, 40292, 40273, 40272, 40281, 40306, 40329, 40327, 40363,
  9152. 40303, 40314, 40346, 40356, 40361, 40370, 40388, 40385, 40379, 40376,
  9153. 40378, 40390, 40399, 40386, 40409, 40403, 40440, 40422, 40429, 40431,
  9154. 40445, {f: 2, c: 40474}, 40478, [12228, 40565], 40569, 40573, 40577, 40584,
  9155. {f: 2, c: 40587}, 40594, 40597, 40593, 40605, [12230, 40613], 40617, 40632,
  9156. 40618, 40621, 38753, 40652, {f: 3, c: 40654}, 40660, 40668, 40670, 40669,
  9157. 40672, 40677, 40680, 40687, 40692, {f: 2, c: 40694}, [12235, 40697],
  9158. {f: 2, c: 40699}, [12236, 40701], {f: 2, c: 40711}, 30391, 40725, 40737,
  9159. 40748, 40766, [12241, 40778], [12242, 40786], 40788, 40803,
  9160. {f: 3, c: 40799}, {f: 2, c: 40806}, 40812, 40810, 40823, 40818, 40822,
  9161. 40853, [12244, 40860], [12245, 40864], 22575, 27079, 36953, 29796, 0,
  9162. {f: 76, c: 9472}, {f: 20, c: 9312}, {f: 10, c: 8544}, 13129, 13076, 0,
  9163. 13133, 0, 13095, 0, 13110, 13137, 0, 13069, 13094, 0, 13099, 13130, 0,
  9164. {f: 3, c: 13212}, {f: 2, c: 13198}, 13252, 13217, 12317, 12319, 8470,
  9165. 13261, 0, {f: 5, c: 12964}, {f: 2, c: 12849}, 12857, 13182, 13181, 13180,
  9166. 8750, 8721, {s: 3}, 8735, 8895, 0, 0, 21854, {s: 7}, 167133, 0, 0, 28976,
  9167. 0, 40407, {s: 4}, 64054, 0, 0, 22169, 15694, {s: 4}, 20448, 0, 0, 36544, 0,
  9168. 194797, {s: 4}, 153716, 32363, 33606, 167670, {s: 3}, 40572, 0, 0, 26171,
  9169. 0, 40628, {s: 4}, 26629, {s: 5}, 23650, 0, 194780, 0, 32353, 0, 0, 64070,
  9170. {s: 5}, 34083, 37292, {s: 7}, 34796, {s: 8}, 25620, 0, 0, 39506, {s: 4},
  9171. 64074, 0, 194692, {s: 4}, 31774, {s: 6}, 64016, 25681, 0, 0, 63980, 22625,
  9172. 39002, 0, 194679, {s: 3}, 31153, 0, 28678, {s: 9}, 22218, {s: 3}, 21085, 0,
  9173. 28497, 37297, {s: 10}, 64106, {s: 6}, 38960, 0, 40629, {s: 9}, 33802,
  9174. 63939, {f: 2, c: 63890}, 63897, 0, 34847, 194575, 0, 194771, 194584,
  9175. {s: 7}, 137754, 23643, {s: 4}, 25890, 0, 0, 26618, 0, 26766, 0, 148432,
  9176. 194848, {s: 21}, 34110, {s: 15}, 30562, {s: 12}, 65075, 0,
  9177. {f: 2, c: 65073}, {s: 4}, 65072, {f: 2, c: 65077}, {f: 2, c: 65081}, 0, 0,
  9178. {f: 2, c: 65079}, {f: 2, c: 65087}, {f: 2, c: 65085}, {f: 4, c: 65089},
  9179. {f: 2, c: 65083}, {s: 41}, {f: 3, c: 12436}, 0, 0, 22099, {s: 41}, 65508,
  9180. 65287, 65282, 0, 9665, 9655, 8681, 8679, 8678, 8680, 9634, 9831, 9825,
  9181. 9828, 9826, 13216, 13218, {f: 2, c: 13220}, 13207, 8467, 13208, 13235,
  9182. 13234, 13233, 13232, {f: 3, c: 13189}, 13259, 13200, 13268, 13206, 13090,
  9183. 13078, 13080, 13077, 13059, 13091, 13143, 13122, 13113, 13115, 13056,
  9184. 13105, 13127, 13086, 13098, 0, 13183, 8481, 9742, 12342, 12320, {s: 3},
  9185. {f: 9, c: 9352}, {f: 20, c: 9332}, 12881, {f: 10, c: 8560},
  9186. {f: 10, c: 12882}, {f: 26, c: 9372}, 12867, 12861, 12863, 12852, 12856,
  9187. 12851, 12860, 12866, 12862, 12854, 12853, 12859, 12864, 12858, 12976,
  9188. 12973, 12969, 12975, 12948, 12970, 12952, 12971, 12946, 12945, 12947,
  9189. 12972, 12974, 12950, {s: 8}, {f: 3, c: 9131}, 0, {f: 3, c: 9127}, 0, 13260,
  9190. 13061, 0, 0, 13215, 13219, 13222, 0, 0, 12958, {f: 2, c: 13192}, 13256,
  9191. 8749, 0, 12848, {f: 6, c: 12842}, 12855, 12865, 10145, {s: 3}, 9673, 9824,
  9192. 9829, 9827, 9830, {f: 4, c: 9728}, 9758, {f: 2, c: 9756}, 9759, 12953,
  9193. 9450, {f: 2, c: 8554}, {s: 3}, {f: 8, c: 9601}, 9615, 9614, 9613, 9612,
  9194. 9611, 9610, 9609, {f: 2, c: 9620}, {f: 2, c: 9581}, 9584, 9583, 9552, 9566,
  9195. 9578, 9569, {f: 2, c: 9698}, 9701, 9700, 0, 0, {f: 3, c: 9585}, {s: 20},
  9196. 20956, 29081, {f: 9, c: 10102}, {s: 3}, {f: 2, c: 8570}, {s: 3}, 8575,
  9197. 8458, 8457, 0, 0, 12292, 8646, {f: 2, c: 8644}, 0, {f: 4, c: 12535}, 0, 0,
  9198. 12957, {s: 3}, 13179, {s: 3}, 13107, 13134, {s: 30}, 32394, 35100, 37704,
  9199. 37512, 34012, 20425, 28859, 26161, 26824, 37625, 26363, 24389,
  9200. [12033, 20008], 20193, 20220, 20224, 20227, 20281, 20310, 20370, 20362,
  9201. 20378, 20372, 20429, 20544, 20514, 20479, 20510, 20550, 20592, 20546,
  9202. 20628, 20724, 20696, 20810, 20836, 20893, 20926, 20972, 21013, 21148,
  9203. 21158, 21184, 21211, 21248, 0, 21284, 21362, 21395, 21426, 21469, 64014,
  9204. 21660, 21642, 21673, 21759, 21894, 22361, 22373, 22444, 22472, 22471,
  9205. 64015, 0, 22686, 22706, 22795, 22867, 22875, 22877, 22883, 22948, 22970,
  9206. 23382, 23488, 29999, 23512, 0, 23582, 23718, 23738, 23797, 23847, 23891, 0,
  9207. 23874, 23917, {f: 2, c: 23992}, 24016, 24353, 24372, 24423, 24503, 24542,
  9208. 24669, 24709, 24714, 24798, 24789, 24864, 24818, 24849, 24887, 24880,
  9209. 24984, 25107, 25254, 25589, 25696, 25757, 25806, 25934, 26112, 26133,
  9210. 26121, 26158, 0, 26148, 26213, 26199, 26201, 64018, 26227, 26265, 26272,
  9211. 26290, 26303, 26362, 26382, 0, 26470, 26555, 26706, 26560, 0, 26692, 26831,
  9212. 64019, 26984, 64020, 27032, 27106, 27184, 27243, 27206, 27251, 27262,
  9213. 27362, 27364, 27606, 27711, 27740, 27782, 27759, 27866, 27908, 28039,
  9214. 28015, 28054, 28076, 28111, 28152, 28146, 28156, 28217, 28252, 28199,
  9215. 28220, 28351, 28552, 28597, 28661, 28677, 28679, 28712, 28805, 28843,
  9216. 28943, 28932, 29020, {f: 2, c: 28998}, 0, 29121, 29182, 29361, 29374,
  9217. 29476, 64022, 29559, 29629, 29641, 29654, 29667, 29650, 29703, 29685,
  9218. 29734, 29738, 29737, 29742, 0, 29833, 29855, 29953, 30063, 30338, 30364,
  9219. 30366, 30363, 30374, 64023, 30534, 21167, 30753, 30798, 30820, 30842,
  9220. 31024, {f: 3, c: 64024}, 31124, 64027, 31131, 31441, 31463, 64028, 31467,
  9221. 31646, 64029, 32072, 0, 32183, 32160, 32214, 32338, 32583, 32673, 64030,
  9222. 33537, 33634, 33663, 33735, 33782, 33864, 33972, 34131, 34137, 34155,
  9223. 64031, 34224, {f: 2, c: 64032}, 34823, 35061, 35346, 35383, 35449, 35495,
  9224. 35518, 35551, 64034, 35574, 35667, 35711, 36080, 36084, 36114, 36214,
  9225. 64035, 36559, 0, 64037, 36967, 37086, 64038, 37141, 37159, 37338, 37335,
  9226. 37342, {f: 2, c: 37357}, {f: 2, c: 37348}, 37382, 37392, 37386, 37434,
  9227. 37440, 37436, 37454, 37465, 37457, 37433, 37479, 37543, {f: 2, c: 37495},
  9228. 37607, 37591, 37593, 37584, 64039, 37589, 37600, 37587, 37669, 37665,
  9229. 37627, 64040, 37662, 37631, 37661, 37634, 37744, 37719, 37796, 37830,
  9230. 37854, 37880, 37937, 37957, 37960, 38290, 0, 64041, 38557, 38575, 38707,
  9231. 38715, 38723, 38733, 38735, [12205, 38737], 0, 38999, 39013,
  9232. {f: 2, c: 64042}, 39207, 64044, 39326, 39502, 39641, 39644, 39797, 39794,
  9233. 39823, 39857, 39867, 39936, 40304, 40299, 64045, 40473, 40657, 0, 92,
  9234. {s: 634}, 8364, 8486, 0, 0, 64256, {f: 2, c: 64259}, 257, 299, 363, 275,
  9235. 333, 256, 298, 362, 274, 332, {f: 4, c: 8539}, {f: 2, c: 8531}, 8304,
  9236. {f: 6, c: 8308}, {f: 10, c: 8320}, 461, 282, 0, 7868, 463, 0, 296, 465, 0,
  9237. 467, 366, 360, 462, 283, 0, 7869, 464, 0, 297, 466, 0, 468, 367, 361, 593,
  9238. 8049, 8048, 509, 0, 596, 0, 0, 601, 0, 0, 602, 0, 0, 603, 8051, 8050, 0,
  9239. 331, 629, 652, 0, 0, 658, 643, 720, {s: 682}, {f: 10, c: 12832}, {s: 108},
  9240. {f: 4, c: 12892}, {f: 15, c: 12977}, {s: 50}, {f: 26, c: 9424},
  9241. {f: 26, c: 9398}, {s: 48}, {f: 47, c: 13008}, 0, {f: 10, c: 12928}, 12944,
  9242. {f: 6, c: 12938}, 0, 12959, {s: 6}, {f: 2, c: 12960}, 12955, 12954, 12963,
  9243. 12962, 12951, 0, 12956, 12949, {s: 6}, 9676, {s: 11}, 10111,
  9244. {f: 10, c: 9451}, {s: 510}, 8414, {s: 815}, 13274, {s: 3}, 8448, 13250, 0,
  9245. 0, 8453, 0, 13169, 0, 0, 13197, 13211, {s: 3}, {f: 2, c: 13271}, {s: 3},
  9246. {f: 2, c: 13057}, 13060, 13062, 0, 13064, 0, 13063, 13066, 0, 13065, 0,
  9247. 13067, 0, 13068, {f: 6, c: 13070}, 0, 13079, 0, 13081, 0, {f: 4, c: 13082},
  9248. {f: 3, c: 13087}, 13092, 0, 13093, 0, 0, {f: 2, c: 13096}, 0, 13101, 0, 0,
  9249. {f: 3, c: 13102}, 13106, 0, 0, {f: 2, c: 13108}, 13116, {s: 3}, 13111, 0,
  9250. 13112, 13114, 13117, 13121, {f: 3, c: 13118}, {f: 4, c: 13123}, 13128,
  9251. {f: 2, c: 13131}, {f: 2, c: 13135}, 0, 0, 13138, 13140, 0, 0, 13139,
  9252. {f: 2, c: 13141}, {s: 132}, 8501, 976, 8714, 8463, 0, 981, 987, 977, 0,
  9253. {f: 2, c: 9832}, 9836, {s: 5}, 12347, 0, {f: 3, c: 12339}, 8252, 8265,
  9254. {s: 5}, 8723, 0, 8771, {f: 2, c: 8818}, {s: 6}, {f: 2, c: 12312},
  9255. {f: 2, c: 65375}, {s: 10}, 9115, {f: 2, c: 9117}, 9120, {s: 4}, 9121,
  9256. {f: 2, c: 9123}, 9126, {s: 12}, [9116, 9119, 9122, 9125, 9130], {s: 8},
  9257. 9986, 0, 0, 12349, 0, 12447, 0, 0, 8709, 8864, 8854, 8856, 8853, 8855,
  9258. {s: 4}, 9664, 9654, {s: 4}, 8656, 8596, {f: 2, c: 8600}, {f: 2, c: 8598},
  9259. 8652, 8651, {s: 10}, 12336, 8967, {s: 8}, 10048, 10047, {s: 7}, 9643, 0,
  9260. 9642, 0, 10010, {s: 12}, 9702, {s: 4}, 10070, {s: 379}, {f: 2, c: 65093},
  9261. {s: 679}, 64103, 64098, 32227, [12232, 40643], 28331, 64082, 64061, 64069,
  9262. 64062, 27114, 28212, 64096, 64071, 64056, 64066, 64078, 34395, 64105,
  9263. 64052, 64099, 25581, 25802, 30799, 64084, 63856, 64077, 64097, 64072,
  9264. 64076, {f: 2, c: 64091}, 64081, 64067, 64090, 28041, 29376, 0, 194885,
  9265. 64086, 64080, 64049, 64059, 24034, 64063, 64101, 21373, 64055, 64095,
  9266. 24501, 64064, 0, 64083, 0, 64085, 64104, 64068, 64089, 26202, 64053, 64075,
  9267. 64100, 64065, 64048, 0, 64057, 64051, 27493, 64058, 27599, 64050, 25150,
  9268. 64079, 63773, 63964, 63798, 28122, 63952, 26310, 27511, 64087, 37706, 0,
  9269. 37636, {s: 120}, 133390, {s: 120}, 35999, 11991, [11965, 158033], {s: 5},
  9270. 37555, 38321, 0, 0, 194812, {s: 13}, 194965, {s: 8}, 194794, 0, 26478,
  9271. 11974, 0, 194594, {s: 13}, 13314, 0, 0, 26083, {s: 4}, 134071, {s: 10},
  9272. 171339, 0, 194611, 24378, {s: 8}, 11945, 0, 20465, {s: 7}, 63753, {s: 7},
  9273. 11964, 0, 0, 194732, 26435, {s: 3}, 133732, 35329, 25142, 0, 0, 21555,
  9274. 23067, {s: 3}, 25221, 0, 0, 194819, {s: 6}, 21567, {s: 9}, 27506, {s: 4},
  9275. 29986, 19256, 0, 0, 24063, {s: 6}, 194827, 29626, 134047, {s: 3}, 194600,
  9276. 0, 194849, {s: 5}, 194623, {s: 16}, 194675, {f: 2, c: 11916}, 23577,
  9277. {s: 3}, 131083, 23426, 194642, {s: 5}, 11997, [11999, 39136],
  9278. [11998, 169599], 14221, 0, [11927, 14586], 0, 194887, 0, [11909, 20155],
  9279. 131490, {s: 7}, 13599, 0, 194738, 0, 0, [11971, 35200], {s: 4}, 31237,
  9280. {s: 4}, 35498, 0, 32085, 0, 28568, {s: 7}, 25591, 30246, {s: 4},
  9281. [11978, 163767], {s: 5}, 146686, {s: 5}, 13351, 0, 0, 33067, 0, 0, 194842,
  9282. {s: 5}, 11950, {s: 5}, 194714, {s: 3}, 194831, {s: 19}, 22305, 135741,
  9283. 194586, 0, 64003, {s: 7}, 21534, 15240, 20839, {s: 4}, 63839, {s: 9},
  9284. 20023, {s: 13}, [11946, 150804], 24421, 23020, 194658, 0, 24217, {s: 46},
  9285. 13416, {s: 8}, 21200, {s: 9}, 26625, 0, 195024, 195039, {s: 5}, 153215, 0,
  9286. 0, 11959, {s: 4}, 36534, 63775, {s: 3}, 63875, {s: 5}, 31867, 63906, 0,
  9287. 63898, 0, [11961, 32770], 157360, {s: 4}, [11911, 132648], 0, 0, 131210,
  9288. 194604, [11915, 13630], {s: 4}, 21589, 0, 22841, 0, 0, 23414, 194669,
  9289. 23572, 14306, 23782, 0, 20040, 0, 0, 194742, {s: 4}, 158105, 25371, 0, 0,
  9290. 26211, 0, 194779, 0, 0, 27126, 27014, {s: 3}, 27596, 0, 28183, 0, 0, 27818,
  9291. {s: 3}, [11942, 20012], 0, 0, 29935, 30069, 30188, 30286, 16305, 30570,
  9292. 30633, {s: 6}, 31571, 0, 0, 16996, {s: 3}, 194924, 0, 0, 32328, {s: 5},
  9293. 11955, {s: 4}, 33089, 17491, 0, [11966, 33401], [11967, 64094],
  9294. [11968, 64093], 0, 20857, 33626, {s: 3}, 17701, 0, 34292, 131248, {s: 4},
  9295. 34429, 0, 13358, 35014, {s: 6}, 18406, {s: 8}, 36808, {s: 19}, 166279, 0,
  9296. 0, 167447, 0, 0, 38969, {s: 6}, 39432, {s: 4}, 39903, {s: 10}, 148206,
  9297. {s: 5}, 21385, 0, 64017, 194785, 0, 146622, 132625, 0, {f: 2, c: 19972},
  9298. 19999, 20011, {f: 2, c: 20015}, {f: 2, c: 20032}, 20036, [11907, 20058],
  9299. 20095, 20109, 20118, 20153, 20176, 20192, 20221, 20223, 20235, 20245,
  9300. 20320, 20283, 20297, 20308, 20346, {f: 2, c: 20349}, 20375, 20414, 20431,
  9301. 20477, {f: 2, c: 20480}, 20496, 20507, 20519, 20526, 20567, 20582, 20586,
  9302. 20539, 20623, 20630, 20636, 20684, 20710, 20713, 20719, 20744, 20747,
  9303. 20752, 20763, 20766, 20831, 20897, 20924, 0, 20974, 20980, 20993,
  9304. [11913, 20994], 21011, 21065, 21089, 21094, 21139, 21192, 21232,
  9305. {f: 2, c: 21258}, 21310, 21324, 21323, 21345, 21356, 21419, 21466, 21478,
  9306. 21493, 21543, 21581, 21606, 21611, 21620, 21645, 21654, 21665, 21677,
  9307. 21689, 21695, 21702, 21709, 21774, 21803, 21813, 21834, 21856, 0, 21896,
  9308. 21902, 22024, {f: 2, c: 22030}, 22071, 22079, 22089, 22091, 22095, 22118,
  9309. 22121, 22127, {f: 2, c: 22129}, 22165, 22170, {f: 2, c: 22188}, 22193,
  9310. 22217, 22237, 22244, 22282, 22293, 22307, 22319, {f: 2, c: 22323}, 22348,
  9311. 22384, 22412, 22428, 22456, 22502, 22509, {f: 2, c: 22517}, 22527, 22537,
  9312. 22560, 22578, 22652, 22656, 22697, 22734, 22736, 22740, 22746, 22761,
  9313. 22796, 22820, 22831, 22881, 22893, 22986, 22994, 23005, {f: 2, c: 23011},
  9314. 23044, 23052, 23075, 23111, 23125, 23139, 23149, 23166, 23198, 23207,
  9315. 23212, 23219, 23264, 23296, 23321, 23333, 23341, 23361, 23420,
  9316. {f: 2, c: 23422}, 23434, [11919, 23587], 23595, 23600, 23651, 23657, 23676,
  9317. 23755, 23762, 23796, 23844, 23846, 23875, 23878, 23882, 23954, 23956,
  9318. 23961, 23968, 24024, 24032, 24056, 24064, 24082, {f: 2, c: 24084}, 24088,
  9319. 24110, 24152, {f: 2, c: 24171}, 24232, 24234, {f: 2, c: 24254}, 0, 24274,
  9320. 24327, 24334, {f: 2, c: 24348}, 24354, 24360, 24374, 24379, 24384,
  9321. [12089, 24400], 24408, 24420, 24457, 24476, 24487, 24484, 24495, 24504,
  9322. [11926, 24516], 24521, 24545, 24553, 24557, 24572, 24599, 24602, 24627,
  9323. 24673, 24703, 24734, 24740, 24752, 24779, 24795, 24824, {f: 3, c: 24850},
  9324. 24860, 24956, 24973, 24991, 25000, 25026, 25055, 25109, 25129, 25155,
  9325. 25158, [11928, 25164], 25169, 25174, 25284, 25340, 25354, 25357, 25368,
  9326. 25401, {f: 2, c: 25410}, 25445, 25460, 25469, 25476, 25479, 25488, 25502,
  9327. 25553, 25564, 25609, 25616, 25634, 25684, 25691, 25709, 25723,
  9328. {f: 2, c: 25790}, 25829, 25847, 25851, 25860, 25878, 25881, 25927, 25959,
  9329. 25985, 25989, 26050, 26096, 26098, 26156, 26188, {f: 2, c: 26203}, 26209,
  9330. 26219, 0, 26276, 26312, 26348, 26373, 26387, 26419, 26440, 26444, 26486,
  9331. 26491, 26544, 26546, 26617, 26583, 26585, 26608, 26668, {f: 2, c: 26672},
  9332. 26715, 26738, 26741, 26746, 26756, 26789, 26802, 26832, 26838, 26856,
  9333. 26861, {f: 2, c: 26864}, 26876, 26897, 26899, 26933, 26939, 26967, 26979,
  9334. 26994, {f: 2, c: 27007}, 27046, 27053, 27063, {f: 2, c: 27094}, 27137,
  9335. 27151, 27157, 27176, 27188, 27198, 27205, {f: 2, c: 27216}, 27222, 27227,
  9336. 27267, 27273, 27281, {f: 3, c: 27293}, 27356, 27367, 27372, 27422, 27428,
  9337. 27445, 27462, 27478, 27488, 27522, 27582, 27617, 27633, 27664, 27699,
  9338. [11937, 27701], 11938, 27737, 27766, 27771, 27781, 27797, 27804, 27856,
  9339. 27860, 27862, 27872, {f: 2, c: 27883}, 27886, 27914, 27918, 27921, 27950,
  9340. 27991, 27998, 28005, 28034, 28095, 28100, 28106, 28118, 28137, 28194,
  9341. 28241, 28359, 28362, 28366, 28413, 28442, 28458, 28463, 28467, 28506,
  9342. 28510, 28514, 28541, 28555, 28557, 28562, 28564, 28570, {f: 2, c: 28583},
  9343. 28598, 28634, 28638, 0, 28729, 28732, 0, 28756, {f: 2, c: 28765}, 28772,
  9344. [11939, 28780], 28798, 28801, 28821, 28855, {f: 2, c: 28883}, 28888, 28892,
  9345. 28935, 28960, 28977, 29002, 29010, 29024, 29049, 29074, 0, 29131, 29139,
  9346. 29142, 29184, 29213, 29227, 29240, 29249, 29267, {f: 2, c: 29269}, 29276,
  9347. 29325, [11944, 29357], 29364, 29383, 29435, {f: 2, c: 29444}, 29480, 29489,
  9348. 29507, 29548, 29564, 29571, {f: 2, c: 29573}, 29589, {f: 3, c: 29598},
  9349. 29606, 29611, 29621, 29623, 29628, 29647, 29657, 29673, 29684, 29693,
  9350. 29700, 29706, {f: 2, c: 29722}, 29732, 29736, 29740, {f: 3, c: 29743},
  9351. 29753, 29764, 29767, 29771, 29773, 29777, 29783, 29798, 29803, 29809,
  9352. 29824, {f: 3, c: 29829}, 29840, 29848, 29852, 29856, 29859, 29864, 29867,
  9353. 29877, 29887, 29896, 29914, 29918, 30030, 30073, 30081, 30096,
  9354. [12135, 30098], 30099, 30132, 30180, 30201, 30208, 30218, {f: 2, c: 30229},
  9355. 30233, 30238, 30253, 30261, 30275, 30283, 30309, 30317, 30319, 30321,
  9356. 30324, {f: 2, c: 30372}, 30405, 30412, 30444, 30460, 30516, 30518, 30556,
  9357. {f: 2, c: 30559}, 30578, 30589, 30613, 30634, 30694, 30704, 30708, 30726,
  9358. 30754, {f: 2, c: 30765}, 30768, 30773, 30824, 30878, 30920, 30924, 30926,
  9359. 30948, {f: 2, c: 30944}, 30962, 30967, 30971, 31025, 0, [11949, 31035],
  9360. 31037, 31045, {f: 2, c: 31067}, 31115, 31126, 31128, [12145, 31160], 31163,
  9361. 31178, 31194, 31235, 31241, 31249, 31262, 31277, 31289, 31301, 31308,
  9362. 31325, 0, 31341, 31352, 31392, 31395, 31411, {f: 2, c: 31419}, 31430,
  9363. 31495, 31508, 31527, 31537, 31559, 31566, 31584, 31593, 31597, 31602,
  9364. 31633, 31663, 31703, 31705, 31755, 31759, 31776, 31782, 31793, 31798,
  9365. 31825, 31833, 31847, 31854, 31856, 31932, 31935, {f: 2, c: 31944}, 31959,
  9366. 31961, 31965, 31979, {f: 3, c: 32007}, 32019, 32029, 32035, 32065, 32083,
  9367. 32089, 32093, 32122, 32134, {f: 2, c: 32139}, 32204, 32235, 32241, 32249,
  9368. 32264, 32273, 32277, 32288, 32327, 32354, 32366, 32371, 32397, 32401,
  9369. 32408, 32580, 32591, [11947, 11954, 32594], [11953, 32595], 32609, 32657,
  9370. 32703, 32718, 32735, 32741, 32748, {f: 2, c: 32750}, 32762, 32782, 32785,
  9371. 32788, 32804, 32806, 32826, 32828, 32864, 32881, 32885, 32926, 32934,
  9372. 32939, {f: 2, c: 32983}, 33046, 33048, 33082, 33098, 33100, 33153, 33156,
  9373. 33204, 33231, 33273, 33283, 33313, 33330, 33332, 33350, 33355, 33359,
  9374. 33422, 33454, 33463, 33470, 33478, 33534, 33603, 33617, 33621, 33670,
  9375. 33677, 33682, 33688, 33705, {f: 2, c: 33727}, 33770, 33807, 33809, 33866,
  9376. 33910, 33960, 33967, 33984, 33986, 34032, 34045, 34060, 34100, 34142,
  9377. 34191, 34231, 34254, 34221, 34322, 34345, 34386, 34403, 34412, 34415,
  9378. 34426, 34445, 34449, 34456, {f: 2, c: 34471}, 34554, 34557, 34571, 34579,
  9379. 34585, 34590, 34600, 34622, 34673, 34696, 34713, {f: 2, c: 34732}, 34741,
  9380. 34774, 34795, 34797, 34817, 0, 34822, 34827, 34836, 34844, 34902, 34911,
  9381. [11970, 34916], 34968, 34986, {f: 2, c: 35005}, 35018, 35026, 35035,
  9382. {f: 2, c: 35056}, 35078, {f: 3, c: 35096}, 35111, 35120, 35134, 35195,
  9383. 35284, 35286, 35301, 35313, 35335, 35343, 35349, 35362, 35406, 35455,
  9384. 35572, 35615, 35639, {f: 2, c: 35651}, 35668, 35740, 35742, 35911, 35924,
  9385. 35955, 36004, 36057, 36065, 36088, 36094, 36123, 36201, 36204, 36228,
  9386. 36237, 36245, 36262, 36294, 36302, 36324, 36332, 36384, 36427, 36460,
  9387. 36464, 36474, 36498, 36526, 36531, 36561, 36564, 36601, 36631, 36662,
  9388. 36774, [12193, 36789], [11981, 36790], 0, 36832, 36836, 36854, 36866,
  9389. 36908, 36932, 37000, 37013, 37017, 37019, 37026, 37044, 37079, 37085,
  9390. 37108, 37143, 37148, 37169, 37178, 37181, 37192, 37211, 37217, 37220,
  9391. 37262, 37278, 37288, {f: 2, c: 37293}, 37298, 37308, 37360, 37367, 37371,
  9392. 37383, 37416, 37427, 37432, 37443, 37447, 37455, 37472, 37570,
  9393. {f: 2, c: 37579}, 37599, 37645, 37653, 37663, 37671, 37703, 37714, 0,
  9394. 37738, 37741, 37787, 37818, 37801, 37825, 37834, 37858, 37882, 37885,
  9395. 37903, 37940, 37951, 37973, 37995, 38002, [11986, 38264], 38310, 38313, 0,
  9396. 38324, 38333, 38362, [11983, 11990, 38429], 38465, 38488, 38532, 38564,
  9397. 38569, 38610, 195060, 38622, 38633, 38641, 38658, 38665, 38746, 38755,
  9398. 38766, 38771, 38810, 38818, {f: 2, c: 38837}, 38873, 38878, 38900, 38922,
  9399. 38926, 38942, 38947, 38955, 38974, {f: 2, c: 38994}, 39001, 39020, 39096,
  9400. 39098, 39103, 39112, 39141, {f: 2, c: 39218}, 39232, 39245, 39260, 39263,
  9401. 39345, {f: 2, c: 39353}, 39369, 39426, 39446, 39460, 39463,
  9402. {f: 2, c: 39469}, 39478, 39480, 39498, 39510, {f: 2, c: 39605}, 39673,
  9403. 39683, 39712, {f: 2, c: 39731}, 39795, 39801, 39847, 39873, 39879, 39895,
  9404. 39911, 39915, 39927, 39930, 39933, 39947, 39975, 39978, 39990, 40001,
  9405. 40019, 40035, 40048, 40055, 40194, 40258, 40263, 40291, 40297, 40316,
  9406. 40318, 40333, 40369, 40387, 40391, 40406, 40415, 40427, 40436, 40469,
  9407. 40477, 40612, 40616, 40620, 40679, 40686, 40720, 40722, 40727, 40729,
  9408. 40751, 40759, 40761, 40769, 40773, 40791, 40808, 40817, 40821, 40848,
  9409. 40852, 40866, 0, 13317, 194564, 22048, 24267, 11925, 0, 144954, 0, 28665,
  9410. 28390, 29107, [11940, 64073], {s: 4}, [11980, 64102], 0, 23986, 0, 20435,
  9411. 20697, 20720, 20931, 22134, 27220, 27905, 28112, 28226, 28377, 29668,
  9412. 29729, 30060, 30801, 34805, 144382, 29608, 15091, 13531, 17420, 16010, 0,
  9413. 0, 19432, 0, 16090, 15138, 0, 17786, 16531, 0, 18021, 16643, 17043, 18094,
  9414. 13448, 140809, {f: 3, c: 63584}, 63610, 63615, {s: 23}, {f: 2, c: 8836},
  9415. {f: 2, c: 8842}, 8713, 0, {f: 2, c: 8965}, {s: 9}, {f: 2, c: 8741},
  9416. {s: 14}, 8802, 0, 8773, 8776, {f: 2, c: 8822}, {s: 4}, 8487, {s: 209},
  9417. {f: 2, c: 8922}, 8533, 8984, {f: 2, c: 7742}, {f: 2, c: 504}, 470, 472,
  9418. 474, 476, 260, 728, 317, 346, 350, 356, 377, 379, 261, 731, 318, 347, 711,
  9419. 351, 357, 378, 733, 380, 340, 258, 313, 262, 268, 280, 270, 323, 327, 336,
  9420. 344, 368, 354, 341, 259, 314, 263, 269, 281, 271, 273, 324, 328, 337, 345,
  9421. 369, 355, 729, 264, 284, 292, 308, 348, 364, 265, 285, 293, 309, 349, 365,
  9422. 625, 651, 638, 620, 622, 633, 648, 598, 627, 637, 642, 656, 635, 621, 607,
  9423. 626, 669, 654, 609, 624, 641, 295, 661, 660, 614, 664, 450, 595, 599, 644,
  9424. 608, 403, 616, 649, 600, 604, 606, 592, 623, 650, 612, 594, 653, 613, 674,
  9425. 673, 597, 657, 634, 615, 865, 712, 716, 721, 8255, 783, {f: 5, c: 741}, 0,
  9426. 0, 805, 812, 825, 796, {f: 2, c: 799}, 829, 809, 815, 734, 804, 816, 828,
  9427. 820, {f: 2, c: 797}, {f: 2, c: 792}, 810, {f: 2, c: 826}, 794, {s: 3},
  9428. {f: 2, c: 610}, 618, 628, 630, 632, 640, 655, 665, 668, 671, 688, 690, 695,
  9429. 704, {f: 2, c: 736}, {s: 6}, 8862, {s: 287}, 12348, 12543, 0,
  9430. {f: 2, c: 12310}, 9838, 9835, {f: 2, c: 10548}, 10687, 0, 12448, 0,
  9431. {f: 2, c: 10746}, {s: 13}, 962, {f: 10, c: 9461}, {f: 2, c: 9750}, 9649,
  9432. {f: 10, c: 12784}, 0, {f: 6, c: 12794}, {f: 15, c: 9150}, 0, 0, 10003, 0,
  9433. 9251, 9166, {f: 4, c: 9680}, {f: 2, c: 8263}, 0, 8273, 8258,
  9434. {f: 16, c: 12688}, {s: 13}, {f: 2, c: 9136}, {f: 12, c: 9842},
  9435. {f: 2, c: 12441}, 8413, {s: 450}, 20296, 20319, 20330, 20332, 20494, 20504,
  9436. 20545, 20722, 20688, 20742, 20739, 20789, 20821, 20823, 13493, 20938,
  9437. 20962, 21079, 21196, 21206, 21243, 21276, 21347, 21405, 21522, 21631,
  9438. 21640, 21840, 21889, 21933, 21966, 22075, 22174, 22185, 22195, 22391,
  9439. 22396, 135963, 22479, 22500, 22628, 22665, 136302, 22738, 22752, 34369,
  9440. 22923, 22930, 22979, 23059, 23143, 23159, 23172, 23236, 137405, 23421,
  9441. 23443, 23570, 64060, 136884, 23674, 23695, 23711, 23715, 23722, 23760,
  9442. 138804, 23821, 23879, 23937, 23972, 23975, 24011, 24158, 24313, 24320,
  9443. 24322, 24355, 24381, 24404, 24445, 24589, 24596, 24600, 24629, 24647,
  9444. 24733, 24788, 24797, 24875, 25020, 25017, 25122, 25178, 25199, 25302,
  9445. 25468, 25573, 25721, 25796, 25808, 25897, 26013, 26170, 26146, 26155,
  9446. 26160, 26163, 26184, 143812, {f: 2, c: 26231}, 26253, 26299, 26331, 26344,
  9447. 26439, 26497, 26515, 26520, 26523, 26620, 26653, 26787, 26890, 26953,
  9448. 144836, 26946, 26980, 27045, 27087, 15286, 15299, 27113, 27125, 145215,
  9449. 27195, 145251, 27284, 27301, 15375, 27419, 27436, 27495, 27561, 27565,
  9450. 27607, 27647, 27653, 27764, 27800, 27899, 27846, 27953, 27961, 27967,
  9451. 27992, 28052, 28074, 28123, 28125, 28228, 28254, 28337, 28353, 28432,
  9452. 28505, 28513, 28542, 28556, 28576, 28604, 28615, 28618, 28656, 28750,
  9453. 28789, 28836, 28900, 28971, 28958, 28974, 29009, 29032, 29061, 29063,
  9454. 29114, 29124, 29205, 15935, 29339, 149489, 29479, 29520, 29542, 29602,
  9455. 29739, 29766, 29794, 29805, 29862, 29865, 29897, 29951, 29975, 16242,
  9456. 30158, 30210, 30216, 30308, 30337, 30365, 30378, 30390, 30414, 30420,
  9457. 30438, 30449, 30474, 30489, {f: 2, c: 30541}, 30586, 30592, 30612, 30688,
  9458. 152718, 30787, 30830, 30896, 152846, 30893, 30976, 31004, 31022, 31028,
  9459. 31046, 31097, 31176, 153457, 31188, 31198, 31211, 31213, 31365, 154052,
  9460. 31438, 31485, 31506, 31533, 31547, 31599, 31745, 31795, 155041, 31853,
  9461. 31865, 31887, 31892, 31904, 31957, 32049, 32092, 32131, 32166, 32194,
  9462. 32296, 32663, 32731, 32821, 32823, 32970, 32992, 33011, 33120,
  9463. {f: 2, c: 33127}, 33133, 33211, 33226, 33239, 17499, 33376, 33396, 158463,
  9464. 33441, {f: 2, c: 33443}, 33449, 33471, 33493, 33533, 33536, 33570, 33581,
  9465. 33594, 33607, 33661, 33703, 33743, 33745, 33761, 33793, 33798, 33887,
  9466. 33904, 33907, 33925, 33950, 33978, 159296, 34098, 34078, 34095, 34148,
  9467. 34170, 34188, 34210, 34251, 34285, 34303, {f: 2, c: 34308}, 34320, 159988,
  9468. 34328, 34360, 34391, 34402, 17821, 34421, 34488, 34556, 34695, 17898,
  9469. 34826, 34832, 35022, 161412, 35122, 35129, 35136, 35220, 35318, 35399,
  9470. 35421, 35425, 35445, 35536, 35654, 35673, 35689, 35741, 35913, 35944,
  9471. 36271, 36305, 36311, 36387, 36413, 36475, 164471, 18500, 36602, 36638,
  9472. 36653, 36692, 164813, 36840, 36846, 36872, 36909, 37015, 37043, 37054,
  9473. {f: 2, c: 37060}, 37063, 37103, 37140, 37142, {f: 2, c: 37154}, 37167,
  9474. 37172, 37251, 37361, 37705, {f: 2, c: 37732}, 37795, 37855, 37892, 37939,
  9475. 37962, 37987, 38001, 38286, 38303, 38316, 38326, 38347, 38352, 38355,
  9476. 18864, 38366, 38565, 38639, 38734, 38805, 38830, 38842, 38849, 38857,
  9477. 38875, 38998, 39143, 39256, 39427, 39617, 39619, 39630, 39638, 39682,
  9478. 39688, 19479, 39725, 39774, 39782, 39812, 39818, 39838, 39886, 39909,
  9479. 39928, 39971, {f: 2, c: 40015}, 40037, {f: 2, c: 40221}, 40259, 40274,
  9480. 40330, 40342, 40384, 40364, 40380, 172432, 40423, 40455, 40606, 40623,
  9481. 40855, 131209, 19970, 19983, 19986, 20009, 20014, 20039, 131234, 20049,
  9482. 13318, 131236, 20073, 20125, 13356, 20156, 20163, 20168, 20203, 20186,
  9483. 20209, 20213, 20246, 20324, 20279, 20286, 20312, 131603, {f: 2, c: 20343},
  9484. 20354, 20357, 20454, 20402, 20421, 20427, 20434, 13418, 20466, 20499,
  9485. 20508, 20558, 20563, 20579, 20643, 20616, {f: 2, c: 20626}, 20629, 20650,
  9486. 131883, 20657, {f: 2, c: 20666}, 20676, 20679, 20723, 131969, 20686,
  9487. 131953, 20692, 20705, 13458, 132089, 20759, 132170, 20832, 132361, 20851,
  9488. 20867, 20875, 13500, 20888, 20899, 20909, 13511, 132566, 20979, 21010,
  9489. 21014, 132943, 21077, 21084, 21100, 21111, 21124, 21122, 133127, 21144,
  9490. 133178, 21156, {f: 2, c: 21178}, 21194, 21201, 133305, 21239, 21301, 21314,
  9491. 133500, 133533, 21351, 21370, 21412, 21428, 133843, 21431, 21440, 133917,
  9492. {f: 2, c: 13661}, 21461, 13667, 21492, 21540, 21544, 13678, 21571, 21602,
  9493. 21612, 21653, 21664, 21670, 21678, 21687, 21690, 21699, 134469, 21740,
  9494. 21743, 21745, 21747, {f: 2, c: 21760}, 21769, 21820, 21825, 13734, 21831,
  9495. 13736, 21860, 134625, 21885, 21890, 21905, 13765, 21970, 134805, 134765,
  9496. 21951, 21961, 21964, 21969, 21981, 13786, 21986, 134756, 21993, 22056,
  9497. 135007, 22023, 22032, 22064, 13812, 22077, 22080, 22087, 22110, 22112,
  9498. 22125, 13829, 22152, 22156, 22173, 22184, 22194, 22213, 22221, 22239,
  9499. 22248, {f: 2, c: 22262}, 135681, 135765, 22313, 135803, {f: 2, c: 22341},
  9500. 22349, 135796, 22376, 22383, {f: 3, c: 22387}, 22395, 135908, 135895,
  9501. 22426, {f: 2, c: 22429}, 22440, 22487, 135933, 22476, 135990, 136004,
  9502. 22494, 22512, 13898, 22520, 22523, 22525, 22532, 22558, 22567, 22585,
  9503. 136132, 22601, 22604, 22631, {f: 2, c: 22666}, 22669, {f: 2, c: 22671},
  9504. 22676, 22685, 22698, 22705, 136301, 22723, 22733, 22754, {f: 2, c: 22771},
  9505. {f: 2, c: 22789}, 22797, 22804, 136663, 13969, 22845, 13977, 22854, 13974,
  9506. 158761, 22879, 136775, {f: 2, c: 22901}, 22908, 22943, 22958, 22972, 22984,
  9507. 22989, 23006, 23015, 23022, 136966, 137026, 14031, 23053, 23063, 23079,
  9508. 23085, 23141, 23162, 23179, 23196, {f: 2, c: 23199}, 23202, 23217, 23221,
  9509. 23226, 23231, 23258, 23260, 23269, 23280, 23278, 23285, 23304, 23319,
  9510. 23348, 23372, 23378, 23400, 23407, 23425, 23428, 137667, 23446, 23468,
  9511. {f: 2, c: 14177}, 23502, 23510, 14188, 14187, 23537, 23549, 14197, 23555,
  9512. 23593, 138326, 23647, {f: 2, c: 23655}, 23664, 138541, 138565, 138616,
  9513. 138594, 23688, 23690, 14273, 138657, 138652, 23712, 23714, 23719, 138642,
  9514. 23725, 23733, 138679, 23753, 138720, 138803, 23814, 23824, 23851, 23837,
  9515. 23840, 23857, 23865, 14312, 23905, 23914, 14324, 23920, 139038, 14333,
  9516. 23944, 14336, 23959, 23984, 23988, 139126, 24017, 24023, 139258, 24036,
  9517. 24041, 14383, 14390, 14400, 24095, 24126, 24137, 14428, 24150, 14433,
  9518. {f: 2, c: 24173}, 139643, 24229, 24236, 24249, 24262, 24281, 140062, 24317,
  9519. 24328, 140205, 24350, 24391, 24419, 24434, 24446, 24463, 24482, 24519,
  9520. 24523, {f: 3, c: 24530}, 24546, {f: 2, c: 24558}, 24563, 14615, 24610,
  9521. 24612, 14618, 24652, 24725, 24744, 141043, 24753, 24766, 24776, 24793,
  9522. 24814, 24821, 24848, 24857, 24862, 24890, 14703, 24897, 24902, 24928,
  9523. 141403, {f: 2, c: 24978}, 24983, 24997, 25005, 141483, 25045, 25053, 25077,
  9524. 141711, 25123, 25170, 25185, 25188, 25211, 25197, 25203, 25241, 25301,
  9525. 142008, 25341, 25347, 25360, {f: 2, c: 142159}, 25394, 25397,
  9526. {f: 2, c: 25403}, 25409, 25412, 25422, 142150, 25433, 142365, 142246,
  9527. 25452, 25497, 142372, 25492, 25533, {f: 2, c: 25556}, 25568,
  9528. {f: 2, c: 25579}, 25586, 25630, 25637, 25641, 25647, 25690, 25693, 25715,
  9529. 25725, 25735, 25745, 25759, {f: 2, c: 25803}, 25813, 25815, 142817, 25828,
  9530. 25855, 14958, 25871, 25876, 14963, 25886, 25906, 25924, 25940, 25963,
  9531. 25978, 25988, 25994, 26034, 26037, 26040, 26047, 26057, 26068, 15062,
  9532. 26105, 26108, 26116, 26120, 26145, 26154, 26181, 26193, 26190, 15082,
  9533. 143811, 143861, 143798, 26218, {f: 2, c: 26220}, 26235, 26240, 26256,
  9534. 26258, 15118, 26285, 26289, 26293, 15130, 15132, 15063, 26369, 26386,
  9535. 144242, 26393, 144339, 144338, 26445, 26452, 26461, 144336, 144356, 144341,
  9536. 26484, 144346, 26514, 144351, 33635, 26640, 26563, 26568, 26578, 26587,
  9537. 26615, 144458, 144465, 144459, 26648, 26655, 26669, 144485, 26675, 26683,
  9538. 26686, 26693, 26697, 26700, 26709, 26711, 15223, 26731, 26734, 26748,
  9539. 26754, 26768, 26774, 15213, {f: 3, c: 26776}, 26780, {f: 2, c: 26794},
  9540. 26804, 26811, 26875, 144612, 144730, 26819, 26821, 26828, 26841,
  9541. {f: 2, c: 26852}, 26860, 26871, 26883, 26887, 15239, 144788, 15245, 26950,
  9542. 26985, 26988, 27002, 27026, 15268, 27030, 27056, 27066, 27068, 27072,
  9543. 27089, 144953, 144967, 144952, 27107, {f: 2, c: 27118}, 27123, 15309,
  9544. 27124, 27134, 27153, 27162, 27165, 145180, {f: 2, c: 27186}, 27199, 27209,
  9545. 27258, 27214, 27218, 27236, 145164, 27275, 15344, 27297, 145252, 27307,
  9546. 27325, 27334, 27348, 27344, 27357, 145407, 145383, {f: 3, c: 27377}, 27389,
  9547. 145444, 27403, {f: 3, c: 27407}, 145469, 27415, 15398, 27439, 27466, 27480,
  9548. 27500, 27509, [11934, 27514], 27521, 27547, 27566, 146072, 27581,
  9549. {f: 3, c: 27591}, 27610, {f: 2, c: 27622}, 27630, 27650, 27658, 27662,
  9550. 27702, 146559, 27725, 27739, 27757, 27780, 27785, 15555, 27796, 27799,
  9551. 27821, 27842, 15570, 27868, 27881, 27885, 146688, 27904, 27940,
  9552. {f: 2, c: 27942}, 27751, 27951, 27964, 27995, 28000, 28016,
  9553. {f: 2, c: 28032}, 28042, 28045, 28049, 28056, 146752, 146938, 146937,
  9554. 146899, 28075, 28078, 28084, 28098, 27956, 28104, 28110, 28127, 28150,
  9555. 28214, 28190, 15633, 28210, {f: 2, c: 28232}, {f: 2, c: 28235}, 28239,
  9556. {f: 2, c: 28243}, 28247, 28259, 15646, 28307, 28327, 28340, 28355, 28469,
  9557. 28395, 28409, 28411, 28426, 28428, 28440, 28453, 28470, 28476, 147326,
  9558. 28498, 28503, 28512, 28520, 28560, 28566, 28606, 28575, 28581, 28591,
  9559. 15716, {f: 2, c: 28616}, 28649, 147606, 28668, 28672, 28682, 28707, 147715,
  9560. 28730, 28739, 28743, 28747, 15770, 28773, 28777, 28782, 28790, 28806,
  9561. 28823, 147910, 28831, 28849, 147966, 28908, 28874, 28881, 28931, 28934,
  9562. 28936, 28940, 15808, 28975, 29008, 29011, 29022, 15828, 29078, 29056,
  9563. 29083, 29088, 29090, {f: 2, c: 29102}, 148412, 29145, 29148, 29191, 15877,
  9564. 29236, 29241, 29250, 29271, 29283, 149033, {f: 2, c: 29294}, 29304, 29311,
  9565. 29326, 149157, 29358, 29360, 29377, 15968, 29388, 15974, 15976, 29427,
  9566. 29434, 29447, 29458, {f: 2, c: 29464}, 16003, 29497, 29484, 29491, 29501,
  9567. 29522, 16020, 29547, 149654, {f: 2, c: 29550}, 29553, 29569, 29578, 29588,
  9568. 29592, 29596, 29605, 29625, 29631, 29637, 29643, 29665, 29671, 29689,
  9569. 29715, 29690, 29697, 29779, 29760, 29763, 29778, 29789, 29825, 29832,
  9570. 150093, 29842, 29847, 29849, 29857, 29861, 29866, 29881, 29883, 29882,
  9571. 29910, 29912, 29931, 150358, 29946, 150383, 29984, 29988, 29994, 16215,
  9572. 150550, {f: 2, c: 30013}, 30016, 30024, 30032, 30034, 30066, 30065, 30074,
  9573. {f: 2, c: 30077}, 30092, 16245, 30114, 16247, 30128, 30135,
  9574. {f: 2, c: 30143}, 30150, 30159, 30163, 30173, {f: 2, c: 30175}, 30183,
  9575. 30190, 30193, 30211, 30232, 30215, 30223, 16302, 151054, 30227,
  9576. {f: 2, c: 30235}, 151095, 30245, 30248, 30268, 30259, 151146, 16329, 30273,
  9577. 151179, 30281, 30293, 16343, 30318, 30357, 30369, 30368, {f: 2, c: 30375},
  9578. 30383, 151626, 30409, 151637, 30440, 151842, 30487, 30490, 30509, 30517,
  9579. 151977, 16441, 152037, 152013, 30552, 152094, 30588, 152140, 16472, 30618,
  9580. 30623, 30626, 30628, {f: 2, c: 30686}, 30692, 30698, 30700, 30715, 152622,
  9581. 30725, 30729, 30733, 30745, 30764, 30791, 30826, 152793, 30858, 30868,
  9582. 30884, 30877, 30879, 30907, 30933, 30950, {f: 2, c: 30969}, 30974, 152999,
  9583. 30992, 31003, 31013, 31050, 31064, 16645, 31079, 31090, 31125, 31137,
  9584. 31145, 31156, 31170, 31175, {f: 2, c: 31180}, 31190, 16712, 153513, 153524,
  9585. 16719, 31242, 31253, 31259, 16739, 31288, 31303, 31318, 31321, 31324,
  9586. 31327, 31335, 31338, 31349, 31362, 31370, 31376, 31404, 154068, 16820,
  9587. 31417, 31422, 16831, 31436, 31464, 31476, 154340, 154339, 154353, 31549,
  9588. 31530, {f: 2, c: 31534}, 16870, 16883, 31615, 31553, 16878, 31573, 31609,
  9589. 31588, 31590, 31603, 154546, 16903, 31632, 31643, 16910, 31669, 31676,
  9590. 31685, 31690, 154699, 154724, 31700, 31702, 31706, 31722, 31728, 31747,
  9591. 31758, 31813, 31818, 31831, 31838, 31841, 31849, 31855, 155182, 155222,
  9592. 155237, 31910, 155234, {f: 2, c: 31926}, 155352, 31940, 155330, 31949,
  9593. 155368, 155427, 31974, 155484, 31989, 32003, 17094, 32018, 32030, 155616,
  9594. 155604, {f: 2, c: 32061}, 32064, 32071, 155660, 155643, 17110, 32090,
  9595. 32106, 32112, 17117, 32127, 155671, 32136, 32151, 155744, 32157, 32167,
  9596. 32170, 32182, 32192, 32215, 32217, 32230, 17154, 155885, 64088, 32272,
  9597. 32279, 32285, 32295, 32300, 32325, 32373, 32382, {f: 2, c: 32390}, 17195,
  9598. 32410, 17219, 32572, 32571, 32574, 32579, 13505, 156272, 156294,
  9599. {f: 2, c: 32611}, 32621, {f: 2, c: 32637}, 32656, 20859, 146702, 32662,
  9600. 32668, 32685, 156674, 32707, 32719, 32739, 32754, 32778, 32776, 32790,
  9601. 32812, 32816, 32835, 32870, 32891, 32921, 32924, 32932, 32935, 32952,
  9602. 157310, 32965, 32981, 32998, 33037, 33013, 33019, 17390, 33077, 33054,
  9603. 17392, 33060, 33063, 33068, 157469, 33085, 17416, 33129, 17431, 17436,
  9604. 33157, 17442, 33176, 33202, 33217, 33219, 33238, 33243, 157917, 33252,
  9605. 157930, 33260, 33277, 33279, 158063, 33284, 158173, 33305, 33314, 158238,
  9606. 33340, 33353, 33349, 158296, 17526, 17530, 33367, 158348, 33372, 33379,
  9607. 158391, 17553, 33405, 33407, 33411, 33418, 33427, {f: 2, c: 33447}, 33458,
  9608. 33460, 33466, 33468, 33506, 33512, 33527, {f: 2, c: 33543}, 33548, 33620,
  9609. 33563, 33565, 33584, 33596, 33604, 33623, 17598, 17620, 17587,
  9610. {f: 2, c: 33684}, 33691, 33693, 33737, 33744, 33748, 33757, 33765, 33785,
  9611. 33813, 158835, 33815, 33849, 33871, {f: 2, c: 33873}, {f: 2, c: 33881},
  9612. 33884, 158941, 33893, 33912, 33916, 33921, 17677, 33943, 33958, 33982,
  9613. 17672, {f: 2, c: 33998}, 34003, 159333, 34023, 34026, 34031, 34033, 34042,
  9614. 34075, {f: 2, c: 34084}, 34091, 34127, 34159, 17731, 34129,
  9615. {f: 2, c: 34145}, 159636, 34171, 34173, 34175, 34177, 34182, 34195, 34205,
  9616. 34207, 159736, {f: 2, c: 159734}, 34236, 34247, 34250, {f: 2, c: 34264},
  9617. 34271, 34273, 34278, 34294, 34304, 34321, 34334, 34337, 34340, 34343,
  9618. 160013, 34361, 34364, 160057, 34368, 34387, 34390, 34423, 34439, 34441,
  9619. {f: 2, c: 34460}, 34481, 34483, 34497, 34499, 34513, 34517, 34519, 34531,
  9620. 34534, 17848, 34565, 34567, 34574, 34576, 34591, 34593, 34595, 34609,
  9621. 34618, 34624, 34627, 34641, 34648, {f: 2, c: 34660}, 34674, 34684, 160731,
  9622. 160730, 34727, 34697, 34699, 34707, 34720, 160766, 17893, 34750, 160784,
  9623. 34753, 34766, 34783, 160841, 34787, {f: 2, c: 34789}, 34794, 34835, 34856,
  9624. 34862, 34866, 34876, 17935, 34890, 34904, 161301, 161300, 34921, 161329,
  9625. 34927, 34976, 35004, 35008, 161427, 35025, 35027, 17985, 35073, 161550,
  9626. 35127, 161571, 35138, 35141, 35145, 161618, 35170, 35209, 35216, 35231,
  9627. 35248, 35255, 35288, 35307, 18081, 35315, 35325, 35327, 18095, 35345,
  9628. 35348, 162181, 35361, 35381, 35390, 35397, 35405, 35416, 35502, 35472,
  9629. 35511, 35543, 35580, 162436, 35594, 35589, 35597, 35612, 35629, 18188,
  9630. 35665, 35678, 35702, 35713, 35723, {f: 2, c: 35732}, 35897, 162739, 35901,
  9631. 162750, 162759, 35909, 35919, 35927, 35945, 35949, 163000, 35987, 35986,
  9632. 35993, 18276, 35995, 36054, 36053, 163232, 36081, 163344, 36105, 36110,
  9633. 36296, 36313, 36364, 18429, 36349, 36358, 163978, 36372, 36374,
  9634. {f: 2, c: 36385}, 36391, 164027, 18454, 36406, 36409, 36436, 36450, 36461,
  9635. 36463, 36504, 36510, 36533, 36539, 164482, 18510, 164595, 36608, 36616,
  9636. 36651, 36672, 36682, 36696, 164876, 36772, 36788, 164949, 36801, 36806,
  9637. 64036, 36810, 36813, 36819, 36821, 36849, 36853, 36859, 36876, 36919,
  9638. 165227, 36931, 36957, {f: 2, c: 165320}, 36997, 37004, 37008, 37025, 18613,
  9639. 37040, 37046, 37059, 37064, 165591, 37084, 37087, 165626, 37110, 37106,
  9640. 37120, 37099, {f: 2, c: 37118}, 37124, 37126, 37144, 37150, 37175, 37177,
  9641. {f: 2, c: 37190}, 37207, 37209, 37236, 37241, 37253, 37299, 37302,
  9642. {f: 2, c: 37315}, 166217, 166214, 37356, 37377, {f: 2, c: 37398}, 166251,
  9643. 37442, 37450, 37462, 37473, 37477, 37480, 166280, {f: 2, c: 37500}, 37503,
  9644. 37513, 37517, 37527, 37529, 37535, 37547, {f: 2, c: 166330}, 37554,
  9645. {f: 2, c: 37567}, 37574, 37582, 37605, 37649, 166430, 166441, 37623, 37673,
  9646. 166513, 166467, 37713, 37722, 37739, 37745, 37747, 37793, 166553, 166605,
  9647. 37768, 37771, 37775, 37790, 37877, 166628, 166621, 37873, 37831, 37852,
  9648. 37863, 37897, {f: 2, c: 37910}, 37883, 37938, 37947, 166849, 166895, 37997,
  9649. 37999, 38265, 38278, {f: 2, c: 38284}, 167184, 167281, 38344, 167419,
  9650. 167455, 38444, {f: 2, c: 38451}, 167478, 38460, 38497, 167561, 38530,
  9651. 167659, 38554, 167730, 18919, 38579, 38586, 38589, 18938, 167928, 38616,
  9652. 38618, 38621, 18948, 38676, 38691, 18985, 38710, 38721, 38727, 38743,
  9653. 38747, 38762, 168608, 168625, 38806, 38814, {f: 2, c: 38833}, 38846, 38860,
  9654. 38865, 38868, 38872, 38881, 38897, 38916, 38925, 38932, 38934, 19132,
  9655. 169104, {f: 2, c: 38962}, 38949, 38983, 39014, 39083, 39085, 39088, 169423,
  9656. 39095, {f: 2, c: 39099}, 39106, 39111, 39115, 39137, 39139, 39146,
  9657. {f: 2, c: 39152}, 39155, 39176, 19259, 169712, {f: 2, c: 39190}, 169753,
  9658. {f: 3, c: 39194}, 169808, 39217, {f: 3, c: 39226}, 39233, 39238, 39246,
  9659. 39264, 39331, 39334, 39357, 39359, 39363, 39380, 39385, 39390, 170182,
  9660. 39408, 39417, 39420, 39434, 39441, 39450, 39456, 39473, 39492, 39500,
  9661. 39512, 19394, 39599, 19402, 39607, 19410, 39609, 170610, 39622, 39632,
  9662. 39634, 39637, 39648, 39653, 39657, 39692, 39696, 39698, 39702, 39708,
  9663. 39723, 39741, 19488, 39755, 39779, 39781, {f: 2, c: 39787},
  9664. {f: 2, c: 39798}, 39846, 39852, 171483, 39858, 39864, 39870, 39923, 39896,
  9665. 39901, 39914, 39919, 39918, 171541, 171658, 171593, 39958,
  9666. {f: 3, c: 39960}, 39965, 39970, 39977, 171716, 39985, 39991, 40005, 40028,
  9667. 171753, {f: 2, c: 40009}, 171739, 40020, 40024, 40027, 40029, 40031,
  9668. {f: 3, c: 40041}, {f: 2, c: 40045}, 40050, 40053, 40058, 40166, 40178,
  9669. 40203, [171982, 171991], 40209, {f: 2, c: 40215}, 172079, 19652, 172058,
  9670. 40242, 19665, 40266, 40287, 40290, 172281, 172162, 40307, {f: 2, c: 40310},
  9671. 40324, 40345, 40353, 40383, 40373, 40377, 40381, 40393, 40410, 40416,
  9672. 40419, 19719, 40458, 40450, 40461, 40476, 40571, 139800, 40576, 40581,
  9673. 40603, 172940, 40637, 173111, 40671, 40703, 40706, 19831, 40707, 40762,
  9674. 40765, 40774, 40787, 40789, 40792, 173553, 40797, 173570, 40809, 40813,
  9675. 40816, 173746, 11948, 13844, 14509, 15820, 16348, 17854, 17936, 19326,
  9676. 19512, 19681, 19980, {f: 2, c: 20003}, 20089, 20211, 20236, 20249, 20267,
  9677. 20270, 20273, 20356, 20382, 20407, 20484, 20492, 20556, 20575, 20578,
  9678. 20599, 20622, 20638, 20642, 20675, 20712, 20721, 20734, 20743,
  9679. {f: 3, c: 20748}, 20787, 20792, 20852, 20868, 20920, 20922, 20936, 20943,
  9680. 20945, {f: 2, c: 20947}, 20952, 20959, 20997, 21030, 21032, 21035,
  9681. {f: 2, c: 21041}, 21045, 21052, 21082, 21088, 21102, {f: 2, c: 21112},
  9682. 21130, 21132, 21217, 21225, 21233, 21251, 21265, 21279, 21293, 21298,
  9683. 21309, 21349, 21357, 21369, 21374, 21396, 21401, 21418, 21423, 21434,
  9684. 21441, {f: 2, c: 21444}, 21472, 21523, 21546, 21553, {f: 2, c: 21556},
  9685. 21580, 21671, 21674, 21681, 21691, 21710, 21738, 21756, 21765, 21768,
  9686. 21781, 21799, 21802, 21814, 21841, 21862, 21903, 21906, 21908, 21924,
  9687. 21938, 21955, 21958, 21971, 21979, 21996, 21998, 22001, 22006, 22008,
  9688. 22021, 22029, {f: 2, c: 22033}, 22060, 22069, 22073, 22093, 22100, 22149,
  9689. 22175, 22182, 22199, 22220, 22223, 22233, 22241, 22251, 22253, 22257,
  9690. 22279, 22284, {f: 2, c: 22298}, 22301, 22316, 22318, {f: 2, c: 22333},
  9691. 22367, 22379, 22381, 22394, 22403, 22423, 22446, 22485, 22503, 22541,
  9692. 22566, 22605, 22607, 22623, 22637, 22655, 22657, 22680, 22716, 22815,
  9693. 22819, 22873, 22905, 22935, 22959, 22963, 23007, 23025, 23032, 23218,
  9694. 23224, 23274, 23286, 23323, 23325, 23329, 23352, 23479, 23511, 23520,
  9695. 23583, 23594, 23596, 23606, 23641, 23644, 23661, 23773, 23809, 23860,
  9696. 23869, 23897, 23934, 23939, 24007, 24057, 24104, 24114, 24117, 24155,
  9697. 24168, 24170, 24183, 24192, 24203, 24243, 24253, 24273, {f: 2, c: 24276},
  9698. 24397, 24492, 24554, 24583, 24649, 24660, 24679, 24763, 24772, 24829,
  9699. 24842, 24854, 24874, 24886, 24926, 24932, 24955, 24957, 24959, 24989,
  9700. 25016, 25052, 25058, 25061, 25064, 25092, 25095, 25137, 25145, 25149,
  9701. 25210, 25232, 25256, 25306, 25332, 25366, 25386, 25398, 25414, 25419,
  9702. 25427, 25457, 25461, 25471, 25474, 25482, {f: 2, c: 25518}, 25578,
  9703. {f: 2, c: 25592}, 25618, 25624, 25632, 25636, 25642, 25653, 25661, 25663,
  9704. 25682, 25695, 25716, 25744, {f: 2, c: 25752}, 25772, 25779, 25837, 25840,
  9705. 25883, 25887, 25902, 25929, 25952, 26002, 26005, 26036, 26046, 26056,
  9706. 26062, 26064, 26079, 26238, {f: 2, c: 26251}, 26291, 26304, 26319, 26405,
  9707. 26421, 26453, 26496, 26511, 26513, 26532, 26545, 26549, 26558, 26664,
  9708. 26758, 26859, 26869, 26903, 26931, 26936, 26971, 26981, 27048, 27051,
  9709. 27055, 27109, 27121, 27210, 27221, 27239, 27249, 27311, {f: 2, c: 27336},
  9710. 27395, 27451, 27455, {f: 2, c: 27517}, 27568, 27639, 27641, 27652, 27657,
  9711. 27661, 27692, 27722, 27730, 27732, 27769, 27820, 27828, 27858, 28001,
  9712. 28028, 28089, 28144, 28229, 28275, 28283, 28285, 28297, 28348,
  9713. {f: 2, c: 28378}, 28454, 28457, 28464, 28551, 28573, 28590, 28599, 28685,
  9714. 28704, 28745, 28824, 28848, {f: 2, c: 28885}, 28997, 29106, 29172, 29207,
  9715. 29215, 29251, {f: 2, c: 29263}, 29274, 29280, 29288, 29303, 29316, 29385,
  9716. 29413, 29428, 29442, 29451, 29470, 29474, {f: 2, c: 29498}, 29517, 29528,
  9717. 29543, 29810, 29871, 29919, 29924, 29940, 29947, 29974, 29985, 30015,
  9718. 30046, 30105, 30116, 30145, 30148, 30156, 30167, 30172, 30177, 30191,
  9719. 30212, 30220, 30237, 30258, 30264, 30277, 30282, 30303, 30381, 30397,
  9720. 30425, 30443, 30448, 30457, 30464, 30478, 30498, 30504, 30511, 30521,
  9721. 30526, 30533, 30538, 30543, 30558, 30564, 30567, 30572, 30596,
  9722. {f: 2, c: 30604}, 30614, 30631, 30639, 30647, 30654, 30665, 30673, 30681,
  9723. 30705, 30775, 30812, 30846, 30872, 30881, 30897, 30899, 30921, 30931,
  9724. 30988, 31007, {f: 2, c: 31015}, 31039, 31042, 31060, 31083, 31100, 31147,
  9725. 31172, 31210, 31234, 31244, 31280, 31290, 31300, 31360, 31366, 31380,
  9726. 31413, 31421, 31486, 31531, 31607, 31648, 31660, 31664, 31720, 31730,
  9727. 31736, 31740, 31742, 31753, 31784, 31791, 31810, {f: 2, c: 31826},
  9728. {f: 3, c: 31835}, 31858, 31869, 31879, 31902, 31930, 31943, 31955, 31962,
  9729. 32060, 32077, 32130, 32133, 32141, 32145, 32158, 32179, 32185, 32208,
  9730. 32229, {f: 2, c: 32245}, 32303, 32310, 32324, 32367, 32376, 32385, 32573,
  9731. 32603, 32605, 32613, 32625, {f: 2, c: 32639}, 32651, 32674,
  9732. {f: 3, c: 32765}, 32775, 32781, 32798, 32825, 32904, 32910, 32975, 32980,
  9733. 33005, 33008, 33015, 33018, 33022, 33027, 33047, 33072, 33111, 33135,
  9734. 33139, 33163, 33168, 33179, 33182, 33227, 33237, {f: 2, c: 33245}, 33249,
  9735. 33263, 33270, 33280, 33291, {f: 2, c: 33299}, 33306, 33338, 33348, 33389,
  9736. 33412, 33417, 33425, 33450, 33456, 33488, 33514, 33519, 33526, 33622,
  9737. 33656, 33784, 33788, 33880, 33939, 33969, 33981, 34043, 34118, 34134,
  9738. 34141, 34181, 34200, 34370, 34374, 34496, 34580, 34594, 34606, 34617,
  9739. 34653, 34683, 34700, 34702, {f: 2, c: 34711}, 34718, 34723, 34734, 34751,
  9740. 34761, 34778, 34840, 34843, 34861, 34874, 34885, 34891, 34894, 34901,
  9741. 34906, 34926, {f: 3, c: 34970}, 35021, 35040, 35055, {f: 2, c: 35086},
  9742. 35110, 35125, 35162, 35164, 35179, 35184, 35196, 35237, 35253, 35260,
  9743. 35285, 35401, 35415, 35431, 35454, 35462, 35478, 35510, 35529, 35537,
  9744. 35549, 35564, 35573, 35590, 35599, 35601, 35653, 35666, 35693, 35704,
  9745. 35708, 35710, 35717, 35743, 35915, 35923, 35963, 36026, 36037, 36041,
  9746. 36050, 36076, 36085, 36087, 36097, 36099, 36119, 36124, 36206, 36241,
  9747. 36255, 36267, 36274, 36309, 36327, {f: 2, c: 36337}, 36340, 36353, 36363,
  9748. 36390, 36401, {f: 2, c: 36416}, 36429, 36431, 36444, 36449, 36457, 36465,
  9749. 36469, 36471, 36489, 36496, 36501, 36506, 36519, 36521, 36525, 36584,
  9750. 36592, 36615, 36632, 36645, 36647, 36652, 36661, 36666, 36675, 36679,
  9751. 36689, 36693, {f: 3, c: 36768}, 36773, 36868, 36891, 36911, 36940, 36955,
  9752. 36976, 36980, 36985, 37003, 37016, 37024, 37042, 37053, 37065, 37104,
  9753. 37125, 37157, 37210, 37223, 37242, 37258, 37265, 37269, 37296, 37307,
  9754. 37309, 37314, 37317, 37376, 37385, 37411, 37494, 37518, 37551,
  9755. {f: 2, c: 37563}, 37569, 37571, 37573, 37576, 37652, 37683, 37686, 37720,
  9756. 37759, 37762, 37770, 37819, 37836, 37862, 37881, 37890, {f: 2, c: 37901},
  9757. 37934, 37964, 38280, 38305, 38335, 38342, 38345, {f: 2, c: 38353}, 38368,
  9758. 38372, 38374, 38436, 38449, 38456, 38461, 38484, 38516, 38523, 38527,
  9759. 38529, 38531, 38537, 38550, 38574, 38659, 38683, {f: 2, c: 38689}, 38696,
  9760. 38705, 38759, 38774, 38781, 38783, 38809, 38815, 38828, 38841, 38861,
  9761. 38880, 38895, 38919, 38950, 38958, {f: 2, c: 39010}, 39092, 39109, 39170,
  9762. 39185, 39189, 39221, 39240, 39252, 39262, 39393, 39436, 39440, 39459,
  9763. 39489, 39505, {f: 2, c: 39613}, 39681, 39689, 39691, {f: 2, c: 39693},
  9764. 39705, 39733, 39752, 39765, 39784, 39808, 39814, 39824, 39837, 39856,
  9765. 39871, 39880, 39935, 39938, 39964, 39989, 40004, 40022, 40033, 40040,
  9766. 40240, 40253, 40298, 40315, 40421, 40425, 40435, 40570, {f: 3, c: 40578},
  9767. 40624, 40676, 40688, 40690, 40713, 40719, 40724, 40731, 40738, 40742,
  9768. {f: 2, c: 40746}, 40756, 40794, 40815, 40862, 40869, 131317, 151044,
  9769. 151538, 163187, 194581, 194630, 194713, 194726, 194789, 195038, 13790,
  9770. {s: 4}, 172722, 0, 0, 131416, {s: 4}, 132529, 0, 0, 132844, {s: 6}, 134488,
  9771. {s: 21}, 154060, {s: 9}, 14756, 14776, 142914, 0, 0, 14940, 0, 0, 143339,
  9772. 0, 0, 162228, 0, 15044, 15051, {s: 5}, 14981, {s: 8}, 15347, 27384, {s: 5},
  9773. 15665, {s: 9}, 147531, 0, 15936, 14497, {s: 34}, 158878, {s: 12}, 18207,
  9774. 162876, {s: 4}, 18462, {s: 71}, 39709, 39724, 20482, 20958, 21255, 23532,
  9775. 63784, 26142, 63785, 28746, 64021, 21857, 27706, 31328, 156492, 34819,
  9776. 38315, 38741, 171581, 173594],
  9777. 'Adobe-Korea1': [{f: 95, c: 32}, 8361, 8208, 169, 0, 0, [12288, 12644],
  9778. {f: 2, c: 12289}, 12539, 8229, [8230, 8943], 168, 12291, {f: 2, c: 8211},
  9779. 8214, 65340, 65374, {f: 2, c: 8216}, {f: 2, c: 8220}, {f: 2, c: 12308},
  9780. {f: 10, c: 12296}, 177, 215, 247, 8800, {f: 2, c: 8804}, 8734, 8756, 176,
  9781. {f: 2, c: 8242}, 8451, 8491, {f: 2, c: 65504}, 65509, 9794, 9792, 8736,
  9782. 8869, 8978, 8706, 8711, 8801, 8786, 167, 8251, 9734, 9733, 9675, 9679,
  9783. 9678, 9671, 9670, 9633, 9632, 9651, 9650, 9661, 9660, 8594,
  9784. {f: 2, c: 8592}, {f: 2, c: 8595}, 12307, 171, 187, 8730, 8765, 8733, 8757,
  9785. {f: 2, c: 8747}, 8712, 8715, {f: 2, c: 8838}, {f: 2, c: 8834}, 8746, 8745,
  9786. {f: 2, c: 8743}, 65506, 8658, 8660, 8704, 8707, 180, 732, 711, 728, 733,
  9787. 730, 729, 184, 731, 161, 191, 8758, 8750, 8721, 8719, 164, 8457, 8240,
  9788. 9665, 9664, 9655, 9654, 9828, {f: 2, c: 9824}, 9829, 9831, 9827, 9673,
  9789. 9672, 9635, {f: 2, c: 9680}, 9618, {f: 2, c: 9636}, 9640, 9639, 9638, 9641,
  9790. 9832, 9743, 9742, 9756, 9758, 182, {f: 2, c: 8224}, 8597, 8599, 8601, 8598,
  9791. 8600, 9837, {f: 2, c: 9833}, 9836, 12927, 12828, 8470, 13255, 8482, 13250,
  9792. 13272, 8481, {f: 59, c: 65281}, 65510, {f: 33, c: 65341}, 65507,
  9793. {f: 51, c: 12593}, {f: 42, c: 12645}, {f: 10, c: 8560}, {f: 10, c: 8544},
  9794. {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945}, {f: 7, c: 963}, 9472,
  9795. 9474, 9484, 9488, 9496, 9492, 9500, 9516, 9508, 9524, 9532, 9473, 9475,
  9796. 9487, 9491, 9499, 9495, 9507, 9523, 9515, 9531, 9547, 9504, 9519, 9512,
  9797. 9527, 9535, 9501, 9520, 9509, 9528, 9538, 9490, 9489, 9498, 9497, 9494,
  9798. 9493, 9486, 9485, {f: 2, c: 9502}, {f: 2, c: 9505}, {f: 2, c: 9510},
  9799. {f: 2, c: 9513}, {f: 2, c: 9517}, {f: 2, c: 9521}, {f: 2, c: 9525},
  9800. {f: 2, c: 9529}, {f: 2, c: 9533}, {f: 2, c: 9536}, {f: 8, c: 9539},
  9801. {f: 3, c: 13205}, 8467, 13208, 13252, {f: 4, c: 13219}, {f: 10, c: 13209},
  9802. 13258, {f: 3, c: 13197}, 13263, {f: 2, c: 13192}, 13256, {f: 2, c: 13223},
  9803. {f: 10, c: 13232}, {f: 5, c: 13184}, {f: 6, c: 13242}, {f: 5, c: 13200},
  9804. 8486, {f: 2, c: 13248}, {f: 3, c: 13194}, 13270, 13253, {f: 3, c: 13229},
  9805. 13275, {f: 4, c: 13225}, 13277, 13264, 13267, 13251, 13257, 13276, 13254,
  9806. 198, 208, 170, 294, 306, 319, 321, 216, 338, 186, 222, 358, 330,
  9807. {f: 28, c: 12896}, {f: 26, c: 9424}, {f: 15, c: 9312}, 189,
  9808. {f: 2, c: 8531}, 188, 190, {f: 4, c: 8539}, 230, 273, 240, 295, 305, 307,
  9809. 312, 320, 322, 248, 339, 223, 254, 359, 331, 329, {f: 28, c: 12800},
  9810. {f: 26, c: 9372}, {f: 15, c: 9332}, 185, {f: 2, c: 178}, 8308, 8319,
  9811. {f: 4, c: 8321}, {f: 83, c: 12353}, {f: 86, c: 12449}, {f: 6, c: 1040},
  9812. 1025, {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, {f: 2, c: 44032}, 44036,
  9813. {f: 4, c: 44039}, {f: 8, c: 44048}, {f: 5, c: 44057}, 44064, 44068,
  9814. {f: 2, c: 44076}, {f: 3, c: 44079}, {f: 2, c: 44088}, 44092, 44096, 44107,
  9815. 44109, 44116, 44120, 44124, {f: 2, c: 44144}, 44148, {f: 2, c: 44151},
  9816. 44154, {f: 2, c: 44160}, {f: 4, c: 44163}, {f: 4, c: 44169}, 44176, 44180,
  9817. {f: 2, c: 44188}, {f: 3, c: 44191}, {f: 3, c: 44200}, 44204,
  9818. {f: 2, c: 44207}, {f: 2, c: 44216}, {f: 3, c: 44219}, 44225, 44228, 44232,
  9819. 44236, 44245, 44247, {f: 2, c: 44256}, 44260, {f: 2, c: 44263}, 44266,
  9820. 44268, {f: 3, c: 44271}, 44275, {f: 2, c: 44277}, {f: 2, c: 44284}, 44288,
  9821. 44292, 44294, {f: 2, c: 44300}, 44303, 44305, 44312, 44316, 44320, 44329,
  9822. {f: 2, c: 44332}, {f: 2, c: 44340}, 44344, 44348, {f: 2, c: 44356}, 44359,
  9823. 44361, 44368, 44372, 44376, 44385, 44387, {f: 2, c: 44396}, 44400,
  9824. {f: 4, c: 44403}, {f: 3, c: 44411}, 44415, {f: 2, c: 44417},
  9825. {f: 2, c: 44424}, 44428, 44432, {f: 2, c: 44444}, 44452, 44471,
  9826. {f: 2, c: 44480}, 44484, 44488, {f: 2, c: 44496}, 44499, 44508, 44512,
  9827. 44516, {f: 2, c: 44536}, 44540, {f: 3, c: 44543}, {f: 2, c: 44552}, 44555,
  9828. 44557, 44564, {f: 2, c: 44592}, 44596, {f: 2, c: 44599}, 44602,
  9829. {f: 2, c: 44608}, 44611, {f: 2, c: 44613}, 44618, {f: 3, c: 44620}, 44624,
  9830. 44628, 44630, {f: 2, c: 44636}, {f: 3, c: 44639}, 44645, {f: 2, c: 44648},
  9831. 44652, 44656, {f: 2, c: 44664}, {f: 3, c: 44667}, {f: 2, c: 44676}, 44684,
  9832. {f: 3, c: 44732}, 44736, 44740, {f: 2, c: 44748}, {f: 3, c: 44751},
  9833. {f: 2, c: 44760}, 44764, 44776, 44779, 44781, 44788, 44792, 44796,
  9834. {f: 2, c: 44807}, 44813, 44816, {f: 2, c: 44844}, 44848, 44850, 44852,
  9835. {f: 2, c: 44860}, 44863, {f: 3, c: 44865}, {f: 2, c: 44872}, 44880,
  9836. {f: 2, c: 44892}, {f: 2, c: 44900}, 44921, 44928, 44932, 44936,
  9837. {f: 2, c: 44944}, 44949, 44956, {f: 2, c: 44984}, 44988, 44992,
  9838. {f: 3, c: 44999}, 45003, {f: 2, c: 45005}, 45012, 45020, {f: 2, c: 45032},
  9839. {f: 2, c: 45040}, 45044, 45048, {f: 2, c: 45056}, 45060, 45068, 45072,
  9840. 45076, {f: 2, c: 45084}, 45096, {f: 2, c: 45124}, 45128, 45130, 45132,
  9841. 45134, {f: 3, c: 45139}, 45143, 45145, 45149, {f: 2, c: 45180}, 45184,
  9842. 45188, {f: 2, c: 45196}, 45199, 45201, {f: 3, c: 45208}, 45212,
  9843. {f: 4, c: 45215}, {f: 2, c: 45224}, {f: 5, c: 45227}, 45233,
  9844. {f: 3, c: 45235}, 45240, 45244, {f: 2, c: 45252}, {f: 3, c: 45255},
  9845. {f: 2, c: 45264}, 45268, 45272, 45280, 45285, {f: 2, c: 45320},
  9846. {f: 2, c: 45323}, 45328, {f: 2, c: 45330}, {f: 2, c: 45336},
  9847. {f: 3, c: 45339}, {f: 3, c: 45347}, 45352, 45356, {f: 2, c: 45364},
  9848. {f: 3, c: 45367}, {f: 2, c: 45376}, 45380, 45384, {f: 2, c: 45392},
  9849. {f: 2, c: 45396}, 45400, 45404, 45408, {f: 2, c: 45432}, 45436, 45440,
  9850. 45442, {f: 2, c: 45448}, 45451, 45453, {f: 3, c: 45458}, 45464, 45468,
  9851. 45480, 45516, 45520, 45524, {f: 2, c: 45532}, 45535, {f: 2, c: 45544},
  9852. 45548, 45552, 45561, 45563, 45565, {f: 2, c: 45572}, 45576,
  9853. {f: 2, c: 45579}, {f: 2, c: 45588}, 45591, 45593, 45600, 45620, 45628,
  9854. 45656, 45660, 45664, {f: 2, c: 45672}, {f: 2, c: 45684}, 45692,
  9855. {f: 2, c: 45700}, 45705, {f: 2, c: 45712}, 45716, {f: 3, c: 45720},
  9856. {f: 2, c: 45728}, 45731, {f: 2, c: 45733}, 45738, 45740, 45744, 45748,
  9857. {f: 2, c: 45768}, 45772, 45776, 45778, {f: 2, c: 45784}, 45787, 45789,
  9858. 45794, {f: 3, c: 45796}, 45800, {f: 5, c: 45803}, {f: 3, c: 45811},
  9859. {f: 5, c: 45815}, {f: 3, c: 45823}, 45828, 45832, {f: 2, c: 45840},
  9860. {f: 3, c: 45843}, 45852, {f: 3, c: 45908}, 45912, {f: 2, c: 45915},
  9861. {f: 2, c: 45918}, {f: 2, c: 45924}, 45927, 45929, 45931, 45934,
  9862. {f: 2, c: 45936}, 45940, 45944, {f: 2, c: 45952}, {f: 3, c: 45955}, 45964,
  9863. 45968, 45972, {f: 2, c: 45984}, 45992, 45996, {f: 2, c: 46020}, 46024,
  9864. {f: 2, c: 46027}, 46030, 46032, {f: 2, c: 46036}, 46039, 46041, 46043,
  9865. 46045, 46048, 46052, 46056, 46076, 46096, 46104, 46108, 46112,
  9866. {f: 2, c: 46120}, 46123, 46132, {f: 2, c: 46160}, 46164, 46168,
  9867. {f: 2, c: 46176}, 46179, 46181, 46188, 46208, 46216, 46237, 46244, 46248,
  9868. 46252, 46261, 46263, 46265, 46272, 46276, 46280, 46288, 46293,
  9869. {f: 2, c: 46300}, 46304, {f: 2, c: 46307}, 46310, {f: 2, c: 46316}, 46319,
  9870. 46321, 46328, {f: 2, c: 46356}, 46360, {f: 2, c: 46363}, {f: 2, c: 46372},
  9871. {f: 4, c: 46375}, {f: 2, c: 46384}, 46388, 46392, {f: 2, c: 46400},
  9872. {f: 3, c: 46403}, {f: 3, c: 46411}, 46416, 46420, {f: 2, c: 46428},
  9873. {f: 3, c: 46431}, {f: 2, c: 46496}, 46500, 46504, {f: 2, c: 46506},
  9874. {f: 2, c: 46512}, {f: 3, c: 46515}, {f: 3, c: 46523}, 46528, 46532,
  9875. {f: 2, c: 46540}, {f: 3, c: 46543}, 46552, 46572, {f: 2, c: 46608}, 46612,
  9876. 46616, 46629, 46636, 46644, 46664, 46692, 46696, {f: 2, c: 46748}, 46752,
  9877. 46756, {f: 2, c: 46763}, 46769, 46804, 46832, 46836, 46840,
  9878. {f: 2, c: 46848}, 46853, {f: 2, c: 46888}, 46892, {f: 2, c: 46895},
  9879. {f: 2, c: 46904}, 46907, 46916, 46920, 46924, {f: 2, c: 46932}, 46944,
  9880. 46948, 46952, {f: 2, c: 46960}, 46963, 46965, {f: 2, c: 46972}, 46976,
  9881. 46980, {f: 2, c: 46988}, {f: 4, c: 46991}, {f: 4, c: 46998}, 47004, 47008,
  9882. {f: 2, c: 47016}, {f: 3, c: 47019}, {f: 2, c: 47028}, 47032, 47047, 47049,
  9883. {f: 2, c: 47084}, 47088, 47092, {f: 2, c: 47100}, {f: 3, c: 47103},
  9884. {f: 3, c: 47111}, 47116, 47120, {f: 2, c: 47128}, 47131, 47133,
  9885. {f: 2, c: 47140}, 47144, 47148, {f: 2, c: 47156}, {f: 3, c: 47159}, 47168,
  9886. 47172, 47185, 47187, {f: 2, c: 47196}, 47200, 47204, {f: 2, c: 47212},
  9887. 47215, 47217, 47224, 47228, 47245, 47272, 47280, 47284, 47288,
  9888. {f: 2, c: 47296}, 47299, 47301, 47308, 47312, 47316, 47325, 47327, 47329,
  9889. {f: 2, c: 47336}, 47340, 47344, {f: 2, c: 47352}, 47355, 47357, 47364,
  9890. 47384, 47392, {f: 2, c: 47420}, 47424, 47428, 47436, 47439, 47441,
  9891. {f: 2, c: 47448}, 47452, 47456, {f: 2, c: 47464}, 47467, 47469,
  9892. {f: 2, c: 47476}, 47480, 47484, {f: 2, c: 47492}, 47495, {f: 2, c: 47497},
  9893. {f: 2, c: 47501}, {f: 2, c: 47532}, 47536, 47540, {f: 2, c: 47548}, 47551,
  9894. 47553, {f: 2, c: 47560}, 47564, {f: 5, c: 47566}, {f: 2, c: 47576}, 47579,
  9895. {f: 2, c: 47581}, 47585, {f: 3, c: 47587}, 47592, 47596, {f: 2, c: 47604},
  9896. {f: 4, c: 47607}, {f: 2, c: 47616}, 47624, 47637, {f: 2, c: 47672}, 47676,
  9897. 47680, 47682, {f: 2, c: 47688}, 47691, {f: 2, c: 47693}, {f: 3, c: 47699},
  9898. 47704, 47708, {f: 2, c: 47716}, {f: 3, c: 47719}, {f: 2, c: 47728}, 47732,
  9899. 47736, {f: 3, c: 47747}, 47751, 47756, {f: 2, c: 47784}, {f: 2, c: 47787},
  9900. 47792, 47794, {f: 2, c: 47800}, 47803, 47805, 47812, 47816,
  9901. {f: 2, c: 47832}, 47868, 47872, 47876, 47885, 47887, 47889, 47896, 47900,
  9902. 47904, 47913, 47915, {f: 3, c: 47924}, 47928, {f: 4, c: 47931},
  9903. {f: 2, c: 47940}, 47943, 47945, 47949, {f: 2, c: 47951}, 47956, 47960,
  9904. 47969, 47971, 47980, 48008, 48012, 48016, 48036, 48040, 48044, 48052,
  9905. 48055, 48064, 48068, 48072, 48080, 48083, {f: 2, c: 48120}, 48124,
  9906. {f: 2, c: 48127}, 48130, {f: 2, c: 48136}, {f: 3, c: 48139}, 48143, 48145,
  9907. {f: 5, c: 48148}, {f: 5, c: 48155}, {f: 2, c: 48164}, 48167, 48169, 48173,
  9908. {f: 2, c: 48176}, 48180, 48184, {f: 2, c: 48192}, {f: 3, c: 48195}, 48201,
  9909. {f: 2, c: 48204}, 48208, 48221, {f: 2, c: 48260}, 48264, {f: 2, c: 48267},
  9910. 48270, {f: 2, c: 48276}, 48279, {f: 2, c: 48281}, {f: 2, c: 48288}, 48292,
  9911. {f: 2, c: 48295}, {f: 2, c: 48304}, {f: 3, c: 48307}, {f: 2, c: 48316},
  9912. 48320, 48324, 48333, {f: 3, c: 48335}, 48341, 48344, 48348,
  9913. {f: 3, c: 48372}, 48376, 48380, {f: 2, c: 48388}, 48391, 48393, 48400,
  9914. 48404, 48420, 48428, 48448, {f: 2, c: 48456}, 48460, 48464,
  9915. {f: 2, c: 48472}, 48484, 48488, {f: 2, c: 48512}, 48516, {f: 4, c: 48519},
  9916. {f: 2, c: 48528}, 48531, 48533, {f: 2, c: 48537}, 48540, 48548, 48560,
  9917. 48568, {f: 2, c: 48596}, 48600, 48604, 48617, 48624, 48628, 48632, 48640,
  9918. 48643, 48645, {f: 2, c: 48652}, 48656, 48660, {f: 2, c: 48668}, 48671,
  9919. {f: 2, c: 48708}, 48712, 48716, 48718, {f: 2, c: 48724}, 48727,
  9920. {f: 3, c: 48729}, {f: 2, c: 48736}, 48740, 48744, 48746, {f: 2, c: 48752},
  9921. {f: 3, c: 48755}, {f: 3, c: 48763}, 48768, 48772, {f: 2, c: 48780},
  9922. {f: 3, c: 48783}, {f: 2, c: 48792}, 48808, {f: 2, c: 48848}, 48852,
  9923. {f: 2, c: 48855}, 48864, {f: 3, c: 48867}, 48876, 48897, {f: 2, c: 48904},
  9924. {f: 2, c: 48920}, {f: 3, c: 48923}, {f: 2, c: 48960}, 48964, 48968,
  9925. {f: 2, c: 48976}, 48981, 49044, 49072, 49093, {f: 2, c: 49100}, 49104,
  9926. 49108, 49116, 49119, 49121, 49212, 49233, 49240, 49244, 49248,
  9927. {f: 2, c: 49256}, {f: 2, c: 49296}, 49300, 49304, {f: 2, c: 49312}, 49315,
  9928. 49317, {f: 2, c: 49324}, {f: 2, c: 49327}, {f: 4, c: 49331},
  9929. {f: 2, c: 49340}, {f: 3, c: 49343}, 49349, {f: 2, c: 49352}, 49356, 49360,
  9930. {f: 2, c: 49368}, {f: 3, c: 49371}, {f: 2, c: 49380}, 49384, 49388,
  9931. {f: 2, c: 49396}, 49399, 49401, 49408, 49412, 49416, 49424, 49429,
  9932. {f: 5, c: 49436}, {f: 2, c: 49443}, {f: 2, c: 49446}, {f: 2, c: 49452},
  9933. {f: 3, c: 49455}, 49462, {f: 2, c: 49464}, 49468, 49472, {f: 2, c: 49480},
  9934. {f: 3, c: 49483}, {f: 2, c: 49492}, 49496, 49500, {f: 2, c: 49508},
  9935. {f: 3, c: 49511}, 49520, 49524, 49528, 49541, {f: 3, c: 49548}, 49552,
  9936. 49556, 49558, {f: 2, c: 49564}, 49567, 49569, 49573, {f: 2, c: 49576},
  9937. 49580, 49584, 49597, 49604, 49608, 49612, 49620, {f: 2, c: 49623}, 49632,
  9938. 49636, 49640, {f: 2, c: 49648}, 49651, {f: 2, c: 49660}, 49664, 49668,
  9939. {f: 2, c: 49676}, 49679, 49681, {f: 2, c: 49688}, 49692, {f: 2, c: 49695},
  9940. {f: 2, c: 49704}, 49707, 49709, 49711, {f: 2, c: 49713}, 49716, 49736,
  9941. {f: 2, c: 49744}, 49748, 49752, 49760, 49765, {f: 2, c: 49772}, 49776,
  9942. 49780, {f: 2, c: 49788}, 49791, 49793, {f: 2, c: 49800}, 49808, 49816,
  9943. 49819, 49821, {f: 2, c: 49828}, 49832, {f: 2, c: 49836}, {f: 2, c: 49844},
  9944. 49847, 49849, {f: 2, c: 49884}, 49888, {f: 2, c: 49891}, {f: 3, c: 49899},
  9945. 49903, 49905, 49910, {f: 2, c: 49912}, {f: 2, c: 49915}, 49920,
  9946. {f: 2, c: 49928}, {f: 2, c: 49932}, {f: 3, c: 49939}, 49944, 49948,
  9947. {f: 2, c: 49956}, {f: 2, c: 49960}, 49989, {f: 2, c: 50024}, 50028, 50032,
  9948. 50034, {f: 2, c: 50040}, {f: 2, c: 50044}, 50052, 50056, 50060, 50112,
  9949. {f: 2, c: 50136}, 50140, {f: 2, c: 50143}, 50146, {f: 2, c: 50152}, 50157,
  9950. {f: 2, c: 50164}, 50168, 50184, 50192, 50212, 50220, 50224, 50228,
  9951. {f: 2, c: 50236}, 50248, {f: 2, c: 50276}, 50280, 50284, {f: 2, c: 50292},
  9952. 50297, 50304, 50324, 50332, 50360, 50364, 50409, {f: 2, c: 50416}, 50420,
  9953. 50424, 50426, {f: 3, c: 50431}, 50444, 50448, 50452, 50460,
  9954. {f: 2, c: 50472}, 50476, 50480, {f: 2, c: 50488}, 50491, 50493,
  9955. {f: 2, c: 50500}, {f: 3, c: 50504}, {f: 3, c: 50508}, {f: 3, c: 50515},
  9956. {f: 3, c: 50519}, {f: 2, c: 50525}, {f: 2, c: 50528}, 50532, 50536,
  9957. {f: 2, c: 50544}, {f: 3, c: 50547}, {f: 2, c: 50556}, 50560, 50564, 50567,
  9958. {f: 2, c: 50572}, 50575, 50577, 50581, {f: 2, c: 50583}, 50588, 50592,
  9959. 50601, {f: 2, c: 50612}, {f: 2, c: 50616}, {f: 4, c: 50619},
  9960. {f: 7, c: 50628}, 50636, 50638, {f: 2, c: 50640}, 50644, 50648,
  9961. {f: 2, c: 50656}, 50659, 50661, {f: 3, c: 50668}, 50672, 50676,
  9962. {f: 2, c: 50678}, {f: 6, c: 50684}, {f: 4, c: 50693}, 50700, 50704,
  9963. {f: 2, c: 50712}, {f: 2, c: 50715}, {f: 2, c: 50724}, 50728,
  9964. {f: 3, c: 50732}, 50736, {f: 3, c: 50739}, 50743, 50745, 50747,
  9965. {f: 2, c: 50752}, 50756, 50760, {f: 2, c: 50768}, {f: 3, c: 50771},
  9966. {f: 2, c: 50780}, 50784, 50796, 50799, 50801, {f: 2, c: 50808}, 50812,
  9967. 50816, {f: 2, c: 50824}, 50827, 50829, {f: 2, c: 50836}, 50840, 50844,
  9968. {f: 2, c: 50852}, 50855, 50857, {f: 2, c: 50864}, 50868, {f: 3, c: 50872},
  9969. {f: 2, c: 50880}, 50883, 50885, {f: 2, c: 50892}, 50896, 50900,
  9970. {f: 2, c: 50908}, {f: 2, c: 50912}, {f: 2, c: 50920}, 50924, 50928,
  9971. {f: 2, c: 50936}, 50941, {f: 2, c: 50948}, 50952, 50956, {f: 2, c: 50964},
  9972. 50967, 50969, {f: 2, c: 50976}, 50980, 50984, {f: 2, c: 50992}, 50995,
  9973. 50997, 50999, {f: 2, c: 51004}, 51008, 51012, 51018, {f: 2, c: 51020},
  9974. 51023, {f: 8, c: 51025}, 51036, 51040, 51048, 51051, {f: 2, c: 51060},
  9975. 51064, {f: 3, c: 51068}, {f: 3, c: 51075}, {f: 4, c: 51079}, 51086,
  9976. {f: 2, c: 51088}, 51092, {f: 3, c: 51094}, 51098, {f: 2, c: 51104},
  9977. {f: 4, c: 51107}, {f: 2, c: 51116}, 51120, 51124, {f: 2, c: 51132},
  9978. {f: 3, c: 51135}, {f: 2, c: 51144}, 51148, 51150, 51152, 51160, 51165,
  9979. 51172, 51176, 51180, {f: 2, c: 51200}, 51204, 51208, 51210,
  9980. {f: 2, c: 51216}, 51219, {f: 2, c: 51221}, {f: 2, c: 51228}, 51232, 51236,
  9981. {f: 2, c: 51244}, 51247, 51249, 51256, 51260, 51264, {f: 2, c: 51272},
  9982. {f: 2, c: 51276}, 51284, {f: 2, c: 51312}, 51316, 51320, 51322,
  9983. {f: 2, c: 51328}, 51331, {f: 3, c: 51333}, {f: 3, c: 51339}, 51348, 51357,
  9984. 51359, 51361, 51368, {f: 2, c: 51388}, 51396, 51400, 51404,
  9985. {f: 2, c: 51412}, 51415, 51417, {f: 2, c: 51424}, 51428, 51445,
  9986. {f: 2, c: 51452}, 51456, {f: 3, c: 51460}, {f: 2, c: 51468}, 51471, 51473,
  9987. 51480, 51500, 51508, {f: 2, c: 51536}, 51540, 51544, {f: 2, c: 51552},
  9988. 51555, 51564, 51568, 51572, 51580, {f: 2, c: 51592}, 51596, 51600,
  9989. {f: 2, c: 51608}, 51611, 51613, {f: 2, c: 51648}, 51652, {f: 2, c: 51655},
  9990. 51658, {f: 2, c: 51664}, 51667, {f: 2, c: 51669}, {f: 2, c: 51673},
  9991. {f: 2, c: 51676}, 51680, 51682, 51684, 51687, {f: 2, c: 51692},
  9992. {f: 3, c: 51695}, {f: 2, c: 51704}, 51708, 51712, {f: 2, c: 51720},
  9993. {f: 3, c: 51723}, 51732, 51736, 51753, {f: 2, c: 51788}, 51792, 51796,
  9994. {f: 2, c: 51804}, {f: 3, c: 51807}, 51816, 51837, 51844, 51864,
  9995. {f: 2, c: 51900}, 51904, 51908, {f: 2, c: 51916}, 51919, 51921, 51923,
  9996. {f: 2, c: 51928}, 51936, 51948, 51956, 51976, 51984, 51988, 51992,
  9997. {f: 2, c: 52000}, 52033, {f: 2, c: 52040}, 52044, 52048, {f: 2, c: 52056},
  9998. 52061, 52068, {f: 2, c: 52088}, 52124, 52152, 52180, 52196, 52199, 52201,
  9999. {f: 2, c: 52236}, 52240, 52244, {f: 2, c: 52252}, {f: 2, c: 52257},
  10000. {f: 3, c: 52263}, 52268, 52270, 52272, {f: 2, c: 52280}, {f: 4, c: 52283},
  10001. {f: 2, c: 52292}, 52296, 52300, {f: 2, c: 52308}, {f: 3, c: 52311}, 52320,
  10002. 52324, 52326, 52328, 52336, 52341, {f: 2, c: 52376}, 52380, 52384,
  10003. {f: 2, c: 52392}, {f: 3, c: 52395}, {f: 2, c: 52404}, 52408, 52412,
  10004. {f: 2, c: 52420}, 52423, 52425, 52432, 52436, 52452, 52460, 52464, 52481,
  10005. {f: 2, c: 52488}, 52492, 52496, {f: 2, c: 52504}, 52507, 52509, 52516,
  10006. 52520, 52524, 52537, 52572, 52576, 52580, {f: 2, c: 52588}, 52591, 52593,
  10007. 52600, 52616, {f: 2, c: 52628}, 52632, 52636, {f: 2, c: 52644}, 52647,
  10008. 52649, 52656, 52676, 52684, 52688, 52712, 52716, 52720, {f: 2, c: 52728},
  10009. 52731, 52733, 52740, 52744, 52748, 52756, 52761, {f: 2, c: 52768}, 52772,
  10010. 52776, {f: 2, c: 52784}, 52787, 52789, {f: 2, c: 52824}, 52828,
  10011. {f: 3, c: 52831}, {f: 2, c: 52840}, 52843, 52845, {f: 2, c: 52852}, 52856,
  10012. 52860, {f: 2, c: 52868}, 52871, 52873, {f: 2, c: 52880}, 52884, 52888,
  10013. {f: 2, c: 52896}, {f: 3, c: 52899}, {f: 2, c: 52908}, 52929,
  10014. {f: 2, c: 52964}, 52968, {f: 2, c: 52971}, {f: 2, c: 52980},
  10015. {f: 3, c: 52983}, {f: 2, c: 52992}, 52996, 53000, {f: 2, c: 53008}, 53011,
  10016. 53013, 53020, 53024, 53028, {f: 2, c: 53036}, {f: 3, c: 53039}, 53048,
  10017. {f: 2, c: 53076}, 53080, 53084, {f: 2, c: 53092}, 53095, 53097,
  10018. {f: 2, c: 53104}, 53108, 53112, 53120, 53125, 53132, 53153, 53160, 53168,
  10019. 53188, {f: 2, c: 53216}, 53220, 53224, {f: 2, c: 53232}, 53235, 53237,
  10020. 53244, 53248, 53252, 53265, 53272, 53293, {f: 2, c: 53300}, 53304, 53308,
  10021. {f: 2, c: 53316}, 53319, 53321, 53328, 53332, 53336, 53344,
  10022. {f: 2, c: 53356}, 53360, 53364, {f: 2, c: 53372}, 53377, {f: 2, c: 53412},
  10023. 53416, 53420, {f: 2, c: 53428}, 53431, 53433, {f: 2, c: 53440}, 53444,
  10024. {f: 2, c: 53448}, {f: 2, c: 53456}, {f: 3, c: 53459}, {f: 2, c: 53468},
  10025. 53472, 53476, {f: 2, c: 53484}, {f: 3, c: 53487}, 53496, 53517,
  10026. {f: 2, c: 53552}, 53556, 53560, 53562, {f: 2, c: 53568}, {f: 3, c: 53571},
  10027. {f: 2, c: 53580}, 53584, 53588, {f: 2, c: 53596}, 53599, 53601, 53608,
  10028. 53612, 53628, 53636, 53640, {f: 2, c: 53664}, 53668, 53672,
  10029. {f: 2, c: 53680}, 53683, 53685, 53690, 53692, 53696, 53720, 53748, 53752,
  10030. 53767, 53769, 53776, {f: 2, c: 53804}, 53808, 53812, {f: 2, c: 53820},
  10031. 53823, 53825, 53832, 53852, 53860, {f: 2, c: 53888}, 53892, 53896,
  10032. {f: 2, c: 53904}, 53909, 53916, 53920, 53924, 53932, 53937,
  10033. {f: 2, c: 53944}, 53948, {f: 2, c: 53951}, 53954, {f: 2, c: 53960}, 53963,
  10034. 53972, 53976, 53980, {f: 2, c: 53988}, {f: 2, c: 54000}, 54004, 54008,
  10035. {f: 2, c: 54016}, 54019, 54021, {f: 3, c: 54028}, 54032, 54036, 54038,
  10036. {f: 2, c: 54044}, {f: 3, c: 54047}, 54053, {f: 2, c: 54056}, 54060, 54064,
  10037. {f: 2, c: 54072}, {f: 3, c: 54075}, {f: 2, c: 54084}, {f: 2, c: 54140},
  10038. 54144, 54148, {f: 2, c: 54156}, {f: 3, c: 54159}, {f: 2, c: 54168}, 54172,
  10039. 54176, {f: 2, c: 54184}, 54187, 54189, 54196, 54200, 54204,
  10040. {f: 2, c: 54212}, {f: 2, c: 54216}, 54224, 54232, 54241, 54243,
  10041. {f: 2, c: 54252}, 54256, 54260, {f: 2, c: 54268}, 54271, 54273, 54280,
  10042. 54301, 54336, 54340, 54364, 54368, 54372, 54381, 54383, {f: 2, c: 54392},
  10043. 54396, {f: 2, c: 54399}, 54402, {f: 2, c: 54408}, 54411, 54413, 54420,
  10044. 54441, 54476, 54480, 54484, 54492, 54495, 54504, 54508, 54512, 54520,
  10045. 54523, 54525, 54532, 54536, 54540, {f: 2, c: 54548}, 54551,
  10046. {f: 2, c: 54588}, 54592, 54596, {f: 2, c: 54604}, 54607, 54609,
  10047. {f: 2, c: 54616}, 54620, 54624, 54629, {f: 2, c: 54632}, 54635, 54637,
  10048. {f: 2, c: 54644}, 54648, 54652, {f: 2, c: 54660}, {f: 3, c: 54663}, 54672,
  10049. 54693, {f: 2, c: 54728}, 54732, 54736, 54738, {f: 2, c: 54744}, 54747,
  10050. 54749, {f: 2, c: 54756}, 54760, 54764, {f: 2, c: 54772}, 54775, 54777,
  10051. {f: 2, c: 54784}, 54788, 54792, {f: 2, c: 54800}, {f: 3, c: 54803}, 54812,
  10052. 54816, 54820, 54829, {f: 2, c: 54840}, 54844, 54848, 54853,
  10053. {f: 2, c: 54856}, 54859, 54861, 54865, {f: 2, c: 54868}, 54872, 54876,
  10054. 54887, 54889, {f: 2, c: 54896}, 54900, 54915, 54917, {f: 2, c: 54924},
  10055. 54928, 54932, 54941, 54943, 54945, 54952, 54956, 54960, 54969, 54971,
  10056. {f: 2, c: 54980}, 54984, 54988, 54993, 54996, 54999, 55001, 55008, 55012,
  10057. 55016, 55024, 55029, {f: 2, c: 55036}, 55040, 55044, 55057,
  10058. {f: 2, c: 55064}, 55068, 55072, {f: 2, c: 55080}, 55083, 55085,
  10059. {f: 2, c: 55092}, 55096, 55100, 55108, 55111, 55113, {f: 2, c: 55120},
  10060. 55124, {f: 4, c: 55126}, {f: 2, c: 55136}, 55139, 55141, 55145, 55148,
  10061. 55152, 55156, {f: 2, c: 55164}, 55169, {f: 2, c: 55176}, 55180, 55184,
  10062. {f: 2, c: 55192}, 55195, 55197, 20285, 20339, 20551, 20729, 21152, 21487,
  10063. 21621, 21733, 22025, 23233, 23478, 26247, {f: 2, c: 26550}, 26607, 27468,
  10064. 29634, 30146, 31292, 33499, 33540, 34903, 34952, 35382, [36040, 63747],
  10065. 36303, 36603, 36838, 39381, 21051, 21364, 21508, 24682, 24932, 27580,
  10066. 29647, 33050, 35258, [12179, 35282], 38307, 20355, 21002, 22718, 22904,
  10067. 23014, [12082, 24178], 24185, 25031, 25536, 26438, 26604, 26751, 28567,
  10068. 30286, 30475, 30965, 31240, 31487, 31777, 32925, [12169, 33390], 33393,
  10069. 35563, 38291, 20075, 21917, 26359, 28212, 30883, 31469, 33883, 35088,
  10070. 34638, 38824, 21208, 22350, 22570, 23884, 24863, 25022, 25121, 25954,
  10071. 26577, 27204, 28187, [12130, 29976], 30131, 30435, 30640, 32058, 37039,
  10072. {f: 2, c: 37969}, 40853, 21283, 23724, 30002, 32987, 37440, 38296, 21083,
  10073. 22536, 23004, 23713, 23831, 24247, 24378, 24394, 24951, 27743, 30074,
  10074. 30086, 31968, 32115, 32177, 32652, 33108, 33313, 34193, 35137, 35611,
  10075. 37628, [38477, 64009], 40007, 20171, 20215, 20491, 20977, 22607, 24887,
  10076. 24894, 24936, 25913, 27114, 28433, 30117, 30342, 30422, 31623, 33445,
  10077. 33995, 37799, 38283, 21888, 23458, 22353, 31923, 32697, 37301, 20520,
  10078. 21435, 23621, 24040, 25298, 25454, 25818, 25831, 28192, 28844, 31067,
  10079. 36317, 36382, 36989, 37445, 37624, 20094, 20214, 20581, [12081, 24062],
  10080. 24314, 24838, 26967, 33137, 34388, 36423, 37749, 39467, 20062, 20625,
  10081. 26480, 26688, 20745, 21133, 21138, 27298, 30652, 37392, 40660, 21163,
  10082. 24623, 36850, 20552, 25001, 25581, 25802, 26684, 27268, 28608, 33160,
  10083. 35233, 38548, 22533, 29309, [12125, 29356], 29956, 32121, 32365, 32937,
  10084. [12178, 35211, 64010], 35700, 36963, 40273, 25225, 27770, 28500, 32080,
  10085. 32570, 35363, 20860, 24906, 31645, 35609, 37463, 37772, 20140, 20435,
  10086. 20510, 20670, 20742, 21185, 21197, 21375, 22384, 22659, 24218, 24465,
  10087. 24950, 25004, 25806, 25964, 26223, 26299, [26356, 63745], 26775, 28039,
  10088. 28805, 28913, 29855, 29861, 29898, 30169, 30828, 30956, 31455, 31478,
  10089. 32069, 32147, 32789, 32831, 33051, 33686, 35686, 36629, 36885, 37857,
  10090. 38915, 38968, 39514, 39912, 20418, 21843, 22586, [22865, 63753], 23395,
  10091. 23622, 24760, 25106, 26690, 26800, 26856, 28330, 30028, 30328, 30926,
  10092. 31293, 31995, 32363, 32380, 35336, 35489, 35903, 38542, 40388, 21476,
  10093. 21481, 21578, 21617, 22266, 22993, 23396, 23611, 24235, 25335, 25911,
  10094. 25925, 25970, 26272, 26543, 27073, 27837, 30204, 30352, 30590, 31295,
  10095. 32660, 32771, 32929, 33167, 33510, 33533, 33776, 34241, 34865, 34996,
  10096. 35493, 36764, 37678, 38599, 39015, [12220, 39640], [12238, 40723], 21741,
  10097. 26011, 26354, 26767, 31296, [12181, 35895], 40288, 22256, 22372, 23825,
  10098. 26118, 26801, 26829, 28414, 29736, 34974, 39908, 27752, [12219, 39592],
  10099. 20379, 20844, 20849, 21151, 23380, [12079, 24037], 24656, 24685, 25329,
  10100. 25511, 25915, 29657, 31354, 34467, 36002, 38799, [20018, 63749], 23521,
  10101. [12093, 25096], 26524, [12128, 29916], 31185, 33747, 35463, 35506, 36328,
  10102. 36942, 37707, 38982, [24275, 64011], 27112, 34303, 37101, 20896, 23448,
  10103. 23532, 24931, 26874, 27454, 28748, 29743, 29912, 31649, 32592, 33733,
  10104. 35264, 36011, 38364, 39208, 21038, 24669, 25324, 36866, 20362, 20809,
  10105. 21281, 22745, 24291, 26336, 27960, 28826, 29378, 29654, 31568, 33009,
  10106. 37979, 21350, 25499, 32619, 20054, 20608, 22602, 22750, 24618, 24871,
  10107. 25296, 27088, 39745, 23439, 32024, 32945, 36703, 20132, 20689, 21676,
  10108. 21932, 23308, 23968, 24039, 25898, 25934, 26657, 27211, 29409, 30350,
  10109. 30703, 32094, 32761, 33184, 34126, 34527, 36611, 36686, 37066, 39171,
  10110. 39509, 39851, 19992, 20037, 20061, 20167, 20465, 20855, 21246, 21312,
  10111. [12061, 21475], [21477, 63750], 21646, 22036, 22389, 22434, 23495, 23943,
  10112. 24272, 25084, 25304, 25937, 26552, 26601, 27083, 27472, 27590, 27628,
  10113. 27714, 28317, 28792, 29399, 29590, 29699, 30655, 30697, 31350, 32127,
  10114. 32777, [12165, 33276], 33285, 33290, 33503, 34914, 35635, 36092, 36544,
  10115. 36881, 37041, 37476, 37558, 39378, 39493, 40169, 40407,
  10116. [12244, 40860, 63751, 63752], 22283, 23616, 33738, 38816, 38827, 40628,
  10117. 21531, 31384, 32676, 35033, 36557, 37089, 22528, 23624, 25496, 31391,
  10118. 23470, [12088, 24339], 31353, 31406, 33422, 36524, 20518, 21048, 21240,
  10119. 21367, 22280, 25331, 25458, 27402, 28099, 30519, 21413, 29527, 34152,
  10120. 36470, 38357, 26426, 27331, 28528, 35437, 36556, 39243, 26231, 27512,
  10121. 36020, [12225, 39740], 21483, 22317, 22862, 25542, 27131, 29674, 30789,
  10122. 31418, 31429, 31998, 33909, 35215, 36211, 36917, 38312, 21243, 22343,
  10123. 30023, 31584, 33740, 37406, 27224, 20811, 21067, 21127, 25119, 26840,
  10124. 26997, 38553, 20677, 21156, 21220, 25027, [12100, 26020], 26681, 27135,
  10125. 29822, 31563, 33465, 33771, 35250, 35641, 36817, 39241, 20170, 22935,
  10126. 25810, 26129, 27278, 29748, 31105, 31165, 33449, {f: 2, c: 34942}, 35167,
  10127. 37670, 20235, 21450, 24613, 25201, 27762, 32026, 32102, 20120, 20834,
  10128. 30684, 32943, 20225, 20238, 20854, 20864, 21980, 22120, 22331, 22522,
  10129. 22524, 22804, 22855, 22931, 23492, 23696, 23822, [12080, 24049], 24190,
  10130. 24524, 25216, 26071, 26083, {f: 2, c: 26398}, 26462, 26827, 26820, 27231,
  10131. 27450, 27683, 27773, 27778, 28103, 29592, 29734, 29738, 29826, 29859,
  10132. 30072, 30079, 30849, 30959, 31041, {f: 2, c: 31047}, 31098, 31637, 32000,
  10133. 32186, 32648, 32774, 32813, 32908, 35352, 35663, [35912, 63744], 36215,
  10134. 37665, 37668, 39138, 39249, {f: 2, c: 39438}, 39525, 40594, 32202, 20342,
  10135. 21513, 25326, 26708, [12198, 37329, 63754], 21931, 20794, 23068, 25062,
  10136. [25295, 63835], 25343, 37027, [35582, 63837], 26262, 29014, 38627, 25423,
  10137. 25466, 21335, 26511, 26976, 28275, 30007, 32013, 34930, 22218, 23064,
  10138. 20035, 20839, [22856, 63756], 26608, 32784, [12069, 22899, 63873],
  10139. [24180, 63886], [25754, 63889], [31178, 63893], [24565, 63907], 24684,
  10140. 25288, [25467, 63908], [23527, 63839, 63914], 23511, 21162, 22900, 24361,
  10141. [24594, 63840], 29785, 39377, 28611, 33215, 36786, 24817, 33126,
  10142. [23615, 63933], 23273, 35365, [26491, 63944], [32016, 63951], 33021, 23612,
  10143. [27877, 63971], [21311, 63979], [28346, 63980], 22810, [33590, 63998],
  10144. [20025, 63838], 20150, 20294, 21934, 22296, 22727, 24406, 26039, 26086,
  10145. 27264, 27573, 28237, 30701, 31471, 31774, 32222, 34507, 34962, 37170,
  10146. 37723, 25787, 28606, 29562, 30136, 36948, 21846, 22349, 25018, 25812,
  10147. 26311, 28129, 28251, 28525, 28601, 30192, 32835, 33213, 34113, 35203,
  10148. 35527, 35674, 37663, 27795, 30035, 31572, 36367, 36957, 21776, 22530,
  10149. 22616, 24162, 25095, 25758, 26848, 30070, [31958, 64003], 34739, 40680,
  10150. 20195, 22408, 22382, [12068, 22823], 23565, 23729, 24118, 24453, 25140,
  10151. 25825, 29619, 33274, 34955, 36024, 38538, 40667, [23429, 64004], 24503,
  10152. 24755, 20498, [12049, 20992], 21040, 22294, 22581, 22615, 23566, 23648,
  10153. 23798, 23947, [24230, 64001], 24466, 24764, 25361, 25481, 25623, 26691,
  10154. 26873, 27330, 28120, 28193, 28372, 28644, 29182, 30428, 30585, 31153,
  10155. 31291, 33796, 35241, 36077, 36339, 36424, 36867, 36884, 36947, 37117,
  10156. 37709, 38518, 38876, 27602, 28678, 29272, 29346, 29544, 30563, 31167,
  10157. 31716, 32411, [35712, 63834], 22697, 24775, 25958, 26109, 26302, 27788,
  10158. 28958, 29129, 35930, 38931, 20077, 31361, 20189, 20908, 20941, 21205,
  10159. 21516, 24999, 26481, 26704, 26847, [27934, 64005], 28540, 30140, 30643,
  10160. 31461, 33012, 33891, 37509, 20828, [12099, 26007], 26460, 26515, 30168,
  10161. 31431, 33651, [12182, 35910], 36887, 38957, 23663, 33216, 33434, 36929,
  10162. 36975, 37389, 24471, 23965, 27225, 29128, 30331, 31561, 34276, 35588,
  10163. 37159, 39472, [21895, 63755], [25078, 63757], [30313, 63758],
  10164. [32645, 63759], [34367, 63760], [34746, 63761], [35064, 63762],
  10165. [37007, 63763], [27931, 63765], [28889, 63766], [29662, 63767], 32097,
  10166. [33853, 63768], [37226, 63769], [39409, 63770], [20098, 63771],
  10167. [21365, 63772], [27396, 63773], 27410, 28734, [29211, 63774],
  10168. [34349, 63775], [40478, 63776], 21068, 36771, [23888, 63777], 25829, 25900,
  10169. 27414, [28651, 63778], 31811, 32412, [34253, 63779], [35172, 63780], 35261,
  10170. [25289, 63781], [33240, 63782], [34847, 63783], [24266, 63784],
  10171. [26391, 63785], [28010, 63786], [29436, 63787], 29701, 29807, 34690,
  10172. [37086, 63788], [20358, 63789], 23821, 24480, 33802, [20919, 63790],
  10173. [25504, 63861], [30053, 63862], [20142, 63863], 20486, [20841, 63864],
  10174. [20937, 63865], [26753, 63866], 27153, 31918, 31921, [31975, 63867],
  10175. [33391, 63868], [35538, 63869], 36635, [37327, 63870], 20406, 20791,
  10176. [21237, 63871], [21570, 63872], [24300, 63874], 24942, 25150,
  10177. [26053, 63875], 27354, [28670, 63876], [31018, 63877], 34268, 34851,
  10178. [38317, 63878], 39522, [39530, 63879], [40599, 63880], [40654, 63881],
  10179. [12050, 21147, 63882], [26310, 63883], [27511, 63884], 28701, 31019,
  10180. [36706, 63885], 38722, [24976, 63887], [25088, 63888], 25891,
  10181. [28451, 63890], [29001, 63891], [29833, 63892], [32244, 63894],
  10182. [32879, 63895], [34030, 63897], [36646, 63896], [36899, 63898],
  10183. [37706, 63899], 20925, [21015, 63900], [21155, 63901], 27916,
  10184. [28872, 63903], [35010, 63904], [24265, 63906], 25986, [27566, 63909],
  10185. 28610, [31806, 63910], [29557, 63911], [20196, 63912], 20278,
  10186. [22265, 63913], 23738, [23994, 63915], [24604, 63916], [29618, 63917],
  10187. 31533, [32666, 63919], 32718, [32838, 63920], 36894, [37428, 63921],
  10188. [38646, 63922], [38728, 63923], [38936, 63924], 40801, [20363, 63925],
  10189. 28583, [31150, 63926], [37300, 63927], [38583, 63928], [21214, 63791],
  10190. 25736, [25796, 63792], [27347, 63793], 28510, 28696, [29200, 63794],
  10191. [30439, 63795], [12156, 32769, 63796], [34310, 63797], [34396, 63798],
  10192. [36335, 63799], 36613, [38706, 63800], [39791, 63801], [40442, 63802],
  10193. [12228, 40565], [30860, 63803], [31103, 63804], [32160, 63805],
  10194. [33737, 63806], [37636, 63807], [12229, 40575, 63808], 40595,
  10195. [35542, 63809], [22751, 63810], [24324, 63811], 26407, 28711, 29903,
  10196. [31840, 63812], [32894, 63813], 20769, 28712, [29282, 63814],
  10197. [30922, 63815], [36034, 63816], 36058, 36084, [38647, 63817],
  10198. [20102, 63930], [20698, 63931], [23534, 63932], 24278, [26009, 63934],
  10199. [29134, 63936], [30274, 63937], 30637, 32842, [34044, 63938],
  10200. [36988, 63939], 39719, [12243, 40845, 63940], [22744, 63818], 23105,
  10201. [23650, 63819], [27155, 63820], [28122, 63821], [28431, 63822], 30267,
  10202. [32047, 63823], [32311, 63824], 34078, 35128, 37860, [38475, 63825],
  10203. [21129, 63943], 26066, [26611, 63945], 27060, [27969, 63946],
  10204. [28316, 63947], 28687, [29705, 63948], 29792, [30041, 63949], 30244,
  10205. [30827, 63950], 35628, [39006, 63952], [20845, 63953], [25134, 63954],
  10206. [38520, 63955], 20374, [20523, 63956], [23833, 63957], [28138, 63958],
  10207. 32184, [36650, 63959], [24459, 63960], [24900, 63961], [26647, 63962],
  10208. [38534, 63964], [21202, 63826], [32907, 63827], [20956, 63828],
  10209. [20940, 63829], 26974, [31260, 63830], [32190, 63831], [33777, 63832],
  10210. [38517, 63833], 20442, [21033, 63965], 21400, [21519, 63966], 21774,
  10211. [23653, 63967], 24743, [26446, 63969], [26792, 63970], 28012, 29313, 29432,
  10212. [29702, 63972], 29827, [30178, 63973], 31852, [32633, 63974], 32696, 33673,
  10213. [35023, 63975], [35041, 63976], [12197, 37324, 63977], 37328,
  10214. [38626, 63978], 39881, [21533, 63981], 28542, [29136, 63982],
  10215. [29848, 63983], [34298, 63984], 36522, [38563, 63985], [40023, 63986],
  10216. [40607, 63987], [26519, 63988], [28107, 63989], 29747, [33256, 63990],
  10217. 38678, 30764, [12148, 31435, 63991], [31520, 63992], [31890, 63993], 25705,
  10218. 29802, 30194, 30908, 30952, [12218, 39340], 39764, [12231, 40635], 23518,
  10219. 24149, 28448, 33180, 33707, 37000, 19975, 21325, 23081, 24018, 24398,
  10220. 24930, 25405, 26217, 26364, 28415, 28459, 28771, 30622, 33836, 34067,
  10221. 34875, 36627, 39237, 39995, 21788, 25273, 26411, 27819, 33545, 35178,
  10222. 38778, 20129, 22916, {f: 2, c: 24536}, 26395, 32178, 32596, 33426, 33579,
  10223. 33725, 36638, 37017, 22475, 22969, 23186, 23504, 26151, 26522, 26757,
  10224. 27599, 29028, 32629, 36023, 36067, 36993, 39749, 33032, 35978, 38476,
  10225. 39488, [12230, 40613], 23391, 27667, 29467, 30450, 30431, 33804, 20906,
  10226. 35219, 20813, 20885, 21193, 26825, 27796, 30468, 30496, 32191, 32236,
  10227. [12207, 38754], 40629, 28357, 34065, 20901, 21517, 21629, 26126, 26269,
  10228. 26919, 28319, [12139, 30399], 30609, 33559, 33986, 34719, 37225, 37528,
  10229. 40180, 34946, 20398, 20882, 21215, 22982, 24125, 24917, {f: 2, c: 25720},
  10230. 26286, 26576, 27169, 27597, [12113, 27611], 29279, 29281, 29761, 30520,
  10231. [12141, 30683], 32791, 33468, 33541, 35584, 35624, 35980, [12106, 26408],
  10232. 27792, 29287, [12140, 30446], 30566, 31302, 40361, 27519, 27794, 22818,
  10233. 26406, 33945, 21359, 22675, 22937, 24287, 25551, 26164, 26483, 28218,
  10234. 29483, 31447, 33495, 37672, 21209, 24043, 25006, 25035, 25098, 25287,
  10235. 25771, [12102, 26080], 26969, 27494, [12111, 27595], 28961, 29687, 30045,
  10236. 32326, 33310, 33538, 34154, 35491, 36031, 38695, 40289, 22696, 40664,
  10237. 20497, 21006, 21563, 21839, [12098, 25991], 27766, {f: 2, c: 32010}, 32862,
  10238. 34442, [12200, 38272], 38639, 21247, 27797, 29289, 21619, 23194, 23614,
  10239. 23883, 24396, 24494, 26410, 26806, 26979, 28220, 28228, 30473,
  10240. [12150, 31859], 32654, 34183, 35598, 36855, 38753, 40692, 23735, 24758,
  10241. 24845, 25003, 25935, {f: 2, c: 26107}, 27665, 27887, 29599, 29641, 32225,
  10242. 38292, 23494, 34588, 35600, 21085, 21338, 25293, 25615, 25778, 26420,
  10243. 27192, 27850, 29632, 29854, 31636, 31893, 32283, 33162, 33334, 34180,
  10244. 36843, 38649, 39361, 20276, 21322, 21453, 21467, 25292, 25644, 25856,
  10245. 26001, 27075, 27886, 28504, 29677, 30036, 30242, 30436, 30460, 30928,
  10246. [30971, 63844], 31020, 32070, 33324, 34784, 36820, 38930, 39151, 21187,
  10247. 25300, 25765, 28196, 28497, 30332, 36299, 37297, 37474, 39662, 39747,
  10248. 20515, 20621, 22346, 22952, 23592, 24135, 24439, 25151, 25918,
  10249. [12101, 26041], 26049, 26121, 26507, 27036, 28354, 30917, 32033, 32938,
  10250. 33152, 33323, 33459, 33953, 34444, 35370, 35607, 37030, 38450, 40848,
  10251. 20493, 20467, 22521, 24472, 25308, 25490, 26479, 28227, 28953, 30403,
  10252. 32972, 32986, {f: 2, c: 35060}, 35097, 36064, 36649, 37197, 38506, 20271,
  10253. 20336, 24091, 26575, 26658, [12137, 30333], 30334, 39748, 24161, 27146,
  10254. 29033, 29140, 30058, 32321, 34115, 34281, 39132, 20240, 31567, 32624,
  10255. 38309, 20961, 24070, 26805, 27710, 27726, 27867, 29359, 31684, 33539,
  10256. 27861, 29754, 20731, 21128, 22721, 25816, 27287, 29863, 30294, 30887,
  10257. 34327, 38370, 38713, 21342, 24321, 35722, 36776, 36783, 37002, 21029,
  10258. 30629, 40009, 40712, 19993, 20482, 20853, 23643, 24183, 26142, 26170,
  10259. 26564, 26821, 28851, 29953, 30149, 31177, 31453, 36647, 39200, 39432,
  10260. 20445, 22561, 22577, 23542, 26222, 27493, 27921, 28282, 28541, 29668,
  10261. 29995, 33769, 35036, 35091, 35676, 36628, 20239, 20693, 21264,
  10262. [12056, 21340], 23443, [24489, 63846], 26381, 31119, 33145, 33583, 34068,
  10263. 35079, 35206, 36665, [36667, 64007], 39333, 39954, 26412, 20086, 20472,
  10264. 22857, 23553, {f: 2, c: 23791}, 25447, 26834, 28925, 29090, 29739, 32299,
  10265. 34028, 34562, 36898, 37586, 40179, [19981, 63847], 20184, 20463, 20613,
  10266. 21078, 21103, 21542, 21648, 22496, 22827, 23142, 23386, 23413, 23500,
  10267. 24220, 25206, 25975, 26023, 28014, 28325, [12119, 29238], 31526, 31807,
  10268. [12152, 32566], {f: 2, c: 33104}, 33178, 33344, 33433, 33705, 35331, 36000,
  10269. 36070, 36091, 36212, 36282, 37096, 37340, [12201, 38428], 38468, 39385,
  10270. 40167, [21271, 63843], 20998, 21545, 22132, 22707, 22868, 22894, 24575,
  10271. 24996, 25198, 26128, 27774, 28954, 30406, 31881, 31966, 32027, 33452,
  10272. 36033, 38640, 20315, 24343, 24447, 25282, 23849, 26379, 26842, 30844,
  10273. 32323, 40300, 19989, 20633, [12052, 21269], 21290, 21329, 22915, 23138,
  10274. 24199, 24754, 24970, 25161, 25209, 26000, 26503, 27047, [12112, 27604],
  10275. {f: 3, c: 27606}, 27832, 29749, 30202, 30738, 30865, 31189, 31192, 31875,
  10276. 32203, 32737, 32933, 33086, 33218, 33778, 34586, 35048, 35513, 35692,
  10277. 36027, 37145, [12206, 38750], [12214, 39131], [12240, 40763], 22188, 23338,
  10278. 24428, 25996, 27315, 27567, 27996, 28657, 28693, 29277, 29613, 36007,
  10279. 36051, 38971, 24977, 27703, 32856, 39425, 20045, 20107, 20123, 20181,
  10280. 20282, 20284, 20351, 20447, 20735, 21490, 21496, 21766, 21987, 22235,
  10281. [12064, 22763], 22882, 23057, 23531, 23546, 23556, 24051, 24107, 24473,
  10282. 24605, 25448, 26012, 26031, 26614, 26619, 26797, 27515, 27801, 27863,
  10283. 28195, 28681, 29509, 30722, 31038, 31040, 31072, 31169, 31721, 32023,
  10284. 32114, 32902, 33293, 33678, 34001, 34503, 35039, 35408, 35422, 35613,
  10285. 36060, 36198, 36781, 37034, 39164, 39391, 40605, 21066, 26388, 20632,
  10286. 21034, [12077, 23665], 25955, 27733, 29642, 29987, 30109, 31639, 33948,
  10287. 37240, 38704, 20087, 25746, [27578, 63856], 29022, 34217, 19977, 26441,
  10288. 26862, 28183, 33439, 34072, 34923, 25591, 28545, 37394, 39087, 19978,
  10289. 20663, 20687, 20767, 21830, 21930, 22039, 23360, 23577, 23776, 24120,
  10290. 24202, 24224, 24258, 24819, 26705, 27233, 28248, 29245, 29248,
  10291. [29376, 63994], 30456, 31077, 31665, 32724, 35059, 35316, 35443, 35937,
  10292. 36062, 38684, [22622, 63852], 29885, 36093, 21959, 31329, [32034, 63850],
  10293. [12170, 33394], 29298, [12131, 29983], 29989, 31513, 22661, 22779, 23996,
  10294. 24207, 24246, 24464, 24661, 25234, 25471, 25933, 26257, 26329, 26360,
  10295. 26646, 26866, 29312, 29790, 31598, 32110, 32214, 32626, 32997, 33298,
  10296. 34223, 35199, 35475, 36893, 37604, [12233, 40653], [12239, 40736],
  10297. [12067, 22805], 22893, 24109, 24796, 26132, 26227, 26512, 27728, 28101,
  10298. 28511, [12143, 30707], 30889, 33990, 37323, 37675, 20185, 20682, 20808,
  10299. 21892, 23307, 23459, 25159, 25982, 26059, 28210, 29053, 29697, 29764,
  10300. 29831, 29887, 30316, 31146, 32218, 32341, 32680, 33146, 33203, 33337,
  10301. 34330, 34796, 35445, 36323, 36984, 37521, 37925, 39245, 39854, 21352,
  10302. 23633, 26964, 27844, 27945, 28203, [12166, 33292], 34203, 35131, 35373,
  10303. [35498, 63855, 63905], 38634, 40807, 21089, 26297, 27570, 32406, 34814,
  10304. 36109, 38275, 38493, 25885, 28041, 29166, 22478, 22995, 23468, 24615,
  10305. 24826, 25104, 26143, 26207, 29481, 29689, 30427, [30465, 63853], 31596,
  10306. 32854, 32882, 33125, 35488, 37266, 19990, 21218, 27506, 27927, 31237,
  10307. 31545, 32048, 36016, 21484, 22063, 22609, 23477, [12073, 23567], 23569,
  10308. 24034, 25152, 25475, 25620, 26157, 26803, 27836, 28040, 28335, 28703,
  10309. 28836, 29138, 29990, 30095, 30094, 30233, 31505, 31712, 31787, 32032,
  10310. 32057, 34092, 34157, 34311, 35380, 36877, 36961, 37045, 37559, 38902,
  10311. 39479, 20439, 23660, 26463, 28049, 31903, 32396, 35606, 36118, 36895,
  10312. 23403, 24061, 25613, 33984, 36956, 39137, [29575, 63841, 63963], 23435,
  10313. 24730, 26494, 28126, 35359, 35494, 36865, 38924, 21047, 28753, 30862,
  10314. 37782, 34928, 37335, 20462, 21463, 22013, 22234, 22402, 22781, 23234,
  10315. 23432, 23723, 23744, 24101, 24833, 25101, [12095, 25163], 25480, 25628,
  10316. 25910, [25976, 63849], 27193, 27530, [12116, 27700], 27929, 28465, 29159,
  10317. 29417, 29560, 29703, 29874, 30246, 30561, 31168, 31319, 31466, 31929,
  10318. 32143, 32172, 32353, 32670, 33065, 33585, 33936, 34010, 34282, 34966,
  10319. 35504, 35728, 36664, 36930, 36995, 37228, 37526, 37561, 38539,
  10320. {f: 2, c: 38567}, 38614, 38656, 38920, [12216, 39318], 39635, 39706, 21460,
  10321. 22654, 22809, 23408, 23487, 28113, 28506, 29087, 29729, 29881, 32901,
  10322. 33789, 24033, 24455, 24490, 24642, 26092, 26642, 26991, 27219, 27529,
  10323. 27957, 28147, 29667, 30462, 30636, 31565, 32020, 33059, 33308, 33600,
  10324. 34036, 34147, 35426, 35524, 37255, 37662, 38918, 39348, 25100, 34899,
  10325. 36848, 37477, 23815, 23847, 23913, 29791, 33181, 34664, 28629,
  10326. [25342, 63859], 32722, 35126, 35186, 19998, 20056, 20711, 21213, 21319,
  10327. 25215, 26119, 32361, 34821, 38494, 20365, 21273, 22070, 22987, 23204,
  10328. [12075, 23608], 23630, 23629, 24066, 24337, 24643, 26045, 26159, 26178,
  10329. 26558, 26612, 29468, [12142, 30690], [12144, 31034], 32709, 33940, 33997,
  10330. 35222, 35430, 35433, 35553, [12183, 35925], 35962, 22516, 23508, 24335,
  10331. 24687, 25325, 26893, 27542, 28252, 29060, 31698, 34645, [35672, 63996],
  10332. 36606, [12215, 39135], 39166, 20280, 20353, 20449, 21627, 23072, 23480,
  10333. 24892, 26032, 26216, 29180, 30003, 31070, 32051, 33102, [12162, 33251],
  10334. 33688, 34218, 34254, 34563, 35338, [12189, 36523], [12191, 36763], 36805,
  10335. 22833, 23460, 23526, 24713, 23529, 23563, [12092, 24515], 27777, 28145,
  10336. 28683, 29978, 33455, 35574, [20160, 63997], [12055, 21313], 38617,
  10337. [12114, 27663], 20126, 20420, 20818, 21854, 23077, 23784, 25105,
  10338. [12123, 29273], 33469, 33706, 34558, 34905, 35357, 38463, 38597, 39187,
  10339. 40201, 40285, 22538, 23731, 23997, 24132, [24801, 63929], 24853, 25569,
  10340. [27138, 63764, 63836, 63935], 28197, 37122, 37716, 38990, 39952, 40823,
  10341. 23433, 23736, 25353, 26191, 26696, 30524, 38593, 38797, 38996, 39839,
  10342. 26017, 35585, 36555, 38332, 21813, 23721, 24022, 24245, 26263, 30284,
  10343. 33780, 38343, 22739, 25276, 29390, 40232, 20208, 22830, 24591, 26171,
  10344. 27523, 31207, 40230, 21395, 21696, 22467, 23830, 24859, 26326, 28079,
  10345. 30861, 33406, 38552, 38724, 21380, 25212, 25494, 28082, 32266, 33099,
  10346. 38989, 27387, 32588, 40367, 40474, 20063, 20539, 20918, 22812, 24825,
  10347. 25590, 26928, 29242, 32822, 37326, 24369, 32004, [33509, 63860], 33903,
  10348. 33979, 34277, 36493, 20335, 22756, 23363, 24665, 25562, 25880, 25965,
  10349. 26264, 26954, 27171, 27915, 28673, 29036, 30162, 30221, 31155, 31344,
  10350. [12154, 32650], 35140, 35731, 37312, 38525, 39178, 22276, 24481, 26044,
  10351. 28417, 30208, 31142, 35486, 39341, [12226, 39770], 40812, 20740, 25014,
  10352. 25233, 27277, 33222, 20547, 22576, 24422, 28937, [12180, 35328], 35578,
  10353. 23420, 34326, 20474, 20796, 22196, 22852, 25513, 28153, 23978, 26989,
  10354. 20870, 20104, 20313, 22914, 27487, 27741, 29877, 30998, 33287, 33349,
  10355. 33593, 36671, 36701, 39192, 20134, 22495, 24441, [26131, 63968], 30123,
  10356. 32377, 35695, 36870, 39515, 22181, 22567, 23032, 23071, 23476, 24310,
  10357. 25424, 25403, 26941, 27783, 27839, 28046, 28051, 28149, 28436, 28895,
  10358. 28982, 29017, 29123, 29141, 30799, 30831, 31605, 32227, 32303, 34893,
  10359. 36575, 37467, 40182, 24709, 28037, 29105, 38321, 21421, 26579, 28814,
  10360. 28976, 29744, 33398, 33490, 38331, 39653, 40573, 26308, 29121,
  10361. [33865, 63854], 22603, 23992, 24433, 26144, 26254, 27001, 27054, 27704,
  10362. 27891, 28214, 28481, 28634, 28699, 28719, 29008, 29151, 29552, 29787,
  10363. 29908, 30408, 31310, 32403, 33521, 35424, 36814, 37704, 38681, 20034,
  10364. 20522, 21000, 21473, 26355, 27757, 28618, 29450, 30591, 31330, 33454,
  10365. 34269, 34306, 35028, 35427, 35709, 35947, 37555, 38675, 38928, 20116,
  10366. 20237, 20425, 20658, 21320, 21566, 21555, 21978, 22626, 22714, 22887,
  10367. 23067, 23524, 24735, 25034, 25942, 26111, 26212, 26791, 27738, 28595,
  10368. 28879, 29100, 29522, 31613, 34568, 35492, 39986, 40711, 23627, 27779,
  10369. 29508, [12127, 29577], 37434, 28331, 29797, 30239, 31337, 32277, 34314,
  10370. 20800, 22725, 25793, 29934, 29973, 30320, 32705, 37013, 38605, 39252,
  10371. 28198, [12129, 29926], {f: 2, c: 31401}, 33253, 34521, 34680, 35355, 23113,
  10372. 23436, 23451, 26785, 26880, 28003, 29609, 29715, 29740, 30871, 32233,
  10373. 32747, 33048, 33109, 33694, 35916, [38446, 63942], 38929, [12104, 26352],
  10374. 24448, 26106, 26505, 27754, 29579, 20525, 23043, 27498, 30702, 22806,
  10375. 23916, 24013, 29477, 30031, 20709, 20985, 22575, 22829, 22934, 23002,
  10376. 23525, 23970, 25303, 25622, 25747, 25854, 26332, 27208, 29183, 29796,
  10377. 31368, 31407, 32327, 32350, 32768, 33136, 34799, 35201, 35616, 36953,
  10378. 36992, 39250, 24958, 27442, 28020, 32287, 35109, 36785, 20433, 20653,
  10379. 20887, 21191, 22471, 22665, 23481, 24248, 24898, 27029, 28044, 28263,
  10380. 28342, 29076, 29794, [12132, 29992], 29996, 32883, 33592, 33993, 36362,
  10381. 37780, 37854, 20110, 20305, 20598, 20778, [12060, 21448], 21451, 21491,
  10382. 23431, 23507, 23588, 24858, 24962, 26100, [12124, 29275], 29591, 29760,
  10383. 30402, 31056, 31121, 31161, 32006, [12155, 32701], 33419, 34261, 34398,
  10384. 36802, 36935, 37109, 37354, 38533, [12204, 38632], 38633, 21206, 24423,
  10385. 26093, 26161, 26671, 29020, 31286, 37057, 38922, 20113, 27218, 27550,
  10386. 28560, 29065, 32792, 33464, 34131, 36939, 38549, 38642, 38907, 34074,
  10387. 39729, 20112, 29066, 38596, 20803, 21407, 21729, 22291, 22290, 22435,
  10388. 23195, 23236, 23491, 24616, 24895, 25588, 27781, 27961, 28274, 28304,
  10389. 29232, 29503, 29783, 33489, 34945, 36677, 36960, 38498, 39000, 40219,
  10390. [12105, 26376], 36234, 37470, 20301, 20553, 20702, 21361, 22285, 22996,
  10391. 23041, 23561, 24944, 26256, 28205, 29234, 29771, 32239, 32963, 33806,
  10392. 33894, 34111, 34655, 34907, 35096, 35586, 36949, [12209, 38859], 39759,
  10393. 20083, 20369, 20754, 20842, 21807, 21929, 23418, 23461, {f: 2, c: 24188},
  10394. 24254, 24736, 24799, {f: 2, c: 24840}, 25540, 25912, 26377, 26580, 26586,
  10395. {f: 2, c: 26977}, 27833, 27943, 28216, 28641, {f: 2, c: 29494}, 29788,
  10396. 30001, 30290, 32173, 33278, 33848, 35029, 35480, 35547, 35565, 36400,
  10397. 36418, 36938, 36926, 36986, [12195, 37193], 37321, 37742, 22537, 27603,
  10398. [12161, 32905], 32946, 20801, 22891, 23609, 28516, 29607, 32996, 36103,
  10399. 37399, 38287, [12160, 32895], 25102, 28700, 32104, 34701, 22432, 24681,
  10400. 24903, 27575, 35518, 37504, 38577, [12036, 20057], 21535, 28139, 34093,
  10401. 38512, [12211, 38899], 39150, 25558, 27875, [12194, 37009], 20957, 25033,
  10402. 33210, 40441, 20381, 20506, 20736, 23452, 24847, 25087, 25836, 26885,
  10403. 27589, 30097, 30691, 32681, 33380, 34191, 34811, [12176, 34915], 35516,
  10404. 35696, 37291, [12038, 20108], 20197, 20234, 22839, 23016, 24050, 24347,
  10405. 24411, 24609, 29246, 29669, [30064, 63842], 30157, 31227, [12157, 32780],
  10406. [12159, 32819], 32900, 33505, 33617, 36029, 36019, 36999, 39156, 39180,
  10407. 28727, 30410, 32714, 32716, 32764, 35610, [12040, 20154], 20161, 20995,
  10408. 21360, [21693, 63902], 22240, 23035, 23493, 24341, 24525, 28270, 32106,
  10409. 33589, 34451, 35469, 38765, 38775, [12032, 19968], 20314, 20350, 22777,
  10410. [12103, 26085], 28322, 36920, 37808, 39353, 20219, 22764, 22922, 23001,
  10411. 24641, 31252, 33615, 36035, [12042, 20837], 21316, 20173, 21097, 23381,
  10412. 33471, 20180, [21050, 63999], 21672, 22985, 23039, [12070, 23376], 23383,
  10413. 23388, 24675, 24904, 28363, [28825, 63995], 29038, 29574, 29943, 30133,
  10414. 30913, 32043, 32773, [12163, 33258], 33576, 34071, 34249, 35566, 36039,
  10415. 38604, 20316, 21242, 22204, 26027, 26152, 28796, 28856, 29237, 32189,
  10416. 33421, 37196, 38592, 40306, 23409, 26855, 27544, 28538, 30430, 23697,
  10417. 26283, 28507, 31668, 31786, 34870, 38620, 19976, 20183, 21280, 22580,
  10418. 22715, 22767, 22892, 23559, 24115, 24196, 24373, 25484, 26290, 26454,
  10419. 27167, 27299, 27404, 28479, 29254, 29520, 29835, 31456, 31911, 33144,
  10420. 33247, 33255, 33674, 33900, 34083, 34196, 34255, 35037, 36115, 37292,
  10421. [12199, 38263], 38556, 20877, 21705, 22312, 23472, 25165, 26448, 26685,
  10422. 26771, 28221, 28371, 28797, 32289, 35009, 36001, 36617, 40779, 40782,
  10423. 29229, 31631, 35533, 37658, 20295, 20302, 20786, 21632, 22992, 24213,
  10424. 25269, 26485, 26990, 27159, 27822, 28186, 29401, 29482, 30141, 31672,
  10425. 32053, 33511, 33785, 33879, 34295, 35419, 36015, 36487, 36889, 37048,
  10426. 38606, 40799, 21219, 21514, 23265, 23490, 25688, 25973, 28404, 29380,
  10427. 30340, 31309, 31515, 31821, 32318, 32735, 33659, 35627, 36042,
  10428. [12186, 36196], 36321, 36447, 36842, 36857, 36969, 37841, 20291, 20346,
  10429. 20659, 20840, 20856, 21069, 21098, 22625, 22652, 22880, 23560, 23637,
  10430. 24283, 24731, 25136, 26643, 27583, 27656, 28593, 29006, 29728,
  10431. [12133, 30000], 30008, 30033, 30322, 31564, 31627, 31661, 31686, 32399,
  10432. 35438, 36670, 36681, 37439, 37523, 37666, 37931, 38651, 39002, 39019,
  10433. 39198, [20999, 64000], 25130, 25240, 27993, 30308, 31434, 31680, 32118,
  10434. 21344, 23742, 24215, 28472, 28857, 31896, 38673, 39822, 40670, 25509,
  10435. 25722, 34678, 19969, 20117, 20141, 20572, 20597, 21576, 22979, 23450,
  10436. 24128, 24237, 24311, 24449, 24773, 25402, 25919, 25972, 26060, 26230,
  10437. 26232, 26622, 26984, 27273, 27491, 27712, 28096, 28136, 28191, 28254,
  10438. 28702, 28833, 29582, 29693, 30010, 30555, 30855, 31118, 31243, 31357,
  10439. 31934, 32142, 33351, 35330, 35562, 35998, 37165, 37194, 37336, 37478,
  10440. 37580, 37664, 38662, 38742, 38748, 38914, [12237, 40718], 21046, 21137,
  10441. 21884, 22564, 24093, 24351, 24716, 25552, 26799, 28639, 31085, 31532,
  10442. 33229, 34234, 35069, 35576, 36420, 37261, 38500, 38555, 38717, 38988,
  10443. [12241, 40778], 20430, 20806, 20939, 21161, 22066, 24340, 24427, 25514,
  10444. 25805, 26089, 26177, 26362, 26361, 26397, 26781, 26839, 27133, 28437,
  10445. 28526, 29031, 29157, [12118, 29226], 29866, 30522, 31062, 31066, 31199,
  10446. 31264, 31381, 31895, 31967, 32068, 32368, 32903, 34299, 34468, 35412,
  10447. 35519, 36249, 36481, 36896, 36973, 37347, 38459, 38613, [12227, 40165],
  10448. 26063, 31751, [12188, 36275], 37827, 23384, 23562, 21330, 25305, 29469,
  10449. 20519, 23447, 24478, 24752, 24939, 26837, 28121, 29742, 31278, 32066,
  10450. 32156, 32305, 33131, 36394, 36405, 37758, 37912, 20304, 22352, 24038,
  10451. 24231, 25387, 32618, 20027, 20303, 20367, 20570, 23005, 32964, 21610,
  10452. 21608, 22014, 22863, 23449, 24030, 24282, 26205, 26417, 26609, 26666,
  10453. 27880, 27954, 28234, 28557, 28855, 29664, 30087, 31820, 32002, 32044,
  10454. 32162, [12168, 33311], 34523, 35387, 35461, [12187, 36208], 36490, 36659,
  10455. 36913, 37198, 37202, 37956, 39376, [12149, 31481], 31909, 20426, 20737,
  10456. 20934, 22472, 23535, 23803, 26201, 27197, 27994, 28310, 28652, 28940,
  10457. 30063, 31459, 34850, 36897, 36981, 38603, 39423, 33537, 20013, 20210,
  10458. 34886, 37325, 21373, 27355, 26987, 27713, 33914, 22686, 24974, 26366,
  10459. 25327, 28893, 29969, 30151, 32338, 33976, 35657, 36104, 20043, 21482,
  10460. 21675, 22320, 22336, 24535, 25345, 25351, 25711, [12096, 25903], 26088,
  10461. 26234, 26525, 26547, [12108, 27490], 27744, 27802, 28460, 30693, 30757,
  10462. 31049, 31063, 32025, 32930, 33026, [12164, 33267], 33437, 33463, 34584,
  10463. 35468, 36100, 36286, 36978, 30452, 31257, 31287, 32340, 32887, 21767,
  10464. 21972, 22645, 25391, 25634, 26185, 26187, 26733, 27035, 27524, 27941,
  10465. 28337, 29645, 29800, 29857, 30043, 30137, 30433, 30494, 30603, 31206,
  10466. 32265, 32285, 33275, 34095, 34967, 35386, 36049, 36587,
  10467. [12192, 36784, 63857], 36914, 37805, 38499, 38515, 38663, 20356, 21489,
  10468. 23018, 23241, 24089, 26702, 29894, 30142, 31209, 31378, 33187, 34541,
  10469. 36074, 36300, 36845, 26015, 26389, 22519, 28503, 32221, 36655, 37878,
  10470. 38598, 24501, 25074, 28548, 19988, 20376, 20511, 21449, 21983, 23919,
  10471. 24046, 27425, 27492, 30923, 31642, 36425, [12190, 36554, 63746], 36974,
  10472. 25417, 25662, 30528, 31364, 37679, 38015, 40810, 25776, 28591, 29158,
  10473. 29864, 29914, 31428, 31762, 32386, 31922, 32408, 35738, 36106, 38013,
  10474. 39184, 39244, 21049, 23519, 25830, 26413, 32046, 20717, [21443, 63851],
  10475. 22649, {f: 2, c: 24920}, 25082, 26028, 31449, 35730, 35734, 20489, 20513,
  10476. 21109, 21809, 23100, 24288, 24432, 24884, 25950, 26124, 26166, 26274,
  10477. 27085, 28356, 28466, 29462, 30241, 31379, 33081, 33369, 33750, 33980,
  10478. 20661, 22512, 23488, 23528, 24425, 25505, 30758, 32181, 33756, 34081,
  10479. 37319, 37365, 20874, 26613, 31574, 36012, 20932, 22971, 24765, 34389,
  10480. 20508, 21076, 23610, 24957, 25114, [25299, 64002], 25842, 26021, 28364,
  10481. 30240, 33034, 36448, 38495, 38587, 20191, 21315, 21912, 22825, 24029,
  10482. 25797, 27849, 28154, 29588, 31359, [12167, 33307], 34214, 36068, 36368,
  10483. 36983, 37351, 38369, 38433, 38854, 20984, 21746, 21894, 24505, 25764,
  10484. 28552, 32180, 36639, 36685, 37941, 20681, 23574, 27838, 28155, 29979,
  10485. 30651, 31805, 31844, 35449, 35522, 22558, 22974, 24086, 25463, 29266,
  10486. 30090, 30571, 35548, 36028, 36626, 24307, 26228, 28152, 32893, 33729,
  10487. 35531, [12205, 38737], 39894, 21059, 26367, 28053, 28399, 32224, 35558,
  10488. 36910, 36958, 39636, 21021, 21119, 21736, 24980, 25220, 25307, 26786,
  10489. 26898, 26970, 27189, 28818, 28966, 30813, 30977, 30990, 31186, 31245,
  10490. 32918, [12171, 33400], 33493, 33609, 34121, 35970, 36229, 37218, 37259,
  10491. 37294, 20419, 22225, 29165, 30679, 34560, 35320, [12072, 23544], 24534,
  10492. 26449, 37032, 21474, 22618, 23541, 24740, 24961, 25696, 32317, 32880,
  10493. 34085, 37507, 25774, 20652, 23828, 26368, 22684, 25277, 25512, 26894,
  10494. 27000, 27166, 28267, 30394, 31179, 33467, 33833, 35535, 36264, 36861,
  10495. 37138, 37195, 37276, 37648, 37656, 37786, 38619, 39478, 39949, 19985,
  10496. 30044, 31069, 31482, 31569, 31689, 32302, 33988, 36441, 36468, 36600,
  10497. 36880, 26149, 26943, 29763, 20986, 26414, 40668, 20805, 24544, 27798,
  10498. 34802, 34909, 34935, 24756, 33205, 33795, 36101, 21462, 21561, 22068,
  10499. 23094, 23601, 28810, 32736, 32858, 33030, 33261, 36259, 37257, 39519,
  10500. 40434, 20596, 20164, 21408, 24827, 28204, 23652, 20360, 20516, 21988,
  10501. 23769, 24159, 24677, 26772, 27835, 28100, 29118, 30164, 30196, 30305,
  10502. 31258, 31305, 32199, 32251, 32622, 33268, 34473, 36636, 38601, 39347,
  10503. [12242, 40786], 21063, 21189, 39149, 35242, 19971, 26578, 28422, 20405,
  10504. 23522, 26517, [27784, 63858], 28024, 29723, 30759, 37341, 37756, 34756,
  10505. 31204, 31281, 24555, 20182, 21668, 21822, 22702, 22949, 24816, 25171,
  10506. 25302, 26422, 26965, 33333, 38464, 39345, 39389, 20524, 21331, 21828,
  10507. 22396, 25176, 25826, 26219, 26589, 28609, 28655, 29730, 29752, 35351,
  10508. 37944, 21585, 22022, 22374, 24392, 24986, 27470, 28760, 28845, 32187,
  10509. 35477, 22890, 33067, 25506, 30472, 32829, 36010, 22612, 25645, 27067,
  10510. 23445, 24081, 28271, 34153, 20812, 21488, 22826, 24608, 24907, 27526,
  10511. 27760, 27888, 31518, 32974, 33492, 36294, 37040, 39089, 25799, 28580,
  10512. 25745, 25860, 20814, 21520, [12063, 22303], 35342, 24927, 26742, 30171,
  10513. 31570, 32113, 36890, 22534, 27084, 33151, 35114, 36864, 38969, 20600,
  10514. 22871, 22956, 25237, 36879, 39722, 24925, 29305, 38358, 22369, 23110,
  10515. 24052, 25226, 25773, 25850, 26487, 27874, 27966, 29228, 29750, 30772,
  10516. 32631, 33453, 36315, 38935, 21028, 22338, 26495, 29256, 29923, 36009,
  10517. 36774, 37393, 38442, [12043, 20843], 21485, 25420, 20329, 21764, 24726,
  10518. 25943, 27803, 28031, 29260, 29437, 31255, 35207, [12185, 35997], 24429,
  10519. 28558, 28921, 33192, 24846, [20415, 63845], 20559, 25153, [12122, 29255],
  10520. 31687, 32232, 32745, 36941, 38829, 39449, 36022, 22378, 24179, 26544,
  10521. 33805, 35413, 21536, 23318, 24163, 24290, 24330, 25987, 32954, 34109,
  10522. 38281, 38491, 20296, 21253, 21261, 21263, 21638, 21754, 22275, 24067,
  10523. 24598, 25243, 25265, 25429, 27873, 28006, 30129, 30770, 32990, 33071,
  10524. 33502, 33889, 33970, 34957, 35090, 36875, 37610, 39165, 39825, 24133,
  10525. [26292, 64006], 26333, 28689, 29190, 20469, 21117, 24426, 24915, 26451,
  10526. 27161, 28418, 29922, 31080, 34920, 35961, 39111, 39108, 39491, 21697,
  10527. 31263, 26963, 35575, 35914, [12213, 39080], 39342, 24444, 25259, 30130,
  10528. [12138, 30382], 34987, 36991, 38466, 21305, 24380, 24517, [27852, 63848],
  10529. 29644, 30050, [12134, 30091], 31558, 33534, 39325, 20047, 36924, 19979,
  10530. 20309, 21414, 22799, 24264, 26160, 27827, 29781, 33655, 34662, 36032,
  10531. 36944, 38686, 39957, 22737, 23416, 34384, 35604, 40372, 23506, 24680,
  10532. 24717, 26097, 27735, 28450, 28579, 28698, 32597, 32752, {f: 2, c: 38289},
  10533. 38480, 38867, 21106, 36676, 20989, 21547, 21688, 21859, 21898, 27323,
  10534. 28085, 32216, 33382, 37532, 38519, 40569, 21512, 21704, 30418, 34532,
  10535. 38308, 38356, 38492, 20130, 20233, 23022, 23270, 24055, 24658, 25239,
  10536. 26477, 26689, 27782, 28207, 32568, 32923, 33322, 38917, 20133, 20565,
  10537. 21683, 22419, 22874, 23401, 23475, 25032, 26999, 28023, 28707, 34809,
  10538. 35299, 35442, 35559, 36994, 39405, 39608, 21182, 26680, 20502, 24184,
  10539. 26447, 33607, [12175, 34892, 64008], 20139, 21521, 22190, 29670, 37141,
  10540. 38911, 39177, 39255, [12217, 39321], 22099, 22687, 34395, 35377, 25010,
  10541. 27382, 29563, 36562, 27463, 38570, 39511, 22869, 29184, 36203,
  10542. [12208, 38761], 20436, 23796, 24358, 25080, 26203, 27883, 28843,
  10543. [12126, 29572], 29625, 29694, 30505, 30541, 32067, 32098, 32291, 33335,
  10544. 34898, 36066, 37449, 39023, 23377, [12147, 31348], [12174, 34880],
  10545. [12212, 38913], 23244, 20448, 21332, 22846, 23805, 25406, 28025, 29433,
  10546. 33029, 33031, 33698, 37583, 38960, 20136, 20804, 21009, 22411, 24418,
  10547. 27842, 28366, 28677, 28752, 28847, 29074, 29673, [29801, 63918], 33610,
  10548. 34722, 34913, 36872, 37026, 37795, 39336, 20846, 24407, 24800, 24935,
  10549. 26291, 34137, 36426, 37295, 38795, 20046, 20114, 21628, 22741, 22778,
  10550. 22909, 23733, 24359, [12094, 25142], 25160, 26122, 26215, 27627, 28009,
  10551. 28111, 28246, 28408, 28564, 28640, 28649, 28765, 29392, 29733, 29786,
  10552. 29920, 30355, 31068, 31946, 32286, 32993, 33446, 33899, 33983, 34382,
  10553. 34399, 34676, 35703, 35946, 37804, 38912, 39013, 24785, 25110, 37239,
  10554. 23130, 26127, 28151, 28222, 29759, 39746, 24573, 24794, 31503, 21700,
  10555. 24344, 27742, 27859, 27946, 28888, 32005, 34425, 35340, 40251, 21270,
  10556. 21644, 23301, 27194, [12117, 28779], 30069, 31117, [12146, 31166], 33457,
  10557. 33775, 35441, 35649, 36008, 38772, 25844, 25899, {f: 2, c: 30906}, 31339,
  10558. 20024, 21914, 22864, 23462, 24187, 24739, 25563, 27489, 26213, 26707,
  10559. 28185, 29029, 29872, 32008, 36996, 39529, 39973, 27963, [28369, 63748],
  10560. 29502, 35905, 38346, 20976, 24140, 24488, 24653, 24822, 24880, 24908,
  10561. {f: 2, c: 26179}, 27045, 27841, 28255, 28361, 28514, 29004, 29852, 30343,
  10562. 31681, 31783, 33618, 34647, 36945, 38541, [12232, 40643], 21295, 22238,
  10563. 24315, 24458, 24674, 24724, 25079, 26214, 26371, 27292, 28142, 28590,
  10564. 28784, 29546, 32362, 33214, 33588, 34516, 35496, 36036, 21123, 29554,
  10565. 23446, 27243, 37892, 21742, 22150, 23389, 25928, 25989, 26313, 26783,
  10566. 28045, 28102, [12120, 29243], 32948, 37237, 39501, 20399, 20505, 21402,
  10567. 21518, 21564, 21897, 21957, 24127, 24460, 26429, 29030, 29661, 36869,
  10568. 21211, 21235, 22628, 22734, 28932, 29071, 29179, 34224, 35347,
  10569. [26248, 63941], 34216, 21927, 26244, 29002, 33841, 21321, 21913, 27585,
  10570. 24409, 24509, 25582, 26249, 28999, 35569, 36637, 40638, 20241, 25658,
  10571. 28875, 30054, 34407, 24676, 35662, 40440, 20807, 20982, 21256, 27958,
  10572. 33016, [12234, 40657], 26133, 27427, 28824, 30165, 21507, 23673, 32007,
  10573. 35350, [12107, 27424], 27453, 27462, 21560, 24688, 27965, 32725, 33288,
  10574. 20694, 20958, 21916, 22123, 22221, 23020, 23305, 24076, 24985, 24984,
  10575. 25137, 26206, 26342, 29081, {f: 2, c: 29113}, 29351, 31143, 31232, 32690,
  10576. 35440, {s: 163}, {f: 4, c: 12310}, {s: 14}, 8223, 8219, {f: 2, c: 8314},
  10577. {s: 7}, 8316, 0, {f: 2, c: 8317}, {s: 23}, 700, {s: 44}, 8942, 8759,
  10578. {s: 20}, {f: 10, c: 10122}, {s: 36}, {f: 26, c: 9398}, {s: 61},
  10579. {f: 2, c: 8826}, {f: 2, c: 8910}, {f: 2, c: 8832}, {f: 4, c: 8816}, 0,
  10580. 8842, 0, 8843, {f: 2, c: 8822}, 8825, {f: 2, c: 8922}, {s: 5}, 8773, 8771,
  10581. 8776, 0, 8868, {s: 78}, 8244, {s: 11}, 9839, {s: 4}, 8258, {s: 4}, 10045,
  10582. 0, 0, 8226, {s: 4}, {f: 2, c: 8249}, {s: 16}, 10010, 10006, 0, 9711,
  10583. {s: 3}, 10070, 0, 9676, {s: 24}, 9775, {s: 6}, 12320, 0, {f: 10, c: 10102},
  10584. {s: 17}, 12306, 12342, {s: 13}, 8710, 0, 8735, 0, {f: 2, c: 8741}, 0, 8787,
  10585. 8785, {f: 2, c: 8806}, 8723, {f: 3, c: 8853}, 0, 8980, 0, 0, 8802, 0, 9649,
  10586. 0, 8738, 8784, 0, 0, 8867, 0, 0, {f: 2, c: 8814}, 8837, 8836, 8713, 8716,
  10587. {f: 2, c: 8891}, 8794, 8966, {s: 6}, 12958, 0, 8252, {s: 11}, 9702, {s: 3},
  10588. 9663, 9653, 9657, 9667, {s: 4}, 9674, 12849, 12857, 13259, {f: 5, c: 9327},
  10589. {s: 18}, 8656, 8655, 8653, {s: 37}, 8657, 8659, {s: 8}, 8626, 8625, 0,
  10590. 8628, 8624, 8627, {s: 14}, 8636, 8640, {s: 10}, {f: 2, c: 8644}, {s: 144},
  10591. {f: 5, c: 9347}, {s: 33}, 12948, {s: 15}, 12965, {s: 93}, 8672, 8674, 8673,
  10592. 8675, {s: 4}, 8678, 8680, 8679, 8681, {s: 20}, 9757, 9759, {s: 76}, 12944,
  10593. {f: 6, c: 12938}, {s: 15}, {f: 2, c: 12318}, 8246, 0, 8245, {s: 3}, 12540,
  10594. 0, 0, {f: 2, c: 44034}, {f: 2, c: 44037}, {f: 5, c: 44043}, 44056,
  10595. {f: 2, c: 44062}, {f: 3, c: 44065}, {f: 7, c: 44069}, 44078,
  10596. {f: 6, c: 44082}, {f: 2, c: 44090}, {f: 3, c: 44093}, {f: 10, c: 44097},
  10597. 44108, {f: 6, c: 44110}, {f: 3, c: 44117}, {f: 3, c: 44121},
  10598. {f: 19, c: 44125}, {f: 2, c: 44146}, {f: 2, c: 44149}, 44153,
  10599. {f: 5, c: 44155}, 44162, {f: 2, c: 44167}, {f: 3, c: 44173},
  10600. {f: 3, c: 44177}, {f: 7, c: 44181}, 44190, {f: 6, c: 44194}, 44203,
  10601. {f: 2, c: 44205}, {f: 7, c: 44209}, 44218, {f: 3, c: 44222},
  10602. {f: 2, c: 44226}, {f: 3, c: 44229}, {f: 3, c: 44233}, {f: 8, c: 44237},
  10603. 44246, {f: 8, c: 44248}, {f: 2, c: 44258}, {f: 2, c: 44261}, 44265, 44267,
  10604. {f: 2, c: 44269}, 44274, 44276, {f: 5, c: 44279}, {f: 2, c: 44286},
  10605. {f: 3, c: 44289}, 44293, {f: 5, c: 44295}, 44302, 44304, {f: 6, c: 44306},
  10606. {f: 3, c: 44313}, {f: 3, c: 44317}, {f: 8, c: 44321}, {f: 2, c: 44330},
  10607. {f: 6, c: 44334}, {f: 2, c: 44342}, {f: 3, c: 44345}, {f: 7, c: 44349},
  10608. 44358, 44360, {f: 6, c: 44362}, {f: 3, c: 44369}, {f: 3, c: 44373},
  10609. {f: 8, c: 44377}, 44386, {f: 8, c: 44388}, {f: 2, c: 44398},
  10610. {f: 2, c: 44401}, {f: 4, c: 44407}, 44414, 44416, {f: 5, c: 44419},
  10611. {f: 2, c: 44426}, {f: 3, c: 44429}, {f: 11, c: 44433}, {f: 6, c: 44446},
  10612. {f: 18, c: 44453}, {f: 8, c: 44472}, {f: 2, c: 44482}, {f: 3, c: 44485},
  10613. {f: 7, c: 44489}, 44498, {f: 8, c: 44500}, {f: 3, c: 44509},
  10614. {f: 3, c: 44513}, {f: 19, c: 44517}, {f: 2, c: 44538}, {f: 2, c: 44541},
  10615. {f: 6, c: 44546}, 44554, 44556, {f: 6, c: 44558}, {f: 27, c: 44565},
  10616. {f: 2, c: 44594}, {f: 2, c: 44597}, 44601, {f: 5, c: 44603}, 44610, 44612,
  10617. {f: 3, c: 44615}, 44619, 44623, {f: 3, c: 44625}, 44629, {f: 5, c: 44631},
  10618. 44638, {f: 3, c: 44642}, {f: 2, c: 44646}, {f: 2, c: 44650},
  10619. {f: 3, c: 44653}, {f: 7, c: 44657}, 44666, {f: 6, c: 44670},
  10620. {f: 6, c: 44678}, {f: 47, c: 44685}, 44735, {f: 3, c: 44737},
  10621. {f: 7, c: 44741}, 44750, {f: 6, c: 44754}, {f: 2, c: 44762},
  10622. {f: 11, c: 44765}, {f: 2, c: 44777}, 44780, {f: 6, c: 44782},
  10623. {f: 3, c: 44789}, {f: 3, c: 44793}, {f: 10, c: 44797}, {f: 4, c: 44809},
  10624. {f: 2, c: 44814}, {f: 27, c: 44817}, {f: 2, c: 44846}, 44849, 44851,
  10625. {f: 7, c: 44853}, 44862, 44864, {f: 4, c: 44868}, {f: 6, c: 44874},
  10626. {f: 11, c: 44881}, {f: 6, c: 44894}, {f: 19, c: 44902}, {f: 6, c: 44922},
  10627. {f: 3, c: 44929}, {f: 3, c: 44933}, {f: 7, c: 44937}, {f: 3, c: 44946},
  10628. {f: 6, c: 44950}, {f: 27, c: 44957}, {f: 2, c: 44986}, {f: 3, c: 44989},
  10629. {f: 6, c: 44993}, 45002, 45004, {f: 5, c: 45007}, {f: 7, c: 45013},
  10630. {f: 11, c: 45021}, {f: 6, c: 45034}, {f: 2, c: 45042}, {f: 3, c: 45045},
  10631. {f: 7, c: 45049}, {f: 2, c: 45058}, {f: 7, c: 45061}, {f: 3, c: 45069},
  10632. {f: 3, c: 45073}, {f: 7, c: 45077}, {f: 10, c: 45086}, {f: 27, c: 45097},
  10633. {f: 2, c: 45126}, 45129, 45131, 45133, {f: 4, c: 45135}, 45142, 45144,
  10634. {f: 3, c: 45146}, {f: 30, c: 45150}, {f: 2, c: 45182}, {f: 3, c: 45185},
  10635. {f: 7, c: 45189}, 45198, 45200, {f: 6, c: 45202}, 45211, {f: 2, c: 45213},
  10636. {f: 5, c: 45219}, 45226, 45232, 45234, {f: 2, c: 45238}, {f: 3, c: 45241},
  10637. {f: 7, c: 45245}, 45254, {f: 6, c: 45258}, {f: 2, c: 45266},
  10638. {f: 3, c: 45269}, {f: 7, c: 45273}, {f: 4, c: 45281}, {f: 34, c: 45286},
  10639. 45322, {f: 3, c: 45325}, 45329, {f: 4, c: 45332}, 45338, {f: 5, c: 45342},
  10640. {f: 2, c: 45350}, {f: 3, c: 45353}, {f: 7, c: 45357}, 45366,
  10641. {f: 6, c: 45370}, {f: 2, c: 45378}, {f: 3, c: 45381}, {f: 7, c: 45385},
  10642. {f: 2, c: 45394}, {f: 2, c: 45398}, {f: 3, c: 45401}, {f: 3, c: 45405},
  10643. {f: 23, c: 45409}, {f: 2, c: 45434}, {f: 3, c: 45437}, 45441,
  10644. {f: 5, c: 45443}, 45450, 45452, {f: 4, c: 45454}, {f: 3, c: 45461},
  10645. {f: 3, c: 45465}, {f: 11, c: 45469}, {f: 35, c: 45481}, {f: 3, c: 45517},
  10646. {f: 3, c: 45521}, {f: 7, c: 45525}, 45534, {f: 8, c: 45536},
  10647. {f: 2, c: 45546}, {f: 3, c: 45549}, {f: 8, c: 45553}, 45562, 45564,
  10648. {f: 6, c: 45566}, {f: 2, c: 45574}, {f: 2, c: 45577}, {f: 7, c: 45581},
  10649. 45590, 45592, {f: 6, c: 45594}, {f: 19, c: 45601}, {f: 7, c: 45621},
  10650. {f: 27, c: 45629}, {f: 3, c: 45657}, {f: 3, c: 45661}, {f: 7, c: 45665},
  10651. {f: 10, c: 45674}, {f: 6, c: 45686}, {f: 7, c: 45693}, {f: 3, c: 45702},
  10652. {f: 6, c: 45706}, {f: 2, c: 45714}, {f: 3, c: 45717}, {f: 5, c: 45723},
  10653. 45730, 45732, {f: 3, c: 45735}, 45739, {f: 3, c: 45741}, {f: 3, c: 45745},
  10654. {f: 19, c: 45749}, {f: 2, c: 45770}, {f: 3, c: 45773}, 45777,
  10655. {f: 5, c: 45779}, 45786, 45788, {f: 4, c: 45790}, 45795, 45799,
  10656. {f: 2, c: 45801}, {f: 3, c: 45808}, 45814, {f: 3, c: 45820},
  10657. {f: 2, c: 45826}, {f: 3, c: 45829}, {f: 7, c: 45833}, 45842,
  10658. {f: 6, c: 45846}, {f: 55, c: 45853}, 45911, {f: 2, c: 45913}, 45917,
  10659. {f: 4, c: 45920}, 45926, 45928, 45930, {f: 2, c: 45932}, 45935,
  10660. {f: 2, c: 45938}, {f: 3, c: 45941}, {f: 7, c: 45945}, 45954,
  10661. {f: 6, c: 45958}, {f: 3, c: 45965}, {f: 3, c: 45969}, {f: 11, c: 45973},
  10662. {f: 6, c: 45986}, {f: 3, c: 45993}, {f: 23, c: 45997}, {f: 2, c: 46022},
  10663. {f: 2, c: 46025}, 46029, 46031, {f: 3, c: 46033}, 46038, 46040, 46042,
  10664. 46044, {f: 2, c: 46046}, {f: 3, c: 46049}, {f: 3, c: 46053},
  10665. {f: 19, c: 46057}, {f: 19, c: 46077}, {f: 7, c: 46097}, {f: 3, c: 46105},
  10666. {f: 3, c: 46109}, {f: 7, c: 46113}, 46122, {f: 8, c: 46124},
  10667. {f: 27, c: 46133}, {f: 2, c: 46162}, {f: 3, c: 46165}, {f: 7, c: 46169},
  10668. 46178, 46180, {f: 6, c: 46182}, {f: 19, c: 46189}, {f: 7, c: 46209},
  10669. {f: 20, c: 46217}, {f: 6, c: 46238}, {f: 3, c: 46245}, {f: 3, c: 46249},
  10670. {f: 8, c: 46253}, 46262, 46264, {f: 6, c: 46266}, {f: 3, c: 46273},
  10671. {f: 3, c: 46277}, {f: 7, c: 46281}, {f: 4, c: 46289}, {f: 6, c: 46294},
  10672. {f: 2, c: 46302}, {f: 2, c: 46305}, 46309, {f: 5, c: 46311}, 46318, 46320,
  10673. {f: 6, c: 46322}, {f: 27, c: 46329}, {f: 2, c: 46358}, {f: 2, c: 46361},
  10674. {f: 7, c: 46365}, 46374, {f: 5, c: 46379}, {f: 2, c: 46386},
  10675. {f: 3, c: 46389}, {f: 7, c: 46393}, 46402, {f: 5, c: 46406},
  10676. {f: 2, c: 46414}, {f: 3, c: 46417}, {f: 7, c: 46421}, 46430,
  10677. {f: 62, c: 46434}, {f: 2, c: 46498}, {f: 3, c: 46501}, 46505,
  10678. {f: 4, c: 46508}, 46514, {f: 5, c: 46518}, {f: 2, c: 46526},
  10679. {f: 3, c: 46529}, {f: 7, c: 46533}, 46542, {f: 6, c: 46546},
  10680. {f: 19, c: 46553}, {f: 35, c: 46573}, {f: 2, c: 46610}, {f: 3, c: 46613},
  10681. {f: 12, c: 46617}, {f: 6, c: 46630}, {f: 7, c: 46637}, {f: 19, c: 46645},
  10682. {f: 27, c: 46665}, {f: 3, c: 46693}, {f: 51, c: 46697}, {f: 2, c: 46750},
  10683. {f: 3, c: 46753}, {f: 6, c: 46757}, {f: 4, c: 46765}, {f: 34, c: 46770},
  10684. {f: 27, c: 46805}, {f: 3, c: 46833}, {f: 3, c: 46837}, {f: 7, c: 46841},
  10685. {f: 3, c: 46850}, {f: 34, c: 46854}, {f: 2, c: 46890}, {f: 2, c: 46893},
  10686. {f: 7, c: 46897}, 46906, {f: 8, c: 46908}, {f: 3, c: 46917},
  10687. {f: 3, c: 46921}, {f: 7, c: 46925}, {f: 10, c: 46934}, {f: 3, c: 46945},
  10688. {f: 3, c: 46949}, {f: 7, c: 46953}, 46962, 46964, {f: 6, c: 46966},
  10689. {f: 2, c: 46974}, {f: 3, c: 46977}, {f: 7, c: 46981}, 46990,
  10690. {f: 3, c: 46995}, {f: 2, c: 47002}, {f: 3, c: 47005}, {f: 7, c: 47009},
  10691. 47018, {f: 6, c: 47022}, {f: 2, c: 47030}, {f: 14, c: 47033}, 47048,
  10692. {f: 34, c: 47050}, {f: 2, c: 47086}, {f: 3, c: 47089}, {f: 7, c: 47093},
  10693. 47102, {f: 5, c: 47106}, {f: 2, c: 47114}, {f: 3, c: 47117},
  10694. {f: 7, c: 47121}, 47130, 47132, {f: 6, c: 47134}, {f: 2, c: 47142},
  10695. {f: 3, c: 47145}, {f: 7, c: 47149}, 47158, {f: 6, c: 47162},
  10696. {f: 3, c: 47169}, {f: 12, c: 47173}, 47186, {f: 8, c: 47188},
  10697. {f: 2, c: 47198}, {f: 3, c: 47201}, {f: 7, c: 47205}, 47214, 47216,
  10698. {f: 6, c: 47218}, {f: 3, c: 47225}, {f: 16, c: 47229}, {f: 26, c: 47246},
  10699. {f: 7, c: 47273}, {f: 3, c: 47281}, {f: 3, c: 47285}, {f: 7, c: 47289},
  10700. 47298, 47300, {f: 6, c: 47302}, {f: 3, c: 47309}, {f: 3, c: 47313},
  10701. {f: 8, c: 47317}, 47326, 47328, {f: 6, c: 47330}, {f: 2, c: 47338},
  10702. {f: 3, c: 47341}, {f: 7, c: 47345}, 47354, 47356, {f: 6, c: 47358},
  10703. {f: 19, c: 47365}, {f: 7, c: 47385}, {f: 27, c: 47393}, {f: 2, c: 47422},
  10704. {f: 3, c: 47425}, {f: 7, c: 47429}, {f: 2, c: 47437}, 47440,
  10705. {f: 6, c: 47442}, {f: 2, c: 47450}, {f: 3, c: 47453}, {f: 7, c: 47457},
  10706. 47466, 47468, {f: 6, c: 47470}, {f: 2, c: 47478}, {f: 3, c: 47481},
  10707. {f: 7, c: 47485}, 47494, 47496, {f: 2, c: 47499}, {f: 29, c: 47503},
  10708. {f: 2, c: 47534}, {f: 3, c: 47537}, {f: 7, c: 47541}, 47550, 47552,
  10709. {f: 6, c: 47554}, {f: 2, c: 47562}, 47565, {f: 5, c: 47571}, 47578, 47580,
  10710. {f: 2, c: 47583}, 47586, {f: 2, c: 47590}, {f: 3, c: 47593},
  10711. {f: 7, c: 47597}, 47606, {f: 5, c: 47611}, {f: 6, c: 47618},
  10712. {f: 12, c: 47625}, {f: 34, c: 47638}, {f: 2, c: 47674}, {f: 3, c: 47677},
  10713. 47681, {f: 5, c: 47683}, 47690, 47692, {f: 4, c: 47695}, {f: 2, c: 47702},
  10714. {f: 3, c: 47705}, {f: 7, c: 47709}, 47718, {f: 6, c: 47722},
  10715. {f: 2, c: 47730}, {f: 3, c: 47733}, {f: 10, c: 47737}, 47750,
  10716. {f: 4, c: 47752}, {f: 27, c: 47757}, 47786, {f: 3, c: 47789}, 47793,
  10717. {f: 5, c: 47795}, 47802, 47804, {f: 6, c: 47806}, {f: 3, c: 47813},
  10718. {f: 15, c: 47817}, {f: 34, c: 47834}, {f: 3, c: 47869}, {f: 3, c: 47873},
  10719. {f: 8, c: 47877}, 47886, 47888, {f: 6, c: 47890}, {f: 3, c: 47897},
  10720. {f: 3, c: 47901}, {f: 8, c: 47905}, 47914, {f: 8, c: 47916}, 47927,
  10721. {f: 2, c: 47929}, {f: 5, c: 47935}, 47942, 47944, {f: 3, c: 47946}, 47950,
  10722. {f: 3, c: 47953}, {f: 3, c: 47957}, {f: 8, c: 47961}, 47970,
  10723. {f: 8, c: 47972}, {f: 27, c: 47981}, {f: 3, c: 48009}, {f: 3, c: 48013},
  10724. {f: 19, c: 48017}, {f: 3, c: 48037}, {f: 3, c: 48041}, {f: 7, c: 48045},
  10725. {f: 2, c: 48053}, {f: 8, c: 48056}, {f: 3, c: 48065}, {f: 3, c: 48069},
  10726. {f: 7, c: 48073}, {f: 2, c: 48081}, {f: 36, c: 48084}, {f: 2, c: 48122},
  10727. {f: 2, c: 48125}, 48129, {f: 5, c: 48131}, 48138, 48142, 48144,
  10728. {f: 2, c: 48146}, {f: 2, c: 48153}, {f: 4, c: 48160}, 48166, 48168,
  10729. {f: 3, c: 48170}, {f: 2, c: 48174}, {f: 2, c: 48178}, {f: 3, c: 48181},
  10730. {f: 7, c: 48185}, 48194, {f: 3, c: 48198}, {f: 2, c: 48202},
  10731. {f: 2, c: 48206}, {f: 12, c: 48209}, {f: 38, c: 48222}, {f: 2, c: 48262},
  10732. {f: 2, c: 48265}, 48269, {f: 5, c: 48271}, 48278, 48280, {f: 5, c: 48283},
  10733. {f: 2, c: 48290}, {f: 2, c: 48293}, {f: 7, c: 48297}, 48306,
  10734. {f: 6, c: 48310}, {f: 2, c: 48318}, {f: 3, c: 48321}, {f: 8, c: 48325},
  10735. 48334, {f: 3, c: 48338}, {f: 2, c: 48342}, {f: 3, c: 48345},
  10736. {f: 23, c: 48349}, 48375, {f: 3, c: 48377}, {f: 7, c: 48381}, 48390, 48392,
  10737. {f: 6, c: 48394}, {f: 3, c: 48401}, {f: 15, c: 48405}, {f: 7, c: 48421},
  10738. {f: 19, c: 48429}, {f: 7, c: 48449}, {f: 2, c: 48458}, {f: 3, c: 48461},
  10739. {f: 7, c: 48465}, {f: 10, c: 48474}, {f: 3, c: 48485}, {f: 23, c: 48489},
  10740. {f: 2, c: 48514}, {f: 2, c: 48517}, {f: 5, c: 48523}, 48530, 48532,
  10741. {f: 3, c: 48534}, 48539, {f: 7, c: 48541}, {f: 11, c: 48549},
  10742. {f: 7, c: 48561}, {f: 27, c: 48569}, {f: 2, c: 48598}, {f: 3, c: 48601},
  10743. {f: 12, c: 48605}, {f: 6, c: 48618}, {f: 3, c: 48625}, {f: 3, c: 48629},
  10744. {f: 7, c: 48633}, {f: 2, c: 48641}, 48644, {f: 6, c: 48646},
  10745. {f: 2, c: 48654}, {f: 3, c: 48657}, {f: 7, c: 48661}, 48670,
  10746. {f: 36, c: 48672}, {f: 2, c: 48710}, {f: 3, c: 48713}, 48717,
  10747. {f: 5, c: 48719}, 48726, 48728, {f: 4, c: 48732}, {f: 2, c: 48738},
  10748. {f: 3, c: 48741}, 48745, {f: 5, c: 48747}, 48754, {f: 5, c: 48758},
  10749. {f: 2, c: 48766}, {f: 3, c: 48769}, {f: 7, c: 48773}, 48782,
  10750. {f: 6, c: 48786}, {f: 14, c: 48794}, {f: 39, c: 48809}, {f: 2, c: 48850},
  10751. {f: 2, c: 48853}, {f: 7, c: 48857}, {f: 2, c: 48865}, {f: 6, c: 48870},
  10752. {f: 20, c: 48877}, {f: 6, c: 48898}, {f: 14, c: 48906}, 48922,
  10753. {f: 34, c: 48926}, {f: 2, c: 48962}, {f: 3, c: 48965}, {f: 7, c: 48969},
  10754. {f: 3, c: 48978}, {f: 62, c: 48982}, {f: 27, c: 49045}, {f: 20, c: 49073},
  10755. {f: 6, c: 49094}, {f: 2, c: 49102}, {f: 3, c: 49105}, {f: 7, c: 49109},
  10756. {f: 2, c: 49117}, 49120, {f: 90, c: 49122}, {f: 20, c: 49213},
  10757. {f: 6, c: 49234}, {f: 3, c: 49241}, {f: 3, c: 49245}, {f: 7, c: 49249},
  10758. {f: 38, c: 49258}, {f: 2, c: 49298}, {f: 3, c: 49301}, {f: 7, c: 49305},
  10759. 49314, 49316, {f: 6, c: 49318}, 49326, {f: 2, c: 49329}, {f: 5, c: 49335},
  10760. 49342, {f: 3, c: 49346}, {f: 2, c: 49350}, {f: 2, c: 49354},
  10761. {f: 3, c: 49357}, {f: 7, c: 49361}, 49370, {f: 6, c: 49374},
  10762. {f: 2, c: 49382}, {f: 3, c: 49385}, {f: 7, c: 49389}, 49398, 49400,
  10763. {f: 6, c: 49402}, {f: 3, c: 49409}, {f: 3, c: 49413}, {f: 7, c: 49417},
  10764. {f: 4, c: 49425}, {f: 6, c: 49430}, {f: 2, c: 49441}, 49445,
  10765. {f: 4, c: 49448}, 49454, {f: 4, c: 49458}, 49463, {f: 2, c: 49466},
  10766. {f: 3, c: 49469}, {f: 7, c: 49473}, 49482, {f: 6, c: 49486},
  10767. {f: 2, c: 49494}, {f: 3, c: 49497}, {f: 7, c: 49501}, 49510,
  10768. {f: 6, c: 49514}, {f: 3, c: 49521}, {f: 3, c: 49525}, {f: 12, c: 49529},
  10769. {f: 6, c: 49542}, 49551, {f: 3, c: 49553}, 49557, {f: 5, c: 49559}, 49566,
  10770. 49568, {f: 3, c: 49570}, {f: 2, c: 49574}, {f: 2, c: 49578},
  10771. {f: 3, c: 49581}, {f: 12, c: 49585}, {f: 6, c: 49598}, {f: 3, c: 49605},
  10772. {f: 3, c: 49609}, {f: 7, c: 49613}, {f: 2, c: 49621}, {f: 7, c: 49625},
  10773. {f: 3, c: 49633}, {f: 3, c: 49637}, {f: 7, c: 49641}, 49650,
  10774. {f: 8, c: 49652}, {f: 2, c: 49662}, {f: 3, c: 49665}, {f: 7, c: 49669},
  10775. 49678, 49680, {f: 6, c: 49682}, {f: 2, c: 49690}, {f: 2, c: 49693},
  10776. {f: 7, c: 49697}, 49706, 49708, 49710, 49712, 49715, {f: 19, c: 49717},
  10777. {f: 7, c: 49737}, {f: 2, c: 49746}, {f: 3, c: 49749}, {f: 7, c: 49753},
  10778. {f: 4, c: 49761}, {f: 6, c: 49766}, {f: 2, c: 49774}, {f: 3, c: 49777},
  10779. {f: 7, c: 49781}, 49790, 49792, {f: 6, c: 49794}, {f: 6, c: 49802},
  10780. {f: 7, c: 49809}, {f: 2, c: 49817}, 49820, {f: 6, c: 49822},
  10781. {f: 2, c: 49830}, {f: 3, c: 49833}, {f: 6, c: 49838}, 49846, 49848,
  10782. {f: 34, c: 49850}, {f: 2, c: 49886}, {f: 2, c: 49889}, {f: 6, c: 49893},
  10783. 49902, 49904, {f: 4, c: 49906}, 49911, 49914, {f: 3, c: 49917},
  10784. {f: 7, c: 49921}, {f: 2, c: 49930}, {f: 5, c: 49934}, {f: 2, c: 49942},
  10785. {f: 3, c: 49945}, {f: 7, c: 49949}, {f: 2, c: 49958}, {f: 27, c: 49962},
  10786. {f: 34, c: 49990}, {f: 2, c: 50026}, {f: 3, c: 50029}, 50033,
  10787. {f: 5, c: 50035}, {f: 2, c: 50042}, {f: 6, c: 50046}, {f: 3, c: 50053},
  10788. {f: 3, c: 50057}, {f: 51, c: 50061}, {f: 23, c: 50113}, {f: 2, c: 50138},
  10789. {f: 2, c: 50141}, 50145, {f: 5, c: 50147}, {f: 3, c: 50154},
  10790. {f: 6, c: 50158}, {f: 2, c: 50166}, {f: 15, c: 50169}, {f: 7, c: 50185},
  10791. {f: 19, c: 50193}, {f: 7, c: 50213}, {f: 3, c: 50221}, {f: 3, c: 50225},
  10792. {f: 7, c: 50229}, {f: 10, c: 50238}, {f: 27, c: 50249}, {f: 2, c: 50278},
  10793. {f: 3, c: 50281}, {f: 7, c: 50285}, {f: 3, c: 50294}, {f: 6, c: 50298},
  10794. {f: 19, c: 50305}, {f: 7, c: 50325}, {f: 27, c: 50333}, {f: 3, c: 50361},
  10795. {f: 44, c: 50365}, {f: 6, c: 50410}, {f: 2, c: 50418}, {f: 3, c: 50421},
  10796. 50425, {f: 4, c: 50427}, {f: 10, c: 50434}, {f: 3, c: 50445},
  10797. {f: 3, c: 50449}, {f: 7, c: 50453}, {f: 11, c: 50461}, {f: 2, c: 50474},
  10798. {f: 3, c: 50477}, {f: 7, c: 50481}, 50490, 50492, {f: 6, c: 50494},
  10799. {f: 2, c: 50502}, 50507, {f: 4, c: 50511}, 50518, {f: 3, c: 50522}, 50527,
  10800. {f: 2, c: 50530}, {f: 3, c: 50533}, {f: 7, c: 50537}, 50546,
  10801. {f: 6, c: 50550}, {f: 2, c: 50558}, {f: 3, c: 50561}, {f: 2, c: 50565},
  10802. {f: 4, c: 50568}, 50574, 50576, {f: 3, c: 50578}, 50582, {f: 3, c: 50585},
  10803. {f: 3, c: 50589}, {f: 8, c: 50593}, {f: 10, c: 50602}, {f: 2, c: 50614},
  10804. 50618, {f: 5, c: 50623}, 50635, 50637, 50639, {f: 2, c: 50642},
  10805. {f: 3, c: 50645}, {f: 7, c: 50649}, 50658, 50660, {f: 6, c: 50662}, 50671,
  10806. {f: 3, c: 50673}, 50677, {f: 4, c: 50680}, {f: 3, c: 50690},
  10807. {f: 3, c: 50697}, {f: 3, c: 50701}, {f: 7, c: 50705}, 50714,
  10808. {f: 7, c: 50717}, {f: 2, c: 50726}, {f: 3, c: 50729}, 50735,
  10809. {f: 2, c: 50737}, 50742, 50744, 50746, {f: 4, c: 50748}, {f: 2, c: 50754},
  10810. {f: 3, c: 50757}, {f: 7, c: 50761}, 50770, {f: 6, c: 50774},
  10811. {f: 2, c: 50782}, {f: 11, c: 50785}, {f: 2, c: 50797}, 50800,
  10812. {f: 6, c: 50802}, {f: 2, c: 50810}, {f: 3, c: 50813}, {f: 7, c: 50817},
  10813. 50826, 50828, {f: 6, c: 50830}, {f: 2, c: 50838}, {f: 3, c: 50841},
  10814. {f: 7, c: 50845}, 50854, 50856, {f: 6, c: 50858}, {f: 2, c: 50866},
  10815. {f: 3, c: 50869}, {f: 5, c: 50875}, 50882, 50884, {f: 6, c: 50886},
  10816. {f: 2, c: 50894}, {f: 3, c: 50897}, {f: 7, c: 50901}, {f: 2, c: 50910},
  10817. {f: 6, c: 50914}, {f: 2, c: 50922}, {f: 3, c: 50925}, {f: 7, c: 50929},
  10818. {f: 3, c: 50938}, {f: 6, c: 50942}, {f: 2, c: 50950}, {f: 3, c: 50953},
  10819. {f: 7, c: 50957}, 50966, 50968, {f: 6, c: 50970}, {f: 2, c: 50978},
  10820. {f: 3, c: 50981}, {f: 7, c: 50985}, 50994, 50996, 50998, {f: 4, c: 51000},
  10821. {f: 2, c: 51006}, {f: 3, c: 51009}, {f: 5, c: 51013}, 51019, 51022, 51024,
  10822. {f: 3, c: 51033}, {f: 3, c: 51037}, {f: 7, c: 51041}, {f: 2, c: 51049},
  10823. {f: 8, c: 51052}, {f: 2, c: 51062}, {f: 3, c: 51065}, {f: 4, c: 51071},
  10824. 51078, {f: 3, c: 51083}, 51087, {f: 2, c: 51090}, 51093, 51097,
  10825. {f: 5, c: 51099}, 51106, {f: 5, c: 51111}, {f: 2, c: 51118},
  10826. {f: 3, c: 51121}, {f: 7, c: 51125}, 51134, {f: 6, c: 51138},
  10827. {f: 2, c: 51146}, 51149, 51151, {f: 7, c: 51153}, {f: 4, c: 51161},
  10828. {f: 6, c: 51166}, {f: 3, c: 51173}, {f: 3, c: 51177}, {f: 19, c: 51181},
  10829. {f: 2, c: 51202}, {f: 3, c: 51205}, 51209, {f: 5, c: 51211}, 51218, 51220,
  10830. {f: 5, c: 51223}, {f: 2, c: 51230}, {f: 3, c: 51233}, {f: 7, c: 51237},
  10831. 51246, 51248, {f: 6, c: 51250}, {f: 3, c: 51257}, {f: 3, c: 51261},
  10832. {f: 7, c: 51265}, {f: 2, c: 51274}, {f: 6, c: 51278}, {f: 27, c: 51285},
  10833. {f: 2, c: 51314}, {f: 3, c: 51317}, 51321, {f: 5, c: 51323}, 51330, 51332,
  10834. {f: 3, c: 51336}, {f: 6, c: 51342}, {f: 8, c: 51349}, 51358, 51360,
  10835. {f: 6, c: 51362}, {f: 19, c: 51369}, {f: 6, c: 51390}, {f: 3, c: 51397},
  10836. {f: 3, c: 51401}, {f: 7, c: 51405}, 51414, 51416, {f: 6, c: 51418},
  10837. {f: 2, c: 51426}, {f: 16, c: 51429}, {f: 6, c: 51446}, {f: 2, c: 51454},
  10838. {f: 3, c: 51457}, {f: 5, c: 51463}, 51470, 51472, {f: 6, c: 51474},
  10839. {f: 19, c: 51481}, {f: 7, c: 51501}, {f: 27, c: 51509}, {f: 2, c: 51538},
  10840. {f: 3, c: 51541}, {f: 7, c: 51545}, 51554, {f: 8, c: 51556},
  10841. {f: 3, c: 51565}, {f: 3, c: 51569}, {f: 7, c: 51573}, {f: 11, c: 51581},
  10842. {f: 2, c: 51594}, {f: 3, c: 51597}, {f: 7, c: 51601}, 51610, 51612,
  10843. {f: 34, c: 51614}, {f: 2, c: 51650}, {f: 2, c: 51653}, 51657,
  10844. {f: 5, c: 51659}, 51666, 51668, {f: 2, c: 51671}, 51675, {f: 2, c: 51678},
  10845. 51681, 51683, {f: 2, c: 51685}, {f: 4, c: 51688}, 51694, {f: 6, c: 51698},
  10846. {f: 2, c: 51706}, {f: 3, c: 51709}, {f: 7, c: 51713}, 51722,
  10847. {f: 6, c: 51726}, {f: 3, c: 51733}, {f: 16, c: 51737}, {f: 34, c: 51754},
  10848. {f: 2, c: 51790}, {f: 3, c: 51793}, {f: 7, c: 51797}, 51806,
  10849. {f: 6, c: 51810}, {f: 20, c: 51817}, {f: 6, c: 51838}, {f: 19, c: 51845},
  10850. {f: 35, c: 51865}, {f: 2, c: 51902}, {f: 3, c: 51905}, {f: 7, c: 51909},
  10851. 51918, 51920, 51922, {f: 4, c: 51924}, {f: 6, c: 51930}, {f: 11, c: 51937},
  10852. {f: 7, c: 51949}, {f: 19, c: 51957}, {f: 7, c: 51977}, {f: 3, c: 51985},
  10853. {f: 3, c: 51989}, {f: 7, c: 51993}, {f: 31, c: 52002}, {f: 6, c: 52034},
  10854. {f: 2, c: 52042}, {f: 3, c: 52045}, {f: 7, c: 52049}, {f: 3, c: 52058},
  10855. {f: 6, c: 52062}, {f: 19, c: 52069}, {f: 34, c: 52090}, {f: 27, c: 52125},
  10856. {f: 27, c: 52153}, {f: 15, c: 52181}, {f: 2, c: 52197}, 52200,
  10857. {f: 34, c: 52202}, {f: 2, c: 52238}, {f: 3, c: 52241}, {f: 7, c: 52245},
  10858. {f: 3, c: 52254}, {f: 4, c: 52259}, {f: 2, c: 52266}, 52269, 52271,
  10859. {f: 7, c: 52273}, 52282, {f: 5, c: 52287}, {f: 2, c: 52294},
  10860. {f: 3, c: 52297}, {f: 7, c: 52301}, 52310, {f: 6, c: 52314},
  10861. {f: 3, c: 52321}, 52325, 52327, {f: 7, c: 52329}, {f: 4, c: 52337},
  10862. {f: 34, c: 52342}, {f: 2, c: 52378}, {f: 3, c: 52381}, {f: 7, c: 52385},
  10863. 52394, {f: 6, c: 52398}, {f: 2, c: 52406}, {f: 3, c: 52409},
  10864. {f: 7, c: 52413}, 52422, 52424, {f: 6, c: 52426}, {f: 3, c: 52433},
  10865. {f: 15, c: 52437}, {f: 7, c: 52453}, {f: 3, c: 52461}, {f: 16, c: 52465},
  10866. {f: 6, c: 52482}, {f: 2, c: 52490}, {f: 3, c: 52493}, {f: 7, c: 52497},
  10867. 52506, 52508, {f: 6, c: 52510}, {f: 3, c: 52517}, {f: 3, c: 52521},
  10868. {f: 12, c: 52525}, {f: 34, c: 52538}, {f: 3, c: 52573}, {f: 3, c: 52577},
  10869. {f: 7, c: 52581}, 52590, 52592, {f: 6, c: 52594}, {f: 15, c: 52601},
  10870. {f: 11, c: 52617}, {f: 2, c: 52630}, {f: 3, c: 52633}, {f: 7, c: 52637},
  10871. 52646, 52648, {f: 6, c: 52650}, {f: 19, c: 52657}, {f: 7, c: 52677},
  10872. {f: 3, c: 52685}, {f: 23, c: 52689}, {f: 3, c: 52713}, {f: 3, c: 52717},
  10873. {f: 7, c: 52721}, 52730, 52732, {f: 6, c: 52734}, {f: 3, c: 52741},
  10874. {f: 3, c: 52745}, {f: 7, c: 52749}, {f: 4, c: 52757}, {f: 6, c: 52762},
  10875. {f: 2, c: 52770}, {f: 3, c: 52773}, {f: 7, c: 52777}, 52786, 52788,
  10876. {f: 34, c: 52790}, {f: 2, c: 52826}, {f: 2, c: 52829}, {f: 6, c: 52834},
  10877. 52842, 52844, {f: 6, c: 52846}, {f: 2, c: 52854}, {f: 3, c: 52857},
  10878. {f: 7, c: 52861}, 52870, 52872, {f: 6, c: 52874}, {f: 2, c: 52882},
  10879. {f: 3, c: 52885}, {f: 7, c: 52889}, 52898, {f: 6, c: 52902},
  10880. {f: 19, c: 52910}, {f: 34, c: 52930}, {f: 2, c: 52966}, {f: 2, c: 52969},
  10881. {f: 7, c: 52973}, 52982, {f: 6, c: 52986}, {f: 2, c: 52994},
  10882. {f: 3, c: 52997}, {f: 7, c: 53001}, 53010, 53012, {f: 6, c: 53014},
  10883. {f: 3, c: 53021}, {f: 3, c: 53025}, {f: 7, c: 53029}, 53038,
  10884. {f: 6, c: 53042}, {f: 27, c: 53049}, {f: 2, c: 53078}, {f: 3, c: 53081},
  10885. {f: 7, c: 53085}, 53094, 53096, {f: 6, c: 53098}, {f: 2, c: 53106},
  10886. {f: 3, c: 53109}, {f: 7, c: 53113}, {f: 4, c: 53121}, {f: 6, c: 53126},
  10887. {f: 20, c: 53133}, {f: 6, c: 53154}, {f: 7, c: 53161}, {f: 19, c: 53169},
  10888. {f: 27, c: 53189}, {f: 2, c: 53218}, {f: 3, c: 53221}, {f: 7, c: 53225},
  10889. 53234, 53236, {f: 6, c: 53238}, {f: 3, c: 53245}, {f: 3, c: 53249},
  10890. {f: 12, c: 53253}, {f: 6, c: 53266}, {f: 20, c: 53273}, {f: 6, c: 53294},
  10891. {f: 2, c: 53302}, {f: 3, c: 53305}, {f: 7, c: 53309}, 53318, 53320,
  10892. {f: 6, c: 53322}, {f: 3, c: 53329}, {f: 3, c: 53333}, {f: 7, c: 53337},
  10893. {f: 11, c: 53345}, {f: 2, c: 53358}, {f: 3, c: 53361}, {f: 7, c: 53365},
  10894. {f: 3, c: 53374}, {f: 34, c: 53378}, {f: 2, c: 53414}, {f: 3, c: 53417},
  10895. {f: 7, c: 53421}, 53430, 53432, {f: 6, c: 53434}, {f: 2, c: 53442},
  10896. {f: 3, c: 53445}, {f: 6, c: 53450}, 53458, {f: 6, c: 53462},
  10897. {f: 2, c: 53470}, {f: 3, c: 53473}, {f: 7, c: 53477}, 53486,
  10898. {f: 6, c: 53490}, {f: 20, c: 53497}, {f: 34, c: 53518}, {f: 2, c: 53554},
  10899. {f: 3, c: 53557}, 53561, {f: 5, c: 53563}, 53570, {f: 6, c: 53574},
  10900. {f: 2, c: 53582}, {f: 3, c: 53585}, {f: 7, c: 53589}, 53598, 53600,
  10901. {f: 6, c: 53602}, {f: 3, c: 53609}, {f: 15, c: 53613}, {f: 7, c: 53629},
  10902. {f: 3, c: 53637}, {f: 23, c: 53641}, {f: 2, c: 53666}, {f: 3, c: 53669},
  10903. {f: 7, c: 53673}, 53682, 53684, {f: 4, c: 53686}, 53691, {f: 3, c: 53693},
  10904. {f: 23, c: 53697}, {f: 27, c: 53721}, {f: 3, c: 53749}, {f: 14, c: 53753},
  10905. 53768, {f: 6, c: 53770}, {f: 27, c: 53777}, {f: 2, c: 53806},
  10906. {f: 3, c: 53809}, {f: 7, c: 53813}, 53822, 53824, {f: 6, c: 53826},
  10907. {f: 19, c: 53833}, {f: 7, c: 53853}, {f: 27, c: 53861}, {f: 2, c: 53890},
  10908. {f: 3, c: 53893}, {f: 7, c: 53897}, {f: 3, c: 53906}, {f: 6, c: 53910},
  10909. {f: 3, c: 53917}, {f: 3, c: 53921}, {f: 7, c: 53925}, {f: 4, c: 53933},
  10910. {f: 6, c: 53938}, {f: 2, c: 53946}, {f: 2, c: 53949}, 53953,
  10911. {f: 5, c: 53955}, 53962, {f: 8, c: 53964}, {f: 3, c: 53973},
  10912. {f: 3, c: 53977}, {f: 7, c: 53981}, {f: 10, c: 53990}, {f: 2, c: 54002},
  10913. {f: 3, c: 54005}, {f: 7, c: 54009}, 54018, 54020, {f: 6, c: 54022}, 54031,
  10914. {f: 3, c: 54033}, 54037, {f: 5, c: 54039}, 54046, {f: 3, c: 54050},
  10915. {f: 2, c: 54054}, {f: 2, c: 54058}, {f: 3, c: 54061}, {f: 7, c: 54065},
  10916. 54074, {f: 6, c: 54078}, {f: 54, c: 54086}, {f: 2, c: 54142},
  10917. {f: 3, c: 54145}, {f: 7, c: 54149}, 54158, {f: 6, c: 54162},
  10918. {f: 2, c: 54170}, {f: 3, c: 54173}, {f: 7, c: 54177}, 54186, 54188,
  10919. {f: 6, c: 54190}, {f: 3, c: 54197}, {f: 3, c: 54201}, {f: 7, c: 54205},
  10920. {f: 2, c: 54214}, {f: 6, c: 54218}, {f: 7, c: 54225}, {f: 8, c: 54233},
  10921. 54242, {f: 8, c: 54244}, {f: 2, c: 54254}, {f: 3, c: 54257},
  10922. {f: 7, c: 54261}, 54270, 54272, {f: 6, c: 54274}, {f: 20, c: 54281},
  10923. {f: 34, c: 54302}, {f: 3, c: 54337}, {f: 23, c: 54341}, {f: 3, c: 54365},
  10924. {f: 3, c: 54369}, {f: 8, c: 54373}, 54382, {f: 8, c: 54384},
  10925. {f: 2, c: 54394}, {f: 2, c: 54397}, 54401, {f: 5, c: 54403}, 54410, 54412,
  10926. {f: 6, c: 54414}, {f: 20, c: 54421}, {f: 34, c: 54442}, {f: 3, c: 54477},
  10927. {f: 3, c: 54481}, {f: 7, c: 54485}, {f: 2, c: 54493}, {f: 8, c: 54496},
  10928. {f: 3, c: 54505}, {f: 3, c: 54509}, {f: 7, c: 54513}, {f: 2, c: 54521},
  10929. 54524, {f: 6, c: 54526}, {f: 3, c: 54533}, {f: 3, c: 54537},
  10930. {f: 7, c: 54541}, 54550, {f: 36, c: 54552}, {f: 2, c: 54590},
  10931. {f: 3, c: 54593}, {f: 7, c: 54597}, 54606, 54608, {f: 6, c: 54610},
  10932. {f: 2, c: 54618}, {f: 3, c: 54621}, {f: 4, c: 54625}, {f: 2, c: 54630},
  10933. 54634, 54636, {f: 6, c: 54638}, {f: 2, c: 54646}, {f: 3, c: 54649},
  10934. {f: 7, c: 54653}, 54662, {f: 6, c: 54666}, {f: 20, c: 54673},
  10935. {f: 34, c: 54694}, {f: 2, c: 54730}, {f: 3, c: 54733}, 54737,
  10936. {f: 5, c: 54739}, 54746, 54748, {f: 6, c: 54750}, {f: 2, c: 54758},
  10937. {f: 3, c: 54761}, {f: 7, c: 54765}, 54774, 54776, {f: 6, c: 54778},
  10938. {f: 2, c: 54786}, {f: 3, c: 54789}, {f: 7, c: 54793}, 54802,
  10939. {f: 6, c: 54806}, {f: 3, c: 54813}, {f: 3, c: 54817}, {f: 8, c: 54821},
  10940. {f: 10, c: 54830}, {f: 2, c: 54842}, {f: 3, c: 54845}, {f: 4, c: 54849},
  10941. {f: 2, c: 54854}, 54858, 54860, {f: 3, c: 54862}, {f: 2, c: 54866},
  10942. {f: 2, c: 54870}, {f: 3, c: 54873}, {f: 10, c: 54877}, 54888,
  10943. {f: 6, c: 54890}, {f: 2, c: 54898}, {f: 14, c: 54901}, 54916,
  10944. {f: 6, c: 54918}, {f: 2, c: 54926}, {f: 3, c: 54929}, {f: 8, c: 54933},
  10945. 54942, 54944, {f: 6, c: 54946}, {f: 3, c: 54953}, {f: 3, c: 54957},
  10946. {f: 8, c: 54961}, 54970, {f: 8, c: 54972}, {f: 2, c: 54982},
  10947. {f: 3, c: 54985}, {f: 4, c: 54989}, {f: 2, c: 54994}, {f: 2, c: 54997},
  10948. 55000, {f: 6, c: 55002}, {f: 3, c: 55009}, {f: 3, c: 55013},
  10949. {f: 7, c: 55017}, {f: 4, c: 55025}, {f: 6, c: 55030}, {f: 2, c: 55038},
  10950. {f: 3, c: 55041}, {f: 12, c: 55045}, {f: 6, c: 55058}, {f: 2, c: 55066},
  10951. {f: 3, c: 55069}, {f: 7, c: 55073}, 55082, 55084, {f: 6, c: 55086},
  10952. {f: 2, c: 55094}, {f: 3, c: 55097}, {f: 7, c: 55101}, {f: 2, c: 55109},
  10953. 55112, {f: 6, c: 55114}, {f: 2, c: 55122}, 55125, {f: 6, c: 55130}, 55138,
  10954. 55140, {f: 3, c: 55142}, {f: 2, c: 55146}, {f: 3, c: 55149},
  10955. {f: 3, c: 55153}, {f: 7, c: 55157}, {f: 3, c: 55166}, {f: 6, c: 55170},
  10956. {f: 2, c: 55178}, {f: 3, c: 55181}, {f: 7, c: 55185}, 55194, 55196,
  10957. {f: 6, c: 55198}],
  10958. 'Adobe-CNS1': [{f: 95, c: 32}, {s: 3}, 12288, 65292, {f: 2, c: 12289}, 65294,
  10959. 8226, 65307, 65306, 65311, 65281, 65072, 8230, 8229, 65104, 65380, 65106,
  10960. 183, {f: 4, c: 65108}, 65372, 8211, 65073, 8212, {s: 4}, {f: 2, c: 65288},
  10961. {f: 2, c: 65077}, 65371, 65373, {f: 2, c: 65079}, {f: 2, c: 12308},
  10962. {f: 2, c: 65081}, {f: 2, c: 12304}, {f: 2, c: 65083}, {f: 2, c: 12298},
  10963. {f: 2, c: 65085}, {f: 2, c: 12296}, {f: 2, c: 65087}, {f: 2, c: 12300},
  10964. {f: 2, c: 65089}, {f: 2, c: 12302}, {f: 2, c: 65091}, {f: 6, c: 65113},
  10965. {f: 2, c: 8216}, {f: 2, c: 8220}, {f: 2, c: 12317}, 8245, 8242, 65283,
  10966. 65286, 65290, 8251, 167, 12291, 9675, 9679, 9651, 9650, 9678, 9734, 9733,
  10967. 9671, 9670, 9633, 9632, 9661, 9660, 12963, 8453, 8254, 0, 65343, 0,
  10968. {f: 2, c: 65097}, {f: 2, c: 65101}, {f: 2, c: 65099}, {f: 3, c: 65119},
  10969. 65291, 65293, 215, 247, 177, 8730, 65308, 65310, 65309, {f: 2, c: 8806},
  10970. 8800, 8734, 8786, 8801, {f: 5, c: 65122}, 8764, {f: 2, c: 8745}, 8869,
  10971. 8736, 8735, 8895, 13266, 13265, 8747, 8750, 8757, 8756, 9792, 9794, 9793,
  10972. 9737, 8593, 8595, 8594, 8592, {f: 2, c: 8598}, 8601, 8600, 8741, 8739, 0,
  10973. 0, 65295, 65340, 65284, 165, 12306, {f: 2, c: 162}, 65285, 65312, 8451,
  10974. 8457, {f: 3, c: 65129}, 13269, {f: 3, c: 13212}, 13262, 13217,
  10975. {f: 2, c: 13198}, 13252, 176, [20825, 58834], [20827, 58835],
  10976. [20830, 58837], [20829, 58836], 20833, 20835, 21991, [29929, 58044],
  10977. [31950, 58191], {f: 8, c: 9601}, 9615, 9614, 9613, 9612, 9611, 9610, 9609,
  10978. 9532, 9524, 9516, 9508, 9500, 9620, 9472, 9474, 9621, 9484, 9488, 9492,
  10979. 9496, {f: 2, c: 9581}, 9584, 9583, 9552, 9566, 9578, 9569, {f: 2, c: 9698},
  10980. 9701, 9700, {f: 3, c: 9585}, {f: 10, c: 65296}, {f: 10, c: 8544},
  10981. {f: 9, c: 12321}, 0, [21316, 57443], 0, {f: 26, c: 65313},
  10982. {f: 26, c: 65345}, {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945},
  10983. {f: 7, c: 963}, {f: 37, c: 12549}, 729, 714, 711, 715, [9312, 63153],
  10984. [9313, 63154], [9314, 63155], [9315, 63156], [9316, 63157], [9317, 63158],
  10985. [9318, 63159], [9319, 63160], [9320, 63161], [9321, 63162], [9332, 63163],
  10986. [9333, 63164], [9334, 63165], [9335, 63166], [9336, 63167], [9337, 63168],
  10987. [9338, 63169], [9339, 63170], [9340, 63171], [9341, 63172], [8560, 63173],
  10988. [8561, 63174], [8562, 63175], [8563, 63176], [8564, 63177], [8565, 63178],
  10989. [8566, 63179], [8567, 63180], [8568, 63181], [8569, 63182], [12033, 20008],
  10990. [12034, 20022, 63183], [12035, 20031, 63184], [12037, 20101, 63185],
  10991. [12039, 20128, 63186], [12044, 20866, 63187], [12045, 20886, 63188],
  10992. [12046, 20907, 63189], [12051, 21241, 63190], [12054, 21304, 63191],
  10993. [12057, 21353, 63192], [12059, 21430, 63193],
  10994. [12065, 12066, 22786, 22794, 63194], [12071, 23424, 63195],
  10995. [12078, 24027, 63196], [12083, 24186, 63197], [12084, 24191, 63198],
  10996. [12085, 24308], [12089, 24400, 63200], [12090, 24417, 63201],
  10997. [12097, 25908, 63202], [12102, 26080], [12135, 30098, 63204],
  10998. [12136, 30326], [12193, 36789, 63206], [12202, 38582], {f: 32, c: 9216},
  10999. 9249, [12032, 19968], [12036, 20057], 19969, 19971, 20035, 20061, 20102,
  11000. [12038, 20108], [12040, 20154], [12041, 20799], [12042, 20837],
  11001. [12043, 20843], [12047, 20960], [12049, 20992], 20993, [12050, 21147],
  11002. [12052, 21269], [12055, 21313], [12056, 21340], [12060, 21448], 19977,
  11003. 19979, 19976, 19978, 20011, 20024, 20961, 20037, 20040, 20063, 20062,
  11004. 20110, 20129, [20800, 64012], 20995, 21242, 21315, 21449, [12061, 21475],
  11005. [12063, 22303], [12064, 22763], [12067, 22805], [12068, 22823],
  11006. [12069, 22899], [12070, 23376], 23377, 23379, [12072, 23544],
  11007. [12073, 23567], [12074, 23586], [12075, 23608], [12077, 23665], 24029,
  11008. [12079, 24037], [12080, 24049], {f: 2, c: 24050}, [12081, 24062],
  11009. [12082, 24178], [12086, 24318], [12087, 24331], [12088, 24339], 25165,
  11010. 19985, 19984, 19981, 20013, 20016, 20025, 20043, 23609, 20104, 20113,
  11011. 20117, 20114, 20116, 20130, 20161, 20160, 20163, {f: 2, c: 20166}, 20173,
  11012. {f: 2, c: 20170}, 20164, 20803, 20801, 20839, {f: 2, c: 20845}, 20844,
  11013. 20887, 20982, {f: 3, c: 20998}, 21243, {f: 2, c: 21246}, 21270, 21305,
  11014. 21320, 21319, 21317, 21342, 21380, 21451, 21450, 21453, 22764, 22825,
  11015. 22827, 22826, 22829, 23380, 23569, 23588, 23610, 23663, 24052, 24187,
  11016. 24319, {f: 2, c: 24340}, [12092, 24515], [12093, 25096], [12094, 25142],
  11017. [12095, 25163], 25166, [12096, 25903], [12098, 25991], [12099, 26007],
  11018. [12100, 26020], [12101, 26041], [12103, 26085], [12104, 26352],
  11019. [12105, 26376], [12106, 26408], [12107, 27424], [12108, 27490],
  11020. [12109, 27513], [12111, 27595], [12112, 27604], [12113, 27611],
  11021. [12114, 27663], [12116, 27700], [12117, 28779], [12118, 29226],
  11022. [12119, 29238], [12120, 29243], [12122, 29255], [12123, 29273],
  11023. [12124, 29275], [12125, 29356], 29579, 19993, 19990, 19989, 19988, 19992,
  11024. 20027, 20045, 20047, 20046, 20197, 20184, {f: 4, c: 20180},
  11025. {f: 2, c: 20195}, 20185, 20190, 20805, 20804, {f: 2, c: 20873}, 20908,
  11026. {f: 2, c: 20985}, 20984, 21002, 21152, 21151, [21253, 57435], 21254, 21271,
  11027. 21277, 20191, 21322, 21321, 21345, 21344, 21359, 21358, 21435, 21487,
  11028. 21476, 21491, 21484, 21486, 21481, 21480, 21500, 21496, 21493, 21483,
  11029. 21478, 21482, 21490, 21489, 21488, 21477, 21485, 21499, 22235, 22234,
  11030. 22806, 22830, 22833, 22900, 22902, 23381, 23427, 23612, 24040, 24039,
  11031. 24038, {f: 2, c: 24066}, 24179, 24188, 24321, 24344, 24343, 24517, 25098,
  11032. {f: 2, c: 25171}, 25170, 25169, 26021, 26086, 26414, 26412,
  11033. {f: 2, c: 26410}, 26413, 27491, 27597, 27665, 27664, 27704, 27713, 27712,
  11034. 27710, 29359, [12126, 29572], [12127, 29577], [12128, 29916],
  11035. [12129, 29926], [12130, 29976], [12131, 29983], [12132, 29992], 29993,
  11036. [12133, 30000], {f: 3, c: 30001}, [12134, 30091], [12137, 30333],
  11037. [12138, 30382], [12139, 30399], [12140, 30446], [12141, 30683],
  11038. [12142, 30690], [12143, 30707], [12144, 31034], [12146, 31166],
  11039. [12147, 31348], [12148, 31435], {f: 2, c: 19998}, {f: 2, c: 20050}, 20073,
  11040. 20121, 20132, 20134, 20133, 20223, 20233, 20249, 20234, 20245, 20237,
  11041. {f: 2, c: 20240}, 20239, 20210, 20214, 20219, 20208, 20211, 20221, 20225,
  11042. 20235, 20809, 20807, 20806, 20808, 20840, 20849, 20877, 20912, 21015,
  11043. {f: 2, c: 21009}, 21006, 21014, 21155, 21256, 21281, 21280,
  11044. {f: 2, c: 21360}, 21513, 21519, 21516, 21514, 21520, 21505, 21515, 21508,
  11045. 21521, 21517, 21512, 21507, 21518, 21510, 21522, 22240, 22238, 22237,
  11046. 22323, 22320, 22312, 22317, 22316, 22319, 22313, {f: 2, c: 22809},
  11047. {f: 2, c: 22839}, 22916, 22904, 22915, 22909, 22905, 22914, 22913,
  11048. {f: 2, c: 23383}, {f: 2, c: 23431}, 23429, 23433, 23546, 23574, 23673,
  11049. 24030, 24070, 24182, 24180, 24335, 24347, 24537, 24534, 25102,
  11050. {f: 2, c: 25100}, 25104, 25187, 25179, 25176, 25910, 26089, 26088,
  11051. {f: 2, c: 26092}, {f: 2, c: 26354}, 26377, 26429, 26420, 26417, 26421,
  11052. 27425, 27492, 27515, 27670, 27741, 27735, 27737, {f: 2, c: 27743}, 27728,
  11053. 27733, 27745, 27739, {f: 2, c: 27725}, 28784, 29279, 29277, 30334,
  11054. [12149, 31481], [12150, 31859], [12151, 31992], [12152, 32566],
  11055. [12154, 32650], [12155, 32701], [12156, 32769], 32771, [12157, 32780],
  11056. [12158, 32786], [12159, 32819], [12160, 32895], [12161, 32905],
  11057. {f: 2, c: 32907}, [12162, 33251], [12163, 33258], [12164, 33267],
  11058. [12165, 33276], [12166, 33292], [12167, 33307], [12168, 33311],
  11059. [12169, 33390], [12170, 33394], 33406, [12173, 34411], [12174, 34880],
  11060. [12175, 34892], [12176, 34915], 35199, 38433, 20018, 20136, 20301, 20303,
  11061. 20295, 20311, 20318, 20276, 20315, 20309, 20272, {f: 2, c: 20304}, 20285,
  11062. 20282, 20280, 20291, 20308, 20284, 20294, 20323, 20316, 20320, 20271,
  11063. 20302, 20278, 20313, 20317, 20296, 20314, 20812, 20811, 20813, 20853,
  11064. {f: 2, c: 20918}, 21029, 21028, {f: 2, c: 21033}, 21032, 21163,
  11065. {f: 2, c: 21161}, 21164, 21283, 21363, 21365, 21533, 21549, 21534, 21566,
  11066. 21542, 21582, 21543, 21574, 21571, 21555, 21576, 21570, 21531, 21545,
  11067. 21578, 21561, 21563, 21560, 21550, {f: 2, c: 21557}, 21536, 21564, 21568,
  11068. 21553, 21547, 21535, 21548, 22250, 22256, 22244, 22251, 22346, 22353,
  11069. 22336, 22349, 22343, 22350, 22334, 22352, 22351, 22331, 22767, 22846,
  11070. 22941, 22930, 22952, 22942, 22947, 22937, 22934, 22925, 22948, 22931,
  11071. 22922, 22949, 23389, 23388, {f: 2, c: 23386}, 23436, 23435, 23439, 23596,
  11072. {f: 2, c: 23616}, 23615, 23614, {f: 2, c: 23696}, 23700, 23692, 24043,
  11073. 24076, 24207, 24199, 24202, 24311, 24324, 24351, 24420, 24418, 24439,
  11074. 24441, 24536, 24524, 24535, 24525, 24561, 24555, 24568, 24554, 25106,
  11075. 25105, 25220, 25239, 25238, 25216, 25206, 25225, 25197, 25226, 25212,
  11076. 25214, 25209, 25203, 25234, 25199, 25240, 25198, 25237, 25235, 25233,
  11077. 25222, 25913, 25915, 25912, 26097, 26356, 26463, {f: 4, c: 26446}, 26460,
  11078. 26454, [26462, 57801], 26441, 26438, 26464, 26451, 26455, 27493, 27599,
  11079. 27714, 27742, 27801, 27777, {f: 2, c: 27784}, 27781, 27803, 27754, 27770,
  11080. 27792, 27760, 27788, 27752, 27798, 27794, 27773, 27779, 27762, 27774,
  11081. 27764, 27782, 27766, 27789, 27796, 27800, 27778, 28790, {f: 2, c: 28796},
  11082. 28792, 29282, 29281, 29280, 29380, 29378, 29590, 29996, 29995,
  11083. {f: 2, c: 30007}, 30338, 30447, 30691, 31169, 31168, 31167, 31350, 31995,
  11084. 32597, 32918, 32915, 32925, 32920, 32923, 32922, 32946, 33391, 33426,
  11085. 33419, 33421, [12178, 35211], [12179, 35282], [12180, 35328],
  11086. [12181, 35895], [12182, 35910], [12183, 35925], [12185, 35997],
  11087. [12186, 36196], [12187, 36208], [12188, 36275], [12189, 36523],
  11088. [12190, 36554], [12191, 36763], [12192, 36784], 36802, 36806, 36805, 36804,
  11089. 24033, [12194, 37009], 37026, 37034, 37030, 37027, [12195, 37193],
  11090. [12196, 37318], [12197, 37324], 38450, 38446, 38449, 38442, 38444, 20006,
  11091. 20054, 20083, 20107, 20123, 20126, {f: 2, c: 20139}, 20335, 20381, 20365,
  11092. 20339, 20351, 20332, 20379, 20363, 20358, 20355, 20336, 20341, 20360,
  11093. 20329, 20347, 20374, 20350, 20367, 20369, 20346, 20820, 20818, 20821,
  11094. 20841, 20855, 20854, 20856, 20925, 20989, 21051, 21048, 21047, 21050,
  11095. 21040, 21038, 21046, 21057, 21182, 21179, 21330, 21332, 21331, 21329,
  11096. 21350, {f: 3, c: 21367}, 21462, 21460, 21463, 21619, 21621, 21654, 21624,
  11097. 21653, 21632, 21627, 21623, 21636, 21650, 21638, 21628, 21648, 21617,
  11098. 21622, 21644, 21658, 21602, 21608, 21643, 21629, 21646, 22266, 22403,
  11099. 22391, 22378, 22377, 22369, 22374, 22372, 22396, 22812, 22857,
  11100. {f: 2, c: 22855}, 22852, 22868, 22974, 22971, 22996, 22969, 22958, 22993,
  11101. 22982, 22992, 22989, 22987, 22995, 22986, 22959, 22963, 22994, 22981,
  11102. 23391, 23396, 23395, 23447, 23450, 23448, 23452, 23449, 23451, 23578,
  11103. 23624, {f: 2, c: 23621}, 23735, 23713, 23736, 23721, 23723, 23729, 23731,
  11104. 24088, 24090, 24086, 24085, 24091, 24081, 24184, 24218, 24215, 24220,
  11105. {f: 2, c: 24213}, 24310, {f: 2, c: 24358}, 24361, {f: 2, c: 24448}, 24447,
  11106. 24444, 24541, 24544, 24573, 24565, 24575, 24591, 24596, 24623, 24629,
  11107. 24598, 24618, 24597, 24609, 24615, 24617, 24619, 24603, 25110, 25109,
  11108. 25151, 25150, 25152, 25215, 25289, 25292, 25284, 25279, 25282, 25273,
  11109. 25298, 25307, 25259, {f: 2, c: 25299}, 25291, 25288, 25256, 25277, 25276,
  11110. [25296, 60582], 25305, 25287, 25293, 25269, 25306, 25265, 25304,
  11111. {f: 2, c: 25302}, 25286, 25260, [25294, 61010], 25918, 26023, 26044, 26106,
  11112. 26132, 26131, 26124, 26118, 26114, 26126, 26112, 26127, 26133, 26122,
  11113. 26119, 26381, 26379, 26477, 26507, 26517, 26481, 26524, 26483, 26487,
  11114. 26503, 26525, 26519, {f: 2, c: 26479}, 26495, 26505, 26494, 26512, 26485,
  11115. 26522, 26515, 26492, 26474, 26482, 27427, {f: 2, c: 27494}, 27519, 27667,
  11116. 27675, 27875, 27880, 27891, 27825, 27852, 27877, 27827, {f: 2, c: 27837},
  11117. 27836, 27874, 27819, 27861, 27859, 27832, 27844, 27833, 27841, 27822,
  11118. 27863, 27845, 27889, 27839, 27835, 27873, 27867, 27850, 27820, 27887,
  11119. 27868, 27862, 27872, 28821, 28814, 28818, 28810, 28825, {f: 2, c: 29228},
  11120. 29240, 29256, 29287, 29289, 29376, 29390, 29401, 29399, 29392, 29609,
  11121. 29608, 29599, 29611, 29605, 30013, 30109, {f: 2, c: 30105}, 30340, 30402,
  11122. 30450, 30452, 30693, 30717, 31038, {f: 2, c: 31040}, 31177, 31176, 31354,
  11123. 31353, 31482, 31998, 32596, 32652, 32651, [32773, 58236], 32954, 32933,
  11124. 32930, 32945, 32929, 32939, 32937, 32948, 32938, 32943, 33253, 33278,
  11125. 33293, 33459, 33437, 33433, 33453, 33469, 33439, 33465, 33457, 33452,
  11126. 33445, 33455, 33464, 33443, 33456, 33470, 33463, 34382, 34417, 21021,
  11127. 34920, 36555, 36814, 36820, 36817, 37045, 37048, 37041, 37046, 37319,
  11128. [12198, 37329], [12199, 38263], [12200, 38272], [12201, 38428], 38464,
  11129. 38463, 38459, 38468, 38466, [12203, 38585], [12204, 38632], 38738,
  11130. [12206, 38750], 20127, {f: 2, c: 20141}, 20449, 20405, 20399, 20415, 20448,
  11131. 20433, 20431, 20445, 20419, 20406, 20440, 20447, 20426, 20439, 20398,
  11132. 20432, 20420, 20418, 20442, 20430, 20446, 20407, 20823, 20882, 20881,
  11133. 20896, 21070, 21059, 21066, 21069, 21068, 21067, 21063, 21191, 21193,
  11134. 21187, 21185, 21261, 21335, 21371, 21402, 21467, 21676, 21696, 21672,
  11135. 21710, 21705, 21688, 21670, 21683, 21703, 21698, 21693, 21674, 21697,
  11136. 21700, 21704, 21679, 21675, 21681, 21691, 21673, 21671, 21695, 22271,
  11137. 22402, 22411, 22432, 22435, 22434, 22478, 22446, 22419, 22869, 22865,
  11138. 22863, 22862, 22864, 23004, 23000, 23039, 23011, 23016, 23043, 23013,
  11139. 23018, 23002, 23014, 23041, 23035, 23401, 23459, 23462, 23460, 23458,
  11140. 23461, 23553, {f: 2, c: 23630}, 23629, 23627, 23769, 23762, 24055, 24093,
  11141. 24101, 24095, 24189, 24224, 24230, 24314, 24328, 24365, 24421, 24456,
  11142. 24453, {f: 2, c: 24458}, 24455, 24460, 24457, 24594, 24605, 24608, 24613,
  11143. 24590, 24616, 24653, 24688, 24680, [24674, 60712], 24646, 24643, 24684,
  11144. 24683, 24682, 24676, 25153, 25308, 25366, 25353, 25340, 25325, 25345,
  11145. 25326, 25341, 25351, 25329, 25335, 25327, 25324, 25342, 25332, 25361,
  11146. 25346, 25919, 25925, 26027, 26045, 26082, 26149, 26157, 26144, 26151,
  11147. 26159, 26143, 26152, 26161, 26148, 26359, 26623, 26579, 26609, 26580,
  11148. 26576, 26604, 26550, 26543, 26613, 26601, 26607, 26564, 26577, 26548,
  11149. 26586, 26597, 26552, 26575, 26590, 26611, 26544, 26585, 26594, 26589,
  11150. 26578, 27498, 27523, 27526, 27573, 27602, 27607, 27679, 27849, 27915,
  11151. 27954, 27946, 27969, 27941, 27916, 27953, 27934, 27927, 27963,
  11152. {f: 2, c: 27965}, 27958, 27931, 27893, 27961, 27943, 27960, 27945, 27950,
  11153. 27957, 27918, 27947, 28843, 28858, 28851, 28844, 28847, 28845, 28856,
  11154. 28846, 28836, 29232, 29298, 29295, 29300, 29417, {f: 2, c: 29408}, 29623,
  11155. 29642, 29627, 29618, 29645, 29632, 29619, 29978, 29997, 30031, 30028,
  11156. 30030, 30027, 30123, {f: 2, c: 30116}, {f: 2, c: 30114}, 30328,
  11157. {f: 3, c: 30342}, 30408, 30406, 30403, 30405, 30465, 30457, 30456, 30473,
  11158. 30475, 30462, 30460, 30471, 30684, 30722, 30740, {f: 2, c: 30732}, 31046,
  11159. 31049, 31048, 31047, {f: 2, c: 31161}, {f: 2, c: 31185}, 31179, 31359,
  11160. 31361, 31487, 31485, 31869, 32002, 32005, 32000, 32009, 32007, 32004,
  11161. 32006, 32568, 32654, 32703, 32784, 32781, 32785, 32822, 32982, 32997,
  11162. 32986, {f: 2, c: 32963}, 32972, 32993, 32987, 32974, 32990, 32996, 32989,
  11163. 33268, 33314, 33511, 33539, 33541, 33507, 33499, 33510, 33540, 33509,
  11164. 33538, 33545, 33490, 33495, 33521, 33537, 33500, 33492, 33489, 33502,
  11165. 33491, 33503, 33519, 33542, 34384, 34425, 34427, 34426, 34893, 34923,
  11166. 35201, 35284, 35336, {f: 2, c: 35330}, 35998, 36000, 36212, 36211, 36276,
  11167. 36557, 36556, 36848, 36838, 36834, 36842, 36837, 36845, 36843, 36836,
  11168. 36840, 37066, 37070, 37057, 37059, 37195, 37194, 37325, 38274, 38480,
  11169. {f: 3, c: 38475}, [12207, 38754], [12208, 38761], [12209, 38859],
  11170. [12210, 38893], [12211, 38899], [12212, 38913], [12213, 39080],
  11171. [12214, 39131], [12215, 39135], [12216, 39318], [12217, 39321], 20056,
  11172. 20147, {f: 2, c: 20492}, 20515, 20463, 20518, 20517, 20472, [20521, 57375],
  11173. 20502, 20486, 20540, 20511, 20506, 20498, 20497, 20474, 20480, 20500,
  11174. 20520, 20465, 20513, 20491, 20505, 20504, 20467, 20462, 20525, 20522,
  11175. 20478, 20523, 20489, 20860, {f: 2, c: 20900}, 20898, 20941, 20940, 20934,
  11176. 20939, 21078, 21084, 21076, 21083, 21085, 21290, [21375, 57459], 21407,
  11177. 21405, 21471, 21736, 21776, 21761, 21815, 21756, 21733, 21746, 21766,
  11178. 21754, 21780, 21737, 21741, 21729, 21769, 21742, 21738, 21734, 21799,
  11179. 21767, 21757, 21775, {f: 2, c: 22275}, 22466, 22484, 22475, 22467, 22537,
  11180. 22799, {f: 2, c: 22871}, 22874, 23057, 23064, 23068, 23071, 23067, 23059,
  11181. 23020, 23072, 23075, 23081, 23077, 23052, 23049, 23403, 23640, 23472,
  11182. 23475, 23478, 23476, 23470, 23477, 23481, 23480, 23556, 23633, 23637,
  11183. 23632, 23789, 23805, 23803, 23786, 23784, 23792, 23798, 23809, 23796,
  11184. 24046, 24109, 24107, 24235, 24237, 24231, 24369, 24466, 24465, 24464,
  11185. 24665, 24675, 24677, 24656, 24661, 24685, 24681, 24687, 24708, 24735,
  11186. 24730, 24717, 24724, 24716, 24709, 24726, 25159, 25331, 25352, 25343,
  11187. 25422, 25406, 25391, 25429, 25410, 25414, 25423, 25417, 25402, 25424,
  11188. 25405, {f: 2, c: 25386}, 25384, 25421, 25420, {f: 2, c: 25928}, 26009,
  11189. 26049, 26053, 26178, 26185, 26191, 26179, 26194, 26188, 26181, 26177,
  11190. 26360, {f: 2, c: 26388}, 26391, 26657, 26680, 26696, 26694, 26707, 26681,
  11191. 26690, 26708, 26665, 26803, 26647, 26700, 26705, 26685, 26612, 26704,
  11192. 26688, 26684, 26691, 26666, 26693, 26643, 26648, 26689, 27530, 27529,
  11193. 27575, 27683, {f: 2, c: 27687}, 27686, 27684, 27888, 28010, 28053, 28040,
  11194. 28039, 28006, 28024, 28023, 27993, 28051, 28012, 28041, 28014, 27994,
  11195. 28020, 28009, 28044, 28042, 28025, 28037, 28005, 28052, 28874, 28888,
  11196. 28900, 28889, 28872, 28879, 29241, 29305, 29436, 29433, 29437, 29432,
  11197. 29431, 29574, 29677, 29705, 29678, 29664, 29674, 29662, 30036, 30045,
  11198. 30044, 30042, 30041, 30142, 30149, 30151, {f: 2, c: 30130}, 30141, 30140,
  11199. 30137, 30146, 30136, 30347, 30384, 30410, {f: 2, c: 30413}, 30505,
  11200. {f: 2, c: 30495}, 30504, 30697, 30768, 30759, 30776, 30749, 30772, 30775,
  11201. 30757, 30765, 30752, 30751, 30770, 31061, 31056, 31072, 31071, 31062,
  11202. 31070, 31069, 31063, 31066, 31204, [31203, 60418], 31207, 31199, 31206,
  11203. 31209, 31192, 31364, 31368, 31449, 31494, 31505, 31881, 32033, 32023,
  11204. 32011, 32010, 32032, 32034, 32020, 32016, 32021, 32026, 32028, 32013,
  11205. 32025, 32027, 32570, 32607, 32660, 32709, 32705, 32774, 32772, 32792,
  11206. 32789, 32793, 32791, 32829, 32831, 33009, 33026, 33008, 33029, 33005,
  11207. 33012, 33030, 33016, 33011, 33032, 33021, 33034, 33020, 33007, 33261,
  11208. 33260, 33280, 33296, {f: 2, c: 33322}, 33320, 33324, 33467, 33579, 33618,
  11209. 33620, 33610, 33592, 33616, 33609, 33589, 33588, 33615, 33586, 33593,
  11210. 33590, 33559, 33600, 33585, 33576, 33603, 34388, 34442, 34474, 34451,
  11211. 34468, 34473, 34444, 34467, 34460, 34928, 34935, {f: 2, c: 34945}, 34941,
  11212. 34937, 35352, 35344, 35342, 35340, 35349, 35338, 35351, 35347, 35350,
  11213. 35343, 35345, 35912, 35962, 35961, {f: 2, c: 36001}, [36215, 58442], 36524,
  11214. 36562, 36564, 36559, 36785, 36865, 36870, 36855, 36864, 36858, 36852,
  11215. 36867, 36861, 36869, 36856, 37013, 37089, 37085, 37090, 37202, 37197,
  11216. 37196, 37336, 37341, 37335, 37340, 37337, 38275, {f: 2, c: 38498}, 38497,
  11217. 38491, 38493, 38500, 38488, 38494, 38587, 39138, [12218, 39340],
  11218. [12219, 39592], [12220, 39640], [12222, 39717], [12224, 39730],
  11219. [12225, 39740], 20094, 20602, [20605, 57382], 20572, 20551, 20547, 20556,
  11220. 20570, 20553, 20581, 20598, 20558, 20565, 20597, 20596, 20599, 20559,
  11221. 20495, 20591, 20589, 20828, 20885, 20976, 21098, 21103, 21202, 21209,
  11222. 21208, 21205, 21264, 21263, 21273, {f: 2, c: 21311}, 21310, 21443, 26364,
  11223. 21830, 21866, 21862, 21828, 21854, 21857, 21827, 21834, 21809, 21846,
  11224. 21839, 21845, 21807, 21860, 21816, 21806, 21852, 21804, 21859, 21811,
  11225. 21825, 21847, 22280, 22283, 22281, 22495, 22533, 22538, 22534, 22496,
  11226. 22500, 22522, 22530, 22581, 22519, 22521, 22816, 22882, 23094, 23105,
  11227. 23113, 23142, 23146, 23104, 23100, 23138, 23130, 23110, 23114, 23408,
  11228. 23495, 23493, 23492, 23490, 23487, 23494, 23561, 23560, 23559, 23648,
  11229. {f: 2, c: 23644}, 23815, 23814, 23822, 23835, 23830, 23842, 23825, 23849,
  11230. 23828, 23833, 23844, 23847, 23831, 24034, 24120, 24118, 24115, 24119,
  11231. {f: 2, c: 24247}, 24246, 24245, 24254, 24373, 24375, 24407, 24428, 24425,
  11232. 24427, 24471, 24473, 24478, 24472, 24481, 24480, 24476, 24703, 24739,
  11233. 24713, 24736, 24744, 24779, 24756, 24806, 24765, 24773, 24763, 24757,
  11234. 24796, 24764, 24792, 24789, 24774, 24799, 24760, 24794, 24775,
  11235. {f: 2, c: 25114}, 25160, 25504, 25511, 25458, 25494, 25506, 25509, 25463,
  11236. 25447, 25496, 25514, 25457, 25513, 25481, 25475, 25499, 25451, 25512,
  11237. 25476, 25480, 25497, 25505, 25516, 25490, 25487, 25472, 25467, 25449,
  11238. 25448, 25466, 25949, 25942, 25937, 25945, 25943, 21855, 25935, 25944,
  11239. 25941, 25940, 26012, 26011, 26028, 26063, {f: 2, c: 26059}, 26062, 26205,
  11240. 26202, 26212, 26216, 26214, 26206, 26361, 21207, 26395, 26753, 26799,
  11241. 26786, 26771, 26805, 26751, 26742, 26801, 26791, 26775, 26800, 26755,
  11242. 26820, 26797, 26758, 26757, 26772, 26781, 26792, 26783, 26785, 26754,
  11243. 27442, 27578, {f: 2, c: 27627}, 27691, 28046, 28092, 28147, 28121, 28082,
  11244. 28129, 28108, 28132, 28155, 28154, 28165, 28103, 28107, 28079, 28113,
  11245. 28078, 28126, 28153, 28088, 28151, 28149, 28101, 28114, 28186, 28085,
  11246. 28122, 28139, 28120, 28138, 28145, 28142, 28136, 28102, 28100, 28074,
  11247. 28140, 28095, 28134, 28921, {f: 2, c: 28937}, 28925, 28911, 29245, 29309,
  11248. 29313, 29468, 29467, 29462, 29459, 29465, 29575, 29701, 29706, 29699,
  11249. 29702, 29694, 29709, 29920, {f: 2, c: 29942}, 29980, 29986,
  11250. {f: 2, c: 30053}, 30050, 30064, 30095, {f: 2, c: 30164}, 30133, 30154,
  11251. 30157, 30350, 30420, 30418, 30427, 30519, 30526, 30524, 30518, 30520,
  11252. 30522, 30827, 30787, 30798, 31077, 31080, 31085, 31227, 31378, 31381,
  11253. 31520, 31528, 31515, 31532, 31526, 31513, 31518, 31534, 31890, 31895,
  11254. 31893, 32070, 32067, 32113, 32046, 32057, 32060, 32064, 32048, 32051,
  11255. 32068, 32047, 32066, 32050, 32049, 32573, 32670, 32666, 32716, 32718,
  11256. 32722, 32796, 32842, 32838, 33071, 33046, 33059, 33067, 33065, 33072,
  11257. 33060, 33282, 33333, 33335, 33334, 33337, 33678, 33694, 33688, 33656,
  11258. 33698, 33686, 33725, 33707, 33682, 33674, 33683, 33673, 33696, 33655,
  11259. {f: 2, c: 33659}, 33670, 33703, 34389, 24426, 34503, 34496, 34486, 34500,
  11260. 34485, 34502, 34507, 34481, 34479, 34505, 34899, 34974, 34952, 34987,
  11261. 34962, 34966, 34957, 34955, 35219, 35215, 35370, 35357, 35363, 35365,
  11262. 35377, 35373, 35359, 35355, 35362, 35913, 35930, 36009, 36012, 36011,
  11263. 36008, 36010, 36007, 36199, 36198, 36286, 36282, 36571, 36575, 36889,
  11264. 36877, 36890, 36887, 36899, 36895, 36893, 36880, 36885, 36894, 36896,
  11265. 36879, 36898, 36886, 36891, 36884, 37096, 37101, [37117, 58488], 37207,
  11266. 37326, 37365, 37350, 37347, 37351, 37357, 37353, 38281, 38506, 38517,
  11267. 38515, 38520, 38512, 38516, {f: 2, c: 38518}, 38508, 38592, 38634, 38633,
  11268. 31456, 31455, {f: 2, c: 38914}, [12226, 39770], [12227, 40165],
  11269. [12228, 40565], [12229, 40575], [12230, 40613], [12231, 40635], 20642,
  11270. 20621, 20613, 20633, 20625, 20608, 20630, 20632, 20634, 26368, 20977,
  11271. 21106, {f: 2, c: 21108}, 21097, 21214, 21213, 21211, 21338, 21413, 21883,
  11272. 21888, 21927, 21884, 21898, 21917, 21912, 21890, 21916, 21930, 21908,
  11273. 21895, 21899, 21891, 21939, 21934, 21919, 21822, 21938, 21914, 21947,
  11274. 21932, 21937, 21886, 21897, 21931, 21913, 22285, 22575, 22570, 22580,
  11275. 22564, {f: 2, c: 22576}, 22561, 22557, 22560, {f: 2, c: 22777}, 22880,
  11276. [23159, 57587], 23194, 23167, 23186, 23195, 23207, 23411, 23409, 23506,
  11277. 23500, 23507, 23504, {f: 2, c: 23562}, 23601, 23884, 23888, 23860, 23879,
  11278. 24061, 24133, 24125, 24128, 24131, 24190, 24266, {f: 2, c: 24257}, 24260,
  11279. 24380, 24429, {f: 2, c: 24489}, 24488, 24785, 24801, 24754, 24758, 24800,
  11280. 24860, 24867, 24826, 24853, 24816, 24827, 24820, 24936, 24817, 24846,
  11281. 24822, 24841, 24832, 24850, 25119, 25161, 25507, 25484, 25551, 25536,
  11282. 25577, 25545, 25542, 25549, 25554, 25571, 25552, 25569, 25558,
  11283. {f: 2, c: 25581}, 25462, 25588, 25578, 25563, 25682, 25562, 25593, 25950,
  11284. 25958, {f: 2, c: 25954}, 26001, 26000, 26031, 26222, 26224, [26228, 57786],
  11285. 26230, 26223, 26257, 26234, 26238, 26231, {f: 2, c: 26366}, 26399, 26397,
  11286. 26874, 26837, 26848, 26840, 26839, 26885, 26847, 26869, 26862, 26855,
  11287. 26873, 26834, 26866, 26851, 26827, 26829, 26893, 26898, 26894, 26825,
  11288. 26842, 26990, 26875, 27454, 27450, 27453, 27544, 27542, 27580, 27631,
  11289. {f: 2, c: 27694}, 27692, [28207, 57904], 28216, 28244, 28193, 28210, 28263,
  11290. 28234, 28192, 28197, 28195, 28187, 28251, 28248, 28196, 28246, 28270,
  11291. 28205, 28198, 28271, 28212, 28237, 28218, 28204, 28227, [28189, 57901],
  11292. 28222, 28363, 28297, 28185, 28238, 28259, 28228, 28274, 28265, 28255,
  11293. {f: 2, c: 28953}, 28966, 28976, 28961, 28982, [29038, 57958], 28956, 29260,
  11294. 29316, 29312, 29494, 29477, 29492, 29481, 29754, 29738, 29747, 29730,
  11295. 29733, {f: 2, c: 29749}, 29748, 29743, 29723, 29734, 29736,
  11296. {f: 2, c: 29989}, 30059, 30058, 30178, 30171, 30179, 30169, 30168, 30174,
  11297. 30176, {f: 2, c: 30331}, 30358, 30355, 30388, 30428, 30543, 30701, 30813,
  11298. 30828, 30831, 31245, 31240, 31243, 31237, 31232, 31384, 31383, 31382,
  11299. 31461, 31459, 31561, 31574, 31558, 31568, 31570, 31572, 31565, 31563,
  11300. 31567, [31569, 60510], 31903, 31909, 32094, 32080, 32104, 32085, 32043,
  11301. 32110, 32114, 32097, 32102, 32098, 32112, 32115, 21892, {f: 2, c: 32724},
  11302. 32779, 32850, 32901, 33109, 33108, 33099, 33105, 33102, 33081, 33094,
  11303. 33086, 33100, 33107, 33140, 33298, 33308, 33769, 33795, 33784, 33805,
  11304. 33760, 33733, 33803, [33729, 58309], 33775, 33777, 33780, 33879, 33802,
  11305. 33776, 33804, 33740, 33789, 33778, 33738, 33848, 33806, 33796, 33756,
  11306. 33799, 33748, 33759, 34395, 34527, 34521, 34541, 34516, 34523, 34532,
  11307. 34512, 34526, 34903, {f: 2, c: 35009}, 34993, 35203, 35222, 35387, 35424,
  11308. 35413, 35422, 35388, 35393, 35412, 35419, 35408, 35398, 35380, 35386,
  11309. 35382, 35414, 35937, 35970, 36015, 36028, 36019, 36029, 36033, 36027,
  11310. 36032, 36020, 36023, 36022, 36031, 36024, 36234, 36229, 36225, 36302,
  11311. 36317, 36299, 36314, 36305, 36300, 36315, 36294, 36603, 36600, 36604,
  11312. 36764, 36910, 36917, 36913, 36920, 36914, 36918, 37122, 37109, 37129,
  11313. 37118, 37219, 37221, 37327, {f: 2, c: 37396}, 37411, 37385, 37406, 37389,
  11314. 37392, 37383, 37393, 38292, 38287, 38283, 38289, 38291, 38290, 38286,
  11315. 38538, 38542, 38539, 38525, {f: 2, c: 38533}, 38541, 38514, 38532, 38593,
  11316. 38597, 38596, {f: 2, c: 38598}, 38639, 38642, 38860, {f: 2, c: 38917},
  11317. 38920, 39143, 39146, 39151, 39145, 39154, 39149, 39342, 39341,
  11318. [12232, 40643], [12233, 40653], [12234, 40657], 20098, 20653, 20661,
  11319. {f: 2, c: 20658}, 20677, 20670, 20652, 20663, 20667, 20655, 20679, 21119,
  11320. 21111, 21117, 21215, 21222, 21220, {f: 2, c: 21218}, 21295, 21983, 21992,
  11321. 21971, 21990, 21966, 21980, 21959, 21969, {f: 2, c: 21987}, 21999, 21978,
  11322. 21985, {f: 2, c: 21957}, 21989, 21961, {f: 2, c: 22290}, 22622, 22609,
  11323. 22616, 22615, 22618, 22612, 22635, 22604, 22637, 22602, 22626, 22610,
  11324. 22603, 22887, 23233, 23241, 23244, 23230, 23229, 23228, 23219, 23234,
  11325. 23218, 23913, 23919, 24140, 24185, 24265, 24264, 24338, 24409, 24492,
  11326. 24494, 24858, 24847, 24904, 24863, 24819, 24859, 24825, 24833, 24840,
  11327. 24910, 24908, 24900, 24909, 24894, 24884, 24871, 24845, 24838, 24887,
  11328. {f: 2, c: 25121}, 25619, 25662, 25630, 25642, 25645, 25661, 25644, 25615,
  11329. 25628, 25620, 25613, 25654, {f: 2, c: 25622}, 25606, 25964, 26015, 26032,
  11330. 26263, 26249, {f: 2, c: 26247}, 26262, 26244, 26264, 26253, 26371, 27028,
  11331. 26989, 26970, 26999, 26976, 26964, 26997, 26928, 27010, 26954, 26984,
  11332. 26987, 26974, 26963, 27001, 27014, 26973, 26979, 26971, 27463, 27506,
  11333. 27584, 27583, 27603, 27645, 28322, 28335, 28371, 28342, 28354, 28304,
  11334. 28317, 28359, 28357, 28325, 28312, 28348, 28346, 28331, 28369, 28310,
  11335. 28316, 28356, 28372, 28330, 28327, 28340, 29006, 29017, 29033, 29028,
  11336. 29001, 29031, 29020, 29036, 29030, 29004, 29029, 29022, 28998, 29032,
  11337. 29014, 29242, 29266, 29495, 29509, 29503, 29502, 29807, 29786, 29781,
  11338. 29791, 29790, 29761, 29759, 29785, 29787, [29788, 58019], 30070, 30072,
  11339. 30208, 30192, 30209, 30194, 30193, 30202, 30207, 30196, 30195,
  11340. {f: 2, c: 30430}, 30555, 30571, 30566, 30558, 30563, 30585, 30570, 30572,
  11341. 30556, 30565, 30568, 30562, 30702, 30862, 30896, {f: 2, c: 30871}, 30860,
  11342. 30857, 30844, 30865, 30867, 30847, 31098, 31103, 31105, 33836, 31165,
  11343. 31260, 31258, 31264, 31252, 31263, 31262, {f: 2, c: 31391}, 31607, 31680,
  11344. 31584, 31598, 31591, 31921, 31923, 31925, 32147, 32121, 32145, 32129,
  11345. 32143, 32091, 32622, {f: 2, c: 32617}, 32626, 32681, 32680, 32676, 32854,
  11346. 32856, 32902, 32900, 33137, 33136, 33144, 33125, 33134, 33139, 33131,
  11347. {f: 2, c: 33145}, 33126, 33285, 33351, 33922, 33911, 33853, 33841, 33909,
  11348. 33894, 33899, 33865, 33900, 33883, 33852, 33845, 33889, 33891, 33897,
  11349. 33901, 33862, 34398, 34396, 34399, 34553, 34579, 34568, 34567, 34560,
  11350. 34558, 34555, {f: 2, c: 34562}, 34566, 34570, 34905, 35039, 35028, 35033,
  11351. 35036, 35032, 35037, 35041, 35018, 35029, 35026, 35228, 35299, 35435,
  11352. {f: 2, c: 35442}, 35430, 35433, 35440, 35463, 35452, 35427, 35488, 35441,
  11353. 35461, 35437, 35426, 35438, 35436, 35449, 35451, 35390, 35432, 35938,
  11354. 35978, 35977, 36042, {f: 2, c: 36039}, 36036, 36018, 36035, 36034, 36037,
  11355. 36321, 36319, 36328, 36335, 36339, 36346, 36330, 36324, 36326, 36530,
  11356. 36611, 36617, 36606, 36618, 36767, 36786, 36939, 36938, 36947, 36930,
  11357. 36948, 36924, 36949, 36944, 36935, 36943, 36942, 36941, 36945, 36926,
  11358. 36929, 37138, 37143, 37228, 37226, 37225, 37321, 37431, 37463, 37432,
  11359. 37437, 37440, 37438, 37467, 37451, 37476, 37457, 37428, 37449, 37453,
  11360. 37445, 37433, 37439, 37466, 38296, 38552, {f: 2, c: 38548}, 38605, 38603,
  11361. {f: 2, c: 38601}, 38647, 38651, 38649, 38646, 38742, 38772, 38774,
  11362. {f: 2, c: 38928}, 38931, 38922, 38930, 38924, 39164, 39156,
  11363. {f: 2, c: 39165}, 39347, 39345, 39348, 39649, 40169, 40578, [12237, 40718],
  11364. [12238, 40723], [12239, 40736], 20711, 20718, 20709, 20694, [20717, 60903],
  11365. 20698, 20693, 20687, 20689, 20721, 20686, 20713, 20834, 20979, 21123,
  11366. 21122, 21297, 21421, 22014, 22016, 22043, 22039, 22013, 22036, 22022,
  11367. 22025, {f: 2, c: 22029}, 22007, 22038, 22047, 22024, 22032, 22006, 22296,
  11368. 22294, 22645, 22654, 22659, 22675, 22666, 22649, 22661, 22653, 22781,
  11369. 22821, 22818, 22820, 22890, 22889, 23265, 23270, 23273, 23255, 23254,
  11370. 23256, 23267, 23413, 23518, 23527, 23521, {f: 2, c: 23525}, 23528, 23522,
  11371. 23524, 23519, 23565, 23650, 23940, 23943, 24155, 24163, 24149, 24151,
  11372. 24148, 24275, 24278, 24330, 24390, 24432, 24505, 24903, 24895, 24907,
  11373. 24951, {f: 2, c: 24930}, 24927, 24922, 24920, 24949, 25130, 25735, 25688,
  11374. 25684, 25764, 25720, 25695, 25722, 25681, 25703, 25652, 25709, 25723,
  11375. 25970, 26017, 26071, 26070, 26274, 26280, 26269, 27036, 27048, 27029,
  11376. 27073, 27054, 27091, 27083, 27035, 27063, 27067, 27051, 27060, 27088,
  11377. 27085, 27053, 27084, 27046, 27075, 27043, 27465, 27468, 27699, 28467,
  11378. 28436, 28414, 28435, 28404, 28457, 28478, 28448, 28460, 28431, 28418,
  11379. 28450, 28415, 28399, 28422, 28465, 28472, 28466, 28451, 28437, 28459,
  11380. 28463, 28552, 28458, 28396, 28417, 28402, 28364, 28407, 29076, 29081,
  11381. 29053, 29066, 29060, 29074, 29246, 29330, 29334, 29508, 29520, 29796,
  11382. 29795, 29802, 29808, 29805, 29956, 30097, 30247, 30221, 30219, 30217,
  11383. 30227, 30433, 30435, 30596, 30589, 30591, 30561, 30913, 30879, 30887,
  11384. 30899, 30889, 30883, {f: 2, c: 31118}, 31117, 31278, 31281, 31402, 31401,
  11385. 31469, 31471, 31649, 31637, 31627, 31605, 31639, 31645, 31636, 31631,
  11386. [31672, 58170], 31623, 31620, 31929, {f: 2, c: 31933}, 32187, 32176, 32156,
  11387. {f: 2, c: 32189}, 32160, 32202, 32180, 32178, 32177, 32186, 32162, 32191,
  11388. 32181, 32184, 32173, [32210, 58202], 32199, 32172, 32624, {f: 2, c: 32736},
  11389. 32735, 32862, 32858, 32903, 33104, 33152, 33167, 33160, 33162, 33151,
  11390. 33154, 33255, 33274, 33287, 33300, 33310, 33355, 33993, 33983, 33990,
  11391. 33988, 33945, 33950, 33970, 33948, 33995, 33976, 33984, 34003, 33936,
  11392. 33980, 34001, 33994, 34623, 34588, 34619, 34594, 34597, 34612, 34584,
  11393. 34645, 34615, 34601, 35059, 35074, 35060, 35065, 35064, 35069, 35048,
  11394. 35098, 35055, 35494, 35468, 35486, 35491, 35469, 35489, 35475, 35492,
  11395. 35498, 35493, 35496, 35480, 35473, 35482, 35495, 35946, 35981, 35980,
  11396. 36051, {f: 2, c: 36049}, 36203, 36249, 36245, 36348, 36628, 36626, 36629,
  11397. 36627, 36771, 36960, 36952, 36956, 36963, 36953, 36958, 36962, 36957,
  11398. 36955, 37145, 37144, 37150, 37237, 37240, 37239, 37236, 37496, 37548,
  11399. 37504, 37509, 37528, 37526, 37499, 37523, 37532, 37544, 37500, 37521,
  11400. 38305, {f: 2, c: 38312}, 38307, 38309, 38308, 38553, 38556, 38555, 38604,
  11401. 38610, 38656, 38780, 38789, 38902, {f: 2, c: 38935}, 39087, 39089, 39171,
  11402. 39173, 39180, 39177, 39361, {f: 2, c: 39599}, 39654, {f: 2, c: 39745},
  11403. 40180, 40182, 40179, 40636, [12240, 40763], [12241, 40778], 20740, 20736,
  11404. 20731, 20725, 20729, 20738, {f: 2, c: 20744}, 20741, 20956,
  11405. {f: 3, c: 21127}, 21133, 21130, 21232, 21426, 22062, 22075, 22073, 22066,
  11406. 22079, 22068, 22057, 22099, 22094, 22103, 22132, 22070, {f: 2, c: 22063},
  11407. 22656, 22687, 22686, 22707, 22684, 22702, 22697, 22694, 22893, 23305,
  11408. 23291, 23307, 23285, 23308, 23304, 23534, 23532, 23529, 23531,
  11409. {f: 2, c: 23652}, 23965, 23956, 24162, 24159, 24161, 24290, 24282, 24287,
  11410. 24285, 24291, 24288, 24392, 24433, 24503, 24501, 24950, 24935, 24942,
  11411. 24925, 24917, 24962, 24956, 24944, 24939, 24958, 24999, 24976, 25003,
  11412. 24974, 25004, 24986, 24996, 24980, 25006, 25134, 25705, 25711, 25721,
  11413. 25758, 25778, 25736, [25744, 57745], 25776, 25765, 25747, 25749, 25769,
  11414. 25746, 25774, 25773, 25771, 25754, 25772, 25753, 25762, 25779, 25973,
  11415. {f: 2, c: 25975}, 26286, 26283, 26292, 26289, 27171, 27167, 27112, 27137,
  11416. 27166, 27161, 27133, 27169, 27155, 27146, 27123, 27138, 27141, 27117,
  11417. 27153, 27472, 27470, 27556, {f: 2, c: 27589}, 28479, 28540, 28548, 28497,
  11418. 28518, 28500, 28550, 28525, 28507, 28536, 28526, 28558, 28538, 28528,
  11419. 28516, 28567, 28504, 28373, 28527, 28512, 28511, 29087, 29100, 29105,
  11420. 29096, 29270, 29339, 29518, 29527, 29801, 29835, 29827, 29822, 29824,
  11421. 30079, 30240, 30249, 30239, 30244, 30246, {f: 2, c: 30241}, 30362, 30394,
  11422. 30436, 30606, 30599, 30604, 30609, 30603, 30923, 30917, 30906, 30922,
  11423. 30910, 30933, 30908, 30928, 31295, 31292, 31296, 31293, 31287, 31291,
  11424. 31407, 31406, 31661, 31665, 31684, 31668, {f: 2, c: 31686}, 31681, 31648,
  11425. 31692, 31946, 32224, 32244, 32239, 32251, 32216, 32236, 32221, 32232,
  11426. 32227, 32218, 32222, 32233, 32158, 32217, 32242, 32249, 32629, 32631,
  11427. 32687, 32745, 32806, {f: 3, c: 33179}, 33184, 33178, 33176, 34071, 34109,
  11428. 34074, 34030, {f: 2, c: 34092}, 34067, 34065, 34083, 34081, 34068, 34028,
  11429. 34085, 34047, 34054, 34690, 34676, 34678, 34656, 34662, 34680, 34664,
  11430. 34649, 34647, 34636, 34643, 34907, 34909, 35088, 35079, {f: 2, c: 35090},
  11431. 35093, 35082, 35516, 35538, 35527, 35524, 35477, 35531, 35576, 35506,
  11432. 35529, 35522, 35519, 35504, 35542, 35533, 35510, 35513, 35547, 35916,
  11433. 35918, 35948, 36064, 36062, 36070, 36068, {f: 2, c: 36076},
  11434. {f: 2, c: 36066}, 36060, 36074, 36065, 36205, 36255, 36259, 36395, 36368,
  11435. 36381, 36386, 36367, 36393, 36383, 36385, 36382, 36538, 36637, 36635,
  11436. 36639, 36649, 36646, 36650, 36636, 36638, 36645, 36969, 36974, 36968,
  11437. 36973, 36983, 37168, 37165, 37159, 37169, 37255, 37257, 37259, 37251,
  11438. 37573, 37563, 37559, 37610, 37604, 37569, 37555, 37564, 37586, 37575,
  11439. 37616, 37554, 38317, 38321, 38660, {f: 2, c: 38662}, 38665, 38752, 38797,
  11440. 38795, 38799, 38945, 38955, 38940, 39091, 39178, 39187, 39186, 39192,
  11441. 39389, 39376, 39391, 39387, 39377, 39381, 39378, 39385, 39607,
  11442. {f: 2, c: 39662}, 39719, 39749, 39748, 39799, 39791, 40198, 40201, 40195,
  11443. 40617, 40638, 40654, 22696, [12242, 40786], 20754, 20760, 20756, 20752,
  11444. 20757, 20864, 20906, 20957, 21137, 21139, 21235, 22105, 22123, 22137,
  11445. 22121, 22116, 22136, 22122, 22120, 22117, 22129, 22127, 22124, 22114,
  11446. 22134, 22721, 22718, 22727, 22725, 22894, 23325, 23348, 23416, 23536,
  11447. 23566, 24394, 25010, 24977, 25001, 24970, 25037, 25014, 25022, 25034,
  11448. 25032, 25136, 25797, 25793, 25803, {f: 2, c: 25787}, 25818, 25796, 25799,
  11449. 25794, 25805, 25791, 25810, 25812, 25790, 25972, 26310, 26313, 26297,
  11450. 26308, 26311, 26296, 27197, 27192, 27194, 27225, 27243, 27224, 27193,
  11451. 27204, 27234, 27233, 27211, 27207, 27189, 27231, 27208, 27481, 27511,
  11452. 27653, 28610, 28593, 28577, 28611, 28580, 28609, 28583, 28595, 28608,
  11453. 28601, [28598, 60318], 28582, 28576, 28596, 29118, 29129, 29136, 29138,
  11454. 29128, 29141, 29113, 29134, 29145, 29148, {f: 2, c: 29123}, 29544, 29852,
  11455. 29859, 29848, 29855, 29854, 29922, {f: 2, c: 29964}, 30260, 30264, 30266,
  11456. 30439, 30437, 30624, {f: 2, c: 30622}, 30629, 30952, 30938, 30956, 30951,
  11457. 31142, {f: 2, c: 31309}, 31302, 31308, 31307, 31418, 31705, 31761, 31689,
  11458. 31716, 31707, 31713, 31721, 31718, {f: 2, c: 31957}, 32266, 32273, 32264,
  11459. 32283, 32291, 32286, [32285, 58211], 32265, 32272, 32633, 32690,
  11460. {f: 2, c: 32752}, 32750, [32808, 58239], 33203, 33193, 33192, 33275, 33288,
  11461. {f: 2, c: 33368}, 34122, 34137, 34120, {f: 2, c: 34152}, 34115, 34121,
  11462. 34157, 34154, 34142, 34691, 34719, 34718, 34722, 34701, 34913, 35114,
  11463. 35122, 35109, 35115, 35105, 35242, [35238, 58391], 35558, 35578, 35563,
  11464. 35569, 35584, 35548, 35559, 35566, 35582, {f: 2, c: 35585}, 35575, 35565,
  11465. 35571, 35574, 35580, 35947, 35949, 35987, 36084, 36420, 36401, 36404,
  11466. 36418, 36409, 36405, 36667, 36655, 36664, 36659, 36776, 36774, 36981,
  11467. 36980, 36984, 36978, 36988, 36986, 37172, 37266, 37664, 37686, 37624,
  11468. 37683, 37679, 37666, 37628, 37675, 37636, 37658, 37648, 37670, 37665,
  11469. 37653, 37678, 37657, 38331, {f: 2, c: 38567}, 38570, 38613, 38670, 38673,
  11470. 38678, 38669, 38675, 38671, 38747, [38748, 58565], 38758, 38808, 38960,
  11471. 38968, 38971, 38967, 38957, 38969, 38948, 39184, 39208, 39198, 39195,
  11472. 39201, 39194, 39405, 39394, 39409, 39608, 39612, 39675, 39661, 39720,
  11473. 39825, 40213, 40227, 40230, 40232, 40210, 40219, 40664, 40660,
  11474. [12243, 40845], [12244, 40860], 20778, 20767, 20769, 20786, 21237, 22158,
  11475. 22144, 22160, 22149, 22151, 22159, 22741, 22739, 22737, 22734, 23344,
  11476. 23338, 23332, 23418, 23607, 23656, 23996, 23994, 23997, 23992, 24171,
  11477. 24396, 24509, 25033, 25026, 25031, 25062, 25035, 25138, 25140, 25806,
  11478. 25802, 25816, 25824, 25840, 25830, 25836, 25841, 25826, 25837,
  11479. {f: 2, c: 25986}, 26329, 26326, 27264, 27284, 27268, 27298, 27292, 27355,
  11480. 27299, 27262, 27287, 27280, 27296, 27484, 27566, 27610, 27656, 28632,
  11481. 28657, {f: 2, c: 28639}, 28635, 28644, 28651, 28655, 28544, 28652, 28641,
  11482. 28649, 28629, 28654, 28656, 29159, [29151, 60361], 29166, 29158, 29157,
  11483. 29165, 29164, 29172, 29152, 29237, 29254, 29552, 29554, 29865, 29872,
  11484. 29862, 29864, 30278, 30274, 30284, 30442, 30643, 30634, 30640, 30636,
  11485. 30631, 30637, 30703, 30967, 30970, 30964, 30959, 30977, 31143, 31146,
  11486. 31319, 31423, 31751, 31757, 31742, 31735, 31756, 31712, 31968, 31964,
  11487. 31966, 31970, 31967, 31961, 31965, 32302, 32318, 32326, 32311, 32306,
  11488. 32323, 32299, 32317, 32305, 32325, 32321, 32308, 32313, 32328, 32309,
  11489. 32319, 32303, 32580, 32755, 32764, {f: 2, c: 32881}, 32880, 32879, 32883,
  11490. 33222, 33219, 33210, 33218, 33216, 33215, 33213, 33225, 33214, 33256,
  11491. 33289, 33393, 34218, 34180, 34174, 34204, 34193, 34196, 34223, 34203,
  11492. 34183, 34216, 34186, 34214, 34407, 34752, 34769, 34739, 34770, 34758,
  11493. 34731, 34747, 34746, 34760, 34763, 35131, 35126, 35140, 35128, 35133,
  11494. 35244, 35598, 35607, 35609, 35611, 35594, 35616, 35613, 35588, 35600,
  11495. 35905, 35903, 35955, 36090, 36093, 36092, 36088, 36091, 36264, 36425,
  11496. 36427, 36424, 36426, 36676, 36670, 36674, 36677, 36671, 36991, 36989,
  11497. 36996, {f: 2, c: 36993}, 36992, 37177, 37283, 37278, 37276, 37709, 37762,
  11498. 37672, 37749, 37706, 37733, 37707, 37656, 37758, 37740, 37723, 37744,
  11499. 37722, 37716, {f: 3, c: 38346}, 38344, 38342, 38577, 38584, 38614, 38684,
  11500. 38686, 38816, 38867, 38982, 39094, 39221, 39425, 39423, 39854, 39851,
  11501. 39850, 39853, 40251, 40255, 40587, 40655, 40670, {f: 2, c: 40668}, 40667,
  11502. 40766, 40779, 21474, 22165, 22190, 22745, 22744, 23352, 24413, 25059,
  11503. 25139, 25844, 25842, 25854, 25862, {f: 2, c: 25850}, 25847, 26039, 26332,
  11504. 26406, 27315, 27308, 27331, 27323, 27320, 27330, {f: 2, c: 27310}, 27487,
  11505. 27512, 27567, 28681, 28683, 28670, 28678, 28666, 28689, 28687,
  11506. {f: 2, c: 29179}, 29182, 29176, 29559, 29557, 29863, 29887, 29973, 30294,
  11507. 30296, 30290, 30653, 30655, {f: 2, c: 30651}, 30990, 31150,
  11508. {f: 2, c: 31329}, 31328, {f: 2, c: 31428}, 31787, 31783, 31786, 31774,
  11509. 31779, 31777, 31975, {f: 2, c: 32340}, 32350, 32346, 32353, 32338, 32345,
  11510. 32584, 32761, 32763, 32887, 32886, 33229, 33231, 33290, 34255, 34217,
  11511. 34253, 34256, 34249, 34224, 34234, 34233, 34799, 34796, 34802, 34784,
  11512. 35206, 35250, 35316, 35624, 35641, 35628, 35627, 35920, 36101, 36441,
  11513. 36451, 36454, 36452, 36447, 36437, 36544, 36681, 36685, 36999, 36995,
  11514. 37000, {f: 2, c: 37291}, 37328, 37780, 37770, 37782, 37794, 37811, 37806,
  11515. 37804, 37808, 37784, 37786, 37783, 38356, 38358, 38352, 38357, 38626,
  11516. 38620, 38617, 38619, 38622, 38692, 38819, 38822, 38829, 38905, 38989,
  11517. 38991, 38988, 38990, 38995, 39098, {f: 2, c: 39230}, 39229, 39214, 39333,
  11518. 39438, 39617, 39683, 39686, 39759, 39758, 39757, 39882, 39881, 39933,
  11519. 39880, 39872, 40273, 40285, 40288, 40672, 40725, 40748, 20787, 22181,
  11520. 22184, {f: 2, c: 22750}, 22754, 23541, 40848, 24300, 25074, 25079, 25078,
  11521. 25077, 25856, 25871, 26336, 26333, 27365, 27357, 27354, 27347, 28699,
  11522. 28703, 28712, 28698, 28701, 28693, 28696, 29190, 29197, 29272, 29346,
  11523. 29560, 29562, 29885, 29898, 29923, 30087, 30086, 30303, 30305, 30663,
  11524. 31001, 31153, 31339, 31337, {f: 2, c: 31806}, 31800, 31805, 31799, 31808,
  11525. 32363, 32365, 32377, {f: 2, c: 32361}, 32371, 32645, 32694, 32697, 32696,
  11526. 33240, 34281, 34269, 34282, 34261, {f: 2, c: 34276}, 34295, 34811, 34821,
  11527. 34829, 34809, 34814, 35168, 35167, 35158, 35166, 35649, 35676, 35672,
  11528. 35657, 35674, {f: 2, c: 35662}, 35654, 35673, 36104, 36106, 36476, 36466,
  11529. 36487, 36470, 36460, 36474, 36468, 36692, 36686, 36781, {f: 2, c: 37002},
  11530. 37297, 37294, 37857, 37841, 37855, 37827, 37832, {f: 2, c: 37852}, 37846,
  11531. 37858, 37837, 37848, 37860, 37847, 37864, 38364, 38580, 38627, 38698,
  11532. 38695, 38753, 38876, 38907, 39006, 39000, 39003, 39100, 39237, 39241,
  11533. 39446, 39449, 39693, 39912, 39911, 39894, 39899, 40329, 40289, 40306,
  11534. 40298, 40300, 40594, 40599, 40595, 40628, 21240, 22199, 22198, 22196,
  11535. 22204, 22756, 23360, 23363, 23421, 23542, 24009, 25080, 25082, 25880,
  11536. 25876, 25881, 26342, 26407, 27372, 28734, 28720, 28722, 29200, 29563,
  11537. 29903, 30306, 30309, 31014, 31018, 31020, 31019, 31431, 31478, 31820,
  11538. 31811, 31821, {f: 2, c: 31983}, 36782, 32381, 32380, 32386, 32588, 32768,
  11539. 33242, 33382, 34299, 34297, 34321, 34298, 34310, 34315, 34311, 34314,
  11540. {f: 2, c: 34836}, 35172, 35258, 35320, 35696, 35692, 35686, 35695, 35679,
  11541. 35691, 36111, 36109, 36489, 36481, 36485, 36482, 37300, 37323, 37912,
  11542. 37891, 37885, 38369, 38704, 39108, 39250, 39249, 39336, 39467, 39472,
  11543. 39479, 39477, 39955, 39949, 40569, 40629, 40680, 40751, 40799, 40803,
  11544. 40801, {f: 2, c: 20791}, 22209, 22208, 22210, 22804, 23660, 24013, 25084,
  11545. 25086, 25885, 25884, 26005, 26345, 27387, 27396, 27386, 27570, 28748,
  11546. 29211, 29351, 29910, 29908, 30313, 30675, 31824, 32399, 32396, 32700,
  11547. 34327, 34349, 34330, 34851, 34850, 34849, 34847, 35178, 35180, 35261,
  11548. 35700, 35703, 35709, 36115, 36490, 36493, 36491, 36703, 36783, 37306,
  11549. 37934, 37939, 37941, 37946, 37944, 37938, 37931, 38370, {f: 2, c: 38712},
  11550. 38706, [38911, 58586], 39015, 39013, 39255, 39493, 39491, 39488, 39486,
  11551. 39631, 39764, 39761, 39981, 39973, 40367, 40372, 40386, 40376, 40605,
  11552. 40687, 40729, 40796, {f: 2, c: 40806}, 20796, 20795, 22216, 22218, 22217,
  11553. 23423, 24020, 24018, 24398, 25087, 25892, 27402, 27489, 28753, 28760,
  11554. 29568, 29924, 30090, 30318, 30316, 31155, 31840, 31839, 32894, 32893,
  11555. 33247, 35186, 35183, 35324, 35712, {f: 2, c: 36118}, 36497, 36499, 36705,
  11556. 37192, 37956, {f: 2, c: 37969}, {f: 2, c: 38717}, 38851, 38849, 39019,
  11557. 39253, 39509, 39501, 39634, 39706, 40009, 39985, 39998, 39995, 40403,
  11558. 40407, 40756, 40812, 40810, 40852, 22220, 24022, 25088, 25891, 25899,
  11559. 25898, 26348, 27408, 29914, 31434, 31844, 31843, 31845, 32403, 32406,
  11560. 32404, 33250, 34360, 34367, 34865, 35722, 37008, 37007, 37987, 37984,
  11561. 37988, 38760, 39023, 39260, {f: 2, c: 39514}, 39511, {f: 2, c: 39635},
  11562. 39633, 40020, 40023, 40022, 40421, 40607, 40692, 22225, 22761, 25900,
  11563. 28766, {f: 2, c: 30321}, [30679, 60226], 32592, 32648, 34870, 34873, 34914,
  11564. 35731, 35730, 35734, 33399, 36123, 37312, 37994, 38722, 38728, 38724,
  11565. 38854, 39024, 39519, 39714, 39768, 40031, {f: 2, c: 40441},
  11566. {f: 2, c: 40572}, 40711, 40823, 40818, 24307, 27414, 28771, 31852, 31854,
  11567. 34875, 35264, 36513, 37313, 38002, 38000, 39025, 39262, 39638, 39715,
  11568. 40652, 28772, 30682, 35738, 38007, 38857, 39522, 39525, 32412, 35740,
  11569. 36522, 37317, {f: 2, c: 38013}, 38012, {f: 2, c: 40055}, 40695, 35924,
  11570. 38015, 40474, 29224, 39530, 39729, 40475, 40478, 31858, 20034, 20060,
  11571. [12048, 20981], [12053, 21274], [12058, 21378], 19975, 19980, 20039, 20109,
  11572. [12062, 22231], [12076, 23662], [12091, 24435], 19983, 20871, 19982, 20014,
  11573. 20115, 20162, 20169, 20168, 20888, 21244, 21356, 21433, 22304, 22787,
  11574. 22828, [23568, 60417], 24063, 26081, [12110, 27571], 27596, [12115, 27668],
  11575. [12121, 29247], 20017, 20028, 20200, 20188, 20201, 20193, 20189, 20186,
  11576. 21004, 21001, 21276, 21324, {f: 2, c: 22306}, 22807, 22831, 23425, 23428,
  11577. 23570, 23611, 23668, 23667, 24068, 24192, 24194, 24521, 25097, 25168,
  11578. 27669, 27702, 27715, 27711, 27707, 29358, 29360, 29578, [12145, 31160],
  11579. 32906, 38430, 20238, 20248, 20268, 20213, 20244, 20209, 20224, 20215,
  11580. 20232, 20253, 20226, 20229, 20258, 20243, 20228, 20212, 20242, 20913,
  11581. 21011, 21008, 21158, 21282, 21279, 21325, 21386, 21511, 22241, 22239,
  11582. 22318, 22314, 22324, 22844, 22912, 22908, 22917, 22907, 22910, 22903,
  11583. 22911, 23382, 23573, 23589, 23676, {f: 2, c: 23674}, 23678, 24031,
  11584. [24181, 57646], 24196, 24322, 24346, 24436, 24533, 24532, 24527, 25180,
  11585. 25182, 25188, 25185, 25190, 25186, 25177, 25184, 25178, 25189, 25911,
  11586. 26095, 26094, 26430, 26425, 26424, 26427, 26426, 26431, 26428, 26419,
  11587. 27672, 27718, 27730, 27740, 27727, [27722, 60796], 27732, {f: 2, c: 27723},
  11588. 28785, 29278, {f: 2, c: 29364}, 29582, 29994, 30335, 31349, [12153, 32593],
  11589. [12171, 33400], 33404, 33408, 33405, 33407, [12172, 34381], [12177, 35198],
  11590. 37017, [37015, 59347], 37016, 37019, 37012, 38434, 38436, 38432, 38435,
  11591. 20310, 20283, 20322, 20297, 20307, 20324, 20286, 20327, 20306, 20319,
  11592. 20289, 20312, 20269, 20275, 20287, 20321, 20879, 20921, 21020, 21022,
  11593. 21025, {f: 2, c: 21165}, 21257, 21347, 21362, {f: 2, c: 21390}, 21552,
  11594. 21559, 21546, 21588, 21573, 21529, 21532, 21541, 21528, 21565, 21583,
  11595. 21569, 21544, 21540, 21575, 22254, 22247, 22245, 22337, 22341, 22348,
  11596. 22345, 22347, 22354, 22790, 22848, 22950, 22936, 22944, 22935, 22926,
  11597. 22946, 22928, 22927, 22951, 22945, 23438, 23442, 23592, 23594, 23693,
  11598. 23695, 23688, 23691, 23689, 23698, 23690, 23686, 23699, 23701, 24032,
  11599. 24074, 24078, 24203, 24201, 24204, 24200, 24205, 24325, 24349, 24440,
  11600. 24438, 24530, 24529, 24528, 24557, 24552, 24558, 24563, 24545, 24548,
  11601. 24547, 24570, 24559, 24567, 24571, 24576, 24564, 25146, 25219, 25228,
  11602. {f: 2, c: 25230}, 25236, 25223, 25201, 25211, 25210, 25200, 25217, 25224,
  11603. 25207, 25213, 25202, 25204, 26096, 26100, 26099, 26098, 26101, 26437,
  11604. 26439, 26457, 26453, 26444, 26440, 26461, 26445, 26458, 26443, 27600,
  11605. {f: 2, c: 27673}, 27768, 27751, 27755, 27780, 27787, 27791, 27761, 27759,
  11606. 27753, 27802, 27757, 27783, 27797, [27804, 57900], 27750, 27763, 27749,
  11607. 27771, 27790, 28788, 28794, 29283, 29375, 29373, 29379, 29382, 29377,
  11608. 29370, 29381, 29589, 29591, {f: 2, c: 29587}, 29586, 30010, 30009,
  11609. {f: 2, c: 30100}, 30337, 31037, 32820, 32917, 32921, 32912, 32914, 32924,
  11610. 33424, 33423, 33413, 33422, 33425, 33427, 33418, {f: 2, c: 33411},
  11611. [12184, 35960], 36809, 36799, 37023, 37025, 37029, 37022, 37031, 37024,
  11612. 38448, 38440, 38447, 38445, 20019, 20376, 20348, 20357, 20349, 20352,
  11613. 20359, 20342, 20340, 20361, 20356, 20343, 20300, 20375, 20330, 20378,
  11614. 20345, 20353, 20344, 20368, 20380, 20372, 20382, 20370, 20354, 20373,
  11615. 20331, 20334, 20894, 20924, 20926, 21045, {f: 2, c: 21042}, 21062, 21041,
  11616. 21180, {f: 2, c: 21258}, 21308, 21394, 21396, 21639, 21631, 21633, 21649,
  11617. 21634, 21640, 21611, 21626, 21630, 21605, 21612, 21620, 21606, 21645,
  11618. 21615, 21601, 21600, 21656, 21603, 21607, 21604, 22263, 22265, 22383,
  11619. 22386, 22381, 22379, 22385, 22384, 22390, 22400, 22389, 22395,
  11620. {f: 2, c: 22387}, 22370, 22376, 22397, 22796, 22853, 22965, 22970, 22991,
  11621. 22990, 22962, 22988, 22977, 22966, 22972, 22979, 22998, 22961, 22973,
  11622. 22976, 22984, 22964, 22983, 23394, 23397, 23443, 23445, 23620, 23623,
  11623. 23726, 23716, 23712, 23733, 23727, 23720, 23724, 23711, 23715, 23725,
  11624. 23714, 23722, 23719, 23709, 23717, 23734, 23728, 23718, 24087, 24084,
  11625. 24089, 24360, {f: 3, c: 24354}, 24404, 24450, 24446, 24445, 24542, 24549,
  11626. 24621, 24614, 24601, 24626, 24587, 24628, 24586, 24599, 24627, 24602,
  11627. 24606, 24620, 24610, 24589, 24592, 24622, 24595, 24593, 24588, 24585,
  11628. 24604, 25108, 25149, 25261, 25268, 25297, 25278, 25258, 25270, 25290,
  11629. 25262, 25267, 25263, 25275, 25257, 25264, 25272, 25917, 26024, 26043,
  11630. 26121, 26108, 26116, 26130, 26120, 26107, 26115, 26123, 26125, 26117,
  11631. 26109, 26129, 26128, 26358, 26378, 26501, 26476, 26510, 26514, 26486,
  11632. 26491, 26520, 26502, 26500, 26484, 26509, 26508, 26490, 26527, 26513,
  11633. 26521, 26499, 26493, 26497, {f: 2, c: 26488}, 26516, 27429, 27520, 27518,
  11634. 27614, 27677, 27795, 27884, 27883, 27886, 27865, 27830, 27860, 27821,
  11635. 27879, 27831, 27856, 27842, 27834, 27843, 27846, 27885, 27890, 27858,
  11636. 27869, 27828, 27786, 27805, 27776, 27870, 27840, 27952, 27853, 27847,
  11637. 27824, 27897, 27855, 27881, 27857, 28820, 28824, 28805, 28819, 28806,
  11638. 28804, 28817, 28822, 28802, 28826, 28803, 29290, 29398, 29387, 29400,
  11639. 29385, 29404, 29394, 29396, 29402, 29388, 29393, 29604, 29601, 29613,
  11640. 29606, 29602, 29600, 29612, 29597, 29917, 29928, {f: 2, c: 30015}, 30014,
  11641. 30092, 30104, 30383, 30451, 30449, 30448, 30453, 30712, 30716, 30713,
  11642. 30715, 30714, 30711, 31042, 31039, 31173, 31352, 31355, 31483, 31861,
  11643. 31997, 32821, 32911, 32942, 32931, 32952, 32949, 32941, 33312, 33440,
  11644. 33472, 33451, 33434, 33432, 33435, 33461, 33447, 33454, 33468, 33438,
  11645. 33466, 33460, 33448, 33441, 33449, 33474, 33444, 33475, 33462, 33442,
  11646. 34416, 34415, {f: 2, c: 34413}, 35926, 36818, 36811, 36819, 36813, 36822,
  11647. 36821, 36823, 37042, 37044, 37039, 37043, 37040, 38457, 38461, 38460,
  11648. 38458, 38467, 20429, 20421, 20435, 20402, 20425, 20427, 20417, 20436,
  11649. 20444, 20441, [20411, 60346], 20403, 20443, 20423, 20438, 20410, 20416,
  11650. 20409, 20460, 21060, 21065, 21184, 21186, 21309, 21372, 21399, 21398,
  11651. 21401, 21400, 21690, 21665, 21677, 21669, 21711, 21699, 33549, 21687,
  11652. 21678, 21718, 21686, {f: 2, c: 21701}, 21664, 21616, 21692, 21666, 21694,
  11653. 21618, 21726, 21680, 22453, {f: 2, c: 22430}, 22436, 22412, 22423, 22429,
  11654. 22427, 22420, 22424, 22415, 22425, 22437, 22426, 22421, 22772, 22797,
  11655. 22867, 23009, 23006, 23022, 23040, 23025, 23005, 23034, 23037, 23036,
  11656. 23030, 23012, 23026, 23031, 23003, 23017, 23027, 23029, 23008, 23038,
  11657. 23028, 23021, 23464, 23628, 23760, 23768, 23756, 23767, 23755, 23771,
  11658. 23774, 23770, 23753, 23751, 23754, 23766, {f: 2, c: 23763}, 23759, 23752,
  11659. 23750, 23758, 23775, 23800, 24057, {f: 3, c: 24097}, 24096, 24100, 24240,
  11660. 24228, 24226, 24219, 24227, 24229, 24327, 24366, 24406, 24454, 24631,
  11661. 24633, 24660, 24690, 24670, 24645, 24659, 24647, 24649, 24667, 24652,
  11662. 24640, 24642, 24671, 24612, 24644, 24664, 24678, 24686, {f: 2, c: 25154},
  11663. 25295, 25357, 25355, 25333, 25358, 25347, 25323, 25337, 25359, 25356,
  11664. 25336, 25334, 25344, {f: 2, c: 25363}, 25338, 25365, 25339, 25328, 25921,
  11665. 25923, 26026, 26047, 26166, 26145, 26162, 26165, 26140, 26150, 26146,
  11666. 26163, 26155, 26170, 26141, 26164, 26169, 26158, {f: 2, c: 26383}, 26561,
  11667. 26610, 26568, 26554, 26588, 26555, 26616, 26584, 26560, 26551, 26565,
  11668. 26603, 26596, 26591, 26549, 26573, 26547, 26615, 26614, 26606, 26595,
  11669. 26562, 26553, 26574, 26599, 26608, 26546, 26620, 26566, 26605, 26572,
  11670. 26542, 26598, 26587, 26618, {f: 2, c: 26569}, 26563, 26602, 26571, 27432,
  11671. 27522, 27524, 27574, 27606, 27608, 27616, {f: 2, c: 27680}, 27944, 27956,
  11672. 27949, 27935, 27964, 27967, 27922, 27914, 27866, 27955, 27908, 27929,
  11673. 27962, 27930, 27921, 27904, 27933, 27970, 27905, 27928, 27959, 27907,
  11674. 27919, 27968, 27911, 27936, 27948, 27912, 27938, 27913, 27920, 28855,
  11675. 28831, 28862, 28849, 28848, 28833, {f: 2, c: 28852}, 28841, 29249,
  11676. {f: 2, c: 29257}, 29292, 29296, 29299, 29294, 29386, 29412, 29416, 29419,
  11677. 29407, 29418, 29414, 29411, 29573, 29644, 29634, 29640, 29637, 29625,
  11678. 29622, 29621, 29620, 29675, 29631, 29639, 29630, 29635, 29638, 29624,
  11679. 29643, 29932, 29934, 29998, {f: 2, c: 30023}, 30119, 30122, 30329, 30404,
  11680. 30472, {f: 3, c: 30467}, 30474, 30455, 30459, 30458, {f: 2, c: 30695},
  11681. 30726, {f: 2, c: 30737}, 30725, 30736, 30735, 30734, [30729, 58095], 30723,
  11682. 30739, 31050, 31052, 31051, 31045, 31044, 31189, 31181, 31183, 31190,
  11683. 31182, 31360, 31358, 31441, {f: 2, c: 31488}, 31866, {f: 2, c: 31864},
  11684. {f: 3, c: 31871}, 32003, 32008, 32001, 32600, 32657, 32653, 32702, 32775,
  11685. {f: 2, c: 32782}, 32788, 32823, 32984, 32967, 32992, 32977, 32968, 32962,
  11686. 32976, 32965, 32995, 32985, 32988, 32970, 32981, 32969, 32975, 32983,
  11687. 32998, 32973, 33279, 33313, 33428, 33497, 33534, 33529, 33543, 33512,
  11688. 33536, 33493, 33594, 33515, 33494, 33524, 33516, 33505, 33522, 33525,
  11689. 33548, 33531, 33526, 33520, 33514, 33508, 33504, 33530, 33523, 33517,
  11690. 34423, 34420, 34428, 34419, 34881, 34894, 34919, 34922, 34921, 35283,
  11691. 35332, 35335, 36210, 36835, 36833, 36846, 36832, 37105, 37053, 37055,
  11692. 37077, 37061, 37054, 37063, 37067, 37064, [37332, 60294], 37331, 38484,
  11693. 38479, 38481, 38483, 38474, 38478, 20510, 20485, 20487, 20499, 20514,
  11694. 20528, 20507, 20469, 20468, 20531, 20535, 20524, {f: 2, c: 20470}, 20503,
  11695. 20508, 20512, 20519, 20533, 20527, 20529, 20494, 20826, 20884, 20883,
  11696. 20938, {f: 2, c: 20932}, 20936, 20942, 21089, 21082, 21074,
  11697. {f: 2, c: 21086}, 21077, 21090, 21197, 21262, 21406, 21798, 21730, 21783,
  11698. 21778, 21735, 21747, 21732, 21786, 21759, 21764, 21768, 21739, 21777,
  11699. 21765, 21745, 21770, 21755, {f: 2, c: 21751}, 21728, 21774, 21763, 21771,
  11700. {f: 2, c: 22273}, 22476, 22578, 22485, 22482, 22458, 22470, 22461, 22460,
  11701. 22456, 22454, 22463, 22471, 22480, 22457, 22465, 22798, 22858, 23065,
  11702. 23062, {f: 2, c: 23085}, 23061, 23055, 23063, 23050, 23070, 23091, 23404,
  11703. 23463, 23469, 23468, 23555, 23638, 23636, 23788, 23807, 23790, 23793,
  11704. 23799, 23808, 23801, 24105, 24104, 24232, 24238, 24234, 24236, 24371,
  11705. 24368, 24423, 24669, 24666, 24679, 24641, 24738, 24712, 24704, 24722,
  11706. 24705, 24733, 24707, 24725, 24731, 24727, 24711, 24732, 24718, 25113,
  11707. 25158, 25330, 25360, 25430, 25388, {f: 2, c: 25412}, 25398, 25411, 25572,
  11708. 25401, 25419, 25418, 25404, 25385, 25409, 25396, 25432, 25428, 25433,
  11709. 25389, 25415, 25395, 25434, 25425, 25400, 25431, 25408, 25416, 25930,
  11710. 25926, 26054, {f: 2, c: 26051}, 26050, 26186, 26207, 26183, 26193,
  11711. {f: 2, c: 26386}, 26655, 26650, 26697, {f: 2, c: 26674}, 26683, 26699,
  11712. 26703, 26646, 26673, 26652, 26677, 26667, 26669, 26671, 26702, 26692,
  11713. 26676, 26653, 26642, 26644, 26662, 26664, 26670, 26701, 26682, 26661,
  11714. 26656, 27436, 27439, 27437, 27441, 27444, 27501, 32898, 27528, 27622,
  11715. 27620, 27624, 27619, 27618, 27623, 27685, 28026, {f: 2, c: 28003}, 28022,
  11716. 27917, 28001, 28050, 27992, 28002, 28013, 28015, 28049, 28045, 28143,
  11717. 28031, 28038, 27998, [28007, 59078], 28000, 28055, 28016, 28028, 27999,
  11718. 28034, 28056, 27951, 28008, 28043, 28030, 28032, 28036, 27926, 28035,
  11719. 28027, 28029, 28021, 28048, 28892, 28883, 28881, 28893, 28875, 32569,
  11720. 28898, 28887, 28882, 28894, 28896, 28884, 28877, {f: 3, c: 28869}, 28890,
  11721. 28878, 28897, 29250, 29304, 29303, 29302, 29440, 29434, 29428, 29438,
  11722. 29430, 29427, 29435, 29441, 29651, 29657, 29669, 29654, 29628, 29671,
  11723. 29667, 29673, 29660, 29650, 29659, 29652, 29661, 29658, {f: 2, c: 29655},
  11724. 29672, {f: 2, c: 29918}, {f: 2, c: 29940}, 29985, 30043, 30047, 30128,
  11725. 30145, 30139, 30148, 30144, 30143, 30134, 30138, 30346, 30409, 30493,
  11726. 30491, 30480, 30483, 30482, 30499, 30481, 30485, {f: 2, c: 30489}, 30498,
  11727. 30503, 30755, 30764, 30754, 30773, 30767, 30760, 30766, 30763, 30753,
  11728. 30761, 30771, 30762, 30769, 31060, 31067, 31055, 31068, 31059, 31058,
  11729. 31057, {f: 2, c: 31211}, 31200, 31214, 31213, 31210, 31196, 31198, 31197,
  11730. 31366, 31369, 31365, {f: 2, c: 31371}, 31370, 31367, 31448, 31504, 31492,
  11731. 31507, 31493, 31503, 31496, 31498, 31502, 31497, 31506, 31876, 31889,
  11732. 31882, 31884, 31880, 31885, 31877, 32030, 32029, 32017, 32014, 32024,
  11733. 32022, 32019, 32031, 32018, 32015, 32012, 32604, 32609, 32606, 32608,
  11734. 32605, 32603, 32662, 32658, 32707, 32706, 32704, 32790, 32830, 32825,
  11735. 33018, 33010, 33017, 33013, 33025, 33019, 33024, 33281, 33327, 33317,
  11736. 33587, 33581, 33604, 33561, 33617, 33573, 33622, 33599, 33601, 33574,
  11737. 33564, 33570, 33602, 33614, 33563, 33578, 33544, 33596, 33613, 33558,
  11738. 33572, 33568, 33591, 33583, 33577, 33607, 33605, 33612, 33619, 33566,
  11739. 33580, 33611, 33575, 33608, 34387, 34386, 34466, 34472, 34454, 34445,
  11740. 34449, 34462, 34439, 34455, 34438, 34443, 34458, 34437, 34469, 34457,
  11741. 34465, 34471, 34453, 34456, 34446, 34461, 34448, 34452, {f: 2, c: 34883},
  11742. 34925, {f: 2, c: 34933}, 34930, 34944, 34929, 34943, 34927, 34947, 34942,
  11743. 34932, 34940, 35346, 35911, 35927, 35963, 36004, 36003, 36214, 36216,
  11744. 36277, 36279, 36278, 36561, 36563, 36862, 36853, 36866, 36863, 36859,
  11745. 36868, 36860, 36854, 37078, 37088, {f: 2, c: 37081}, 37091, 37087, 37093,
  11746. 37080, 37083, 37079, 37084, 37092, 37200, {f: 2, c: 37198}, 37333, 37346,
  11747. 37338, 38492, 38495, 38588, 39139, [12221, 39647], [12223, 39727], 20095,
  11748. 20592, 20586, 20577, 20574, 20576, 20563, 20555, 20573, 20594, 20552,
  11749. 20557, 20545, 20571, 20554, 20578, 20501, 20549, 20575, 20585, 20587,
  11750. {f: 2, c: 20579}, 20550, 20544, 20590, 20595, 20567, 20561, 20944, 21099,
  11751. 21101, 21100, 21102, 21206, 21203, 21293, 21404, {f: 2, c: 21877}, 21820,
  11752. 21837, 21840, 21812, 21802, 21841, 21858, 21814, 21813, 21808, 21842,
  11753. 21829, 21772, 21810, 21861, 21838, 21817, 21832, 21805, 21819, 21824,
  11754. 21835, 22282, 22279, 22523, 22548, 22498, 22518, 22492, 22516, 22528,
  11755. 22509, 22525, 22536, 22520, 22539, 22515, 22479, 22535, 22510, 22499,
  11756. 22514, 22501, 22508, 22497, 22542, 22524, 22544, 22503, 22529, 22540,
  11757. 22513, 22505, 22512, 22541, 22532, 22876, 23136, 23128, 23125,
  11758. [23143, 60437], 23134, 23096, 23093, 23149, 23120, 23135, 23141, 23148,
  11759. 23123, 23140, 23127, 23107, 23133, 23122, 23108, 23131, 23112, 23182,
  11760. 23102, 23117, 23097, 23116, 23152, 23145, 23111, 23121, 23126, 23106,
  11761. 23132, 23410, 23406, 23489, 23488, 23641, 23838, 23819, 23837, 23834,
  11762. 23840, 23820, 23848, 23821, 23846, 23845, 23823, 23856, 23826, 23843,
  11763. 23839, 23854, 24126, 24116, 24241, 24244, 24249, {f: 2, c: 24242}, 24374,
  11764. 24376, 24475, 24470, 24479, 24714, 24720, 24710, 24766, 24752, 24762,
  11765. {f: 2, c: 24787}, 24783, 24804, 24793, 24797, 24776, 24753, 24795, 24759,
  11766. 24778, 24767, 24771, 24781, 24768, 25394, 25445, 25482, 25474, 25469,
  11767. 25533, 25502, 25517, 25501, 25495, 25515, 25486, 25455, 25479, 25488,
  11768. 25454, 25519, 25461, 25500, 25453, 25518, 25468, 25508, 25403, 25503,
  11769. 25464, 25477, 25473, 25489, 25485, 25456, 25939, 26061, 26213, 26209,
  11770. 26203, 26201, 26204, 26210, 26392, 26745, 26759, 26768, 26780,
  11771. {f: 2, c: 26733}, 26798, 26795, 26966, 26735, 26787, 26796, 26793, 26741,
  11772. 26740, 26802, 26767, 26743, 26770, 26748, 26731, 26738, 26794, 26752,
  11773. 26737, 26750, 26779, 26774, 26763, 26784, 26761, 26788, 26744, 26747,
  11774. 26769, 26764, 26762, 26749, 27446, 27443, {f: 2, c: 27447}, 27537, 27535,
  11775. {f: 2, c: 27533}, 27532, 27690, 28096, 28075, 28084, 28083, 28276, 28076,
  11776. 28137, 28130, 28087, 28150, 28116, 28160, 28104, 28128, 28127, 28118,
  11777. 28094, 28133, {f: 2, c: 28124}, 28123, 28148, 28106, 28093, 28141, 28144,
  11778. 28090, 28117, 28098, 28111, 28105, 28112, 28146, 28115, 28157, 28119,
  11779. 28109, 28131, 28091, 28922, 28941, 28919, 28951, 28916, 28940, 28912,
  11780. 28932, 28915, 28944, 28924, 28927, 28934, 28947, 28928, 28920, 28918,
  11781. 28939, 28930, 28942, 29310, {f: 2, c: 29307}, 29311, 29469, 29463, 29447,
  11782. 29457, 29464, 29450, 29448, 29439, 29455, 29470, 29576, 29686, 29688,
  11783. 29685, 29700, 29697, 29693, 29703, 29696, 29690, 29692, 29695, 29708,
  11784. 29707, 29684, 29704, 30052, 30051, 30158, 30162, 30159, {f: 2, c: 30155},
  11785. 30161, 30160, 30351, 30345, 30419, 30521, 30511, 30509, {f: 2, c: 30513},
  11786. 30516, 30515, 30525, 30501, 30523, 30517, 30792, 30802, 30793, 30797,
  11787. 30794, 30796, 30758, 30789, 30800, 31076, 31079, {f: 2, c: 31081}, 31075,
  11788. 31083, 31073, 31163, 31226, 31224, {f: 2, c: 31222}, 31375, 31380, 31376,
  11789. 31541, 31547, 31540, 31525, 31536, 31522, 31524, 31539, 31512, 31530,
  11790. 31517, 31537, 31531, 31533, 31535, 31538, 31544, 31514, 31523, 31892,
  11791. 31896, 31894, 31907, 32053, 32061, 32056, 32054, 32058, 32069, 32044,
  11792. 32041, 32065, 32071, {f: 2, c: 32062}, 32074, 32059, 32040, 32611, 32661,
  11793. {f: 2, c: 32668}, 32667, {f: 2, c: 32714}, 32717, {f: 2, c: 32720}, 32711,
  11794. 32719, 32713, 32799, 32798, 32795, 32839, 32835, 32840, 33048, 33061,
  11795. 33049, 33051, 33069, 33055, 33068, 33054, 33057, 33045, 33063, 33053,
  11796. 33058, 33297, 33336, 33331, 33338, 33332, 33330, 33396, 33680, 33699,
  11797. 33704, 33677, 33658, 33651, 33700, 33652, 33679, 33665, 33685, 33689,
  11798. 33653, 33684, 33705, 33661, 33667, 33676, 33693, 33691, 33706, 33675,
  11799. 33662, 33701, 33711, 33672, 33687, 33712, 33663, 33702, 33671, 33710,
  11800. 33654, 34393, 34390, 34495, 34487, 34498, 34497, 34501, 34490, 34480,
  11801. 34504, 34489, 34483, 34488, 34508, 34484, {f: 2, c: 34491}, 34499,
  11802. {f: 2, c: 34493}, 34898, 34953, 34965, 34984, 34978, 34986, 34970, 34961,
  11803. 34977, 34975, 34968, 34983, 34969, 34971, 34967, 34980, 34988, 34956,
  11804. 34963, 34958, 35202, 35286, 35289, 35285, 35376, 35367, 35372, 35358,
  11805. 35897, 35899, {f: 2, c: 35932}, 35965, 36005, 36221, 36219, 36217, 36284,
  11806. 36290, 36281, 36287, 36289, 36568, 36574, 36573, 36572, 36567,
  11807. {f: 2, c: 36576}, 36900, 36875, 36881, 36892, 36876, 36897, 37103, 37098,
  11808. 37104, 37108, {f: 2, c: 37106}, 37076, {f: 2, c: 37099}, 37097, 37206,
  11809. 37208, 37210, 37203, 37205, 37356, 37364, 37361, 37363, 37368, 37348,
  11810. 37369, {f: 2, c: 37354}, 37367, 37352, 37358, 38266, 38278, 38280, 38524,
  11811. 38509, 38507, 38513, 38511, 38591, 38762, 38916, 39141, 39319, 20635,
  11812. 20629, 20628, 20638, 20619, 20643, 20611, 20620, 20622, 20637, 20584,
  11813. 20636, 20626, 20610, 20615, 20831, 20948, 21266, 21265, 21412, 21415,
  11814. 21905, 21928, 21925, 21933, 21879, 22085, 21922, 21907, 21896, 21903,
  11815. 21941, 21889, 21923, 21906, 21924, 21885, 21900, 21926, 21887, 21909,
  11816. 21921, 21902, 22284, 22569, 22583, 22553, 22558, 22567, 22563, 22568,
  11817. 22517, 22600, 22565, 22556, 22555, 22579, 22591, 22582, 22574, 22585,
  11818. 22584, 22573, 22572, 22587, 22881, 23215, 23188, 23199, 23162, 23202,
  11819. 23198, 23160, 23206, 23164, 23205, 23212, 23189, 23214, 23095, 23172,
  11820. 23178, 23191, 23171, 23179, 23209, 23163, 23165, 23180, 23196, 23183,
  11821. 23187, 23197, 23530, 23501, 23499, 23508, 23505, 23498, 23502, 23564,
  11822. 23600, 23863, 23875, 23915, 23873, 23883, 23871, 23861, 23889, 23886,
  11823. 23893, 23859, 23866, 23890, 23869, 23857, 23897, 23874, 23865, 23881,
  11824. 23864, 23868, 23858, 23862, 23872, 23877, 24132, 24129, [24408, 57673],
  11825. 24486, 24485, 24491, 24777, 24761, 24780, 24802, 24782, 24772, 24852,
  11826. 24818, 24842, 24854, 24837, 24821, 24851, 24824, 24828, 24830, 24769,
  11827. 24835, 24856, 24861, 24848, 24831, 24836, 24843, 25162, 25492, 25521,
  11828. 25520, 25550, 25573, 25576, 25583, 25539, 25757, 25587, 25546, 25568,
  11829. 25590, 25557, 25586, 25589, 25697, 25567, 25534, 25565, 25564, 25540,
  11830. 25560, 25555, 25538, 25543, 25548, 25547, 25544, 25584, 25559, 25561,
  11831. 25906, 25959, 25962, 25956, 25948, 25960, 25957, 25996, {f: 2, c: 26013},
  11832. 26030, 26064, 26066, 26236, 26220, 26235, 26240, 26225, 26233, 26218,
  11833. 26226, 26369, 26892, 26835, 26884, 26844, 26922, 26860, 26858, 26865,
  11834. 26895, 26838, 26871, 26859, 26852, 26870, 26899, 26896, 26867, 26849,
  11835. 26887, 26828, 26888, 26992, 26804, 26897, 26863, 26822, 26900, 26872,
  11836. 26832, 26877, 26876, 26856, 26891, 26890, 26903, 26830, 26824,
  11837. {f: 2, c: 26845}, 26854, 26868, 26833, 26886, 26836, 26857, 26901, 26917,
  11838. 26823, 27449, 27451, 27455, 27452, 27540, 27543, 27545, 27541, 27581,
  11839. 27632, {f: 2, c: 27634}, 27696, 28156, {f: 2, c: 28230}, 28191, 28233,
  11840. 28296, {f: 2, c: 28220}, 28229, 28258, 28203, 28223, 28225, 28253, 28275,
  11841. 28188, 28211, 28235, 28224, 28241, 28219, 28163, 28206, 28254, 28264,
  11842. 28252, 28257, 28209, 28200, 28256, 28273, 28267, 28217, 28194, 28208,
  11843. 28243, 28261, 28199, 28280, 28260, 28279, 28245, 28281, 28242, 28262,
  11844. {f: 2, c: 28213}, 28250, 28960, 28958, 28975, 28923, 28974, 28977, 28963,
  11845. 28965, 28962, 28978, 28959, 28968, 28986, 28955, 29259, 29274,
  11846. {f: 2, c: 29320}, 29318, 29317, 29323, 29458, 29451, 29488, 29474, 29489,
  11847. 29491, 29479, 29490, 29485, 29478, 29475, 29493, 29452, 29742, 29740,
  11848. 29744, 29739, 29718, 29722, 29729, 29741, 29745, 29732, 29731, 29725,
  11849. 29737, 29728, 29746, 29947, 29999, 30063, 30060, 30183, 30170, 30177,
  11850. 30182, 30173, 30175, 30180, 30167, 30357, 30354, 30426, {f: 2, c: 30534},
  11851. 30532, 30541, 30533, 30538, 30542, {f: 2, c: 30539}, 30686, 30700, 30816,
  11852. {f: 2, c: 30820}, 30812, 30829, 30833, 30826, 30830, 30832, 30825, 30824,
  11853. 30814, 30818, 31092, 31091, 31090, 31088, 31234, 31242, 31235, 31244,
  11854. 31236, 31385, 31462, 31460, 31562, 31559, 31556, 31560, 31564, 31566,
  11855. 31552, 31576, 31557, 31906, 31902, 31912, 31905, 32088, 32111, 32099,
  11856. 32083, 32086, 32103, 32106, 32079, 32109, 32092, 32107, 32082, 32084,
  11857. 32105, 32081, 32095, 32078, {f: 2, c: 32574}, {f: 2, c: 32613}, 32674,
  11858. {f: 2, c: 32672}, 32727, 32849, {f: 2, c: 32847}, 33022, 32980, 33091,
  11859. 33098, 33106, 33103, 33095, 33085, 33101, 33082, 33254, 33262,
  11860. {f: 3, c: 33271}, 33284, {f: 2, c: 33340}, 33343, 33397, 33595,
  11861. [33743, 60382], 33785, 33827, 33728, 33768, 33810, 33767, 33764, 33788,
  11862. 33782, 33808, 33734, 33736, 33771, 33763, 33727, 33793, 33757, 33765,
  11863. 33752, 33791, 33761, 33739, 33742, 33750, 33781, 33737, 33801,
  11864. [33807, 58332], 33758, 33809, 33798, 33730, 33779, 33749, 33786, 33735,
  11865. 33745, 33770, 33811, 33690, 33731, 33772, 33774, 33732, 33787, 33751,
  11866. 33762, 33819, 33755, 33790, 34520, 34530, 34534, 34515, 34531, 34522,
  11867. 34538, 34525, 34539, 34524, 34540, 34537, 34519, 34536, 34513, 34888,
  11868. 34902, 34901, 35002, 35031, 35001, 35000, 35008, 35006, 34998, 35004,
  11869. 34999, 35005, 34994, 35073, 35017, 35221, 35224, 35223, 35293,
  11870. {f: 2, c: 35290}, 35406, 35405, 35385, 35417, 35392, {f: 2, c: 35415},
  11871. {f: 2, c: 35396}, 35410, 35400, 35409, 35402, 35404, 35407, 35935, 35969,
  11872. 35968, 36026, 36030, 36016, 36025, 36021, 36228, 36224, 36233, 36312,
  11873. 36307, 36301, 36295, 36310, 36316, 36303, 36309, 36313, 36296, 36311,
  11874. 36293, 36591, 36599, 36602, 36601, 36582, 36590, 36581, 36597,
  11875. {f: 2, c: 36583}, 36598, 36587, 36593, 36588, 36596, 36585, 36909, 36916,
  11876. 36911, 37126, 37164, [37124, 60367], 37119, 37116, 37128, 37113, 37115,
  11877. 37121, 37120, 37127, 37125, 37123, 37217, 37220, 37215, 37218, 37216,
  11878. 37377, 37386, 37413, 37379, 37402, 37414, 37391, 37388, 37376, 37394,
  11879. 37375, 37373, 37382, 37380, 37415, 37378, 37404, 37412, 37401, 37399,
  11880. 37381, 37398, 38267, 38285, 38284, 38288, 38535, 38526, {f: 2, c: 38536},
  11881. 38531, 38528, 38594, 38600, 38595, 38641, 38640, 38764, 38768, 38766,
  11882. 38919, 39081, 39147, 40166, [12235, 40697], {f: 2, c: 20099}, 20150, 20669,
  11883. 20671, 20678, 20654, 20676, 20682, 20660, 20680, 20674, 20656, 20673,
  11884. 20666, 20657, 20683, 20681, 20662, 20664, 20951, 21114, 21112,
  11885. {f: 2, c: 21115}, 21955, 21979, 21964, 21968, 21963, 21962, 21981,
  11886. [21952, 64013], 21972, 21956, 21993, 21951, 21970, 21901, 21967, 21973,
  11887. 21986, 21974, 21960, 22002, 21965, 21977, 21954, 22292, 22611, 22632,
  11888. 22628, 22607, 22605, 22601, 22639, 22613, 22606, 22621, 22617, 22629,
  11889. 22619, 22589, 22627, 22641, 22780, 23239, 23236, 23243, 23226, 23224,
  11890. 23217, 23221, 23216, 23231, 23240, 23227, 23238, 23223, 23232, 23242,
  11891. 23220, 23222, 23245, 23225, 23184, 23510, {f: 2, c: 23512}, 23583, 23603,
  11892. 23921, 23907, 23882, 23909, 23922, 23916, 23902, 23912, 23911, 23906,
  11893. 24048, 24143, 24142, 24138, 24141, 24139, 24261, 24268, 24262, 24267,
  11894. 24263, 24384, 24495, 24493, 24823, {f: 2, c: 24905}, 24875, 24901, 24886,
  11895. 24882, 24878, 24902, 24879, 24911, 24873, 24896, 25120, 37224, 25123,
  11896. 25125, 25124, 25541, 25585, 25579, 25616, 25618, 25609, 25632, 25636,
  11897. 25651, 25667, 25631, 25621, 25624, 25657, 25655, {f: 2, c: 25634}, 25612,
  11898. 25638, 25648, 25640, 25665, 25653, 25647, 25610, 25626, 25664, 25637,
  11899. 25639, 25611, 25575, 25627, 25646, 25633, 25614, 25967, 26002, 26067,
  11900. 26246, 26252, 26261, 26256, 26251, 26250, 26265, 26260, 26232, 26400,
  11901. 26982, 26975, 26936, 26958, 26978, 26993, 26943, 26949, 26986, 26937,
  11902. 26946, 26967, 26969, 27002, {f: 2, c: 26952}, 26933, 26988, 26931, 26941,
  11903. 26981, 26864, 27000, 26932, 26985, 26944, 26991, 26948, 26998, 26968,
  11904. 26945, 26996, 26956, 26939, 26955, 26935, 26972, 26959, 26961, 26930,
  11905. 26962, 26927, 27003, 26940, 27462, 27461, 27459, 27458, 27464, 27457,
  11906. 27547, {f: 2, c: 27643}, 27641, {f: 2, c: 27639}, 28315, 28374, 28360,
  11907. 28303, 28352, 28319, {f: 2, c: 28307}, 28320, 28337, 28345, 28358, 28370,
  11908. 28349, 28353, 28318, 28361, 28343, 28336, 28365, 28326, 28367, 28338,
  11909. 28350, 28355, 28380, 28376, 28313, 28306, 28302, 28301, 28324, 28321,
  11910. 28351, 28339, 28368, 28362, 28311, 28334, 28323, 28999, 29012, 29010,
  11911. 29027, 29024, 28993, 29021, [29026, 61080], 29042, 29048, 29034, 29025,
  11912. 28994, 29016, 28995, 29003, 29040, 29023, 29008, 29011, 28996, 29005,
  11913. 29018, 29263, 29325, 29324, 29329, 29328, 29326, 29500, 29506, 29499,
  11914. 29498, 29504, 29514, 29513, 29764, {f: 2, c: 29770}, 29778, 29777, 29783,
  11915. 29760, {f: 2, c: 29775}, 29774, 29762, 29766, 29773, 29780, 29921, 29951,
  11916. 29950, 29949, 29981, 30073, 30071, 27011, 30191, 30223, 30211, 30199,
  11917. 30206, 30204, [30201, 60782], 30200, 30224, 30203, 30198, 30189, 30197,
  11918. 30205, 30361, 30389, 30429, 30549, {f: 2, c: 30559}, 30546, 30550, 30554,
  11919. 30569, 30567, 30548, 30553, 30573, 30688, 30855, 30874, 30868, 30863,
  11920. 30852, 30869, {f: 2, c: 30853}, 30881, 30851, 30841, 30873, 30848, 30870,
  11921. 30843, 31100, 31106, 31101, 31097, 31249, {f: 2, c: 31256}, 31250, 31255,
  11922. 31253, 31266, 31251, 31259, 31248, 31395, 31394, 31390, 31467, 31590,
  11923. 31588, 31597, 31604, 31593, 31602, 31589, 31603, 31601, 31600, 31585,
  11924. 31608, 31606, 31587, 31922, 31924, 31919, 32136, 32134, 32128, 32141,
  11925. 32127, 32133, 32122, 32142, 32123, 32131, 32124, 32140, 32148, 32132,
  11926. 32125, 32146, 32621, 32619, {f: 2, c: 32615}, 32620, 32678, 32677, 32679,
  11927. {f: 2, c: 32731}, 32801, 33124, 33120, 33143, 33116, 33129, 33115, 33122,
  11928. 33138, 26401, 33118, 33142, 33127, 33135, 33092, 33121, 33309, 33353,
  11929. 33348, 33344, 33346, 33349, 34033, 33855, 33878, 33910, 33913, 33935,
  11930. 33933, 33893, 33873, 33856, 33926, 33895, 33840, 33869, 33917, 33882,
  11931. 33881, 33908, 33907, 33885, 34055, 33886, 33847, 33850, 33844, 33914,
  11932. 33859, 33912, 33842, 33861, 33833, 33753, 33867, 33839, 33858, 33837,
  11933. 33887, 33904, 33849, 33870, 33868, 33874, 33903, 33989, 33934, 33851,
  11934. 33863, 33846, 33843, 33896, 33918, 33860, 33835, 33888, 33876, 33902,
  11935. 33872, 34571, 34564, 34551, 34572, 34554, 34518, 34549, 34637, 34552,
  11936. 34574, 34569, 34561, 34550, 34573, 34565, 35030, 35019, {f: 2, c: 35021},
  11937. 35038, 35035, 35034, 35020, 35024, 35205, 35227, 35295, 35301, 35300,
  11938. 35297, 35296, 35298, 35292, 35302, 35446, 35462, 35455, 35425, 35391,
  11939. 35447, 35458, 35460, 35445, 35459, 35457, 35444, 35450, 35900, 35915,
  11940. 35914, 35941, 35940, 35942, 35974, {f: 2, c: 35972}, 36044,
  11941. {f: 2, c: 36200}, 36241, 36236, {f: 2, c: 36238}, 36237, {f: 2, c: 36243},
  11942. 36240, 36242, 36336, 36320, 36332, 36337, 36334, 36304, 36329, 36323,
  11943. 36322, 36327, 36338, 36331, 36340, 36614, 36607, 36609, 36608, 36613,
  11944. {f: 2, c: 36615}, 36610, [36619, 60507], 36946, 36927, 36932, 36937, 36925,
  11945. 37136, 37133, 37135, 37137, 37142, 37140, 37131, 37134, {f: 2, c: 37230},
  11946. 37448, 37458, 37424, 37434, 37478, 37427, 37477, 37470, 37507, 37422,
  11947. 37450, 37446, 37485, 37484, 37455, 37472, 37479, 37487, 37430, 37473,
  11948. 37488, 37425, 37460, 37475, 37456, 37490, 37454, 37459, 37452, 37462,
  11949. 37426, 38303, 38300, 38302, 38299, {f: 2, c: 38546}, 38545, 38551, 38606,
  11950. 38650, 38653, 38648, 38645, 38771, {f: 2, c: 38775}, 38770, 38927,
  11951. {f: 2, c: 38925}, 39084, 39158, 39161, 39343, 39346, 39344, 39349, 39597,
  11952. 39595, 39771, 40170, 40173, 40167, 40576, [12236, 40701], 20710, 20692,
  11953. 20695, 20712, 20723, 20699, 20714, 20701, 20708, 20691, 20716, 20720,
  11954. 20719, 20707, 20704, 20952, {f: 2, c: 21120}, 21225, 21227, 21296, 21420,
  11955. 22055, 22037, 22028, 22034, 22012, 22031, 22044, 22017, 22035, 22018,
  11956. 22010, 22045, 22020, 22015, 22009, 22665, 22652, 22672, 22680, 22662,
  11957. 22657, 22655, 22644, 22667, 22650, 22663, 22673, 22670, 22646, 22658,
  11958. 22664, 22651, 22676, 22671, 22782, 22891, 23260, 23278, 23269, 23253,
  11959. 23274, 23258, 23277, 23275, 23283, 23266, 23264, 23259, 23276, 23262,
  11960. 23261, 23257, 23272, 23263, 23415, 23520, 23523, 23651, 23938, 23936,
  11961. 23933, 23942, 23930, 23937, 23927, 23946, 23945, 23944, 23934, 23932,
  11962. 23949, 23929, 23935, {f: 2, c: 24152}, 24147, 24280, 24273, 24279, 24270,
  11963. 24284, 24277, 24281, 24274, 24276, 24388, 24387, 24431, 24502, 24876,
  11964. 24872, 24897, 24926, 24945, 24947, {f: 2, c: 24914}, 24946, 24940, 24960,
  11965. 24948, 24916, 24954, 24923, 24933, 24891, 24938, 24929, 24918, 25129,
  11966. 25127, 25131, 25643, 25677, 25691, 25693, 25716, 25718, {f: 2, c: 25714},
  11967. 25725, 25717, 25702, 25766, 25678, 25730, 25694, 25692, 25675, 25683,
  11968. 25696, 25680, 25727, 25663, 25708, 25707, 25689, 25701, 25719, 25971,
  11969. 26016, 26273, 26272, 26271, 26373, 26372, 26402, 27057, 27062, 27081,
  11970. 27040, 27086, 27030, 27056, 27052, 27068, 27025, 27033, 27022, 27047,
  11971. 27021, 27049, 27070, 27055, 27071, 27076, 27069, 27044, 27092, 27065,
  11972. 27082, 27034, 27087, 27059, 27027, 27050, 27041, 27038, 27097, 27031,
  11973. 27024, 27074, 27061, 27045, 27078, 27466, 27469, 27467, {f: 3, c: 27550},
  11974. {f: 2, c: 27587}, 27646, 28366, 28405, 28401, 28419, 28453, 28408, 28471,
  11975. 28411, 28462, 28425, 28494, {f: 2, c: 28441}, 28455, 28440, 28475, 28434,
  11976. 28397, 28426, 28470, 28531, 28409, 28398, 28461, 28480, 28464, 28476,
  11977. 28469, 28395, 28423, 28430, 28483, 28421, 28413, 28406, 28473, 28444,
  11978. 28412, 28474, 28447, 28429, 28446, 28424, 28449, 29063, 29072, 29065,
  11979. 29056, 29061, 29058, 29071, 29051, 29062, 29057, 29079, 29252, 29267,
  11980. 29335, 29333, 29331, 29507, 29517, 29521, 29516, 29794, 29811, 29809,
  11981. 29813, 29810, 29799, 29806, 29952, {f: 2, c: 29954}, 30077, 30096, 30230,
  11982. 30216, 30220, 30229, 30225, 30218, 30228, 30392, 30593, 30588, 30597,
  11983. 30594, 30574, 30592, 30575, 30590, 30595, 30898, 30890, 30900, 30893,
  11984. 30888, 30846, 30891, 30878, 30885, 30880, 30892, 30882, 30884, 31128,
  11985. {f: 2, c: 31114}, 31126, 31125, 31124, 31123, 31127, 31112, 31122, 31120,
  11986. 31275, 31306, 31280, 31279, 31272, 31270, 31400, {f: 2, c: 31403}, 31470,
  11987. 31624, 31644, 31626, 31633, 31632, 31638, 31629, 31628, 31643, 31630,
  11988. 31621, 31640, 21124, 31641, 31652, 31618, 31931, 31935, 31932, 31930,
  11989. 32167, 32183, 32194, 32163, 32170, 32193, 32192, 32197, 32157, 32206,
  11990. 32196, 32198, {f: 2, c: 32203}, 32175, 32185, 32150, 32188, 32159, 32166,
  11991. 32174, 32169, 32161, 32201, 32627, {f: 2, c: 32738}, 32741, 32734, 32804,
  11992. 32861, 32860, 33161, 33158, 33155, 33159, 33165, 33164, 33163, 33301,
  11993. 33943, 33956, 33953, 33951, 33978, 33998, 33986, 33964, 33966, 33963,
  11994. 33977, 33972, 33985, 33997, 33962, 33946, 33969, 34000, 33949, 33959,
  11995. 33979, 33954, 33940, 33991, 33996, 33947, 33961, 33967, [33960, 58327],
  11996. 34006, 33944, 33974, 33999, 33952, 34007, 34004, 34002, 34011, 33968,
  11997. 33937, 34401, 34611, 34595, 34600, 34667, 34624, 34606, 34590, 34593,
  11998. 34585, 34587, 34627, 34604, 34625, 34622, 34630, 34592, 34610, 34602,
  11999. 34605, 34620, 34578, 34618, 34609, 34613, 34626, {f: 2, c: 34598}, 34616,
  12000. 34596, 34586, 34608, 34577, 35063, 35047, {f: 2, c: 35057}, 35066, 35070,
  12001. 35054, 35068, 35062, 35067, 35056, 35052, 35051, 35229, 35233, 35231,
  12002. 35230, 35305, 35307, 35304, 35499, 35481, 35467, 35474, 35471, 35478,
  12003. 35901, {f: 2, c: 35944}, 36053, 36047, 36055, 36246, 36361, 36354, 36351,
  12004. 36365, 36349, 36362, 36355, 36359, 36358, 36357, 36350, 36352, 36356,
  12005. {f: 2, c: 36624}, 36622, 36621, 37155, 37148, 37152, 37154, 37151, 37149,
  12006. 37146, 37156, 37153, 37147, 37242, 37234, 37241, 37235, 37541, 37540,
  12007. 37494, 37531, 37498, 37536, 37524, 37546, 37517, 37542, 37530, 37547,
  12008. 37497, 37527, 37503, 37539, 37614, 37518, 37506, 37525, 37538, 37501,
  12009. 37512, 37537, 37514, 37510, 37516, 37529, 37543, 37502, 37511, 37545,
  12010. 37533, 37515, 37421, 38558, 38561, 38655, 38744, 38781, 38778, 38782,
  12011. 38787, 38784, 38786, 38779, 38788, 38785, 38783, 38862, 38861, 38934,
  12012. {f: 2, c: 39085}, 39170, 39168, 39175, 39325, 39324, 39363, 39353, 39355,
  12013. 39354, 39362, 39357, 39367, 39601, 39651, 39655, {f: 2, c: 39742},
  12014. {f: 2, c: 39776}, 39775, {f: 2, c: 40177}, 40181, 40615, 20735, 20739,
  12015. 20784, 20728, {f: 2, c: 20742}, 20726, 20734, {f: 2, c: 20747}, 20733,
  12016. 20746, {f: 2, c: 21131}, 21233, 21231, 22088, 22082, 22092, 22069, 22081,
  12017. 22090, 22089, 22086, 22104, 22106, 22080, 22067, 22077, 22060, 22078,
  12018. 22072, 22058, 22074, 22298, 22699, 22685, 22705, 22688, 22691, 22703,
  12019. 22700, 22693, 22689, 22783, 23295, 23284, 23293, 23287, 23286, 23299,
  12020. 23288, 23298, 23289, 23297, 23303, 23301, 23311, 23655, 23961, 23959,
  12021. 23967, 23954, 23970, 23955, 23957, 23968, 23964, 23969, 23962, 23966,
  12022. 24169, 24157, 24160, 24156, 32243, 24283, 24286, 24289, 24393, 24498,
  12023. 24971, 24963, 24953, 25009, 25008, 24994, 24969, 24987, 24979, 25007,
  12024. 25005, 24991, 24978, 25002, 24993, 24973, 24934, 25011, 25133, 25710,
  12025. 25712, 25750, 25760, 25733, 25751, 25756, 25743, 25739, 25738, 25740,
  12026. 25763, 25759, 25704, 25777, 25752, 25974, 25978, 25977, 25979,
  12027. {f: 2, c: 26034}, 26293, 26288, 26281, 26290, 26295, 26282, 26287, 27136,
  12028. 27142, 27159, 27109, 27128, 27157, 27121, 27108, 27168, 27135, 27116,
  12029. 27106, 27163, 27165, 27134, 27175, 27122, 27118, 27156, 27127, 27111,
  12030. 27200, 27144, 27110, 27131, 27149, 27132, 27115, 27145, 27140, 27160,
  12031. 27173, 27151, 27126, 27174, 27143, 27124, 27158, 27473, 27557, 27555,
  12032. 27554, 27558, 27649, 27648, 27647, 27650, 28481, 28454, 28542, 28551,
  12033. 28614, 28562, 28557, 28553, 28556, 28514, 28495, 28549, 28506, 28566,
  12034. 28534, 28524, 28546, 28501, 28530, 28498, 28496, 28503, 28564, 28563,
  12035. 28509, 28416, 28513, 28523, 28541, 28519, 28560, 28499, 28555, 28521,
  12036. 28543, 28565, 28515, 28535, 28522, 28539, 29106, 29103, 29083, 29104,
  12037. 29088, 29082, 29097, 29109, 29085, 29093, 29086, 29092, 29089, 29098,
  12038. 29084, 29095, 29107, 29336, 29338, 29528, 29522, {f: 3, c: 29534}, 29533,
  12039. 29531, 29537, 29530, 29529, 29538, 29831, {f: 2, c: 29833}, 29830, 29825,
  12040. 29821, 29829, 29832, 29820, [29817, 58868], 29960, 29959, 30078, 30245,
  12041. 30238, 30233, 30237, 30236, 30243, 30234, 30248, 30235, {f: 3, c: 30364},
  12042. 30363, 30605, 30607, 30601, 30600, 30925, 30907, 30927, 30924, 30929,
  12043. 30926, 30932, 30920, {f: 2, c: 30915}, 30921, 31130, 31137, 31136, 31132,
  12044. 31138, [31131, 59175], 27510, 31289, 31410, 31412, 31411, 31671, 31691,
  12045. 31678, 31660, 31694, 31663, 31673, 31690, 31669, 31941, 31944, 31948,
  12046. 31947, 32247, 32219, 32234, 32231, 32215, 32225, 32259, 32250, 32230,
  12047. 32246, 32241, 32240, 32238, 32223, 32630, 32684, 32688, 32685, 32749,
  12048. 32747, 32746, 32748, 32742, 32744, 32868, 32871, 33187, 33183, 33182,
  12049. 33173, 33186, 33177, 33175, 33302, 33359, 33363, 33362, 33360, 33358,
  12050. 33361, 34084, 34107, 34063, 34048, 34089, 34062, 34057, 34061, 34079,
  12051. 34058, 34087, 34076, 34043, 34091, 34042, 34056, 34060, 34036, 34090,
  12052. 34034, 34069, 34039, 34027, 34035, 34044, 34066, 34026, 34025, 34070,
  12053. 34046, 34088, 34077, 34094, 34050, 34045, 34078, 34038, 34097, 34086,
  12054. {f: 2, c: 34023}, 34032, 34031, 34041, 34072, 34080, 34096, 34059, 34073,
  12055. 34095, 34402, 34646, {f: 2, c: 34659}, 34679, 34785, 34675, 34648, 34644,
  12056. 34651, 34642, 34657, 34650, 34641, 34654, 34669, 34666, 34640, 34638,
  12057. 34655, 34653, 34671, 34668, 34682, 34670, 34652, 34661, 34639, 34683,
  12058. 34677, 34658, 34663, 34665, 34906, 35077, 35084, 35092, 35083,
  12059. {f: 3, c: 35095}, 35078, 35094, 35089, 35086, 35081, 35234, 35236, 35235,
  12060. 35309, 35312, 35308, 35535, 35526, 35512, 35539, 35537, {f: 2, c: 35540},
  12061. 35515, 35543, 35518, 35520, 35525, 35544, 35523, 35514, 35517, 35545,
  12062. 35902, 35917, 35983, 36069, 36063, 36057, 36072, 36058, 36061, 36071,
  12063. 36256, 36252, 36257, 36251, 36384, 36387, 36389, 36388, 36398, 36373,
  12064. 36379, 36374, 36369, 36377, {f: 2, c: 36390}, 36372, 36370, 36376, 36371,
  12065. 36380, 36375, 36378, 36652, 36644, 36632, 36634, 36640, 36643,
  12066. {f: 2, c: 36630}, 36979, 36976, 36975, 36967, 36971, 37167, 37163,
  12067. {f: 2, c: 37161}, 37170, 37158, 37166, {f: 2, c: 37253}, 37258,
  12068. {f: 2, c: 37249}, 37252, 37248, 37584, {f: 2, c: 37571}, 37568, 37593,
  12069. 37558, 37583, 37617, 37599, 37592, 37609, 37591, 37597, 37580, 37615,
  12070. 37570, 37608, 37578, 37576, 37582, 37606, 37581, 37589, 37577, 37600,
  12071. 37598, 37607, 37585, 37587, 37557, 37601, 37669, 37574, 37556, 38268,
  12072. 38316, 38315, 38318, 38320, 38564, 38562, 38611, 38661, 38664, 38658,
  12073. 38746, 38794, 38798, 38792, 38864, 38863, 38942, 38941, 38950, 38953,
  12074. 38952, 38944, 38939, 38951, 39090, 39176, 39162, 39185, 39188,
  12075. {f: 2, c: 39190}, 39189, 39388, 39373, 39375, {f: 2, c: 39379}, 39374,
  12076. 39369, [39382, 60270], 39384, 39371, 39383, 39372, 39603, 39660, 39659,
  12077. 39667, 39666, 39665, 39750, 39747, 39783, 39796, 39793, 39782, 39798,
  12078. 39797, 39792, 39784, 39780, 39788, 40188, 40186, 40189, 40191, 40183,
  12079. 40199, 40192, 40185, 40187, 40200, 40197, 40196, 40579, 40659,
  12080. {f: 2, c: 40719}, 20764, 20755, 20759, 20762, 20753, 20958, 21300, 21473,
  12081. 22128, 22112, 22126, 22131, 22118, 22115, 22125, 22130, 22110, 22135,
  12082. 22300, 22299, 22728, 22717, 22729, 22719, 22714, 22722, 22716, 22726,
  12083. 23319, 23321, 23323, 23329, 23316, 23315, 23312, 23318, [23336, 59539],
  12084. 23322, 23328, 23326, 23535, 23980, 23985, 23977, 23975, 23989, 23984,
  12085. 23982, 23978, 23976, 23986, 23981, 23983, 23988, {f: 2, c: 24167}, 24166,
  12086. 24175, 24297, 24295, 24294, 24296, 24293, 24395, 24508, 24507, 24989,
  12087. 25000, 24982, 25029, 25012, 25030, 25025, 25036, 25018, 25023, 25016,
  12088. 24972, 25815, 25814, 25808, 25807, 25801, 25789, 25737, 25795, 25819,
  12089. 25843, 25817, 25907, 25983, 25980, 26018, 26312, 26302, 26304,
  12090. {f: 2, c: 26314}, 26319, 26301, 26299, 26298, 26316, 26403, 27188, 27238,
  12091. 27209, 27239, 27186, 27240, 27198, 27229, 27245, 27254, 27227, 27217,
  12092. 27176, 27226, 27195, 27199, 27201, 27242, 27236, 27216, 27215, 27220,
  12093. 27247, 27241, 27232, 27196, 27230, 27222, 27221, {f: 2, c: 27213}, 27206,
  12094. 27477, 27476, 27478, 27559, {f: 2, c: 27562}, 27592, 27591, 27652, 27651,
  12095. 27654, 28589, 28619, 28579, 28615, 28604, 28622, 28616, 28510, 28612,
  12096. 28605, 28574, 28618, 28584, 28676, 28581, 28590, 28602, 28588, 28586,
  12097. 28623, 28607, 28600, 28578, 28617, 28587, 28621, 28591, 28594, 28592,
  12098. 29125, 29122, 29119, 29112, 29142, {f: 2, c: 29120}, 29131, 29140, 29130,
  12099. 29127, 29135, 29117, 29144, 29116, 29126, {f: 2, c: 29146},
  12100. {f: 2, c: 29341}, 29545, {f: 2, c: 29542}, 29548, 29541, 29547, 29546,
  12101. 29823, 29850, 29856, 29844, 29842, 29845, 29857, 29963, 30080, 30255,
  12102. 30253, 30257, 30269, 30259, 30268, 30261, 30258, 30256, 30395, 30438,
  12103. 30618, 30621, 30625, 30620, 30619, {f: 2, c: 30626}, 30613, 30617, 30615,
  12104. 30941, 30953, 30949, 30954, 30942, 30947, 30939, {f: 2, c: 30945}, 30957,
  12105. {f: 2, c: 30943}, 31140, 31300, 31304, 31303, 31414, 31416, 31413, 31409,
  12106. 31415, 31710, 31715, 31719, 31709, 31701, 31717, 31706, 31720, 31737,
  12107. 31700, 31722, 31714, 31708, 31723, 31704, 31711, 31954, 31956, 31959,
  12108. {f: 2, c: 31952}, 32274, 32289, 32279, 32268, {f: 2, c: 32287}, 32275,
  12109. 32270, 32284, 32277, 32282, 32290, 32267, 32271, 32278, 32269, 32276,
  12110. 32293, 32292, 32579, {f: 2, c: 32635}, 32634, 32689, 32751, 32810, 32809,
  12111. 32876, 33201, 33190, 33198, 33209, 33205, 33195, 33200, 33196, 33204,
  12112. 33202, 33207, 33191, 33266, {f: 3, c: 33365}, 34134, 34117, 34155, 34125,
  12113. 34131, 34145, 34136, 34112, 34118, 34148, 34113, 34146, 34116, 34129,
  12114. 34119, 34147, 34110, 34139, 34161, 34126, 34158, 34165, 34133, 34151,
  12115. 34144, 34188, 34150, 34141, 34132, 34149, 34156, 34403, 34405, 34404,
  12116. 34724, 34715, 34703, 34711, 34707, 34706, 34696, 34689, 34710, 34712,
  12117. 34681, 34695, 34723, 34693, {f: 2, c: 34704}, 34717, 34692, 34708, 34716,
  12118. 34714, 34697, 35102, 35110, 35120, {f: 2, c: 35117}, 35111, 35121, 35106,
  12119. 35113, 35107, 35119, 35116, 35103, 35313, 35552, 35554, 35570,
  12120. {f: 2, c: 35572}, 35549, 35604, 35556, 35551, 35568, 35528, 35550, 35553,
  12121. 35560, 35583, 35567, 35579, {f: 2, c: 35985}, 35984, 36085, 36078, 36081,
  12122. 36080, 36083, 36204, 36206, 36261, 36263, 36403, 36414, 36408, 36416,
  12123. 36421, 36406, {f: 2, c: 36412}, 36417, 36400, 36415, 36541, [36662, 60329],
  12124. 36654, 36661, 36658, 36665, 36663, 36660, 36982, 36985, 36987, 36998,
  12125. 37114, 37171, {f: 2, c: 37173}, 37267, {f: 2, c: 37264}, 37261, 37263,
  12126. 37671, 37662, 37640, 37663, 37638, 37647, 37754, 37688, 37692, 37659,
  12127. 37667, 37650, 37633, 37702, 37677, 37646, 37645, 37579, 37661, 37626,
  12128. 37651, 37625, 37623, 37684, 37634, 37668, 37631, 37673, 37689, 37685,
  12129. 37674, 37652, 37644, 37643, 37630, 37641, 37632, 37627, 37654, 38332,
  12130. 38349, 38334, {f: 2, c: 38329}, 38326, 38335, 38325, 38333, 38569, 38612,
  12131. 38667, 38674, 38672, 38809, 38807, 38804, 38896, 38904, 38965, 38959,
  12132. 38962, 39204, 39199, 39207, 39209, 39326, 39406, 39404, 39397, 39396,
  12133. 39408, 39395, 39402, 39401, 39399, 39609, 39615, 39604, 39611, 39670,
  12134. 39674, 39673, 39671, 39731, 39808, 39813, 39815, 39804, 39806, 39803,
  12135. 39810, 39827, 39826, 39824, 39802, 39829, 39805, 39816, 40229, 40215,
  12136. 40224, 40222, 40212, 40233, 40221, 40216, 40226, 40208, 40217, 40223,
  12137. 40584, {f: 2, c: 40582}, 40622, 40621, {f: 2, c: 40661}, 40698, 40722,
  12138. 40765, 20774, 20773, 20770, 20772, 20768, 20777, 21236, 22163,
  12139. {f: 2, c: 22156}, 22150, 22148, 22147, 22142, 22146, 22143, 22145, 22742,
  12140. 22740, 22735, 22738, 23341, 23333, 23346, 23331, 23340, 23335, 23334,
  12141. 23343, 23342, 23419, {f: 2, c: 23537}, 23991, 24172, 24170, 24510, 25027,
  12142. 25013, 25020, 25063, 25056, 25061, 25060, 25064, 25054, 25839, 25833,
  12143. 25827, 25835, 25828, 25832, 25985, 25984, 26038, 26074, 26322, 27277,
  12144. 27286, 27265, 27301, 27273, 27295, 27291, 27297, 27294, 27271, 27283,
  12145. 27278, 27285, 27267, 27304, 27300, 27281, 27263, 27302, 27290, 27269,
  12146. 27276, 27282, 27483, 27565, 27657, 28620, 28585, 28660, 28628, 28643,
  12147. 28636, 28653, 28647, 28646, 28638, 28658, 28637, 28642, 28648, 29153,
  12148. 29169, 29160, 29170, 29156, 29168, 29154, 29555, {f: 2, c: 29550}, 29847,
  12149. 29874, 29867, 29840, 29866, 29869, 29873, 29861, 29871, {f: 3, c: 29968},
  12150. 29967, 30084, 30275, {f: 2, c: 30280}, 30279, 30372, 30441, 30645, 30635,
  12151. 30642, 30647, 30646, 30644, 30641, 30632, 30704, 30963, 30973, 30978,
  12152. {f: 2, c: 30971}, 30975, 30962, 30981, 30969, 30974, 30980, 31147, 31144,
  12153. 31324, 31323, 31318, 31320, 31316, 31322, 31422, {f: 2, c: 31424}, 31749,
  12154. 31759, 31730, 31744, 31743, 31739, 31758, 31732, 31755, 31731, 31746,
  12155. 31753, 31747, 31745, 31736, 31741, [31750, 58176], {f: 2, c: 31728}, 31760,
  12156. 31754, 31976, 32301, 32316, 32322, 32307, 38984, 32312, 32298, 32329,
  12157. 32320, 32327, 32297, 32332, 32304, 32315, 32310, 32324, 32314, 32581,
  12158. 32639, 32638, 32637, 32756, 32754, 32812, 33211, 33220, 33228, 33226,
  12159. 33221, 33223, 33212, 33257, 33371, 33370, 33372, 34179, 34176, 34191,
  12160. 34215, 34197, 34208, 34187, 34211, 34171, 34212, 34202, 34206, 34167,
  12161. 34172, 34185, 34209, 34170, 34168, 34135, 34190, 34198, 34182, 34189,
  12162. 34201, 34205, 34177, 34210, 34178, 34184, 34181, 34169, 34166, 34200,
  12163. 34192, 34207, 34408, 34750, 34730, 34733, 34757, 34736, 34732, 34745,
  12164. 34741, 34748, 34734, 34761, 34755, 34754, 34764, 34743, 34735, 34756,
  12165. 34762, 34740, 34742, 34751, 34744, 34749, 34782, 34738, 35125, 35123,
  12166. 35132, 35134, 35137, 35154, 35127, 35138, 35245, 35247, 35246,
  12167. {f: 2, c: 35314}, 35614, 35608, 35606, 35601, 35589, 35595, 35618, 35599,
  12168. 35602, 35605, 35591, 35597, 35592, 35590, 35612, 35603, 35610, 35919,
  12169. 35952, 35954, 35953, 35951, 35989, 35988, 36089, 36207, 36430, 36429,
  12170. 36435, 36432, 36428, 36423, 36675, 36672, 36997, 36990, 37176, 37274,
  12171. 37282, 37275, 37273, 37279, 37281, 37277, 37280, 37793, 37763, 37807,
  12172. 37732, 37718, 37703, 37756, 37720, 37724, 37750, 37705, {f: 2, c: 37712},
  12173. 37728, 37741, 37775, 37708, 37738, 37753, 37719, 37717, 37714, 37711,
  12174. 37745, 37751, 37755, 37729, 37726, 37731, 37735, 37710, 37721, 38343,
  12175. 38336, 38345, 38339, 38341, 38327, 38574, 38576, 38572, 38688, 38687,
  12176. 38680, 38685, 38681, 38810, 38817, 38812, 38814, 38813, 38869, 38868,
  12177. 38897, 38977, 38980, 38986, 38985, 38981, 38979, 39205, {f: 2, c: 39211},
  12178. 39210, 39219, 39218, 39215, 39213, 39217, 39216, 39320, 39331, 39329,
  12179. 39426, 39418, 39412, 39415, 39417, 39416, 39414, 39419, {f: 2, c: 39421},
  12180. 39420, 39427, 39614, 39678, 39677, 39681, 39676, 39752, 39834, 39848,
  12181. 39838, 39835, 39846, 39841, 39845, 39844, 39814, 39842, 39840, 39855,
  12182. 40243, 40257, 40295, 40246, {f: 2, c: 40238}, 40241, 40248, 40240, 40261,
  12183. {f: 2, c: 40258}, 40254, 40247, 40256, 40253, 32757, 40237, 40586, 40585,
  12184. 40589, 40624, 40648, 40666, 40699, 40703, 40740, 40739, 40738, 40788,
  12185. [12245, 40864], 20785, {f: 2, c: 20781}, 22168, 22172, 22167, 22170, 22173,
  12186. 22169, 22896, 23356, {f: 2, c: 23657}, 24000, {f: 2, c: 24173}, 25048,
  12187. 25055, {f: 2, c: 25069}, 25073, 25066, 25072, 25067, 25046, 25065, 25855,
  12188. 25860, 25853, 25848, 25857, 25859, 25852, 26004, 26075, {f: 2, c: 26330},
  12189. 26328, 27333, 27321, 27325, 27361, 27334, 27322, {f: 2, c: 27318}, 27335,
  12190. 27316, 27309, 27486, 27593, 27659, 28679, {f: 2, c: 28684}, 28673, 28677,
  12191. 28692, 28686, {f: 2, c: 28671}, 28667, 28710, 28668, 28663, 28682,
  12192. [29185, 60224], 29183, 29177, 29187, 29181, 29558, 29880, 29888, 29877,
  12193. 29889, 29886, 29878, 29883, 29890, 29972, 29971, 30300, 30308, 30297,
  12194. 30288, 30291, 30295, 30298, 30374, 30397, 30444, 30658, 30650, 30988,
  12195. {f: 2, c: 30995}, 30985, 30992, 30994, 30993, 31149, 31148, 31327, 31772,
  12196. 31785, 31769, 31776, 31775, 31789, 31773, 31782, 31784, 31778, 31781,
  12197. 31792, 32348, 32336, 32342, 32355, 32344, 32354, 32351, 32337, 32352,
  12198. 32343, 32339, 32693, 32691, {f: 2, c: 32759}, 32885, {f: 2, c: 33233},
  12199. 33232, 33375, 33374, 34228, 34246, 34240, 34243, 34242, 34227, 34229,
  12200. 34237, 34247, 34244, 34239, 34251, 34254, 34248, 34245, 34225, 34230,
  12201. 34258, 34340, 34232, 34231, 34238, 34409, 34791, 34790, 34786, 34779,
  12202. 34795, 34794, 34789, 34783, 34803, 34788, 34772, 34780, 34771, 34797,
  12203. 34776, 34787, 34775, 34777, 34817, 34804, 34792, 34781, 35155, 35147,
  12204. 35151, 35148, 35142, {f: 2, c: 35152}, 35145, 35626, 35623, 35619, 35635,
  12205. 35632, 35637, 35655, 35631, 35644, 35646, 35633, 35621, 35639, 35622,
  12206. 35638, 35630, 35620, 35643, 35645, 35642, 35906, 35957, 35993, 35992,
  12207. 35991, 36094, 36100, 36098, 36096, 36444, 36450, 36448, 36439, 36438,
  12208. 36446, 36453, 36455, 36443, 36442, 36449, 36445, 36457, 36436,
  12209. {f: 3, c: 36678}, 36683, 37160, {f: 2, c: 37178}, 37182, 37288, 37285,
  12210. 37287, 37295, 37290, 37813, 37772, 37778, 37815, 37787, 37789, 37769,
  12211. 37799, 37774, 37802, 37790, 37798, 37781, 37768, 37785, 37791, 37760,
  12212. 37773, 37809, 37777, 37810, 37796, 37800, 37812, 37795, {f: 2, c: 38354},
  12213. 38353, 38579, 38615, 38618, 24002, 38623, 38616, 38621, 38691, 38690,
  12214. 38693, 38828, 38830, 38824, 38827, 38820, 38826, 38818, 38821, 38871,
  12215. 38873, 38870, 38872, 38906, {f: 3, c: 38992}, 39096, 39233, 39228, 39226,
  12216. 39439, 39435, 39433, 39437, 39428, 39441, 39434, 39429, 39431, 39430,
  12217. 39616, 39644, 39688, {f: 2, c: 39684}, 39721, 39733, 39754, 39756, 39755,
  12218. 39879, 39878, 39875, 39871, 39873, 39861, 39864, 39891, 39862, 39876,
  12219. 39865, 39869, 40284, 40275, 40271, 40266, 40283, 40267, 40281, 40278,
  12220. 40268, 40279, 40274, 40276, 40287, 40280, 40282, 40590, 40588, 40671,
  12221. 40705, 40704, [40726, 58693], 40741, 40747, 40746, 40745, 40744, 40780,
  12222. 40789, {f: 2, c: 20788}, 21142, 21239, 21428, 22187, 22189,
  12223. {f: 2, c: 22182}, 22186, 22188, 22746, 22749, 22747, 22802,
  12224. {f: 3, c: 23357}, 24003, 24176, 24511, 25083, 25863, 25872, 25869, 25865,
  12225. 25868, 25870, 25988, 26078, 26077, 26334, 27367, 27360, 27340, 27345,
  12226. 27353, 27339, 27359, 27356, 27344, 27371, 27343, 27341, 27358, 27488,
  12227. 27568, 27660, 28697, 28711, 28704, 28694, 28715, {f: 3, c: 28705}, 28713,
  12228. 28695, 28708, 28700, 29196, 29194, 29191, 29186, 29189, {f: 2, c: 29349},
  12229. 29348, 29347, 29345, 29899, 29893, 29879, 29891, 29974, 30304,
  12230. {f: 2, c: 30665}, 30660, 30705, 31005, 31003, 31009, 31004, 30999, 31006,
  12231. 31152, {f: 2, c: 31335}, 31795, 31804, 31801, 31788, 31803, 31980, 31978,
  12232. 32374, 32373, 32376, 32368, 32375, 32367, 32378, 32370, 32372, 32360,
  12233. 32587, 32586, 32643, 32646, 32695, {f: 2, c: 32765}, 32888, 33239, 33237,
  12234. 33291, 33380, 33377, 33379, 34283, 34289, 34285, 34265, 34273, 34280,
  12235. 34266, 34263, 34284, 34290, 34296, 34264, 34271, 34275, 34268, 34257,
  12236. 34288, 34278, 34287, 34270, 34274, 34816, 34810, 34819, {f: 2, c: 34806},
  12237. 34825, 34828, 34827, 34822, 34812, 34824, 34815, 34826, 34818, 35170,
  12238. {f: 2, c: 35162}, 35159, 35169, 35164, 35160, 35165, 35161, 35208, 35255,
  12239. 35254, 35318, 35664, 35656, 35658, 35648, 35667, 35670, 35668, 35659,
  12240. 35669, 35665, 35650, 35666, 35671, 35907, 35959, 35958, 35994,
  12241. {f: 2, c: 36102}, 36105, 36268, 36266, 36269, 36267, 36461, 36472, 36467,
  12242. 36458, 36463, 36475, 36546, 36690, 36689, {f: 2, c: 36687}, 36691, 36788,
  12243. 37184, 37183, 37296, 37293, 37854, 37831, 37839, 37826, 37850, 37840,
  12244. 37881, 37868, 37836, 37849, 37801, 37862, 37834, 37844, 37870, 37859,
  12245. 37845, 37828, 37838, 37824, 37842, 37797, 37863, 38269, {f: 2, c: 38362},
  12246. 38625, 38697, {f: 2, c: 38699}, 38696, 38694, 38835, 38839, 38838,
  12247. {f: 3, c: 38877}, 39004, 39001, 39005, 38999, 39103, 39101, 39099, 39102,
  12248. 39240, 39239, 39235, {f: 2, c: 39334}, 39450, 39445, 39461, 39453, 39460,
  12249. 39451, 39458, 39456, 39463, 39459, 39454, 39452, 39444, 39618, 39691,
  12250. 39690, 39694, 39692, 39735, {f: 2, c: 39914}, 39904, 39902, 39908, 39910,
  12251. 39906, 39920, 39892, 39895, 39916, 39900, 39897, 39909, 39893, 39905,
  12252. 39898, 40311, 40321, 40330, 40324, 40328, 40305, 40320, 40312, 40326,
  12253. {f: 2, c: 40331}, 40317, 40299, {f: 2, c: 40308}, 40304, 40297, 40325,
  12254. 40307, 40315, 40322, 40303, 40313, 40319, 40327, 40296, 40596, 40593,
  12255. 40640, 40700, 40749, {f: 2, c: 40768}, 40781, {f: 3, c: 40790}, 21303,
  12256. 22194, 22197, 22195, 22755, 23365, {f: 2, c: 24006}, {f: 2, c: 24302},
  12257. {f: 2, c: 24512}, 25081, 25879, 25878, 25877, 25875, 26079, 26344,
  12258. {f: 2, c: 26339}, 27379, 27376, 27370, 27368, 27385, 27377,
  12259. {f: 2, c: 27374}, 28732, 28725, 28719, 28727, 28724, 28721, 28738, 28728,
  12260. 28735, 28730, 28729, 28714, 28736, 28731, 28723, 28737, {f: 2, c: 29203},
  12261. 29352, 29565, 29564, 29882, 30379, 30378, 30398, 30445, 30668,
  12262. {f: 2, c: 30670}, 30669, 30706, 31013, 31011, {f: 2, c: 31015}, 31012,
  12263. 31017, 31154, 31342, {f: 2, c: 31340}, 31479, 31817, 31816, 31818, 31815,
  12264. 31813, 31982, 32379, 32382, 32385, 32384, 32698, 32767, 32889, 33243,
  12265. 33241, {f: 2, c: 33384}, 34338, 34303, 34305, 34302, 34331, 34304, 34294,
  12266. 34308, 34313, 34309, 34316, 34301, 34841, {f: 2, c: 34832}, 34839, 34835,
  12267. 34838, 35171, 35174, 35257, 35319, 35680, 35690, 35677, 35688, 35683,
  12268. 35685, 35687, 35693, 36270, 36486, 36488, 36484, 36697, {f: 2, c: 36694},
  12269. 36693, 36696, 36698, 37005, 37187, 37185, 37303, 37301, {f: 2, c: 37298},
  12270. 37899, 37907, 37883, 37920, 37903, 37908, 37886, 37909, 37904, 37928,
  12271. 37913, 37901, 37877, 37888, 37879, 37895, 37902, 37910, 37906, 37882,
  12272. 37897, 37880, 37948, 37898, 37887, 37884, 37900, 37878, 37905, 37894,
  12273. 38366, 38368, 38367, {f: 2, c: 38702}, 38841, 38843, {f: 2, c: 38909},
  12274. 39008, {f: 2, c: 39010}, 39007, {f: 2, c: 39105}, 39248, 39246, 39257,
  12275. 39244, 39243, 39251, 39474, 39476, 39473, 39468, 39466, 39478, 39465,
  12276. 39470, 39480, 39469, 39623, 39626, 39622, 39696, 39698, 39697, 39947,
  12277. 39944, 39927, 39941, 39954, 39928, 40000, 39943, 39950, 39942, 39959,
  12278. 39956, 39945, 40351, 40345, 40356, 40349, 40338, 40344, 40336, 40347,
  12279. 40352, 40340, 40348, 40362, 40343, 40353, 40346, 40354, 40360, 40350,
  12280. 40355, 40383, 40361, 40342, {f: 2, c: 40358}, 40601, 40603, 40602, 40677,
  12281. 40676, 40679, 40678, 40752, 40750, 40795, 40800, 40798, 40797, 40793,
  12282. 40849, 20794, 20793, 21144, 21143, 22211, {f: 2, c: 22205}, 23368, 23367,
  12283. 24011, 24015, 24305, 25085, 25883, 27394, 27388, 27395, 27384, 27392,
  12284. {f: 2, c: 28739}, 28746, {f: 2, c: 28744}, {f: 2, c: 28741}, 29213, 29210,
  12285. 29209, 29566, 29975, 30314, 30672, 31021, 31025, 31023, 31828, 31827,
  12286. 31986, 32394, [32391, 60229], 32392, 32395, 32390, 32397, 32589, 32699,
  12287. 32816, 33245, 34328, 34346, 34342, 34335, 34339, 34332, 34329, 34343,
  12288. 34350, 34337, 34336, 34345, 34334, 34341, 34857, 34845, 34843, 34848,
  12289. 34852, 34844, 34859, 34890, 35181, 35177, 35182, 35179, 35322, 35705,
  12290. 35704, 35653, {f: 2, c: 35706}, 36112, 36116, 36271, 36494, 36492, 36702,
  12291. 36699, 36701, 37190, {f: 2, c: 37188}, 37305, 37951, 37947, 37942, 37929,
  12292. 37949, 37936, 37945, 37930, 37943, 37932, 37952, 37937, 38373, 38372,
  12293. 38371, 38709, 38714, 38847, 38881, 39012, 39113, 39110, 39104, 39256,
  12294. 39254, 39481, 39485, 39494, 39492, 39490, 39489, 39482, 39487, 39629,
  12295. 39701, {f: 2, c: 39703}, 39702, 39738, 39762, 39979, 39965, 39964, 39980,
  12296. 39971, {f: 2, c: 39976}, 39972, 39969, 40375, 40374, 40380, 40385, 40391,
  12297. 40394, 40399, 40382, 40389, 40387, 40379, 40373, 40398, {f: 2, c: 40377},
  12298. 40364, 40392, 40369, 40365, 40396, 40371, 40397, 40370, 40570, 40604,
  12299. 40683, 40686, 40685, 40731, 40728, 40730, 40753, 40782, 40805, 40804,
  12300. 40850, 20153, 22214, 22213, 22219, 22897, {f: 2, c: 23371}, 24021, 24017,
  12301. 24306, 25889, 25888, 25894, 25890, 27403, {f: 2, c: 27400}, 27661,
  12302. {f: 3, c: 28757}, 28754, {f: 2, c: 29214}, 29353, 29567, 29912, 29909,
  12303. 29913, 29911, 30317, 30381, 31029, 31156, {f: 2, c: 31344}, 31831, 31836,
  12304. 31833, 31835, 31834, 31988, 31985, 32401, 32591, 32647, 33246, 33387,
  12305. {f: 2, c: 34356}, 34355, 34348, 34354, 34358, 34860, 34856, 34854, 34858,
  12306. 34853, 35185, 35263, 35262, 35323, 35710, 35716, 35714, 35718, 35717,
  12307. 35711, 36117, 36501, 36500, 36506, 36498, 36496, {f: 2, c: 36502}, 36704,
  12308. 36706, 37191, 37964, 37968, {f: 2, c: 37962}, 37967, 37959, 37957,
  12309. {f: 2, c: 37960}, 37958, 38719, 38883, 39018, 39017, 39115, 39252, 39259,
  12310. 39502, {f: 2, c: 39507}, 39500, 39503, 39496, 39498, 39497, 39506, 39504,
  12311. 39632, 39705, 39723, 39739, 39766, 39765, 40006, 40008, 39999, 40004,
  12312. 39993, 39987, 40001, 39996, 39991, 39988, 39986, 39997, 39990, 40411,
  12313. 40402, 40414, 40410, 40395, 40400, 40412, 40401, 40415, 40425, 40409,
  12314. 40408, 40406, 40437, 40405, 40413, 40630, 40688, 40757, 40755, 40754,
  12315. 40770, 40811, 40853, 40866, 20797, 21145, 22760, 22759, 22898, 23373,
  12316. 24024, 34863, 24399, 25089, {f: 2, c: 25091}, 25897, 25893, 26006, 26347,
  12317. {f: 2, c: 27409}, 27407, 27594, 28763, 28762, 29218, 29570, 29569, 29571,
  12318. 30320, 30676, 31847, 31846, 32405, 33388, 34362, 34368, 34361, 34364,
  12319. 34353, 34363, 34366, 34864, 34866, 34862, 34867, 35190, 35188, 35187,
  12320. 35326, 35724, 35726, 35723, 35720, 35909, 36121, 36504, 36708, 36707,
  12321. 37308, 37986, 37973, 37981, 37975, 37982, {f: 2, c: 38852}, 38912, 39510,
  12322. 39513, {f: 3, c: 39710}, 40018, 40024, 40016, 40010, 40013, 40011, 40021,
  12323. 40025, 40012, 40014, 40443, 40439, 40431, 40419, 40427, 40440, 40420,
  12324. 40438, 40417, 40430, 40422, 40434, [40432, 60370], 40418, 40428, 40436,
  12325. 40435, 40424, 40429, 40642, 40656, {f: 2, c: 40690}, 40710, 40732, 40760,
  12326. 40759, 40758, 40771, 40783, 40817, 40816, {f: 2, c: 40814}, 22227, 22221,
  12327. 23374, 23661, 25901, {f: 2, c: 26349}, 27411, 28767, 28769, 28765, 28768,
  12328. 29219, 29915, 29925, 30677, 31032, 31159, 31158, 31850, 32407, 32649,
  12329. 33389, 34371, 34872, 34871, 34869, 34891, {f: 2, c: 35732},
  12330. {f: 3, c: 36510}, 36509, 37310, 37309, 37314, 37995, {f: 2, c: 37992},
  12331. 38629, 38726, 38723, 38727, 38855, 38885, 39518, 39637, 39769, 40035,
  12332. 40039, 40038, 40034, 40030, 40032, 40450, 40446, 40455, 40451, 40454,
  12333. 40453, {f: 2, c: 40448}, 40457, 40447, 40445, 40452, 40608, 40734, 40774,
  12334. {f: 3, c: 40820}, 22228, 25902, 26040, {f: 2, c: 27416}, 27415, 27418,
  12335. 28770, 29222, 29354, {f: 2, c: 30680}, 31033, 31849, 31851, 31990, 32410,
  12336. 32408, 32411, 32409, {f: 2, c: 33248}, {f: 3, c: 34374}, {f: 2, c: 35193},
  12337. 35196, 35195, 35327, {f: 2, c: 35736}, 36517, 36516, 36515, 37998, 37997,
  12338. 37999, 38001, 38003, 38729, 39026, 39263, 40040, 40046, 40045, 40459,
  12339. 40461, 40464, 40463, 40466, 40465, 40609, 40693, 40713, 40775, 40824,
  12340. 40827, 40826, 40825, 22302, 28774, 31855, 34876, 36274, 36518, 37315,
  12341. 38004, 38008, 38006, 38005, 39520, [39726, 60830], 40052, 40051, 40049,
  12342. 40053, 40468, 40467, 40694, 40714, 40868, 28776, 28773, 31991, 34410,
  12343. 34878, 34877, 34879, 35742, 35996, 36521, 36553, 38731, {f: 2, c: 39027},
  12344. 39116, 39265, 39339, 39524, {f: 2, c: 39526}, 39716, 40469, 40471, 40776,
  12345. 25095, 27422, 29223, 34380, 36520, 38018, {f: 2, c: 38016}, 39529, 39528,
  12346. 40473, 34379, 35743, 38019, 40057, 40631, 30325, 39531, 40058, 40477,
  12347. {f: 2, c: 28777}, 29225, 40612, 40830, 40777, 40856, {s: 97}, 65075, 0,
  12348. 65076, 65103, [168, 776, 63208], [710, 63209, 65342], [12541, 63210],
  12349. [12542, 63211], [12445, 63212], [12446, 63213], 0, [12293, 63216],
  12350. [12294, 63217], [12295, 63218], [12540, 63219], [63220, 65339],
  12351. [63221, 65341], [10045, 63222], [12353, 63223], [12354, 63224],
  12352. [12355, 63225], [12356, 63226], [12357, 63227], [12358, 63228],
  12353. [12359, 63229], [12360, 63230], [12361, 63231], [12362, 63232],
  12354. [12363, 63233], [12364, 63234], [12365, 63235], [12366, 63236],
  12355. [12367, 63237], [12368, 63238], [12369, 63239], [12370, 63240],
  12356. [12371, 63241], [12372, 63242], [12373, 63243], [12374, 63244],
  12357. [12375, 63245], [12376, 63246], [12377, 63247], [12378, 63248],
  12358. [12379, 63249], [12380, 63250], [12381, 63251], [12382, 63252],
  12359. [12383, 63253], [12384, 63254], [12385, 63255], [12386, 63256],
  12360. [12387, 63257], [12388, 63258], [12389, 63259], [12390, 63260],
  12361. [12391, 63261], [12392, 63262], [12393, 63263], [12394, 63264],
  12362. [12395, 63265], [12396, 63266], [12397, 63267], [12398, 63268],
  12363. [12399, 63269], [12400, 63270], [12401, 63271], [12402, 63272],
  12364. [12403, 63273], [12404, 63274], [12405, 63275], [12406, 63276],
  12365. [12407, 63277], [12408, 63278], [12409, 63279], [12410, 63280],
  12366. [12411, 63281], [12412, 63282], [12413, 63283], [12414, 63284],
  12367. [12415, 63285], [12416, 63286], [12417, 63287], [12418, 63288],
  12368. [12419, 63289], [12420, 63290], [12421, 63291], [12422, 63292],
  12369. [12423, 63293], [12424, 63294], [12425, 63295], [12426, 63296],
  12370. [12427, 63297], [12428, 63298], [12429, 63299], [12430, 63300],
  12371. [12431, 63301], [12432, 63302], [12433, 63303], [12434, 63304],
  12372. [12435, 63305], [12449, 63306], [12450, 63307], [12451, 63308],
  12373. [12452, 63309], [12453, 63310], [12454, 63311], [12455, 63312],
  12374. [12456, 63313], [12457, 63314], [12458, 63315], [12459, 63316],
  12375. [12460, 63317], [12461, 63318], [12462, 63319], [12463, 63320],
  12376. [12464, 63321], [12465, 63322], [12466, 63323], [12467, 63324],
  12377. [12468, 63325], [12469, 63326], [12470, 63327], [12471, 63328],
  12378. [12472, 63329], [12473, 63330], [12474, 63331], [12475, 63332],
  12379. [12476, 63333], [12477, 63334], [12478, 63335], [12479, 63336],
  12380. [12480, 63337], [12481, 63338], [12482, 63339], [12483, 63340],
  12381. [12484, 63341], [12485, 63342], [12486, 63343], [12487, 63344],
  12382. [12488, 63345], [12489, 63346], [12490, 63347], [12491, 63348],
  12383. [12492, 63349], [12493, 63350], [12494, 63351], [12495, 63352],
  12384. [12496, 63353], [12497, 63354], [12498, 63355], [12499, 63356],
  12385. [12500, 63357], [12501, 63358], [12502, 63359], [12503, 63360],
  12386. [12504, 63361], [12505, 63362], [12506, 63363], [12507, 63364],
  12387. [12508, 63365], [12509, 63366], [12510, 63367], [12511, 63368],
  12388. [12512, 63369], [12513, 63370], [12514, 63371], [12515, 63372],
  12389. [12516, 63373], [12517, 63374], [12518, 63375], [12519, 63376],
  12390. [12520, 63377], [12521, 63378], [12522, 63379], [12523, 63380],
  12391. [12524, 63381], [12525, 63382], [12526, 63383], [12527, 63384],
  12392. [12528, 63385], [12529, 63386], [12530, 63387], [12531, 63388],
  12393. [12532, 63389], [12533, 63390], [12534, 63391], [1040, 63392],
  12394. [1041, 63393], [1042, 63394], [1043, 63395], [1044, 63396], [1045, 63397],
  12395. [1025, 63398], [1046, 63399], [1047, 63400], [1048, 63401], [1049, 63402],
  12396. [1050, 63403], [1051, 63404], [1052, 63405], [1053, 63406], [1054, 63407],
  12397. [1055, 63408], [1056, 63409], [1057, 63410], [1058, 63411], [1059, 63412],
  12398. [1060, 63413], [1061, 63414], [1062, 63415], [1063, 63416], [1064, 63417],
  12399. [1065, 63418], [1066, 63419], [1067, 63420], [1068, 63421], [1069, 63422],
  12400. [1070, 63423], [1071, 63424], [1072, 63425], [1073, 63426], [1074, 63427],
  12401. [1075, 63428], [1076, 63429], [1077, 63430], [1105, 63431], [1078, 63432],
  12402. [1079, 63433], [1080, 63434], [1081, 63435], [1082, 63436], [1083, 63437],
  12403. [1084, 63438], [1085, 63439], [1086, 63440], [1087, 63441], [1088, 63442],
  12404. [1089, 63443], [1090, 63444], [1091, 63445], [1092, 63446], [1093, 63447],
  12405. [1094, 63448], [1095, 63449], [1096, 63450], [1097, 63451], [1098, 63452],
  12406. [1099, 63453], [1100, 63454], [1101, 63455], [1102, 63456], [1103, 63457],
  12407. [8679, 63458], [8632, 63459], [8633, 63460], [20033, 63461],
  12408. [63462, 131276], [20058, 63463], [63464, 131210], [20994, 63465],
  12409. [17553, 63466], 63467, [20872, 63468], [13853, 63469], [63470, 161287],
  12410. {s: 40}, [172, 63511, 65506], [63512, 65508], [63513, 65287],
  12411. [63514, 65282], [12849, 63515], [8470, 63516], [8481, 63517], 30849,
  12412. [37561, 58501], 35023, 22715, 24658, 31911, 23290, 9556, 9574, 9559, 9568,
  12413. 9580, 9571, 9562, 9577, 9565, 9554, 9572, 9557, {s: 3}, 9560, 9575, 9563,
  12414. 9555, 9573, 9558, 9567, 9579, 9570, 9561, 9576, 9564, 9553, {s: 5}, 9619,
  12415. {s: 26}, [58129, 147159], [22462, 58130], [58131, 159443], [28990, 58132],
  12416. [58133, 153568], [27042, 58135], [58136, 166889], [23412, 58137],
  12417. [31305, 58138], [58139, 153825], [58140, 169177], [31333, 58141],
  12418. [31357, 58142], [58143, 154028], [31419, 58144], [31408, 58145],
  12419. [31426, 58146], [31427, 58147], [29137, 58148], [58149, 156813],
  12420. [16842, 58150], [31450, 58151], [31453, 58152], [31466, 58153],
  12421. [16879, 58154], [21682, 58155], [58156, 154625], [31499, 58157],
  12422. [31573, 58158], [31529, 58159], [58160, 152334], [58161, 154878],
  12423. [31650, 58162], [31599, 58163], [33692, 58164], [58165, 154548],
  12424. [58166, 158847], [31696, 58167], [33825, 58168], [31634, 58169], 0,
  12425. [58171, 154912], 0, [33938, 58174], [31738, 58175], 0, [31797, 58177],
  12426. [58178, 154817], [31812, 58179], [31875, 58180], [58181, 149634],
  12427. [31910, 58182], [58184, 148856], [31945, 58185], [31943, 58186],
  12428. [31974, 58187], 0, [31987, 58189], [31989, 58190], [32359, 58192],
  12429. [17693, 58193], [58194, 159300], [32093, 58195], [58196, 159446],
  12430. [32137, 58198], [32171, 58199], [28981, 58200], [32179, 58201], 32214,
  12431. [58203, 147543], [58204, 155689], [32228, 58205], [15635, 58206],
  12432. [32245, 58207], [58208, 137209], [32229, 58209], [58210, 164717], 0,
  12433. [58212, 155937], [58213, 155994], [32366, 58214], 0, [17195, 58216],
  12434. [37996, 58217], [32295, 58218], [32576, 58219], [32577, 58220],
  12435. [32583, 58221], [31030, 58222], [58223, 156368], [39393, 58224],
  12436. [32663, 58225], [58226, 156497], [32675, 58227], [58228, 136801],
  12437. [58229, 131176], [17756, 58230], [58231, 145254], [58233, 164666],
  12438. [32762, 58234], [58235, 156809], 0, [32776, 58237], [32797, 58238], 0,
  12439. [32815, 58240], [58241, 172167], [58242, 158915], [32827, 58243],
  12440. [32828, 58244], [32865, 58245], [58246, 141076], [18825, 58247],
  12441. [58248, 157222], [58249, 146915], [58250, 157416], [26405, 58251],
  12442. [32935, 58252], [58253, 166472], [33031, 58254], [33050, 58255],
  12443. [22704, 58256], [58257, 141046], [27775, 58258], [58259, 156824],
  12444. [25831, 58261], [58262, 136330], [33304, 58263], [58264, 137310],
  12445. [27219, 58265], [58266, 150117], [58267, 150165], [17530, 58268],
  12446. [33321, 58269], [58271, 158290], [58272, 146814], [20473, 58273],
  12447. [58274, 136445], [34018, 58275], [33634, 58276], 0, [58278, 149927],
  12448. [58279, 144688], [58280, 137075], [58281, 146936], [33450, 58282],
  12449. [26907, 58283], [58284, 194964], [16859, 58285], [34123, 58286],
  12450. [33488, 58287], [33562, 58288], [58289, 134678], [58290, 137140],
  12451. [14017, 58291], [58292, 143741], [58293, 144730], [33403, 58294],
  12452. [33506, 58295], [33560, 58296], [58297, 147083], [58298, 159139],
  12453. [58299, 158469], [58300, 158615], [58301, 144846], [15807, 58302],
  12454. [33565, 58303], [21996, 58304], [33669, 58305], [17675, 58306],
  12455. [58307, 159141], [33708, 58308], 0, [33747, 58310], [58312, 159444],
  12456. [27223, 58313], [34138, 58314], [13462, 58315], [58316, 159298],
  12457. [33880, 58318], [58319, 154596], [33905, 58320], [15827, 58321],
  12458. [17636, 58322], [27303, 58323], [33866, 58324], [31064, 58326], 0,
  12459. [58328, 158614], [58329, 159351], [58330, 159299], [34014, 58331], 0,
  12460. [33681, 58333], [17568, 58334], [33939, 58335], [34020, 58336],
  12461. [58337, 154769], [16960, 58338], [58339, 154816], [17731, 58340],
  12462. [34100, 58341], [23282, 58342], 0, [17703, 58344], [34163, 58345],
  12463. [17686, 58346], [26559, 58347], [34326, 58348], [58349, 165413],
  12464. [58350, 165435], [34241, 58351], [58352, 159880], [34306, 58353],
  12465. [58354, 136578], [58355, 159949], [58356, 194994], [17770, 58357],
  12466. [34344, 58358], [13896, 58359], [58360, 137378], [21495, 58361],
  12467. [58362, 160666], [34430, 58363], 0, [58365, 172280], [34798, 58366],
  12468. [58367, 142375], [34737, 58368], [34778, 58369], [34831, 58370, 60990],
  12469. [22113, 58371], [34412, 58372], [26710, 58373], [17935, 58374],
  12470. [34885, 58375], [34886, 58376], [58377, 161248], [58378, 146873],
  12471. [58379, 161252], [34910, 58380], [34972, 58381], [18011, 58382],
  12472. [34996, 58383], [34997, 58384], [35013, 58386], [58388, 161551],
  12473. [35207, 58389], {s: 3}, [35239, 58393], [35260, 58394], [58395, 166437],
  12474. [35303, 58396], [58397, 162084], [58398, 162493], [35484, 58399],
  12475. [30611, 58400], [37374, 58401], [35472, 58402], [58403, 162393],
  12476. [31465, 58404], [58405, 162618], [18195, 58407], [58408, 162616],
  12477. [29052, 58409], [35596, 58410], [35615, 58411], [58412, 152624],
  12478. [58413, 152933], [35647, 58414], 0, [35661, 58416], [35497, 58417],
  12479. [58418, 150138], [35728, 58419], [35739, 58420], [35503, 58421],
  12480. [58422, 136927], [17941, 58423], [34895, 58424], [35995, 58425],
  12481. [58426, 163156], [58427, 163215], [58428, 195028], [14117, 58429],
  12482. [58430, 163155], [36054, 58431], [58432, 163224], [58433, 163261],
  12483. [36114, 58434], [36099, 58435], [58436, 137488], [36059, 58437],
  12484. [28764, 58438], [36113, 58439], [16080, 58441], 0, [36265, 58443],
  12485. [58444, 163842], [58445, 135188], [58446, 149898], [15228, 58447],
  12486. [58448, 164284], [58449, 160012], [31463, 58450], [36525, 58451],
  12487. [36534, 58452], [36547, 58453], [37588, 58454], [36633, 58455],
  12488. [36653, 58456], [58457, 164709], [58458, 164882], [36773, 58459],
  12489. [37635, 58460], [58461, 172703], [58462, 133712], [36787, 58463], 0,
  12490. [58465, 166366], [58466, 165181], [58467, 146875], [24312, 58468],
  12491. [58469, 143970], [36857, 58470], 0, [58474, 140069], [14720, 58475],
  12492. [58476, 159447], [36919, 58477], [58478, 165180], [58479, 162494],
  12493. [36961, 58480], [58481, 165228], [58482, 165387], [37032, 58483],
  12494. [58484, 165651], [37060, 58485], [58486, 165606], [37038, 58487], 0,
  12495. [37223, 58489], [37289, 58491], [37316, 58492], [31916, 58493],
  12496. [58494, 166195], [58495, 138889], [37390, 58496], [27807, 58497],
  12497. [37441, 58498], [37474, 58499], [58500, 153017], [58502, 166598],
  12498. [58503, 146587], [58504, 166668], [58505, 153051], [58506, 134449],
  12499. [37676, 58507], [37739, 58508], [58509, 166625], [58510, 166891],
  12500. [23235, 58512], [58513, 166626], [58514, 166629], [18789, 58515],
  12501. [37444, 58516], [58517, 166892], [58518, 166969], [58519, 166911],
  12502. [37747, 58520], [37979, 58521], [36540, 58522], [38277, 58523],
  12503. [38310, 58524], [37926, 58525], [38304, 58526], [28662, 58527],
  12504. [17081, 58528], [58530, 165592], [58531, 135804], [58532, 146990],
  12505. [18911, 58533], [27676, 58534], [38523, 58535], [38550, 58536],
  12506. [16748, 58537], [38563, 58538], [58539, 159445], [25050, 58540], 58541,
  12507. [30965, 58542], [58543, 166624], [38589, 58544], [21452, 58545],
  12508. [18849, 58546], [58547, 158904], [58548, 131700], [58549, 156688],
  12509. [58550, 168111], [58551, 168165], [58552, 150225], [58553, 137493],
  12510. [58554, 144138], [38705, 58555], [34370, 58556], [38710, 58557],
  12511. [18959, 58558], [17725, 58559], [17797, 58560], [58561, 150249],
  12512. [28789, 58562], [23361, 58563], [38683, 58564], 0, [58566, 168405],
  12513. [38743, 58567], [23370, 58568], [58569, 168427], [38751, 58570],
  12514. [37925, 58571], [20688, 58572], [58573, 143543], [58574, 143548],
  12515. [38793, 58575], [38815, 58576], [38833, 58577], [38846, 58578],
  12516. [38848, 58579], [38866, 58580], [38880, 58581], [58582, 152684],
  12517. [38894, 58583], [29724, 58584], [58585, 169011], 0, [38901, 58587],
  12518. [58588, 168989], [58589, 162170], [19153, 58590], [38964, 58591],
  12519. [38963, 58592], [38987, 58593], [39014, 58594], [15118, 58595],
  12520. [58596, 160117], [15697, 58597], [58598, 132656], [58599, 147804],
  12521. [58600, 153350], [39114, 58601], [39095, 58602], [39112, 58603],
  12522. [39111, 58604], [19199, 58605], [58606, 159015], [58607, 136915],
  12523. [21936, 58608], [39137, 58609], [39142, 58610], [39148, 58611],
  12524. [37752, 58612], [39225, 58613], [58614, 150057], [19314, 58615],
  12525. [58616, 170071], [58617, 170245], [39413, 58618], [39436, 58619],
  12526. [39483, 58620], [39440, 58621], [39512, 58622], [58623, 153381],
  12527. [14020, 58624], [58625, 168113], [58626, 170965], [39648, 58627],
  12528. [39650, 58628], [58629, 170757], [39668, 58630], [19470, 58631],
  12529. [39700, 58632], [39725, 58633], [58634, 165376], [20532, 58635],
  12530. [39732, 58636], [14531, 58638], [58639, 143485], [39760, 58640],
  12531. [39744, 58641], [58642, 171326], [23109, 58643], [58644, 137315],
  12532. [39822, 58645], [39938, 58647], [39935, 58648], [39948, 58649],
  12533. [58650, 171624], [40404, 58651], [58652, 171959], [58653, 172434],
  12534. [58654, 172459], [58655, 172257], [58656, 172323], [58657, 172511],
  12535. [40318, 58658], [40323, 58659], [58660, 172340], [40462, 58661],
  12536. [40388, 58663], [58665, 172435], [58666, 172576], [58667, 137531],
  12537. [58668, 172595], [40249, 58669], [58670, 172217], [58671, 172724],
  12538. [40592, 58672], [40597, 58673], [40606, 58674], [40610, 58675],
  12539. [19764, 58676], [40618, 58677], [40623, 58678], [58679, 148324],
  12540. [40641, 58680], [15200, 58681], [14821, 58682], [15645, 58683],
  12541. [20274, 58684], [14270, 58685], [58686, 166955], [40706, 58687],
  12542. [40712, 58688], [19350, 58689], [37924, 58690], [58691, 159138],
  12543. [40727, 58692, 60836], 0, [40761, 58694], [22175, 58695], [22154, 58696],
  12544. [40773, 58697], [39352, 58698], [58699, 168075], [38898, 58700],
  12545. [33919, 58701], 0, [40809, 58703], [31452, 58704], [40846, 58705],
  12546. [29206, 58706], [19390, 58707], [58708, 149877], [58709, 149947],
  12547. [29047, 58710], [58711, 150008], [58712, 148296], [58713, 150097],
  12548. [29598, 58714], [58715, 166874], [58716, 137466], [31135, 58717],
  12549. [58718, 166270], [58719, 167478], [37737, 58720], [37875, 58721],
  12550. [58722, 166468], [37612, 58723], [37761, 58724], [37835, 58725],
  12551. [58726, 166252], [58727, 148665], [29207, 58728], [16107, 58729],
  12552. [30578, 58730], [31299, 58731], [28880, 58732], [58733, 148595],
  12553. [58734, 148472], [29054, 58735], [58736, 137199], [28835, 58737],
  12554. [58738, 137406], [58739, 144793], [16071, 58740], [58741, 137349],
  12555. [58742, 152623], [58743, 137208], [14114, 58744], [58745, 136955],
  12556. [58746, 137273], [14049, 58747], [58748, 137076], [58749, 137425],
  12557. [58750, 155467], [14115, 58751], [58752, 136896], [22363, 58753],
  12558. [58754, 150053], [58755, 136190], [58756, 135848], [58757, 136134],
  12559. [58758, 136374], [34051, 58759, 58761], [58760, 145062], 0, [33877, 58762],
  12560. [58763, 149908], [58764, 160101], [58765, 146993], [58766, 152924],
  12561. [58767, 147195], [58768, 159826], [17652, 58769], [58770, 145134],
  12562. [58771, 170397], [58772, 159526], [26617, 58773], [14131, 58774],
  12563. [15381, 58775], [15847, 58776], [22636, 58777], [58778, 137506],
  12564. [26640, 58779], [16471, 58780], [58781, 145215], [58782, 147681],
  12565. [58783, 147595], [58784, 147727], [58785, 158753], [21707, 58786],
  12566. [22174, 58787], [58788, 157361], [22162, 58789], [58790, 135135],
  12567. [58791, 134056], [58792, 134669], 0, [58794, 166675], [37788, 58795],
  12568. [20216, 58796], [20779, 58797], [14361, 58798], [58799, 148534],
  12569. [20156, 58800], [58801, 132197], 0, [20299, 58803], [20362, 58804],
  12570. [58805, 153169], [23144, 58806], [58807, 131499], [58808, 132043],
  12571. [14745, 58809], [58810, 131850], [58811, 132116], [13365, 58812],
  12572. [20265, 58813], [58814, 131776], [58815, 167603], [58816, 131701],
  12573. [35546, 58817], [58818, 131596], [20120, 58819], [20685, 58820],
  12574. [20749, 58821], [20386, 58822], [20227, 58823], [58824, 150030],
  12575. [58825, 147082], [20290, 58826], [20526, 58827], [20588, 58828],
  12576. [20609, 58829], [20428, 58830], [20453, 58831], [20568, 58832],
  12577. [20732, 58833], [28278, 58838], [58839, 144789], [58840, 147001],
  12578. [58841, 147135], [28018, 58842], [58843, 137348], [58844, 147081],
  12579. [20904, 58845], [20931, 58846], [58847, 132576], [17629, 58848],
  12580. [58849, 132259], [58850, 132242], [58851, 132241], [36218, 58852],
  12581. [58853, 166556], [58854, 132878], [21081, 58855], [21156, 58856],
  12582. [58857, 133235], [21217, 58858], 0, [18042, 58860], [29068, 58861],
  12583. [58862, 148364], [58863, 134176], [58864, 149932], [58865, 135396],
  12584. [27089, 58866], [58867, 134685], 0, [16094, 58869], [29849, 58870],
  12585. [29716, 58871], [29782, 58872], [29592, 58873], [19342, 58874],
  12586. [58875, 150204], [58876, 147597], [21456, 58877], [13700, 58878],
  12587. [29199, 58879], [58880, 147657], [21940, 58881], [58882, 131909],
  12588. [21709, 58883], [58884, 134086], [22301, 58885], [37469, 58886],
  12589. [38644, 58887], [22493, 58889], [22413, 58890], [22399, 58891],
  12590. [13886, 58892], [22731, 58893], [23193, 58894], [58895, 166470],
  12591. [58896, 136954], [58897, 137071], [58898, 136976], [23084, 58899],
  12592. [22968, 58900], [23166, 58902], [23247, 58903], [23058, 58904],
  12593. [58905, 153926], [58906, 137715], [58907, 137313], [58908, 148117],
  12594. [14069, 58909], [27909, 58910], [29763, 58911], [23073, 58912],
  12595. [58913, 155267], [23169, 58914], [58915, 166871], [58916, 132115],
  12596. [37856, 58917], [29836, 58918], [58919, 135939], [28933, 58920],
  12597. [18802, 58921], [37896, 58922], [58923, 166395], [37821, 58924],
  12598. [14240, 58925], [23582, 58926], [23710, 58927], [24158, 58928],
  12599. [24136, 58929], [58930, 137622], [58931, 137596], [58932, 146158],
  12600. [24269, 58933], [23375, 58934], [58935, 137475], [58936, 137476],
  12601. [14081, 58937], [58938, 137376], [14045, 58939], [58940, 136958],
  12602. [14035, 58941], [33066, 58942], [58943, 166471], [58944, 138682],
  12603. [58945, 144498], [58946, 166312], [24332, 58947, 60916], [24334, 58948],
  12604. [58949, 137511], [58950, 137131], [23147, 58951], [58952, 137019],
  12605. [23364, 58953], [58955, 161277], [34912, 58956], [24702, 58957],
  12606. [58958, 141408], [58959, 140843], [24539, 58960], [16056, 58961],
  12607. [58962, 140719], [58963, 140734], [58964, 168072], [58965, 159603],
  12608. [25024, 58966], [58967, 131134], [58968, 131142], [58969, 140827],
  12609. [24985, 58970], [24984, 58971], [24693, 58972], [58973, 142491],
  12610. [58974, 142599], [58975, 149204], [58976, 168269], [25713, 58977],
  12611. [58978, 149093], [58979, 142186], [14889, 58980], [58981, 142114],
  12612. [58982, 144464], [58983, 170218], [58984, 142968], [25399, 58985],
  12613. [25782, 58987], [25393, 58988], [25553, 58989], [58990, 149987],
  12614. [58991, 142695], [25252, 58992], [58993, 142497], [25659, 58994],
  12615. [25963, 58995], [26994, 58996], [15348, 58997], [58998, 143502],
  12616. [58999, 144045], [59000, 149897], [59001, 144043], [21773, 59002],
  12617. [59003, 144096], [59004, 137433], [59005, 169023], [26318, 59006],
  12618. [59007, 144009], [59008, 143795], [15072, 59009], [59011, 152964],
  12619. [59012, 166690], [59013, 152975], [59014, 136956], [59015, 152923],
  12620. [59016, 152613], [30958, 59017], [59018, 143619], [59019, 137258],
  12621. [59020, 143924], [13412, 59021], [59022, 143887], [59023, 143746],
  12622. [59024, 148169], [26254, 59025], [59026, 159012], [26219, 59027],
  12623. [19347, 59028], [26160, 59029], [59030, 161904], [59031, 138731],
  12624. [26211, 59032], [59033, 144082], [59034, 144097], [26142, 59035],
  12625. [59036, 153714], [14545, 59037], [59038, 145466], [59039, 145340],
  12626. [15257, 59040], [59041, 145314], [59042, 144382], [29904, 59043],
  12627. [15254, 59044], [59046, 149034], [26806, 59047], 0, [15300, 59049],
  12628. [27326, 59050], [59052, 145365], [59053, 148615], [27187, 59054],
  12629. [27218, 59055], [27337, 59056], [27397, 59057], [59058, 137490],
  12630. [25873, 59059], [26776, 59060], [27212, 59061], [15319, 59062],
  12631. [27258, 59063], [27479, 59064], [59065, 147392], [59066, 146586],
  12632. [37792, 59067], [37618, 59068], [59069, 166890], [59070, 166603],
  12633. [37513, 59071], [59072, 163870], [59073, 166364], [37991, 59074],
  12634. [28069, 59075], [28427, 59076], 0, [59079, 147327], [15759, 59080],
  12635. [28164, 59081], [59082, 147516], [23101, 59083], [28170, 59084],
  12636. [22599, 59085], [27940, 59086], [30786, 59087], [28987, 59088],
  12637. [59089, 148250], [59090, 148086], [28913, 59091], [29264, 59092, 61085],
  12638. [29319, 59093], [29332, 59094], [59095, 149391], [59096, 149285],
  12639. [20857, 59097], [59098, 150180], [59099, 132587], [29818, 59100],
  12640. [59101, 147192], [59102, 144991], [59103, 150090], [59104, 149783],
  12641. [59105, 155617], [16134, 59106], [16049, 59107], [59108, 150239],
  12642. [59109, 166947], [59110, 147253], [24743, 59111], [16115, 59112],
  12643. [29900, 59113], [29756, 59114], [37767, 59115], [29751, 59116],
  12644. [17567, 59117], [59118, 159210], [17745, 59119], [30083, 59120],
  12645. [16227, 59121], [59122, 150745], [59123, 150790], [16216, 59124],
  12646. [30037, 59125], [30323, 59126], [59127, 173510], 0, [29800, 59129, 61070],
  12647. [59130, 166604], [59131, 149931], [59132, 149902], [15099, 59133],
  12648. [15821, 59134], [59135, 150094], [16127, 59136], [59137, 149957],
  12649. [59138, 149747], [37370, 59139], [22322, 59140], [37698, 59141],
  12650. [59142, 166627], [59143, 137316], [20703, 59144], [59145, 152097],
  12651. [59146, 152039], [30584, 59147], [59148, 143922], [30478, 59149],
  12652. [30479, 59150], [30587, 59151], [59152, 149143], [59153, 145281],
  12653. [14942, 59154], [59155, 149744], [29752, 59156], [29851, 59157],
  12654. [16063, 59158], [59159, 150202], [59160, 150215], [16584, 59161],
  12655. [59162, 150166], [59163, 156078], [37639, 59164], [59165, 152961],
  12656. [30750, 59166], [30861, 59167], [30856, 59168], [30930, 59169],
  12657. [29648, 59170], [31065, 59171], [59172, 161601], [59173, 153315],
  12658. [16654, 59174], 0, 0, [31141, 59177], [27181, 59178], [59179, 147194],
  12659. [31290, 59180], [31220, 59181], [16750, 59182], [59183, 136934],
  12660. [16690, 59184], [37429, 59185], [31217, 59186], [59187, 134476],
  12661. [59188, 149900], [59189, 131737], [59190, 146874], [59191, 137070],
  12662. [13719, 59192], [21867, 59193], [13680, 59194], [13994, 59195],
  12663. [59196, 131540], [59197, 134157], [31458, 59198], [23129, 59199],
  12664. [59200, 141045], [59201, 154287], [59202, 154268], [23053, 59203],
  12665. [59204, 131675], [30960, 59205], [23082, 59206], [59207, 154566],
  12666. [31486, 59208], [16889, 59209], [31837, 59210], [31853, 59211],
  12667. [16913, 59212], [59213, 154547], [59214, 155324], [59215, 155302],
  12668. [31949, 59216], [59217, 150009], [59218, 137136], [31886, 59219],
  12669. [31868, 59220], [31918, 59221], [27314, 59222], [32220, 59223],
  12670. [32263, 59224], [32211, 59225], [32590, 59226], [59227, 156257],
  12671. [59228, 155996], [59229, 162632], [32151, 59230], [59231, 155266],
  12672. [17002, 59232], [59233, 158581], [59234, 133398], [26582, 59235],
  12673. [59236, 131150], [59237, 144847], [22468, 59238], [59239, 156690],
  12674. [59240, 156664], [32733, 59242], [31527, 59243], [59244, 133164],
  12675. [59245, 154345], [59246, 154947], [31500, 59247], [59248, 155150],
  12676. [39398, 59249], [34373, 59250], [39523, 59251], [27164, 59252],
  12677. [59253, 144447], [59255, 150007], [59256, 157101], [39455, 59257],
  12678. [59258, 157088], 0, [59260, 160039], [59261, 158929], [17642, 59262],
  12679. [33079, 59263], [17410, 59264], [32966, 59265], [33033, 59266],
  12680. [33090, 59267], [59268, 157620], [39107, 59269], [59270, 158274],
  12681. [33378, 59271], [33381, 59272], [59273, 158289], [33875, 59274],
  12682. [59275, 159143], [34320, 59276], [59277, 160283], [23174, 59278],
  12683. [16767, 59279], [59280, 137280], [23339, 59281], [59282, 137377],
  12684. [23268, 59283], [59284, 137432], [34464, 59285], [59286, 195004],
  12685. [59287, 146831], [34861, 59288], [59289, 160802], [23042, 59290],
  12686. [34926, 59291], [20293, 59292], [34951, 59293], [35007, 59294],
  12687. [35046, 59295], [35173, 59296], [35149, 59297], [59298, 153219],
  12688. [35156, 59299], [59300, 161669], [59301, 161668], [59302, 166901],
  12689. [59303, 166873], [59304, 166812], [59305, 166393], [16045, 59306],
  12690. [33955, 59307], [18165, 59308], [18127, 59309], [14322, 59310],
  12691. [35389, 59311], [35356, 59312], [59313, 169032], [24397, 59314],
  12692. [37419, 59315], [59316, 148100], [26068, 59317], [28969, 59318],
  12693. [28868, 59319], [59320, 137285], [40301, 59321], [35999, 59322],
  12694. [36073, 59323], [59324, 163292], [22938, 59325], [30659, 59326],
  12695. [23024, 59327], [14036, 59329], [36394, 59330], [36519, 59331],
  12696. [59332, 150537], [36656, 59333], [36682, 59334], [17140, 59335],
  12697. [27736, 59336], [28603, 59337], [59338, 140065], [18587, 59339],
  12698. [28537, 59340], [28299, 59341], [59342, 137178], [39913, 59343],
  12699. [14005, 59344], [59345, 149807], [37051, 59346], 0, [21873, 59348],
  12700. [18694, 59349], [37307, 59350], [37892, 59351], [59352, 166475],
  12701. [16482, 59353], [59354, 166652], [37927, 59355], [59356, 166941],
  12702. [59357, 166971], [34021, 59358], [35371, 59359], [38297, 59360],
  12703. [38311, 59361], [38295, 59362], [38294, 59363], [59364, 167220],
  12704. [29765, 59365], [16066, 59366], [59367, 149759], [59368, 150082],
  12705. [59369, 148458], [16103, 59370], [59371, 143909], [38543, 59372],
  12706. [59373, 167655], [59374, 167526], [59375, 167525], [16076, 59376],
  12707. [59377, 149997], [59378, 150136], [59379, 147438], [29714, 59380],
  12708. [29803, 59381], [16124, 59382], [38721, 59383], [59384, 168112],
  12709. [26695, 59385], [18973, 59386], [59387, 168083], [59388, 153567], 0,
  12710. [37736, 59390], [59391, 166281], [59392, 166950], [59393, 166703],
  12711. [59394, 156606], [37562, 59395], [23313, 59396], [35689, 59397],
  12712. [18748, 59398], [29689, 59399], [59400, 147995], [38811, 59401], 0,
  12713. [39224, 59403], [59404, 134950], [24001, 59405], [59406, 166853],
  12714. [59407, 150194], [38943, 59408], [59409, 169178], [37622, 59410],
  12715. [59411, 169431], [37349, 59412], [17600, 59413], [59414, 166736],
  12716. [59415, 150119], [59416, 166756], [39132, 59417], [59418, 166469],
  12717. [16128, 59419], [37418, 59420], [18725, 59421], [33812, 59422],
  12718. [39227, 59423], [39245, 59424], [59425, 162566], [15869, 59426], 0,
  12719. [19311, 59428], [39338, 59429], [39516, 59430], [59431, 166757],
  12720. [59432, 153800], [27279, 59433], [39457, 59434], [23294, 59435],
  12721. [39471, 59436], [59437, 170225], [19344, 59438], [59439, 170312],
  12722. [39356, 59440], [19389, 59441], [19351, 59442], [37757, 59443],
  12723. [22642, 59444], [59445, 135938], [22562, 59446], [59447, 149944],
  12724. [59448, 136424], [30788, 59449], [59450, 141087], [59451, 146872],
  12725. [26821, 59452], [15741, 59453], [37976, 59454], [14631, 59455],
  12726. [24912, 59456], [59457, 141185], [59458, 141675], [24839, 59459],
  12727. [40015, 59460], [40019, 59461], [40059, 59462], [39989, 59463],
  12728. [39952, 59464], [39807, 59465], [39887, 59466], [59467, 171565],
  12729. [39839, 59468], [59469, 172533], [59470, 172286], [40225, 59471],
  12730. [19630, 59472], [59473, 147716], [40472, 59474], [19632, 59475],
  12731. [40204, 59476], [59477, 172468], [59478, 172269], [59479, 172275],
  12732. [59480, 170287], [40357, 59481], [33981, 59482], [59483, 159250],
  12733. [59484, 159711], [59485, 158594], [34300, 59486], [17715, 59487],
  12734. [59488, 159140], [59489, 159364], [59490, 159216], [33824, 59491],
  12735. [34286, 59492], [59493, 159232], [59494, 145367], [59495, 155748],
  12736. [31202, 59496], [59497, 144796], [59498, 144960], [59500, 149982],
  12737. [15714, 59501], [37851, 59502], [37566, 59503], [37704, 59504],
  12738. [59505, 131775], [30905, 59506], [37495, 59507], [37965, 59508],
  12739. [20452, 59509], [13376, 59510], [36964, 59511], [59512, 152925],
  12740. [30781, 59513], [30804, 59514], [30902, 59515], [30795, 59516],
  12741. [59517, 137047], [59518, 143817], [59519, 149825], [13978, 59520],
  12742. [20338, 59521], [28634, 59522], [28633, 59523], 0, [28702, 59524, 59525],
  12743. [21524, 59526], [59527, 147893], [22459, 59528], [22771, 59529],
  12744. [22410, 59530], [40214, 59531], [22487, 59532], [28980, 59533],
  12745. [13487, 59534], [59535, 147884], [29163, 59536], [59537, 158784],
  12746. [59538, 151447], 0, [59540, 137141], [59541, 166473], [24844, 59542],
  12747. [23246, 59543], [23051, 59544], [17084, 59545], [59546, 148616],
  12748. [14124, 59547], [19323, 59548], [59549, 166396], [37819, 59550],
  12749. [37816, 59551], [59552, 137430], [59553, 134941], [33906, 59554],
  12750. [59555, 158912], [59556, 136211], [59557, 148218], [59558, 142374],
  12751. [59559, 148417], [22932, 59560], [59561, 146871], [59562, 157505],
  12752. [32168, 59563], [59564, 155995], [59565, 155812], [59566, 149945],
  12753. [59567, 149899], [59568, 166394], [37605, 59569], [29666, 59570],
  12754. [16105, 59571], [29876, 59572], [59573, 166755], [59574, 137375],
  12755. [16097, 59575], [59576, 150195], [27352, 59577], [29683, 59578],
  12756. [29691, 59579], [16086, 59580], [59581, 150078], [59582, 150164],
  12757. [59583, 137177], [59584, 150118], [59585, 132007], [59586, 136228],
  12758. [59587, 149989], [29768, 59588], [59589, 149782], [28837, 59590],
  12759. [59591, 149878], [37508, 59592], [29670, 59593], [37727, 59594],
  12760. [59595, 132350], [37681, 59596], [59597, 166606], [59598, 166422],
  12761. [37766, 59599], [59600, 166887], [59601, 153045], [18741, 59602],
  12762. [59603, 166530], [29035, 59604], [59605, 149827], [59606, 134399],
  12763. [22180, 59607], [59608, 132634], [59609, 134123], [59610, 134328],
  12764. [21762, 59611], [31172, 59612], [59613, 137210], [32254, 59614],
  12765. [59615, 136898], [59616, 150096], [59617, 137298], [17710, 59618],
  12766. [37889, 59619], [14090, 59620], [59621, 166592], [59622, 149933],
  12767. [22960, 59623], [59624, 137407], [59625, 137347], [59626, 160900],
  12768. [23201, 59627], [14050, 59628], [59629, 146779], [14000, 59630],
  12769. [37471, 59631], [23161, 59632], [59633, 166529], [59634, 137314],
  12770. [37748, 59635], [15565, 59636], [59637, 133812], [19094, 59638],
  12771. [14730, 59639], [20724, 59640], [15721, 59641], [15692, 59642],
  12772. [59643, 136092], [29045, 59644], [17147, 59645], [59646, 164376],
  12773. [28175, 59647], [59648, 168164], [17643, 59649], [27991, 59650],
  12774. [59651, 163407], [28775, 59652], [27823, 59653], [15574, 59654],
  12775. [59655, 147437], [59656, 146989], [28162, 59657], [28428, 59658],
  12776. [15727, 59659], [59660, 132085], [30033, 59661], [14012, 59662],
  12777. [13512, 59663], [18048, 59664], [16090, 59665], [18545, 59666],
  12778. [22980, 59667], [37486, 59668], [18750, 59669], [36673, 59670],
  12779. [59671, 166940], [59672, 158656], [22546, 59673], [22472, 59674],
  12780. [14038, 59675], [59676, 136274], [28926, 59677], [59678, 148322],
  12781. [59679, 150129], [59680, 143331], [59681, 135856], [59682, 140221],
  12782. [26809, 59683], [26983, 59684], [59685, 136088], [59686, 144613],
  12783. [59687, 162804], [59688, 145119], [59689, 166531], [59690, 145366],
  12784. [59691, 144378], [59692, 150687], [27162, 59693], [59694, 145069],
  12785. [59695, 158903], [33854, 59696], [17631, 59697], [17614, 59698],
  12786. [59699, 159014], [59700, 159057], [59701, 158850], [59702, 159710], 0, 0,
  12787. [33597, 59705], [59706, 137018], [33773, 59707], [59708, 158848],
  12788. [59709, 159827], [59710, 137179], [22921, 59711], [23170, 59712],
  12789. [59713, 137139], [23137, 59714], [23153, 59715], [59716, 137477],
  12790. [59717, 147964], [14125, 59718], [23023, 59719], [59720, 137020],
  12791. [14023, 59721], [29070, 59722], [37776, 59723], [26266, 59724],
  12792. [59725, 148133], [23150, 59726], [23083, 59727], [59728, 148115],
  12793. [27179, 59729], [59730, 147193], [59731, 161590], [59732, 148571],
  12794. [59733, 148170], [28957, 59734], [59735, 148057], [59736, 166369],
  12795. [20400, 59737], [59738, 159016], [23746, 59739], [59740, 148686],
  12796. [59741, 163405], [59742, 148413], [27148, 59743], [59744, 148054],
  12797. [59745, 135940], 0, [28979, 59747], [59748, 148457], [15781, 59749],
  12798. [27871, 59750], [59751, 194597], [23019, 59754], [24412, 59757],
  12799. [59764, 144128], [31955, 59776], [59783, 162548], [59786, 153334],
  12800. [59790, 162584], [36972, 59791], [33270, 59795], [30476, 59797],
  12801. [27810, 59799], [22269, 59800], [22633, 59828], [26465, 59832],
  12802. [23646, 59838], [22770, 59841], [28857, 59843], [26627, 59853],
  12803. [36795, 59859], [36796, 59861], [20001, 59871], [31545, 59898],
  12804. [15820, 59902], [29482, 57990, 59909], [30048, 59912], [22586, 59920],
  12805. [33446, 59932], [27018, 59940], [24803, 59944], [20206, 59984],
  12806. [39364, 60002], [40639, 60023], [21249, 60025], [26528, 60038],
  12807. [24808, 60046], [20916, 60053], [31363, 60064], [39994, 60075],
  12808. [31432, 60093], [26906, 60098], [22956, 60100], [22592, 60102],
  12809. [21610, 60114], [24807, 60123], [22138, 60125], [26965, 60132],
  12810. [39983, 60133], [34725, 60134], [23584, 60141], [24075, 60143],
  12811. [26398, 60147], [33965, 60157], [35713, 60161], [20088, 60166],
  12812. [25283, 60176], [26709, 60180], 0, [33533, 60190], [35237, 60194],
  12813. [36768, 60196], [38840, 60198], [38983, 60200], [39613, 60201],
  12814. [24497, 60218], [26184, 60219], [26303, 60220], [60221, 162425], 0,
  12815. [60225, 149946], 0, 0, [60230, 131910], [26382, 60232], [26904, 60233],
  12816. [60235, 161367], [60236, 155618], [60239, 161278], [60240, 139418],
  12817. [18640, 60241], [19128, 60242], [60244, 166554], [60247, 147515],
  12818. [60250, 150085], [60251, 132554], [20946, 60252], [60253, 132625],
  12819. [22943, 60254], [60255, 138920], [15294, 60256], [60257, 146687],
  12820. [14747, 60262], [60264, 165352], [60265, 170441], [14178, 60266],
  12821. [60267, 139715], [35678, 60268], [60269, 166734], 0, [29193, 60274],
  12822. [60276, 134264], [60280, 132985], [36570, 60281], [21135, 60283],
  12823. [29041, 60285], [60288, 147274], [60289, 150183], [21948, 60290],
  12824. [60293, 158546], [13427, 60295], [60297, 161330], [18200, 60299],
  12825. [60303, 149823], [20582, 60305], [13563, 60306], [60307, 144332], 0,
  12826. [18300, 60310], [60311, 166216], [60315, 138640], 0, [60320, 162834],
  12827. [36950, 60321], [60323, 151450], [35682, 60324], [23899, 60327],
  12828. [60328, 158711], 0, [60331, 137500], [35562, 60332], [60333, 150006],
  12829. [60335, 147439], [19392, 60337], [60340, 141083], [37989, 60341],
  12830. [60342, 153569], [24981, 60343], [23079, 60344], [60345, 194765], 0,
  12831. [60348, 148769], [20074, 60350], [60351, 149812], [38486, 60352],
  12832. [28047, 60353], [60354, 158909], [35191, 60356], [60359, 156689], 0,
  12833. [31554, 60363], [60364, 168128], [60365, 133649], 0, [31301, 60369],
  12834. [39462, 60372], [13919, 60374], [60375, 156777], [60376, 131105],
  12835. [31107, 60377], [23852, 60380], [60381, 144665], 0, [18128, 60384],
  12836. [30011, 60386], [34917, 60387], [22710, 60389], [14108, 60390],
  12837. [60391, 140685], [15444, 60394], [37505, 60397], [60398, 139642],
  12838. [37680, 60400], [60402, 149968], [27705, 60403], [60406, 134904],
  12839. [34855, 60407], [35061, 60408], [60409, 141606], [60410, 164979],
  12840. [60411, 137137], [28344, 60412], [60413, 150058], [60414, 137248],
  12841. [14756, 60415], 0, 0, [17727, 60419], [26294, 60420], [60421, 171181],
  12842. [60422, 170148], [35139, 60423], [16607, 60427], [60428, 136714],
  12843. [14753, 60429], [60430, 145199], [60431, 164072], [60432, 136133],
  12844. [29101, 60433], [33638, 60434], [60436, 168360], 0, [19639, 60438],
  12845. [60439, 159919], [60440, 166315], [60445, 147834], [31555, 60446],
  12846. [31102, 60447], [28597, 60449], [60450, 172767], [27139, 60451],
  12847. [60452, 164632], [21410, 60453], [60454, 159239], [37823, 60455],
  12848. [26678, 60456], [38749, 59389, 60457], [60458, 164207], [60460, 158133],
  12849. [60461, 136173], [60462, 143919], [23941, 60464], [60465, 166960],
  12850. [22293, 60467], [38947, 60468], [60469, 166217], [23979, 60470],
  12851. [60471, 149896], [26046, 60472], [27093, 60473], [21458, 60474],
  12852. [60475, 150181], [60476, 147329], [15377, 60477], [26422, 60478],
  12853. [60482, 139169], [13770, 60490], [18682, 60493], 0, [30728, 60496],
  12854. [37461, 60497], [17394, 60499], [17375, 60501], [23032, 60505], 0,
  12855. [22155, 60518], [60520, 169449], [36882, 60541], [21953, 60546],
  12856. [17673, 60551], [32383, 60552], [28502, 60553], [27313, 60554],
  12857. [13540, 60556], [60558, 161949], [14138, 60559], 0, [60562, 163876],
  12858. [60565, 162366], [15851, 60567], [60569, 146615], [60574, 156248],
  12859. [22207, 60575], [36366, 60577], [23405, 60578], [25566, 60581], 0,
  12860. [25904, 60585], [22061, 60586], [21530, 60588], [60591, 171416],
  12861. [19581, 60592], [22050, 60593], [22046, 60594], [32585, 60595],
  12862. [22901, 60597], [60598, 146752], [34672, 60599], [33047, 60604],
  12863. [40286, 60605], [36120, 60606], [30267, 60607], [40005, 60608],
  12864. [30286, 60609], [30649, 60610], [37701, 60611], [21554, 60612],
  12865. [33096, 60613], [33527, 60614], [22053, 60615], [33074, 60616],
  12866. [33816, 60617], [32957, 60618], [21994, 60619], [31074, 60620],
  12867. [22083, 60621], [21526, 60622], [60623, 134813], [13774, 60624],
  12868. [22021, 57509, 60625], [22001, 60626], [26353, 60627], [60628, 164578],
  12869. [13869, 60629], [30004, 60630], [22000, 60631], [21946, 60632],
  12870. [21655, 60633], [21874, 60634], [60635, 134209], [60636, 134294],
  12871. [24272, 57652, 60637], [60639, 134774], [60640, 142434], [60641, 134818],
  12872. [40619, 60642], [32090, 60643], 0, [60645, 135285], [25245, 60646],
  12873. [38765, 60647], [21652, 60648], [36045, 60649], [29174, 60650],
  12874. [37238, 60651], [25596, 60652], [25529, 60653], [25598, 60654],
  12875. [21865, 60655], [60656, 142147], [40050, 60657], [60658, 143027],
  12876. [20890, 60659], [13535, 60660], [60661, 134567], [20903, 60662],
  12877. [21581, 60663], [21790, 60664], [21779, 60665], [30310, 60666],
  12878. [36397, 60667], [60668, 157834], [30129, 60669], [32950, 60670],
  12879. [34820, 60671], 0, [35015, 60673], [33206, 60674], [33820, 60675],
  12880. [17644, 60677], [29444, 60678], [33547, 60681], [22139, 60683],
  12881. [37232, 60690], [37384, 60692], [60696, 134905], [29286, 60697],
  12882. [18254, 60699], [60701, 163833], [16634, 60703], [40029, 60704],
  12883. [25887, 60705], [18675, 60707], [60708, 149472], [60709, 171388], 0,
  12884. [60713, 161187], 60715, [60716, 155720], [29091, 60718], [32398, 60719],
  12885. [40272, 60720], [13687, 60723], [27826, 60725], [21351, 60726],
  12886. [14812, 60728], [60731, 149016], [33325, 60734], [21579, 60735], 60739,
  12887. [14930, 60740], [29556, 60742], [60743, 171692], [19721, 60744],
  12888. [39917, 60745], 0, [19547, 60748], [60751, 171998], [33884, 60752],
  12889. [60754, 160434], [25390, 60757], [32037, 60758], [14890, 60761],
  12890. [36872, 60762], [21196, 60763], [15988, 60764], [13946, 60765],
  12891. [17897, 60766], [60767, 132238], [30272, 60768], [23280, 60769],
  12892. [60770, 134838], [30842, 60771], [18358, 60772], [22695, 60773],
  12893. [16575, 60774], [22140, 60775], [39819, 60776], [23924, 60777],
  12894. [30292, 60778], [60779, 173108], [40581, 60780], [19681, 60781], 0,
  12895. [14331, 60783], [24857, 60784], [60786, 148466], 60787, [22109, 60788],
  12896. [60792, 171526], [21044, 60793], [13741, 60795], 0, [40316, 60797],
  12897. [31830, 60798], [39737, 60799], [22494, 60800], [23635, 60802],
  12898. [25811, 60803], [60804, 169168], [60805, 156469], [34477, 60807],
  12899. [60808, 134440], [60811, 134513], 60812, [20990, 60813], [60814, 139023],
  12900. [23950, 60815], [38659, 60816], [60817, 138705], [40577, 60818],
  12901. [36940, 60819], [31519, 60820], [39682, 60821], [23761, 60822],
  12902. [31651, 60823], [25192, 60824], [25397, 60825], [39679, 60826],
  12903. [31695, 60827], [39722, 60828], [31870, 60829], 0, [31810, 60831],
  12904. [31878, 60832], [39957, 60833], [31740, 60834], [39689, 60835], 0, 39982,
  12905. [40794, 60839], [21875, 60840], [23491, 60841], [20477, 60842],
  12906. [40600, 60843], [20466, 60844], [21088, 60845], [21201, 60847],
  12907. [22375, 60848], [20566, 60849], [22967, 60850], [24082, 60851],
  12908. [38856, 60852], [40363, 60853], [36700, 60854], [21609, 60855],
  12909. [38836, 60856], [39232, 60857], [38842, 60858], [21292, 60859],
  12910. [24880, 60860], [26924, 60861], [21466, 60862], [39946, 60863],
  12911. [40194, 60864], [19515, 60865], [38465, 60866], [27008, 60867],
  12912. [20646, 60868], [30022, 60869], [60870, 137069], [39386, 60871],
  12913. [21107, 60872], 60873, [37209, 60874], [38529, 60875], [37212, 60876],
  12914. 60877, [37201, 60878], [60879, 167575], [25471, 60880], [27338, 60882],
  12915. [22033, 60883], [37262, 60884], [30074, 60885], [25221, 60886],
  12916. [29519, 60888], [31856, 60889], [60890, 154657], 60892, [30422, 60894],
  12917. [39837, 60895], [20010, 60896], [60897, 134356], [33726, 60898],
  12918. [34882, 60899], 60900, [23626, 60901], [27072, 60902], 0, 0,
  12919. [21023, 60905], [24053, 60906], [20174, 60907], [27697, 60908],
  12920. [60909, 131570], [20281, 60910], [21660, 60911], 0, [21146, 60913],
  12921. [36226, 60914], [13822, 60915], 0, [13811, 60917], 60918, [27474, 60919],
  12922. [37244, 60920], [40869, 60921], [39831, 60922], [38958, 60923],
  12923. [39092, 60924], [39610, 60925], [40616, 60926], [40580, 60927],
  12924. [31508, 60929], 60930, [27642, 60931], [34840, 60932], [32632, 60933],
  12925. 60934, [22048, 60935], [60936, 173642], [36471, 60937], [40787, 60938],
  12926. 60939, [36308, 60940], [36431, 60941], [40476, 60942], [36353, 60943],
  12927. [25218, 60944], [60945, 164733], [36392, 60946], [36469, 60947],
  12928. [31443, 60948], [31294, 60950], [30936, 60951], [27882, 60952],
  12929. [35431, 60953], [30215, 60954], [40742, 60956], [27854, 60957],
  12930. [34774, 60958], [30147, 60959], [60960, 172722], [30803, 60961],
  12931. [36108, 60963], [29410, 60964], [29553, 60965], [35629, 60966],
  12932. [29442, 60967], [29937, 60968], [36075, 60969], [60970, 150203],
  12933. [34351, 60971], [24506, 60972], [34976, 60973], [17591, 60974], 60975,
  12934. [60977, 159237], 60978, [35454, 60979], [60980, 140571], 60981,
  12935. [24829, 60982], [30311, 60983], [39639, 60984], [40260, 60985],
  12936. [37742, 58859, 60986], [39823, 60987], [34805, 60988], 60989, 0,
  12937. [36087, 60991], [29484, 60992], [38689, 60993], [39856, 60994],
  12938. [13782, 60995], [29362, 60996], [19463, 60997], [31825, 60998],
  12939. [39242, 60999], [24921, 61001], [19460, 61002], [40598, 61003],
  12940. [24957, 61004], 61005, [22367, 61006], [24943, 61007], [25254, 61008],
  12941. [25145, 61009], 0, [14940, 61011], [25058, 61012], [21418, 61013],
  12942. [25444, 61015], [26626, 61016], [13778, 61017], [23895, 61018],
  12943. [36826, 61020], [61021, 167481], 61022, [20697, 61023], [30982, 61025],
  12944. [21298, 61026], [38456, 61027], [61028, 134971], [16485, 61029], 61030,
  12945. [30718, 61031], 61032, [31938, 61033], [61034, 155418], [31962, 61035],
  12946. [31277, 61036], [32870, 61037], [32867, 61038], [32077, 61039],
  12947. [29957, 61040], [29938, 61041], [35220, 61042], [33306, 61043],
  12948. [26380, 61044], [32866, 61045], [61046, 160902], [32859, 61047],
  12949. [29936, 61048], [33027, 61049], [30500, 61050], [35209, 61051],
  12950. [61052, 157644], [30035, 61053], [34729, 61055], [34766, 61056],
  12951. [33224, 61057], [34700, 61058], [35401, 61059], [36013, 61060],
  12952. [35651, 61061], [30507, 61062], [29944, 61063], [34010, 61064],
  12953. [27058, 61066], [36262, 61067], 61068, [35241, 58392, 61069], 0,
  12954. [28089, 61071], [34753, 61072], [61073, 147473], [29927, 61074],
  12955. [15835, 61075], [29046, 61076], [24740, 57702, 61077], [24988, 61078],
  12956. [15569, 61079], 0, [24695, 61081], 61082, [32625, 61083], 0,
  12957. [24809, 61086], [19326, 61087], [57344, 132423], [37595, 57345],
  12958. [57346, 132575], [57347, 147397], [34124, 57348], [17077, 57349],
  12959. [29679, 57350], [20917, 57351], [13897, 57352], [57353, 149826],
  12960. [57354, 166372], [37700, 57355], [57356, 137691], [33518, 57357],
  12961. [57358, 146632], [30780, 57359], [26436, 57360], [25311, 57361],
  12962. [57362, 149811], [57363, 166314], [57364, 131744], [57365, 158643],
  12963. [57366, 135941], [20395, 57367], [57368, 140525], [20488, 57369],
  12964. [57370, 159017], [57371, 162436], [57372, 144896], [57373, 150193],
  12965. [57374, 140563], 0, [57376, 131966], [24484, 57377], [57378, 131968],
  12966. [57379, 131911], [28379, 57380], [57381, 132127], 20702, [20737, 57383],
  12967. [13434, 57384], [20750, 57385], [39020, 57386], [14147, 57387],
  12968. [33814, 57388], [57389, 149924], [57390, 132231], [20832, 57391],
  12969. [57392, 144308], [20842, 57393], [57394, 134143], [57395, 139516],
  12970. [57396, 131813], [57397, 140592], [57398, 132494], [57399, 143923],
  12971. [57400, 137603], [23426, 57401], [34685, 57402], [57403, 132531],
  12972. [57404, 146585], [20914, 57405], [20920, 57406], [40244, 57407],
  12973. [20937, 57408], [20943, 57409], [20945, 57410], [15580, 57411],
  12974. [20947, 57412], [57413, 150182], [20915, 57414], 0, 0, [20973, 57417],
  12975. [33741, 57418], [26942, 57419], [57420, 145197], [24443, 57421],
  12976. [21003, 57422], [21030, 57423], [21052, 57424], [21173, 57425],
  12977. [21079, 57426], [21140, 57427], [21177, 57428], [21189, 57429],
  12978. [31765, 57430], [34114, 57431], [21216, 57432], [34317, 57433],
  12979. [57434, 158483], 0, [57436, 166622], [21833, 57437], [28377, 57438],
  12980. [57439, 147328], [57440, 133460], [57441, 147436], [21299, 57442], 0,
  12981. [57444, 134114], [27851, 57445], [57446, 136998], [26651, 57447],
  12982. [29653, 57448], [24650, 57449], [16042, 57450], [14540, 57451],
  12983. [57452, 136936], [29149, 57453], [17570, 57454], [21357, 57455],
  12984. [21364, 57456], [57457, 165547], [21374, 57458], 0, [57460, 136598],
  12985. [57461, 136723], [30694, 57462], [21395, 57463], [57464, 166555],
  12986. [21408, 57465], [21419, 57466], [21422, 57467], [29607, 57468],
  12987. [57469, 153458], [16217, 57470], [29596, 57471], [21441, 57472],
  12988. [21445, 57473], [27721, 57474], [20041, 57475], [22526, 57476],
  12989. [21465, 57477], [15019, 57478], [57479, 134031], [21472, 57480],
  12990. [57481, 147435], [57482, 142755], [21494, 57483], [57484, 134263],
  12991. [21523, 57485], [28793, 57486], [21803, 57487], [26199, 57488],
  12992. [27995, 57489], [21613, 57490], [57491, 158547], [57492, 134516],
  12993. [21853, 57493], [21647, 57494], [21668, 57495], [18342, 57496],
  12994. [57497, 136973], [57498, 134877], [15796, 57499], [57500, 134477],
  12995. [57501, 166332], [57502, 140952], [21831, 57503], [19693, 57504],
  12996. [21551, 57505], [29719, 57506], [21894, 57507], [21929, 57508], 0,
  12997. [57510, 137431], [57511, 147514], [17746, 57512], [57513, 148533],
  12998. [26291, 57514], [57515, 135348], [22071, 57516], [26317, 57517],
  12999. [57518, 144010], [26276, 57519], 0, [22093, 57521], [22095, 57522],
  13000. [30961, 57523], [22257, 57524], [38791, 57525], [21502, 57526],
  13001. [22272, 57527], [22255, 57528], [22253, 57529], [57530, 166758],
  13002. [13859, 57531], [57532, 135759], [22342, 57533], [57534, 147877],
  13003. [27758, 57535], [28811, 57536], [22338, 57537], [14001, 57538],
  13004. [57539, 158846], [22502, 57540], [57541, 136214], [22531, 57542],
  13005. [57543, 136276], [57544, 148323], [22566, 57545], [57546, 150517], 0,
  13006. [22698, 57548], [13665, 57549], [22752, 57550], [22748, 57551],
  13007. [57552, 135740], [22779, 57553], [23551, 57554], [22339, 57555],
  13008. [57556, 172368], [57557, 148088], [37843, 57558], [13729, 57559],
  13009. [22815, 57560], [26790, 57561], [14019, 57562], [28249, 57563],
  13010. [57564, 136766], [23076, 57565], 0, [57567, 136850], [34053, 57568],
  13011. [22985, 57569], [57570, 134478], [57571, 158849], [57572, 159018],
  13012. [57573, 137180], [23001, 57574], [57575, 137211], [57576, 137138],
  13013. [57577, 159142], [28017, 57578], [57579, 137256], [57580, 136917],
  13014. [23033, 57581], [57582, 159301], [23211, 57583], [23139, 57584],
  13015. [14054, 57585], [57586, 149929], 0, [14088, 57588], [23190, 57589],
  13016. [29797, 57590], [23251, 57591], [57592, 159649], [57593, 140628],
  13017. [57595, 137489], [14130, 57596], [57597, 136888], [24195, 57598],
  13018. [21200, 57599], [23414, 57600], [25992, 57601], [23420, 57602],
  13019. [57603, 162318], [16388, 57604], [18525, 57605], [57606, 131588],
  13020. [23509, 57607], [57609, 137780], [57610, 154060], [57611, 132517],
  13021. [23539, 57612], [23453, 57613], [19728, 57614], [23557, 57615],
  13022. [57616, 138052], [23571, 57617], [29646, 57618], [23572, 57619],
  13023. [57620, 138405], [57621, 158504], [23625, 57622], [18653, 57623],
  13024. [23685, 57624], [23785, 57625], [23791, 57626], [23947, 57627],
  13025. [57628, 138745], [57629, 138807], [23824, 57630], [23832, 57631],
  13026. [23878, 57632], [57633, 138916], [23738, 57634], [24023, 57635],
  13027. [33532, 57636], [14381, 57637], [57638, 149761], [57639, 139337],
  13028. [57640, 139635], [33415, 57641], [14390, 57642], [15298, 57643],
  13029. [24110, 57644], [27274, 57645], 0, 57647, [57648, 148668], [57649, 134355],
  13030. [21414, 57650], [20151, 57651], 0, [21416, 57653], [57654, 137073],
  13031. [24073, 57655], 57656, [57657, 164994], [24313, 57658], [24315, 57659],
  13032. [14496, 57660], [24316, 57661], [26686, 57662], [37915, 57663],
  13033. [24333, 57664], [57665, 131521], [57666, 194708], [15070, 57667],
  13034. [57669, 135994], [24378, 57670], [57671, 157832], [57672, 140240],
  13035. [57674, 140401], [24419, 57675], [57677, 159342], [24434, 57678],
  13036. [37696, 57679], [57680, 166454], [24487, 57681], [23990, 57682],
  13037. [15711, 57683], [57684, 152144], [57685, 139114], [57686, 159992],
  13038. [57687, 140904], [37334, 57688], [57689, 131742], [57690, 166441],
  13039. [24625, 57691], [26245, 57692], [14691, 57694], [15815, 57695],
  13040. [13881, 57696], [22416, 57697], [57698, 141236], [31089, 57699],
  13041. [15936, 57700], [24734, 57701], 0, 0, [57704, 149890], [57705, 149903],
  13042. [57706, 162387], [29860, 57707], [20705, 57708], [23200, 57709],
  13043. [24932, 57710], [24898, 57712], [57713, 194726], [57714, 159442],
  13044. [24961, 57715], [20980, 57716], [57717, 132694], [24967, 57718],
  13045. [23466, 57719], [57720, 147383], [57721, 141407], [25043, 57722],
  13046. [57723, 166813], [57724, 170333], [25040, 57725], [14642, 57726],
  13047. [57727, 141696], [57728, 141505], [24611, 57729], [24924, 57730],
  13048. [25886, 57731], [25483, 57732], [57733, 131352], [25285, 57734],
  13049. [57735, 137072], [25301, 57736], [57737, 142861], [25452, 57738],
  13050. [57739, 149983], [14871, 57740], [25656, 57741], [25592, 57742],
  13051. [57743, 136078], [57744, 137212], [28554, 57746], [57747, 142902], 0,
  13052. [57750, 153373], [25825, 57751], [25829, 57752], [38011, 57753],
  13053. [14950, 57754], [25658, 57755], [14935, 57756], [25933, 57757],
  13054. [28438, 57758], [57759, 150056], [57760, 150051], [25989, 57761],
  13055. [25965, 57762], [25951, 57763], 0, [26037, 57765], [57766, 149824],
  13056. [19255, 57767], [26065, 57768], [16600, 57769], [57770, 137257], 57771,
  13057. [26083, 57772], [24543, 57773], [57774, 144384], [26136, 57775],
  13058. [57776, 143863], [57777, 143864], [26180, 57778], [57779, 143780],
  13059. [57780, 143781], [26187, 57781], [57782, 134773], [26215, 57783],
  13060. [57784, 152038], [26227, 57785], 0, [57788, 143921], [57789, 165364],
  13061. [57790, 143816], [57791, 152339], [30661, 57792], [57793, 141559],
  13062. [39332, 57794], [26370, 57795], [57796, 148380], [57797, 150049],
  13063. [27130, 57799], [57800, 145346], 0, [26471, 57802], [26466, 57803],
  13064. [57804, 147917], [57805, 168173], [26583, 57806], [17641, 57807],
  13065. [26658, 57808], [28240, 57809], [37436, 57810], [26625, 57811],
  13066. [57812, 144358], [57813, 159136], [26717, 57814], [57815, 144495],
  13067. [27105, 57816], [27147, 57817], [57818, 166623], [26995, 57819],
  13068. [26819, 57820], [57821, 144845], [26881, 57822], [26880, 57823],
  13069. [14849, 57825], [57826, 144956], [15232, 57827], [26540, 57828],
  13070. [26977, 57829], [57830, 166474], [17148, 57831], [26934, 57832],
  13071. [27032, 57833], [15265, 57834], [57835, 132041], [33635, 57836],
  13072. [20624, 57837], [27129, 57838], [57839, 144985], [57840, 139562],
  13073. [27205, 57841], [57842, 145155], [27293, 57843], [15347, 57844],
  13074. [26545, 57845], [27336, 57846], [57847, 168348], [15373, 57848],
  13075. [27421, 57849], [57850, 133411], [24798, 57851, 60308], [27445, 57852],
  13076. [27508, 57853], [57854, 141261], [28341, 57855], [57856, 146139], 0,
  13077. [57858, 137560], [14144, 57859], [21537, 57860], [57861, 146266],
  13078. [27617, 57862], [57863, 147196], [27612, 57864], [27703, 57865],
  13079. [57866, 140427], [57867, 149745], [57868, 158545], [27738, 57869],
  13080. [33318, 57870], [27769, 57871], [57872, 146876], [17605, 57873],
  13081. [57874, 146877], [57875, 147876], [57876, 149772], [57877, 149760],
  13082. [57878, 146633], [14053, 57879], [15595, 57880], [57881, 134450],
  13083. [39811, 57882], [57883, 143865], [57884, 140433], [32655, 57885],
  13084. [26679, 57886], [57887, 159013], [57888, 159137], [57889, 159211],
  13085. [28054, 57890], [27996, 57891], [28284, 57892], [28420, 57893],
  13086. [57894, 149887], [57895, 147589], [57896, 159346], [34099, 57897],
  13087. [57898, 159604], [20935, 57899], 0, 0, [33838, 57902], [57903, 166689], 0,
  13088. [57905, 146991], [29779, 57906], [57907, 147330], [31180, 57908],
  13089. [28239, 57909], [23185, 57910], [57911, 143435], [28664, 57912],
  13090. [14093, 57913], [28573, 57914], [57915, 146992], [28410, 57916],
  13091. [57917, 136343], [57918, 147517], [17749, 57919], [37872, 57920],
  13092. [28484, 57921], [28508, 57922], [15694, 57923], [28532, 57924],
  13093. [57925, 168304], [15675, 57926], [28575, 57927], [57928, 147780],
  13094. [28627, 57929], [57930, 147601], [57931, 147797], [57932, 147513],
  13095. [57933, 147440], [57934, 147380], [57935, 147775], [20959, 57936],
  13096. [57937, 147798], [57938, 147799], [57939, 147776], [57940, 156125],
  13097. [28747, 57941], [28798, 57942], [28839, 57943], 0, [28876, 57945],
  13098. [28885, 57946], [28886, 57947], [28895, 57948], [16644, 57949],
  13099. [15848, 57950], [29108, 57951], [29078, 57952], [57953, 148087],
  13100. [28971, 57954], [28997, 57955], [23176, 57956], [29002, 57957], 0,
  13101. [57960, 148325], [29007, 57961], [37730, 57962], [57963, 148161],
  13102. [28972, 57964], [57965, 148570], [57966, 150055], [57967, 150050],
  13103. [29114, 57968], [57969, 166888], [28861, 57970], [29198, 57971],
  13104. [37954, 57972], [29205, 57973], [22801, 57974], [37955, 57975],
  13105. [29220, 57976], [37697, 57977], [57978, 153093], [29230, 57979],
  13106. [29248, 57980], [57981, 149876], [26813, 57982], [29269, 57983],
  13107. [29271, 57984], [15957, 57985], [57986, 143428], [26637, 57987],
  13108. [28477, 57988], [29314, 57989], 0, [29483, 57991], [57992, 149539],
  13109. [57993, 165931], [18669, 57994], [57995, 165892], [29480, 57996],
  13110. [29486, 57997], [29647, 57998], [29610, 57999], [58000, 134202],
  13111. [58001, 158254], [29641, 58002], [29769, 58003], [58004, 147938],
  13112. [58005, 136935], [58006, 150052], [26147, 58007], [14021, 58008],
  13113. [58009, 149943], [58010, 149901], [58011, 150011], [29687, 58012],
  13114. [29717, 58013], [26883, 58014], [58015, 150054], [29753, 58016],
  13115. [16087, 58018], 0, [58020, 141485], [29792, 58021], [58022, 167602],
  13116. [29767, 58023], [29668, 58024], [29814, 58025], [33721, 58026],
  13117. [29804, 58027], [29812, 58029], [37873, 58030], [27180, 58031],
  13118. [29826, 58032], [18771, 58033], [58034, 150156], [58035, 147807],
  13119. [58036, 150137], [58037, 166799], [23366, 58038], [58039, 166915],
  13120. [58040, 137374], [29896, 58041], [58042, 137608], [29966, 58043],
  13121. [29982, 58045], [58046, 167641], [58047, 137803], [23511, 58048],
  13122. [58049, 167596], [37765, 58050], [30029, 58051], [30026, 58052],
  13123. [30055, 58053], [30062, 58054], [58055, 151426], [16132, 58056],
  13124. [58057, 150803], [30094, 58058], [29789, 58059], [30110, 58060],
  13125. [30132, 58061], [30210, 58062], [30252, 58063], [30289, 58064],
  13126. [30287, 58065], [30319, 58066], 58067, [58068, 156661], [30352, 58069],
  13127. [33263, 58070], [14328, 58071], [58072, 157969], [58073, 157966],
  13128. [30369, 58074], [30373, 58075], [30391, 58076], [30412, 58077],
  13129. [58078, 159647], [33890, 58079], [58080, 151709], [58081, 151933],
  13130. [58082, 138780], [30494, 58083], [30502, 58084], [30528, 58085],
  13131. [25775, 58086], [58087, 152096], [30552, 58088], [58089, 144044],
  13132. [30639, 58090], [58091, 166244], [58092, 166248], [58093, 136897],
  13133. [30708, 58094], 0, [26826, 58098], [30895, 58099], [30919, 58100],
  13134. [30931, 58101], [38565, 58102], [31022, 58103], [58104, 153056],
  13135. [30935, 58105], [31028, 58106], [30897, 58107], [58108, 161292],
  13136. [36792, 58109], [34948, 58110], [58113, 140828], [31110, 58114],
  13137. [35072, 58115], [26882, 58116], [31104, 58117], [58118, 153687],
  13138. [31133, 58119], [58120, 162617], [31036, 58121], [31145, 58122],
  13139. [28202, 58123], [58124, 160038], [16040, 58125], [31174, 58126],
  13140. [58127, 168205], [31188, 58128], 0, [21797, 62526], 0, [62528, 134210],
  13141. [62529, 134421], [62530, 151851], [21904, 62531], [62532, 142534],
  13142. [14828, 62533], [62534, 131905], [36422, 62535], [62536, 150968],
  13143. [62537, 169189], 0, [62539, 164030], [30586, 62540], [62541, 142392],
  13144. [14900, 62542], [18389, 62543], [62544, 164189], [62545, 158194],
  13145. [62546, 151018], [25821, 62547], [62548, 134524], [62549, 135092],
  13146. [62550, 134357], 0, [25741, 62552], [36478, 62553], [62554, 134806], 0,
  13147. [62556, 135012], [62557, 142505], [62558, 164438], [62559, 148691], 0,
  13148. [62561, 134470], [62562, 170573], [62563, 164073], [18420, 62564],
  13149. [62565, 151207], [62566, 142530], [39602, 62567], [14951, 62568],
  13150. [62569, 169460], [16365, 62570], [13574, 62571], [62572, 152263],
  13151. [62573, 169940], 0, [62575, 142660], [40302, 62576], [38933, 62577], 0,
  13152. [17369, 62579], 0, [25780, 62581], [21731, 62582], 0, [62584, 142282], 0,
  13153. [14843, 62586], 0, [62588, 157402], [62589, 157462], [62590, 162208],
  13154. [25834, 62591], [62592, 151634], [62593, 134211], [36456, 62594], 0,
  13155. [62596, 166732], [62597, 132913], 0, [18443, 62599], [62600, 131497],
  13156. [16378, 62601], [22643, 62602], [62603, 142733], 0, [62605, 148936],
  13157. [62606, 132348], [62607, 155799], [62608, 134988], 0, [21881, 62610], 0,
  13158. [17338, 62612], 0, [19124, 62614], [62615, 141926], [62616, 135325],
  13159. [33194, 62617], [39157, 62618], [62619, 134556], [25465, 62620],
  13160. [14846, 62621], [62622, 141173], [36288, 62623], [22177, 62624],
  13161. [25724, 62625], [15939, 62626], 0, [62628, 173569], [62629, 134665],
  13162. [62630, 142031], 0, 0, [62633, 135368], [62634, 145858], [14738, 62635],
  13163. [14854, 62636], [62637, 164507], [13688, 62638], [62639, 155209],
  13164. [62640, 139463], 0, 0, [62643, 142514], [62644, 169760], [13500, 62645],
  13165. [27709, 62646], [62647, 151099], 0, 0, [62650, 161140], [62651, 142987],
  13166. [62652, 139784], [62653, 173659], [62654, 167117], [62655, 134778],
  13167. [62656, 134196], [62683, 161337], [62684, 142286], [62687, 142417],
  13168. [14872, 62689], [62691, 135367], [62693, 173618], [62695, 167122],
  13169. [62696, 167321], [62697, 167114], [38314, 62698], 0, [62706, 161630],
  13170. [28992, 62708], 0, [20822, 62385], 0, [20616, 62487], 0, [13459, 62489],
  13171. [20870, 62491], [24130, 63037], [20997, 62495], [21031, 62436],
  13172. [21113, 62497], 0, [13651, 62504], [21442, 62505], [21343, 62715], 0,
  13173. [21823, 62520], 0, [21976, 59986], [13789, 62722], [22049, 63067], 0,
  13174. [22100, 60044], [60148, 135291], 0, [60153, 135379], 0, [61095, 135934], 0,
  13175. 0, [14265, 60104], [23745, 61099], [23829, 63066], [23894, 63030],
  13176. [14392, 63036], [20097, 62477], [24253, 63038], [14612, 63042],
  13177. [25017, 63050], [25232, 63054], [25368, 63056], [25690, 63063],
  13178. [25745, 62381], [33133, 62709], [33156, 59922], [33171, 59924],
  13179. [26624, 63080], [15292, 63093], [29327, 60517], [29389, 59781], 0,
  13180. [29497, 59785], [30018, 59811], [30172, 59817], [16320, 59818],
  13181. [60278, 151205], [16343, 59820], 0, 30336, [30348, 59824, 151388],
  13182. [16552, 59845], [30777, 59846], [16643, 59855], [31377, 59863],
  13183. [31771, 59876], [31981, 59884], [32659, 62658], [32686, 59892], 0,
  13184. [33535, 59936], [22623, 59981], [34482, 59960], 0, [34699, 59963],
  13185. [35143, 59969], 0, [35369, 59972], 0, [36465, 59988], [60484, 164233],
  13186. [36528, 59990], 0, [37214, 62443], [37260, 62441], [39182, 60051],
  13187. [39196, 60054], 0, 0, [39809, 60066], [40384, 60080], [40339, 60078],
  13188. [40620, 60085], [19857, 60540], 0, 37818, [40571, 60084], [28809, 63148],
  13189. [29512, 59788], 0, [31129, 59858], [36791, 59997], 0, [39234, 60056],
  13190. {s: 193}, 8364, {s: 4}, [12443, 63518], [12444, 63519], [11904, 63520],
  13191. {f: 5, c: 62211}, [62216, 131340], 62217, [62218, 131281], [62219, 131277],
  13192. {f: 2, c: 62220}, [62222, 131275], [62223, 139240], 62224, [62225, 131274],
  13193. {f: 4, c: 62226}, [62230, 131342], {f: 2, c: 62231}, {f: 2, c: 62776},
  13194. [62778, 138177], [62779, 194680], [12205, 38737, 62780], [62781, 131206],
  13195. [20059, 62782], [20155, 62783], [13630, 62784], [23587, 62785],
  13196. [24401, 62786], [24516, 62787], [14586, 62788], [25164, 62789],
  13197. [25909, 62790], [27514, 62791], [27701, 62792], [27706, 62793],
  13198. [28780, 62794], [29227, 62795], [20012, 62796], [29357, 62797],
  13199. [62798, 149737], [32594, 62799], [31035, 62800], [31993, 62801],
  13200. [32595, 62802], [62803, 156266], [13505, 62804], [62806, 156491],
  13201. [32770, 62807], [32896, 62808], [62809, 157202], [62810, 158033],
  13202. [21341, 62811], [34916, 62812], [35265, 62813], [62814, 161970],
  13203. [35744, 62815], [36125, 62816], [38021, 62817], [38264, 62818],
  13204. [38271, 62819], [38376, 62820], [62821, 167439], [38886, 62822],
  13205. [39029, 62823], [39118, 62824], [39134, 62825], [39267, 62826],
  13206. [62827, 170000], [40060, 62828], [40479, 62829], [40644, 62830],
  13207. [27503, 62831], [62832, 63751], [20023, 62833], [62834, 131207],
  13208. [38429, 62835], [25143, 62836], [38050, 62837], [11908, 63521],
  13209. [11910, 63522], [11911, 63523], [11912, 63524], [11914, 63525],
  13210. [11916, 63526], [11917, 63527], [11925, 63528], [11932, 63529],
  13211. [11941, 63531], [11943, 63532], [11946, 63533], [11948, 63534],
  13212. [11950, 63535], [11958, 63536], [11964, 63537], [11966, 63538],
  13213. [11978, 63540], [11980, 63541], [11981, 63542], [11983, 63543],
  13214. [11990, 63544], [11991, 63545], [11998, 63546], [62368, 172969],
  13215. [62369, 135493], [25866, 62371], [20029, 62374], [28381, 62375],
  13216. [40270, 62376], [37343, 62377], [62380, 161589], [20250, 62382],
  13217. [20264, 62383], [20392, 62384], [20852, 62386], [20892, 62387],
  13218. [20964, 62388], [21153, 62389], [21160, 62390], [21307, 62391],
  13219. [21326, 62392], [21457, 62393], [21464, 62394], [22242, 62395],
  13220. [22768, 62396], [22788, 62397], [22791, 62398], [22834, 62399],
  13221. [22836, 62400], [23398, 62401], [23454, 62402], [23455, 62403],
  13222. [23706, 62404], [24198, 62405], [24635, 62406], [25993, 62407],
  13223. [26622, 62408], [26628, 62409], [26725, 62410], [27982, 62411],
  13224. [28860, 62412], [30005, 62413], [32420, 62414], [32428, 62415],
  13225. [32442, 62416], [32455, 62417], [32463, 62418], [32479, 62419],
  13226. [32518, 62420], [32567, 62421], [33402, 62422], [33487, 62423],
  13227. [33647, 62424], [35270, 62425], [35774, 62426], [35810, 62427],
  13228. [36710, 62428], [36711, 62429], [36718, 62430], [29713, 62431],
  13229. [31996, 62432], [32205, 62433], [26950, 62434], [31433, 62435],
  13230. [30904, 62442], [32956, 62444], [36107, 62446], [33014, 62447],
  13231. [62448, 133607], [32927, 62451], [40647, 62452], [19661, 62453],
  13232. [40393, 62454], [40460, 62455], [19518, 62456], [62457, 171510],
  13233. [62458, 159758], [40458, 62459], [62460, 172339], [13761, 62461],
  13234. [28314, 62463], [33342, 62464], [29977, 62465], [18705, 62467],
  13235. [39532, 62468], [39567, 62469], [40857, 62470], [31111, 62471],
  13236. [62472, 164972], [62473, 138698], [62474, 132560], [62475, 142054],
  13237. [20004, 62476], [20096, 62478], [20103, 62479], [20159, 62480],
  13238. [20203, 62481], [20279, 62482], [13388, 62483], [20413, 62484],
  13239. [15944, 62485], [20483, 62486], [13437, 62488], [13477, 62490],
  13240. [22789, 62492], [20955, 62493], [20988, 62494], [20105, 62496],
  13241. [21136, 62498], [21287, 62499], [13767, 62500], [21417, 62501],
  13242. [13649, 62502], [21424, 62503], [21539, 62506], [13677, 62507],
  13243. [13682, 62508], [13953, 62509], [21651, 62510], [21667, 62511],
  13244. [21684, 62512], [21689, 62513], [21712, 62514], [21743, 62515],
  13245. [21784, 62516], [21795, 62517], [21800, 62518], [13720, 62519],
  13246. [13733, 62521], [13759, 62522], [21975, 62523], [13765, 62524],
  13247. [62525, 163204], [16467, 62538], [62551, 135412], [62555, 134155],
  13248. [62574, 161992], [62580, 155813], [62583, 142668], [62585, 135287],
  13249. [62587, 135279], [62595, 139681], [62609, 134550], [16571, 62611],
  13250. [62631, 142537], [22098, 62641], [62642, 134961], [62657, 157724],
  13251. [62659, 135375], [62660, 141315], [62661, 141625], [13819, 62662],
  13252. [62663, 152035], [62664, 134796], [62665, 135053], [62666, 134826],
  13253. [16275, 62667], [62668, 134960], [62669, 134471], [62670, 135503],
  13254. [62671, 134732], [62673, 134827], [62674, 134057], [62675, 134472],
  13255. [62676, 135360], [62677, 135485], [16377, 62678], [62679, 140950],
  13256. [25650, 62680], [62681, 135085], [62682, 144372], [62685, 134526],
  13257. [62686, 134527], [62688, 142421], [62690, 134808], [62692, 134958],
  13258. [62694, 158544], [21708, 62699], [33476, 62700], [21945, 62701],
  13259. [62703, 171715], [39974, 62704], [39606, 62705], [62707, 142830],
  13260. [33004, 62710], [23580, 62711], [62712, 157042], [33076, 62713],
  13261. [14231, 62714], [62716, 164029], [37302, 62717], [62718, 134906],
  13262. [62719, 134671], [62720, 134775], [62721, 134907], [62723, 151019],
  13263. [13833, 62724], [62725, 134358], [22191, 62726], [62727, 141237],
  13264. [62728, 135369], [62729, 134672], [62730, 134776], [62731, 135288],
  13265. [62732, 135496], [62733, 164359], [62734, 136277], [62735, 134777],
  13266. [62736, 151120], [62737, 142756], [23124, 62738], [62739, 135197],
  13267. [62740, 135198], [62741, 135413], [62742, 135414], [22428, 62743],
  13268. [62744, 134673], [62745, 161428], [62746, 164557], [62747, 135093],
  13269. [62748, 134779], [62749, 151934], [14083, 62750], [62751, 135094],
  13270. [62752, 135552], [62753, 152280], [62754, 172733], [62755, 149978],
  13271. [62756, 137274], [62757, 147831], [62758, 164476], [22681, 62759],
  13272. [21096, 62760], [13850, 62761], [62762, 153405], [31666, 62763],
  13273. [23400, 62764], [18432, 62765], [19244, 62766], [40743, 62767],
  13274. [18919, 62768], [39967, 62769], [39821, 62770], [62771, 154484],
  13275. [62772, 143677], [22011, 62773], [13810, 62774], [22153, 62775],
  13276. [23870, 63028], [23880, 63029], [15868, 63031], [14351, 63032],
  13277. [23972, 63033], [23993, 63034], [14368, 63035], [24357, 63039],
  13278. [24451, 63040], [14600, 63041], [14655, 63043], [14669, 63044],
  13279. [24791, 63045], [24893, 63046], [23781, 63047], [14729, 63048],
  13280. [25015, 63049], [25039, 63051], [14776, 63052], [25132, 63053],
  13281. [25317, 63055], [14840, 63057], [22193, 63058], [14851, 63059],
  13282. [25570, 63060], [25595, 63061], [25607, 63062], [14923, 63064],
  13283. [25792, 63065], [40863, 63068], [14999, 63069], [25990, 63070],
  13284. [15037, 63071], [26111, 63072], [26195, 63073], [15090, 63074],
  13285. [26258, 63075], [15138, 63076], [26390, 63077], [15170, 63078],
  13286. [26532, 63079], [15192, 63081], [26698, 63082], [26756, 63083],
  13287. [15218, 63084], [15217, 63085], [15227, 63086], [26889, 63087],
  13288. [26947, 63088], [29276, 63089], [26980, 63090], [27039, 63091],
  13289. [27013, 63092], [27094, 63094], [15325, 63095], [27237, 63096],
  13290. [27252, 63097], [27249, 63098], [27266, 63099], [15340, 63100],
  13291. [27289, 63101], [15346, 63102], [27307, 63103], [27317, 63104],
  13292. [27348, 63105], [27382, 63106], [27521, 63107], [27585, 63108],
  13293. [27626, 63109], [27765, 63110], [27818, 63111], [15563, 63112],
  13294. [27906, 63113], [27910, 63114], [27942, 63115], [28033, 63116],
  13295. [15599, 63117], [28068, 63118], [28081, 63119], [28181, 63120],
  13296. [28184, 63121], [28201, 63122], [28294, 63123], [63124, 166336],
  13297. [28347, 63125], [28386, 63126], [28378, 63127], [40831, 63128],
  13298. [28392, 63129], [28393, 63130], [28452, 63131], [28468, 63132],
  13299. [15686, 63133], [63134, 147265], [28545, 63135], [28606, 63136],
  13300. [15722, 63137], [15733, 63138], [29111, 63139], [23705, 63140],
  13301. [15754, 63141], [28716, 63142], [15761, 63143], [28752, 63144],
  13302. [28756, 63145], [28783, 63146], [28799, 63147], [63149, 131877],
  13303. [17345, 63150], [13809, 63151], [63152, 134872], [13902, 58134],
  13304. [15789, 58172], [58173, 154725], [26237, 58183], [31860, 58188],
  13305. [29837, 58197], [32402, 58215], [17667, 58232], [58260, 151480],
  13306. [58270, 133901], [58277, 158474], [13438, 58311], [58317, 143087],
  13307. [58325, 146613], [58343, 159385], [34673, 58364], [25537, 58385],
  13308. [30583, 58387], [35210, 58390], [58406, 147343], [35660, 58415],
  13309. [58440, 150729], [18730, 58464], [58471, 172052], [58472, 165564],
  13310. [58473, 165121], [15088, 58490], [28815, 58511], [58529, 140922],
  13311. [58637, 158120], [58646, 148043], [26760, 58662], [58664, 139611],
  13312. [40802, 58702], [37830, 58793], [58802, 131967], [37734, 58888],
  13313. [37519, 58901], [34324, 58954], [58986, 173147], [16784, 59010],
  13314. [26511, 59045], [26654, 59048], [14435, 59051], [59077, 149996],
  13315. [15129, 59128], [33942, 59176], [59241, 149858], [14818, 59254],
  13316. [33920, 59259], [17262, 59328], [38769, 59402], [39323, 59427],
  13317. [18733, 59499], [28439, 59703], [59704, 160009], [28838, 59746],
  13318. [59752, 150095], [32357, 59753], [23855, 59755], [15859, 59756],
  13319. [59758, 150109], [59759, 137183], [32164, 59760], [33830, 59761],
  13320. [21637, 59762], [59763, 146170], [59765, 131604], [22398, 59766],
  13321. [59767, 133333], [59768, 132633], [16357, 59769], [59770, 139166],
  13322. [59771, 172726], [28675, 59772], [59773, 168283], [23920, 59774],
  13323. [29583, 59775], [59777, 166489], [59778, 168992], [20424, 59779],
  13324. [32743, 59780], [29456, 59782], [29496, 59784], [29505, 59787],
  13325. [16041, 59789], [29173, 59792], [59793, 149746], [29665, 59794],
  13326. [16074, 59796], [16081, 59798], [29721, 59801], [29726, 59802],
  13327. [29727, 59803], [16098, 59804], [16112, 59805], [16116, 59806],
  13328. [16122, 59807], [29907, 59808], [16142, 59809], [16211, 59810],
  13329. [30061, 59812], [30066, 59813], [30093, 59814], [16252, 59815],
  13330. [30152, 59816], [30285, 59819], [30324, 59821], [16348, 59822],
  13331. [30330, 59823], [29064, 59825], [22051, 59826], [35200, 59827],
  13332. [16413, 59829], [30531, 59830], [16441, 59831], [16453, 59833],
  13333. [13787, 59834], [30616, 59835], [16490, 59836], [16495, 59837],
  13334. [30654, 59839], [30667, 59840], [30744, 59842], [30748, 59844],
  13335. [30791, 59847], [30801, 59848], [30822, 59849], [33864, 59850],
  13336. [59851, 152885], [31027, 59852], [31026, 59854], [16649, 59856],
  13337. [31121, 59857], [31238, 59860], [16743, 59862], [16818, 59864],
  13338. [31420, 59865], [33401, 59866], [16836, 59867], [31439, 59868],
  13339. [31451, 59869], [16847, 59870], [31586, 59872], [31596, 59873],
  13340. [31611, 59874], [31762, 59875], [16992, 59877], [17018, 59878],
  13341. [31867, 59879], [31900, 59880], [17036, 59881], [31928, 59882],
  13342. [17044, 59883], [36755, 59885], [28864, 59886], [59887, 134351],
  13343. [32207, 59888], [32212, 59889], [32208, 59890], [32253, 59891],
  13344. [32692, 59893], [29343, 59894], [17303, 59895], [32800, 59896],
  13345. [32805, 59897], [32814, 59899], [32817, 59900], [32852, 59901],
  13346. [22452, 59903], [28832, 59904], [32951, 59905], [33001, 59906],
  13347. [17389, 59907], [33036, 59908], [33038, 59910], [33042, 59911],
  13348. [33044, 59913], [17409, 59914], [15161, 59915], [33110, 59916],
  13349. [33113, 59917], [33114, 59918], [17427, 59919], [33148, 59921],
  13350. [17445, 59923], [17453, 59925], [33189, 59926], [22511, 59927],
  13351. [33217, 59928], [33252, 59929], [33364, 59930], [17551, 59931],
  13352. [33398, 59933], [33482, 59934], [33496, 59935], [17584, 59937],
  13353. [33623, 59938], [38505, 59939], [33797, 59941], [28917, 59942],
  13354. [33892, 59943], [33928, 59945], [17668, 59946], [33982, 59947],
  13355. [34017, 59948], [34040, 59949], [34064, 59950], [34104, 59951],
  13356. [34130, 59952], [17723, 59953], [34159, 59954], [34160, 59955],
  13357. [34272, 59956], [17783, 59957], [34418, 59958], [34450, 59959],
  13358. [34543, 59961], [38469, 59962], [17926, 59964], [17943, 59965],
  13359. [34990, 59966], [35071, 59967], [35108, 59968], [35217, 59970],
  13360. [59971, 162151], [35384, 59973], [35476, 59974], [35508, 59975],
  13361. [35921, 59976], [36052, 59977], [36082, 59978], [36124, 59979],
  13362. [18328, 59980], [36291, 59982], [18413, 59983], [36410, 59985],
  13363. [22356, 59987], [22005, 59989], [18487, 59991], [36558, 59992],
  13364. [36578, 59993], [36580, 59994], [36589, 59995], [36594, 59996],
  13365. [36801, 59998], [36810, 59999], [36812, 60000], [36915, 60001],
  13366. [18605, 60003], [39136, 60004], [37395, 60005], [18718, 60006],
  13367. [37416, 60007], [37464, 60008], [37483, 60009], [37553, 60010],
  13368. [37550, 60011], [37567, 60012], [37603, 60013], [37611, 60014],
  13369. [37619, 60015], [37620, 60016], [37629, 60017], [37699, 60018],
  13370. [37764, 60019], [37805, 60020], [18757, 60021], [18769, 60022],
  13371. [37911, 60024], [37917, 60026], [37933, 60027], [37950, 60028],
  13372. [18794, 60029], [37972, 60030], [38009, 60031], [38189, 60032],
  13373. [38306, 60033], [18855, 60034], [38388, 60035], [38451, 60036],
  13374. [18917, 60037], [18980, 60039], [38720, 60040], [18997, 60041],
  13375. [38834, 60042], [38850, 60043], [19172, 60045], [39097, 60047],
  13376. [19225, 60048], [39153, 60049], [22596, 60050], [39193, 60052],
  13377. [39223, 60055], [39261, 60057], [39266, 60058], [19312, 60059],
  13378. [39365, 60060], [19357, 60061], [39484, 60062], [39695, 60063],
  13379. [39785, 60065], [39901, 60067], [39921, 60068], [39924, 60069],
  13380. [19565, 60070], [39968, 60071], [14191, 60072], [60073, 138178],
  13381. [40265, 60074], [40702, 60076], [22096, 60077], [40381, 60079],
  13382. [40444, 60081], [38134, 60082], [36790, 60083], [40625, 60086],
  13383. [40637, 60087], [40646, 60088], [38108, 60089], [40674, 60090],
  13384. [40689, 60091], [40696, 60092], [40772, 60094], [60095, 131220],
  13385. [60096, 131767], [60097, 132000], [38083, 60099], [60101, 132311],
  13386. [38081, 60103], [60105, 132565], [60106, 132629], [60107, 132726],
  13387. [60108, 136890], [22359, 60109], [29043, 60110], [60111, 133826],
  13388. [60112, 133837], [60113, 134079], [60115, 194619], [60116, 134091],
  13389. [21662, 60117], [60118, 134139], [60119, 134203], [60120, 134227],
  13390. [60121, 134245], [60122, 134268], [60124, 134285], [60126, 134325],
  13391. [60127, 134365], [60128, 134381], [60129, 134511], [60130, 134578],
  13392. [60131, 134600], [60135, 134660], [60136, 134670], [60137, 134871],
  13393. [60138, 135056], [60139, 134957], [60140, 134771], [60142, 135100],
  13394. [60144, 135260], [60145, 135247], [60146, 135286], [60149, 135304],
  13395. [60150, 135318], [13895, 60151], [60152, 135359], [60154, 135471],
  13396. [60155, 135483], [21348, 60156], [60158, 135907], [60159, 136053],
  13397. [60160, 135990], [60162, 136567], [60163, 136729], [60164, 137155],
  13398. [60165, 137159], [28859, 60167], [60168, 137261], [60169, 137578],
  13399. [60170, 137773], [60171, 137797], [60172, 138282], [60173, 138352],
  13400. [60174, 138412], [60175, 138952], [60177, 138965], [60178, 139029],
  13401. [29080, 60179], [60181, 139333], [27113, 60182], [14024, 60183],
  13402. [60184, 139900], [60185, 140247], [60186, 140282], [60187, 141098],
  13403. [60188, 141425], [60189, 141647], [60191, 141671], [60192, 141715],
  13404. [60193, 142037], [60195, 142056], [60197, 142094], [60199, 142143],
  13405. [60202, 142412], [60204, 142472], [60205, 142519], [60206, 154600],
  13406. [60207, 142600], [60208, 142610], [60209, 142775], [60210, 142741],
  13407. [60211, 142914], [60212, 143220], [60213, 143308], [60214, 143411],
  13408. [60215, 143462], [60216, 144159], [60217, 144350], [60222, 144743],
  13409. [60223, 144883], [60227, 144922], [60228, 145174], [22709, 60231],
  13410. [60234, 146087], [60237, 146961], [60238, 147129], [60243, 147737],
  13411. [60245, 148206], [60246, 148237], [60248, 148276], [60249, 148374],
  13412. [60258, 148484], [60259, 148694], [22408, 60260], [60261, 149108],
  13413. [60263, 149295], [60271, 149522], [60272, 149755], [60273, 150037],
  13414. [60275, 150208], [22885, 60277], [60279, 151430], [60282, 151596],
  13415. [22335, 60284], [60286, 152217], [60287, 152601], [60291, 152646],
  13416. [60292, 152686], [60296, 152895], [60298, 152926], [60300, 152930],
  13417. [60301, 152934], [60302, 153543], [60304, 153693], [60309, 153859],
  13418. [60312, 154286], [60313, 154505], [60314, 154630], [22433, 60316],
  13419. [29009, 60317], [60319, 155906], [60322, 156082], [60325, 156674],
  13420. [60326, 156746], [60330, 156804], [60334, 156808], [60336, 156946],
  13421. [60338, 157119], [60339, 157365], [22201, 60347], [60349, 157436],
  13422. [13848, 60355], [60357, 157593], [60358, 157806], [60360, 157790],
  13423. [60362, 157895], [60366, 157990], [60368, 158009], [60371, 158202],
  13424. [60373, 158253], [60378, 158260], [60379, 158555], [60383, 158621],
  13425. [60385, 158884], [60388, 159150], [60392, 159819], [60393, 160205],
  13426. [60395, 160384], [60396, 160389], [60399, 160395], [60401, 160486],
  13427. [38047, 60404], [60405, 160848], [14009, 60416], [60424, 161740],
  13428. [60425, 161880], [22230, 60426], [60435, 162269], [60441, 162301],
  13429. [60442, 162314], [60443, 162571], [60444, 163174], [60448, 163849],
  13430. [60459, 163875], [60463, 163912], [60466, 163971], [60479, 163984],
  13431. [60480, 164084], [60481, 164142], [60483, 164175], [60485, 164271],
  13432. [60486, 164378], [60487, 164614], [60488, 164655], [60489, 164746],
  13433. [60491, 164968], [60492, 165546], [25574, 60494], [60495, 166230],
  13434. [60498, 166328], [60500, 166375], [60502, 166376], [60503, 166726],
  13435. [60504, 166868], [60506, 166921], [60508, 167877], [60509, 168172],
  13436. [60511, 168208], [60512, 168252], [15863, 60513], [60514, 168286],
  13437. [60515, 150218], [36816, 60516], [60519, 169191], [60521, 169392],
  13438. [60522, 169400], [60523, 169778], [60524, 170193], [60525, 170313],
  13439. [60526, 170346], [60527, 170435], [60528, 170536], [60529, 170766],
  13440. [60530, 171354], [60531, 171419], [32415, 60532], [60533, 171768],
  13441. [60534, 171811], [19620, 60535], [38215, 60536], [60537, 172691],
  13442. [29090, 60538], [60539, 172799], [60542, 173515], [19868, 60543],
  13443. [60544, 134300], [36798, 60545], [36794, 60547], [60548, 140464],
  13444. [36793, 60549], [60550, 150163], [20202, 60555], [60557, 166700],
  13445. [36480, 60560], [60561, 137205], [60563, 166764], [60564, 166809],
  13446. [60566, 157359], [60568, 161365], [60570, 153141], [60571, 153942],
  13447. [20122, 60572], [60573, 155265], [60576, 134765], [60579, 147080],
  13448. [60580, 150686], [60583, 137206], [60584, 137339], [60587, 154698],
  13449. [60589, 152337], [15814, 60590], [60596, 155352], [19996, 60600],
  13450. [60601, 135146], [60602, 134473], [60603, 145082], [60638, 151880],
  13451. [21982, 60644], [34694, 60672], [60676, 135361], [60679, 149254],
  13452. [23440, 60680], [60682, 157843], [60684, 141044], [60685, 163119],
  13453. [60686, 147875], [60687, 163187], [60688, 159440], [60689, 160438],
  13454. [60691, 135641], [60693, 146684], [60694, 173737], [60695, 134828],
  13455. [60698, 138402], [60700, 151490], [60702, 135147], [60706, 142752],
  13456. [60710, 135148], [60711, 134666], [60714, 135149], [60717, 135559],
  13457. [19994, 60721], [19972, 60722], [23309, 60724], [13996, 60727],
  13458. [21373, 60729], [13989, 60730], [22682, 60732], [60733, 150382],
  13459. [22442, 60736], [60737, 154261], [60738, 133497], [60741, 140389],
  13460. [60746, 146686], [60747, 171824], [60749, 151465], [60750, 169374],
  13461. [60753, 146870], [60755, 157619], [60756, 145184], [60759, 147191],
  13462. [60760, 146988], [60785, 143578], [60789, 135849], [22439, 60790],
  13463. [60791, 149859], [60794, 159918], [60801, 137068], [60806, 160100],
  13464. [60809, 159010], [60810, 150242], [39963, 60837], [60838, 149822],
  13465. [15878, 60846], [60881, 159011], [60887, 132092], [60891, 146685],
  13466. [60893, 149785], [22394, 60904], [21722, 60912], [29050, 60928],
  13467. [60949, 150135], [60955, 166490], [60962, 194624], [60976, 137275],
  13468. [61000, 155993], [61014, 144373], [61019, 166850], [61024, 138566],
  13469. [61054, 159441], [13877, 61065], [61084, 166701], [21024, 61088],
  13470. [15384, 61089], [61090, 146631], [61091, 155351], [61092, 161366],
  13471. [61093, 152881], [61094, 137540], [61096, 170243], [61097, 159196],
  13472. [61098, 159917], [61100, 156077], [61101, 166415], [61102, 145015],
  13473. [61103, 131310], [61104, 157766], [61105, 151310], [17762, 61106],
  13474. [23327, 61107], [61108, 156492], [40784, 61109], [40614, 61110],
  13475. [61111, 156267], [20962, 57415], [21314, 57416], [26285, 57520],
  13476. [22620, 57547], [21843, 57566], [15749, 57594], [24928, 57608],
  13477. [18606, 57668], [38845, 57676], [57693, 137335], [24755, 57703],
  13478. [33828, 57711], [38932, 57748], [57749, 147596], [57764, 143486],
  13479. [57787, 138813], [15147, 57798], [15666, 57824], [57857, 132021],
  13480. [28801, 57944], [23708, 57959], [58017, 132547], [14128, 58028],
  13481. [58096, 136054], [58097, 150034], [58111, 166699], [58112, 155779],
  13482. [256, 62233], [193, 62234], [461, 62235], [192, 62236], [274, 62237],
  13483. [201, 62238], [282, 62239], [200, 62240], [332, 62241], [211, 62242],
  13484. [465, 62243], [210, 62244], 62245, [7870, 62246], 62247, [7872, 62248],
  13485. [202, 62249], [257, 62250], [225, 62251], [462, 62252], [224, 62253],
  13486. [593, 62254], [275, 62255], [233, 62256], [283, 62257], [232, 62258],
  13487. [299, 62259], [237, 62260], [464, 62261], [236, 62262], [333, 62263],
  13488. [243, 62264], [466, 62265], [242, 62266], [363, 62267], [250, 62268],
  13489. [468, 62269], [249, 62270], [470, 62271], [472, 62272], [474, 62273],
  13490. [476, 62274], [252, 62275], 62276, [7871, 62277], 62278, [7873, 62279],
  13491. [234, 62280], [609, 62281], [643, 63551], [592, 63552], [603, 63553],
  13492. [596, 63554], [629, 63555], [339, 63556], [248, 63557], [331, 63558],
  13493. [650, 63559], [618, 63560], {f: 2, c: 62282}, [11933, 63530],
  13494. [11974, 63539], [12003, 63547], 20539, 28158, [62841, 171123], 62842,
  13495. [15817, 62843], 34959, [62845, 147790], 28791, 23797, [19232, 62848],
  13496. [62849, 152013], [13657, 62850], [62851, 154928], 24866, [62853, 166450],
  13497. 36775, 37366, 29073, 26393, 29626, [62859, 144001], [62860, 172295],
  13498. [15499, 62861], [62862, 137600], [19216, 62863], 30948, 29698, 20910,
  13499. [62867, 165647], [16393, 62868], 27235, [62870, 172730], [16931, 62871],
  13500. 34319, 31274, [62875, 170311], [62876, 166634], 38741, 28749, 21284,
  13501. [62880, 139390], 37876, 30425, [62883, 166371], 62884, 30685, 20131, 20464,
  13502. 20668, 20015, 20247, 62891, 21556, 32139, 22674, 22736, [62896, 138678],
  13503. 24210, 24217, 24514, [62900, 141074], 25995, [62902, 144377], 26905, 27203,
  13504. [62905, 146531], 27903, 29184, [62909, 148741], 29580, [16091, 62911],
  13505. [62912, 150035], 23317, 29881, 35715, [62916, 154788], [62917, 153237],
  13506. 31379, 31724, 31939, 32364, 33528, 34199, 62924, 34960, 62926, 36537,
  13507. 62928, 36815, 34143, 39392, 37409, 62933, [62934, 167353], [62935, 136255],
  13508. [16497, 62936], [17058, 62937], 23066, 39016, 26475, [17014, 62944], 22333,
  13509. 34262, [62948, 149883], 33471, [62950, 160013], [19585, 62951],
  13510. [62952, 159092], 23931, [62954, 158485], [62955, 159678], {f: 2, c: 62956},
  13511. 23446, 62959, 32347],
  13512. 'Adobe-GB1': [{f: 95, c: 32}, {f: 3, c: 12288}, [183, 12539], 713, 711, 168,
  13513. 12291, 12293, 8212, 65374, 8214, [8230, 8943], {f: 2, c: 8216},
  13514. {f: 2, c: 8220}, {f: 2, c: 12308}, {f: 8, c: 12296}, {f: 2, c: 12310},
  13515. {f: 2, c: 12304}, 177, 215, 247, 8758, {f: 2, c: 8743}, 8721, 8719, 8746,
  13516. 8745, 8712, 8759, 8730, 8869, 8741, 8736, 8978, 8857, 8747, 8750, 8801,
  13517. 8780, 8776, 8765, 8733, 8800, {f: 2, c: 8814}, {f: 2, c: 8804}, 8734, 8757,
  13518. 8756, 9794, 9792, 176, {f: 2, c: 8242}, 8451, 65284, 164, {f: 2, c: 65504},
  13519. 8240, 167, 8470, 9734, 9733, 9675, 9679, 9678, 9671, 9670, 9633, 9632,
  13520. 9651, 9650, 8251, 8594, {f: 2, c: 8592}, 8595, 12307, {f: 20, c: 9352},
  13521. {f: 20, c: 9332}, {f: 10, c: 9312}, {f: 10, c: 12832}, {f: 12, c: 8544},
  13522. {f: 3, c: 65281}, 65509, {f: 89, c: 65285}, 65507, {f: 83, c: 12353},
  13523. {f: 86, c: 12449}, {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945},
  13524. {f: 7, c: 963}, {f: 7, c: 59277}, {f: 2, c: 65077}, {f: 2, c: 65081},
  13525. {f: 2, c: 65087}, {f: 2, c: 65085}, {f: 4, c: 65089}, {f: 2, c: 59284},
  13526. {f: 2, c: 65083}, {f: 2, c: 65079}, 65073, 59286, {f: 2, c: 65075},
  13527. {f: 6, c: 1040}, 1025, {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, 257, 225,
  13528. 462, 224, 275, 233, 283, 232, 299, 237, 464, 236, 333, 243, 466, 242, 363,
  13529. 250, 468, 249, 470, 472, 474, 476, 252, 234, 593, 7743, 324, 328, 505, 609,
  13530. {f: 37, c: 12549}, 0, {f: 76, c: 9472}, {s: 126}, 21834, 38463, 22467,
  13531. 25384, 21710, 21769, 21696, 30353, 30284, 34108, 30702, 33406, 30861,
  13532. 29233, 38552, 38797, 27688, 23433, 20474, 25353, 26263, 23736, 33018,
  13533. 26696, 32942, 26114, 30414, 20985, 25942, 29100, 32753, 34948, 20658,
  13534. 22885, 25034, 28595, 33453, 25420, 25170, 21485, 21543, 31494,
  13535. [12043, 20843], 30116, 24052, 25300, 36299, 38774, 25226, 32793, 22365,
  13536. 38712, 32610, 29240, [12137, 30333], 26575, 30334, 25670, 20336, 36133,
  13537. 25308, 31255, 26001, 29677, 25644, 25203, 33324, 39041, 26495, 29256,
  13538. 25198, 25292, 20276, 29923, 21322, 21150, 32458, 37030, 24110, 26758,
  13539. 27036, 33152, 32465, 26834, 30917, 34444, 38225, 20621, 35876, 33502,
  13540. 32990, 21253, 35090, 21093, 34180, 38649, 20445, 22561, 39281, 23453,
  13541. 25265, 25253, 26292, 35961, 40077, 29190, 26479, 30865, 24754, 21329,
  13542. 21271, 36744, 32972, 36125, 38049, 20493, 29384, 22791, 24811, 28953,
  13543. 34987, 22868, 33519, 26412, 31528, 23849, 32503, 29997, 27893, 36454,
  13544. 36856, 36924, [12240, 40763], [12112, 27604], 37145, 31508, 24444, 30887,
  13545. 34006, 34109, 27605, 27609, 27606, 24065, 24199, 30201, 38381, 25949,
  13546. 24330, 24517, 36767, 22721, 33218, 36991, 38491, 38829, 36793, 32534,
  13547. 36140, 25153, 20415, 21464, 21342, {f: 2, c: 36776}, 36779, 36941, 26631,
  13548. 24426, 33176, 34920, 40150, 24971, 21035, 30250, 24428, 25996, 28626,
  13549. 28392, 23486, 25672, 20853, 20912, 26564, 19993, 31177, 39292, 28851,
  13550. 30149, 24182, 29627, 33760, 25773, 25320, 38069, 27874, 21338, 21187,
  13551. 25615, 38082, 31636, 20271, 24091, 33334, 33046, 33162, 28196, 27850,
  13552. 39539, 25429, [12056, 21340], 21754, 34917, 22496, 19981, 24067, 27493,
  13553. 31807, 37096, 24598, 25830, 29468, 35009, 26448, 25165, 36130, 30572,
  13554. 36393, 37319, 24425, 33756, 34081, 39184, 21442, 34453, 27531, 24813,
  13555. 24808, 28799, 33485, 33329, 20179, 27815, 34255, 25805, 31961, 27133,
  13556. 26361, 33609, 21397, 31574, 20391, 20876, 27979, 23618, 36461, 25554,
  13557. 21449, 33580, 33590, 26597, 30900, 25661, 23519, 23700, 24046, 35815,
  13558. 25286, 26612, 35962, 25600, 25530, 34633, 39307, 35863, 32544, 38130,
  13559. 20135, 38416, 39076, 26124, 29462, 22330, 23581, 24120, 38271, 20607,
  13560. 32928, [12058, 21378], 25950, 30021, 21809, 20513, 36229, 25220, 38046,
  13561. 26397, 22066, 28526, 24034, 21557, 28818, 36710, 25199, 25764, 25507,
  13562. 24443, 28552, 37108, [12162, 33251], [12192, 36784], 23576, 26216, 24561,
  13563. 27785, 38472, 36225, 34924, 25745, 31216, 22478, 27225, 25104, 21576,
  13564. 20056, 31243, 24809, 28548, 35802, 25215, 36894, 39563, 31204, 21507,
  13565. 30196, 25345, 21273, 27744, 36831, 24347, 39536, 32827, 40831, 20360,
  13566. 23610, [12186, 36196], 32709, 26021, 28861, 20805, 20914, [12173, 34411],
  13567. 23815, 23456, 25277, 37228, 30068, 36364, 31264, 24833, 31609, 20167,
  13568. 32504, 30597, 19985, 33261, 21021, 20986, 27249, 21416, 36487, 38148,
  13569. 38607, 28353, 38500, 26970, 30784, 20648, 30679, 25616, 35302, 22788,
  13570. 25571, 24029, 31359, 26941, 20256, 33337, 21912, 20018, 30126, 31383,
  13571. 24162, 24202, 38383, 21019, 21561, 28810, 25462, 38180, 22402, 26149,
  13572. 26943, 37255, 21767, 28147, 32431, 34850, 25139, 32496, 30133, 33576,
  13573. 30913, 38604, 36766, 24904, 29943, 35789, 27492, 21050, 36176, 27425,
  13574. 32874, 33905, 22257, 21254, 20174, 19995, 20945, 31895, 37259, 31751,
  13575. 20419, 36479, 31713, 31388, 25703, 23828, 20652, 33030, 30209, 31929,
  13576. 28140, 32736, 26449, 23384, [12072, 23544], 30923, 25774, 25619, 25514,
  13577. 25387, 38169, 25645, 36798, 31572, 30249, 25171, [12068, 22823], 21574,
  13578. [12109, 27513], 20643, 25140, 24102, 27526, 20195, 36151, 34955, 24453,
  13579. 36910, 24608, 32829, 25285, 20025, 21333, 37112, 25528, 32966, 26086,
  13580. 27694, 20294, 24814, 28129, 35806, 24377, 34507, 24403, 25377, 20826,
  13581. 33633, 26723, [12049, 20992], 25443, 36424, 20498, 23707, 31095, 23548,
  13582. 21040, 31291, 24764, 36947, 30423, 24503, 24471, 30340, 36460, 28783,
  13583. 30331, 31561, 30634, 20979, 37011, 22564, 20302, 28404, 36842, 25932,
  13584. 31515, 29380, 28068, 32735, 23265, 25269, 24213, 22320, 33922, 31532,
  13585. 24093, 24351, 36882, 32532, 39072, 25474, 28359, 30872, 28857, 20856,
  13586. 38747, 22443, 30005, 20291, 30008, 24215, 24806, 22880, 28096, 27583,
  13587. 30857, 21500, 38613, 20939, 20993, 25481, 21514, 38035, 35843, 36300,
  13588. 29241, 30879, 34678, 36845, 35853, 21472, 19969, 30447, 21486, 38025,
  13589. 39030, [12237, 40718], 38189, 23450, 35746, 20002, 19996, 20908, 33891,
  13590. 25026, 21160, 26635, 20375, 24683, 20923, 27934, 20828, 25238,
  13591. [12099, 26007], 38497, [12182, 35910], 36887, 30168, 37117, 30563, 27602,
  13592. 29322, 29420, 35835, 22581, 30585, 36172, 26460, 38208, 32922, 24230,
  13593. 28193, 22930, 31471, 30701, 38203, 27573, 26029, 32526, 22534, 20817,
  13594. 38431, 23545, 22697, 21544, 36466, 25958, 39039, 22244, 38045, 30462,
  13595. 36929, 25479, 21702, 22810, 22842, 22427, 36530, 26421, 36346, 33333,
  13596. 21057, 24816, 22549, 34558, 23784, 40517, 20420, 39069, 35769, 23077,
  13597. 24694, 21380, 25212, 36943, 37122, 39295, 24681, [12157, 32780],
  13598. [12041, 20799], [12159, 32819], 23572, 39285, 27953, [12038, 20108], 36144,
  13599. 21457, 32602, 31567, 20240, 20047, 38400, 27861, 29648, 34281, 24070,
  13600. 30058, 32763, 27146, 30718, 38034, 32321, 20961, 28902, 21453, 36820,
  13601. 33539, 36137, 29359, 39277, 27867, 22346, 33459, [12101, 26041], 32938,
  13602. 25151, 38450, 22952, 20223, 35775, 32442, 25918, 33778, [12206, 38750],
  13603. 21857, 39134, 32933, 21290, 35837, 21536, 32954, 24223, 27832, 36153,
  13604. 33452, 37210, 21545, 27675, 20998, 32439, 22367, 28954, 27774, 31881,
  13605. 22859, 20221, 24575, 24868, 31914, 20016, 23553, 26539, 34562, 23792,
  13606. 38155, 39118, 30127, 28925, 36898, 20911, 32541, 35773, 22857, 20964,
  13607. 20315, 21542, 22827, 25975, 32932, 23413, 25206, 25282, 36752, 24133,
  13608. 27679, 31526, 20239, 20440, 26381, 28014, 28074, 31119, 34993, 24343,
  13609. 29995, 25242, 36741, 20463, 37340, 26023, 33071, 33105, 24220, 33104,
  13610. 36212, 21103, 35206, 36171, 22797, 20613, 20184, [12201, 38428],
  13611. [12119, 29238], 33145, 36127, 23500, 35747, 38468, 22919, 32538, 21648,
  13612. 22134, 22030, 35813, 25913, 27010, 38041, 30422, 28297, [12082, 24178],
  13613. [12130, 29976], 26438, 26577, 31487, 32925, 36214, 24863, 31174, 25954,
  13614. 36195, 20872, 21018, 38050, 32568, 32923, 32434, 23703, 28207, 26464,
  13615. 31705, 30347, [12220, 39640], 33167, 32660, 31957, 25630, 38224, 31295,
  13616. 21578, 21733, 27468, 25601, [12093, 25096], 40509, 33011, 30105, 21106,
  13617. [12208, 38761], 33883, 26684, 34532, 38401, 38548, 38124, 20010, 21508,
  13618. 32473, 26681, 36319, 32789, 26356, 24218, 32697, 22466, 32831, 26775,
  13619. [12079, 24037], 25915, 21151, 24685, 40858, 20379, 36524, 20844, 23467,
  13620. [12088, 24339], 24041, 27742, 25329, 36129, 20849, 38057, 21246, 27807,
  13621. 33503, 29399, 22434, 26500, 36141, 22815, 36764, 33735, 21653, 31629,
  13622. 20272, 27837, 23396, 22993, [12238, 40723], 21476, 34506, [12219, 39592],
  13623. [12181, 35895], 32929, 25925, 39038, 22266, 38599, 21038, [12128, 29916],
  13624. 21072, 23521, 25346, 35074, 20054, 25296, 24618, 26874, 20851, 23448,
  13625. 20896, 35266, 31649, 39302, 32592, 24815, 28748, 36143, 20809,
  13626. [12084, 24191], 36891, 29808, 35268, 22317, 30789, 24402, 40863, 38394,
  13627. 36712, [12225, 39740], 35809, 30328, 26690, 26588, 36330, 36149, 21053,
  13628. 36746, 28378, 26829, 38149, 37101, 22269, 26524, 35065, 36807, 21704,
  13629. 39608, 23401, 28023, 27686, 20133, 23475, 39559, 37219, 25000, 37039,
  13630. 38889, 21547, 28085, 23506, 20989, 21898, 32597, 32752, 25788, 25421,
  13631. 26097, 25022, 24717, 28938, 27735, 27721, 22831, 26477, 33322, 22741,
  13632. 22158, 35946, 27627, 37085, 22909, 32791, 21495, 28009, 21621, 21917,
  13633. 33655, 33743, 26680, [12146, 31166], 21644, 20309, 21512, 30418, 35977,
  13634. 38402, 27827, 28088, 36203, 35088, 40548, 36154, 22079, [12234, 40657],
  13635. 30165, 24456, 29408, 24680, 21756, 20136, 27178, 34913, 24658, 36720,
  13636. 21700, 28888, 34425, 40511, 27946, 23439, 24344, 32418, 21897, 20399,
  13637. 29492, 21564, 21402, 20505, 21518, 21628, 20046, 24573, 29786, 22774,
  13638. 33899, 32993, 34676, 29392, 31946, 28246, 24359, 34382, 21804, 25252,
  13639. 20114, 27818, 25143, 33457, 21719, 21326, 29502, 28369, 30011, 21010,
  13640. 21270, 35805, 27088, 24458, 24576, 28142, 22351, 27426, 29615, 26707,
  13641. 36824, 32531, 25442, 24739, 21796, 30186, 35938, 28949, 28067, 23462,
  13642. 24187, 33618, 24908, 40644, 30970, 34647, 31783, 30343, 20976, 24822,
  13643. 29004, 26179, 24140, 24653, 35854, 28784, 25381, 36745, 24509, 24674,
  13644. 34516, 22238, 27585, 24724, 24935, 21321, 24800, 26214, 36159, 31229,
  13645. 20250, 28905, 27719, 35763, 35826, 32472, 33636, 26127, 23130, 39746,
  13646. 27985, 28151, 35905, 27963, 20249, [12117, 28779], 33719, 25110, 24785,
  13647. 38669, 36135, 31096, 20987, 22334, 22522, 26426, 30072, 31293, 31215,
  13648. 31637, 32908, 39269, 36857, 28608, 35749, 40481, 23020, 32489, 32521,
  13649. 21513, 26497, 26840, 36753, 31821, 38598, 21450, 24613, 30142, 27762,
  13650. 21363, 23241, 32423, 25380, [12047, 20960], 33034, [12080, 24049], 34015,
  13651. 25216, 20864, 23395, 20238, 31085, 21058, 24760, 27982, 23492, 23490,
  13652. 35745, 35760, 26082, 24524, 38469, 22931, 32487, 32426, 22025, 26551,
  13653. 22841, 20339, 23478, 21152, 33626, 39050, 36158, 30002, 38078, 20551,
  13654. 31292, 20215, 26550, 39550, 23233, 27516, 30417, 22362, 23574, 31546,
  13655. 38388, 29006, 20860, 32937, 33392, 22904, 32516, 33575, 26816, 26604,
  13656. 30897, 30839, 25315, 25441, 31616, 20461, 21098, 20943, 33616, 27099,
  13657. 37492, 36341, 36145, 35265, 38190, 31661, 20214, 20581, 33328, 21073,
  13658. 39279, 28176, 28293, 28071, 24314, 20725, 23004, 23558, 27974, 27743,
  13659. 30086, 33931, 26728, 22870, 35762, 21280, 37233, 38477, 34121, 26898,
  13660. 30977, 28966, 33014, 20132, 37066, 27975, 39556, 23047, 22204, 25605,
  13661. 38128, 30699, 20389, 33050, 29409, [12179, 35282], 39290, 32564, 32478,
  13662. 21119, 25945, 37237, 36735, 36739, 21483, 31382, 25581, 25509, 30342,
  13663. 31224, 34903, 38454, 25130, 21163, 33410, 26708, 26480, 25463, 30571,
  13664. 31469, 27905, 32467, 35299, 22992, 25106, 34249, 33445, 30028, 20511,
  13665. 20171, 30117, 35819, 23626, [12081, 24062], 31563, [12100, 26020],
  13666. [12198, 37329], 20170, 27941, 35167, 32039, 38182, 20165, 35880, 36827,
  13667. 38771, 26187, 31105, 36817, 28908, 28024, 23613, 21170, 33606, 20834,
  13668. 33550, 30555, 26230, 40120, 20140, 24778, 31934, 31923, 32463, 20117,
  13669. 35686, 26223, 39048, 38745, 22659, 25964, 38236, 24452, 30153, 38742,
  13670. 31455, 31454, 20928, 28847, 31384, 25578, 31350, 32416, 29590,
  13671. [12210, 38893], 20037, 28792, 20061, 37202, 21417, 25937, 26087,
  13672. [12165, 33276], 33285, 21646, 23601, 30106, 38816, 25304, 29401, 30141,
  13673. 23621, 39545, 33738, 23616, 21632, 30697, 20030, 27822, 32858, 25298,
  13674. 25454, 24040, 20855, 36317, 36382, 38191, 20465, 21477, 24807, 28844,
  13675. 21095, 25424, 40515, 23071, 20518, 30519, 21367, 32482, 25733, 25899,
  13676. 25225, 25496, 20500, 29237, 35273, 20915, 35776, 32477, 22343, 33740,
  13677. 38055, 20891, 21531, 23803, 20426, 31459, 27994, 37089, 39567, 21888,
  13678. 21654, 21345, 21679, 24320, 25577, 26999, 20975, 24936, 21002, 22570,
  13679. 21208, 22350, 30733, 30475, 24247, 24951, 31968, 25179, 25239, 20130,
  13680. 28821, 32771, 25335, 28900, 38752, 22391, 33499, 26607, 26869, 30933,
  13681. 39063, 31185, 22771, 21683, 21487, 28212, 20811, 21051, 23458, 35838,
  13682. 32943, 21827, 22438, 24691, 22353, 21549, 31354, 24656, 23380, 25511,
  13683. 25248, [12061, 21475], 25187, 23495, 26543, 21741, 31391, 33510, 37239,
  13684. 24211, 35044, 22840, 22446, 25358, 36328, 33007, 22359, 31607, 20393,
  13685. 24555, 23485, 27454, 21281, 31568, 29378, 26694, 30719, 30518, 26103,
  13686. 20917, 20111, 30420, 23743, 31397, 33909, 22862, 39745, 20608, 39304,
  13687. 24871, 28291, 22372, 26118, 25414, 22256, 25324, 25193, 24275, 38420,
  13688. 22403, 25289, 21895, 34593, 33098, 36771, 21862, 33713, 26469, 36182,
  13689. 34013, 23146, 26639, 25318, 31726, 38417, 20848, 28572, 35888, 25597,
  13690. 35272, 25042, 32518, 28866, 28389, 29701, 27028, 29436, 24266, 37070,
  13691. 26391, 28010, 25438, 21171, 29282, [12156, 32769], 20332, 23013, 37226,
  13692. 28889, 28061, 21202, 20048, 38647, 38253, 34174, 30922, 32047, 20769,
  13693. 22418, 25794, 32907, 31867, 27882, 26865, 26974, 20919, 21400, 26792,
  13694. 29313, 40654, 31729, 29432, 31163, 28435, 29702, 26446, [12197, 37324],
  13695. 40100, 31036, 33673, 33620, 21519, 26647, 20029, 21385, 21169, 30782,
  13696. 21382, 21033, 20616, 20363, 20432, 30178, [12148, 31435], 31890, 27813,
  13697. [12202, 38582], [12050, 21147], 29827, 21737, 20457, 32852, 33714, 36830,
  13698. 38256, 24265, 24604, 28063, 24088, 25947, 33080, 38142, 24651, 28860,
  13699. 32451, 31918, 20937, 26753, 31921, 33391, 20004, 36742, 37327, 26238,
  13700. 20142, 35845, 25769, 32842, 20698, 30103, 29134, 23525, 36797, 28518,
  13701. 20102, 25730, 38243, 24278, 26009, 21015, 35010, 28872, 21155, 29454,
  13702. 29747, 26519, 30967, 38678, 20020, 37051, 40158, 28107, 20955, 36161,
  13703. 21533, 25294, 29618, 33777, 38646, 40836, 38083, 20278, 32666, 20940,
  13704. 28789, 38517, 23725, 39046, 21478, 20196, 28316, 29705, 27060, 30827,
  13705. 39311, 30041, 21016, 30244, 27969, 26611, 20845, 40857, 32843, 21657,
  13706. 31548, 31423, 38534, 22404, 25314, 38471, 27004, 23044, 25602, 31699,
  13707. 28431, 38475, 33446, 21346, 39045, 24208, 28809, 25523, 21348, 34383,
  13708. 40065, 40595, 30860, 38706, 36335, 36162, [12229, 40575], 28510, 31108,
  13709. 24405, 38470, 25134, 39540, 21525, 38109, 20387, 26053, 23653, 23649,
  13710. 32533, 34385, 27695, 24459, 29575, 28388, 32511, 23782, 25371, 23402,
  13711. 28390, 21365, 20081, 25504, 30053, 25249, 36718, 20262, 20177, 27814,
  13712. 32438, 35770, 33821, 34746, 32599, 36923, 38179, 31657, 39585, 35064,
  13713. 33853, 27931, 39558, 32476, 22920, [12231, 40635], 29595, 30721, 34434,
  13714. 39532, 39554, 22043, 21527, 22475, 20080, 40614, 21334, 36808, 33033,
  13715. 30610, 39314, 34542, 28385, 34067, 26364, 24930, 28459, 35881, 33426,
  13716. 33579, 30450, 27667, 24537, 33725, 29483, 33541, 38170, [12113, 27611],
  13717. [12141, 30683], 38086, 21359, 33538, 20882, 24125, 35980, 36152, 20040,
  13718. 29611, 26522, 26757, 37238, 38665, 29028, 27809, 30473, 23186, 38209,
  13719. 27599, 32654, 26151, 23504, 22969, 23194, 38376, 38391, 20204, 33804,
  13720. 33945, 27308, 30431, 38192, 29467, 26790, 23391, 30511, 37274, 38753,
  13721. 31964, 36855, 35868, 24357, [12150, 31859], 31192, 35269, 27852, 34588,
  13722. 23494, 24130, 26825, 30496, 32501, 20885, 20813, 21193, 23081, 32517,
  13723. [12207, 38754], 33495, 25551, 30596, 34256, 31186, 28218, 24217, 22937,
  13724. 34065, 28781, 27665, 25279, [12139, 30399], 25935, 24751, 38397, 26126,
  13725. 34719, 40483, 38125, 21517, 21629, 35884, {f: 2, c: 25720}, 34321, 27169,
  13726. 33180, 30952, 25705, 39764, 25273, 26411, 33707, 22696, 40664, 27819,
  13727. 28448, 23518, 38476, 35851, 29279, 26576, 25287, 29281, 20137, 22982,
  13728. 27597, 22675, 26286, 24149, 21215, 24917, [12106, 26408], [12140, 30446],
  13729. 30566, 29287, 31302, 25343, 21738, 21584, 38048, 37027, 23068, 32435,
  13730. 27670, 20035, 22902, 32784, 22856, 21335, 30007, 38590, 22218, 25376,
  13731. 33041, 24700, 38393, 28118, 21602, 39297, 20869, 23273, 33021, 22958,
  13732. 38675, 20522, 27877, 23612, 25311, 20320, 21311, 33147, 36870, 28346,
  13733. 34091, 25288, 24180, 30910, 25781, 25467, 24565, 23064, 37247, 40479,
  13734. 23615, 25423, 32834, 23421, 21870, 38218, 38221, 28037, 24744, 26592,
  13735. 29406, 20957, 23425, 25319, 27870, [12124, 29275], 25197, 38062, 32445,
  13736. 33043, 27987, 20892, 24324, 22900, 21162, 24594, [12069, 22899], 26262,
  13737. 34384, 30111, 25386, 25062, 31983, 35834, 21734, 27431, 40485, 27572,
  13738. 34261, 21589, 20598, 27812, 21866, 36276, 29228, 24085, 24597, 29750,
  13739. 25293, 25490, 29260, 24472, 28227, 27966, 25856, 28504, 30424, 30928,
  13740. 30460, 30036, 21028, 21467, 20051, 24222, 26049, 32810, 32982, 25243,
  13741. 21638, 21032, 28846, 34957, 36305, 27873, 21624, 32986, 22521, 35060,
  13742. 36180, 38506, 37197, 20329, 27803, 21943, 30406, 30768, 25256, 28921,
  13743. 28558, 24429, 34028, 26842, 30844, 31735, 33192, 26379, 40527, 25447,
  13744. 30896, 22383, 30738, 38713, 25209, 25259, 21128, 29749, 27607, 21860,
  13745. 33086, 30130, [12138, 30382], 21305, 30174, 20731, 23617, 35692, 31687,
  13746. 20559, [12122, 29255], 39575, 39128, 28418, 29922, 31080, 25735, 30629,
  13747. 25340, 39057, 36139, 21697, 32856, 20050, 22378, 33529, 33805, 24179,
  13748. 20973, 29942, 35780, 23631, 22369, 27900, 39047, 23110, 30772, 39748,
  13749. 36843, 31893, 21078, 25169, 38138, 20166, 33670, 33889, 33769, 33970,
  13750. 22484, 26420, 22275, 26222, 28006, 35889, 26333, 28689, 26399, 27450,
  13751. 26646, 25114, 22971, 19971, 20932, 28422, 26578, 27791, 20854, 26827,
  13752. 22855, 27495, 30054, 23822, 33040, 40784, 26071, 31048, 31041, 39569,
  13753. 36215, 23682, 20062, 20225, 21551, 22865, 30732, 22120, [12115, 27668],
  13754. 36804, 24323, 27773, 27875, 35755, 25488, 24688, 27965, 29301, 25190,
  13755. 38030, 38085, 21315, 36801, 31614, 20191, 35878, 20094, 40660, 38065,
  13756. 38067, 21069, 28508, 36963, 27973, 35892, 22545, 23884, [12107, 27424],
  13757. 27465, 26538, 21595, 33108, 32652, 22681, 34103, 24378, 25250, 27207,
  13758. 38201, 25970, 24708, 26725, 30631, 20052, 20392, 24039, 38808, 25772,
  13759. 32728, 23789, 20431, 31373, 20999, 33540, 19988, 24623, 31363, 38054,
  13760. 20405, 20146, 31206, 29748, 21220, 33465, 25810, 31165, 23517, 27777,
  13761. 38738, 36731, 27682, 20542, 21375, 28165, 25806, 26228, 27696, 24773,
  13762. 39031, 35831, 24198, 29756, 31351, 31179, 19992, 37041, 29699, 27714,
  13763. 22234, 37195, 27845, 36235, 21306, 34502, 26354, 36527, 23624, 39537,
  13764. 28192, 21462, 23094, 40843, 36259, 21435, 22280, 39079, 26435, 37275,
  13765. 27849, 20840, 30154, 25331, [12125, 29356], 21048, 21149, 32570, 28820,
  13766. 30264, 21364, 40522, 27063, 30830, 38592, 35033, 32676, 28982, 29123,
  13767. 20873, 26579, 29924, 22756, 25880, 22199, 35753, 39286, 25200, 32469,
  13768. 24825, 28909, 22764, 20161, [12040, 20154], 24525, 38887, 20219, 35748,
  13769. 20995, 22922, 32427, 25172, 20173, [12103, 26085], 25102, 33592, 33993,
  13770. 33635, 34701, 29076, 28342, 23481, 32466, 20887, 25545, 26580,
  13771. [12161, 32905], 33593, 34837, 20754, 23418, 22914, 36785, 20083, 27741,
  13772. [12042, 20837], 35109, 36719, 38446, 34122, 29790, 38160, 38384, 28070,
  13773. 33509, 24369, 25746, 27922, 33832, 33134, 40131, 22622, 36187, 19977,
  13774. 21441, 20254, 25955, 26705, 21971, 20007, 25620, 39578, 25195, 23234,
  13775. 29791, [12170, 33394], 28073, 26862, 20711, 33678, 30722, 26432, 21049,
  13776. 27801, 32433, 20667, 21861, 29022, 31579, 26194, 29642, 33515, 26441,
  13777. [12077, 23665], 21024, 29053, 34923, 38378, 38485, 25797, 36193, 33203,
  13778. 21892, 27733, 25159, 32558, 22674, 20260, 21830, 36175, 26188, 19978,
  13779. 23578, 35059, 26786, 25422, 31245, 28903, 33421, 21242, 38902, 23569,
  13780. 21736, 37045, 32461, 22882, 36170, 34503, [12166, 33292], 33293, 36198,
  13781. 25668, 23556, 24913, 28041, 31038, 35774, 30775, 30003, 21627, 20280,
  13782. [12189, 36523], 28145, 23072, 32453, 31070, 27784, 23457, 23158, 29978,
  13783. 32958, 24910, 28183, 22768, [12131, 29983], 29989, 29298, 21319, 32499,
  13784. 30465, 30427, 21097, 32988, 22307, 24072, 22833, 29422, 26045, 28287,
  13785. 35799, [12075, 23608], 34417, [12055, 21313], [12143, 30707], 25342, 26102,
  13786. 20160, [12215, 39135], 34432, 23454, 35782, 21490, [12142, 30690], 20351,
  13787. 23630, 39542, 22987, 24335, [12144, 31034], [12064, 22763], 19990, 26623,
  13788. 20107, 25325, 35475, 36893, 21183, 26159, 21980, 22124, 36866, 20181,
  13789. 20365, 37322, 39280, [12114, 27663], 24066, 24643, 23460, 35270, 35797,
  13790. 25910, [12095, 25163], [12216, 39318], 23432, 23551, 25480, 21806, 21463,
  13791. 30246, 20861, 34092, 26530, 26803, 27530, 25234, 36755, 21460, 33298,
  13792. 28113, 30095, 20070, 36174, 23408, 29087, 34223, 26257, 26329, 32626,
  13793. 34560, [12233, 40653], [12239, 40736], 23646, 26415, 36848, 26641, 26463,
  13794. 25101, 31446, 22661, 24246, 25968, 28465, 24661, 21047, 32781, 25684,
  13795. 34928, 29993, 24069, 26643, 25332, 38684, 21452, 29245, 35841,
  13796. [12116, 27700], 30561, 31246, 21550, 30636, 39034, 33308, 35828, 30805,
  13797. 26388, 28865, 26031, 25749, 22070, 24605, 31169, 21496, 19997, 27515,
  13798. 32902, 23546, 21987, 22235, 20282, 20284, 39282, 24051, 26494, 32824,
  13799. 24578, 39042, 36865, 23435, 35772, 35829, 25628, 33368, 25822, 22013,
  13800. 33487, 37221, 20439, 32032, 36895, 31903, 20723, 22609, 28335, 23487,
  13801. 35785, 32899, 37240, 33948, 31639, 34429, 38539, 38543, 32485, 39635,
  13802. 30862, 23681, 31319, 36930, 38567, 31071, 23385, 25439, 31499, 34001,
  13803. 26797, 21766, 32553, 29712, 32034, 38145, 25152, 22604, 20182, 23427,
  13804. 22905, 22612, 29549, 25374, 36427, 36367, 32974, 33492, 25260, 21488,
  13805. 27888, 37214, 22826, 24577, 27760, 22349, 25674, 36138, 30251, 28393,
  13806. 22363, 27264, 30192, 28525, 35885, 35848, 22374, 27631, 34962, 30899,
  13807. 25506, 21497, 28845, 27748, 22616, 25642, 22530, 26848, 33179, 21776,
  13808. 31958, 20504, 36538, 28108, 36255, 28907, 25487, 28059, 28372, 32486,
  13809. 33796, 26691, 36867, 28120, 38518, 35752, 22871, 29305, 34276, 33150,
  13810. 30140, 35466, 26799, 21076, 36386, 38161, 25552, 39064, 36420, 21884,
  13811. 20307, 26367, 22159, 24789, 28053, 21059, 23625, 22825, 28155, 22635,
  13812. [12133, 30000], 29980, 24684, 33300, 33094, 25361, 26465, 36834, 30522,
  13813. 36339, 36148, 38081, 24086, 21381, 21548, 28867, 27712, 24311, 20572,
  13814. 20141, 24237, 25402, 33351, 36890, 26704, 37230, 30643, 21516, 38108,
  13815. 24420, 31461, 26742, 25413, 31570, 32479, 30171, 20599, 25237, 22836,
  13816. 36879, 20984, 31171, 31361, 22270, 24466, 36884, 28034, 23648,
  13817. [12063, 22303], 21520, 20820, 28237, 22242, 25512, 39059, 33151, 34581,
  13818. 35114, 36864, 21534, 23663, 33216, 25302, 25176, 33073, 40501, 38464,
  13819. 39534, 39548, 26925, 22949, 25299, 21822, 25366, 21703, 34521, 27964,
  13820. 23043, [12129, 29926], 34972, 27498, 22806, 35916, 24367, 28286, 29609,
  13821. 39037, 20024, 28919, 23436, 30871, 25405, 26202, 30358, 24779, 23451,
  13822. 23113, 19975, 33109, 27754, 29579, 20129, 26505, [12153, 32593], 24448,
  13823. 26106, 26395, 24536, 22916, 23041, 24013, 24494, 21361, 38886, 36829,
  13824. 26693, 22260, 21807, 24799, 20026, 28493, 32500, 33479, 33806, 22996,
  13825. 20255, 20266, 23614, 32428, 26410, 34074, 21619, 30031, 32963, 21890,
  13826. 39759, 20301, 28205, 35859, 23561, 24944, 21355, 30239, 28201, 34442,
  13827. [12098, 25991], 38395, 32441, 21563, 31283, 32010, 38382, 21985, 32705,
  13828. 29934, 25373, 34583, 28065, 31389, 25105, 26017, 21351, 25569, 27779,
  13829. 24043, 21596, 38056, 20044, 27745, 35820, 23627, [12102, 26080], 33436,
  13830. 26791, 21566, 21556, [12111, 27595], 27494, 20116, 25410, 21320, 33310,
  13831. 20237, 20398, 22366, 25098, 38654, 26212, 29289, 21247, 21153, 24735,
  13832. 35823, 26132, 29081, 26512, 35199, 30802, 30717, 26224, 22075, 21560,
  13833. 38177, 29306, 31232, 24687, 24076, 24713, 33181, [12067, 22805], 24796,
  13834. 29060, 28911, 28330, 27728, 29312, 27268, 34989, 24109, 20064, 23219,
  13835. 21916, 38115, 27927, 31995, 38553, 25103, 32454, 30606, 34430, 21283,
  13836. 38686, 36758, 26247, 23777, 20384, 29421, 19979, 21414, 22799, 21523,
  13837. 25472, 38184, 20808, 20185, 40092, 32420, 21688, 36132, 34900, 33335,
  13838. 38386, 28046, 24358, 23244, 26174, 38505, 29616, 29486, 21439, 33146,
  13839. 39301, 32673, 23466, 38519, 38480, 32447, 30456, 21410, 38262,
  13840. [12217, 39321], 31665, 35140, 28248, 20065, 32724, 31077, 35814, 24819,
  13841. 21709, 20139, 39033, 24055, 27233, 20687, 21521, 35937, 33831, 30813,
  13842. 38660, 21066, 21742, 22179, 38144, 28040, 23477, 28102, 26195,
  13843. [12073, 23567], 23389, 26657, 32918, 21880, 31505, 25928, 26964, 20123,
  13844. 27463, 34638, 38795, 21327, 25375, 25658, 37034, 26012, 32961, 35856,
  13845. 20889, 26800, 21368, 34809, 25032, 27844, 27899, 35874, 23633, 34218,
  13846. 33455, 38156, 27427, [12191, 36763], 26032, 24571, [12092, 24515], 20449,
  13847. 34885, 26143, 33125, 29481, 24826, 20852, 21009, 22411, 24418, 37026,
  13848. [12175, 34892], 37266, 24184, 26447, 24615, 22995, 20804, 20982, 33016,
  13849. 21256, 27769, 38596, 29066, 20241, 20462, 32670, 26429, 21957, 38152,
  13850. 31168, 34966, 32483, 22687, 25100, 38656, 34394, 22040, 39035, 24464,
  13851. 35768, 33988, 37207, 21465, 26093, 24207, 30044, 24676, 32110, 23167,
  13852. 32490, 32493, 36713, 21927, 23459, 24748, 26059, [12126, 29572], 36873,
  13853. 30307, 30505, 32474, 38772, 34203, 23398, [12147, 31348], 38634,
  13854. [12174, 34880], 21195, 29071, 24490, 26092, 35810, 23547, 39535, 24033,
  13855. 27529, 27739, 35757, 35759, 36874, 36805, 21387, 25276, 40486, 40493,
  13856. 21568, 20011, 33469, [12123, 29273], 34460, 23830, 34905, 28079, 38597,
  13857. 21713, 20122, 35766, 28937, 21693, 38409, 28895, 28153, 30416, 20005,
  13858. 30740, 34578, 23721, 24310, [12180, 35328], 39068, 38414, 28814, 27839,
  13859. 22852, 25513, 30524, 34893, 28436, 33395, 22576, 29141, 21388, 30746,
  13860. 38593, 21761, 24422, 28976, 23476, 35866, 39564, 27523, 22830, 40495,
  13861. 31207, 26472, 25196, 20335, 30113, [12154, 32650], 27915, 38451, 27687,
  13862. 20208, 30162, 20859, 26679, 28478, 36992, 33136, 22934, 29814, 25671,
  13863. 23591, 36965, 31377, 35875, 23002, 21676, 33280, 33647, 35201, 32768,
  13864. 26928, 22094, 32822, 29239, 37326, 20918, 20063, 39029, 25494, 19994,
  13865. 21494, 26355, 33099, 22812, 28082, [12032, 19968], 22777, 21307, 25558,
  13866. 38129, 20381, 20234, [12176, 34915], 39056, 22839, 36951, 31227, 20202,
  13867. 33008, 30097, 27778, 23452, 23016, 24413, 26885, 34433, 20506, 24050,
  13868. [12036, 20057], 30691, 20197, 33402, 25233, 26131, [12194, 37009], 23673,
  13869. 20159, 24441, 33222, 36920, 32900, 30123, 20134, 35028, 24847, 27589,
  13870. 24518, 20041, 30410, 28322, 35811, 35758, 35850, 35793, 24322, 32764,
  13871. 32716, 32462, 33589, 33643, 22240, 27575, [12211, 38899], 38452, 23035,
  13872. 21535, 38134, 28139, 23493, 39278, 23609, 24341, 38544, 21360, 33521,
  13873. 27185, 23156, 40560, 24212, 32552, 33721, {f: 2, c: 33828}, 33639, 34631,
  13874. 36814, 36194, 30408, 24433, 39062, 30828, 26144, 21727, 25317, 20323,
  13875. 33219, 30152, 24248, 38605, 36362, 34553, 21647, 27891, 28044, 27704,
  13876. 24703, 21191, [12132, 29992], 24189, 20248, 24736, 24551, 23588, 30001,
  13877. 37038, 38080, 29369, 27833, 28216, [12195, 37193], 26377, 21451, 21491,
  13878. 20305, 37321, 35825, [12060, 21448], 24188, 36802, 28132, 20110, 30402,
  13879. 27014, 34398, 24858, 33286, 20313, 20446, 36926, 40060, 24841, 28189,
  13880. 28180, 38533, 20104, 23089, [12204, 38632], 19982, 23679, 31161, 23431,
  13881. 35821, [12155, 32701], [12127, 29577], 22495, 33419, 37057, 21505, 36935,
  13882. 21947, 23786, 24481, 24840, 27442, 29425, 32946, 35465, 28020, 23507,
  13883. 35029, 39044, 35947, 39533, 40499, 28170, 20900, 20803, 22435, 34945,
  13884. 21407, 25588, 36757, 22253, 21592, 22278, 29503, 28304, 32536, 36828,
  13885. 33489, 24895, 24616, 38498, [12104, 26352], 32422, 36234, 36291, 38053,
  13886. 23731, 31908, [12105, 26376], 24742, 38405, 32792, 20113, 37095, 21248,
  13887. 38504, 20801, 36816, 34164, 37213, 26197, 38901, 23381, 21277, 30776,
  13888. 26434, 26685, 21705, 28798, 23472, 36733, 20877, 22312, 21681, 25874,
  13889. 26242, 36190, 36163, 33039, 33900, 36973, 31967, 20991, 34299, 26531,
  13890. 26089, 28577, 34468, 36481, 22122, 36896, 30338, 28790, 29157, 36131,
  13891. 25321, 21017, 27901, 36156, 24590, 22686, 24974, 26366, 36192, 25166,
  13892. 21939, 28195, 26413, 36711, 38113, 38392, 30504, 26629, 27048, 21643,
  13893. 20045, 28856, 35784, 25688, 25995, 23429, 31364, 20538, 23528, 30651,
  13894. 27617, 35449, 31896, 27838, 30415, 26025, 36759, 23853, 23637, 34360,
  13895. 26632, 21344, 25112, 31449, 28251, 32509, 27167, 31456, 24432, 28467,
  13896. 24352, 25484, 28072, 26454, 19976, 24080, 36134, 20183, 32960, 30260,
  13897. 38556, 25307, 26157, 25214, 27836, 36213, 29031, 32617, 20806, 32903,
  13898. 21484, 36974, 25240, 21746, 34544, 36761, 32773, 38167, 34071, 36825,
  13899. 27993, 29645, 26015, 30495, 29956, 30759, 33275, 36126, 38024, 20390,
  13900. 26517, 30137, 35786, 38663, 25391, 38215, 38453, 33976, 25379, 30529,
  13901. 24449, 29424, 20105, 24596, 25972, 25327, 27491, 25919, 24103, 30151,
  13902. 37073, 35777, 33437, 26525, [12096, 25903], 21553, 34584, 30693, 32930,
  13903. 33026, 27713, 20043, 32455, 32844, 30452, 26893, 27542, 25191, 20540,
  13904. 20356, 22336, 25351, [12108, 27490], 36286, 21482, 26088, 32440, 24535,
  13905. 25370, 25527, [12164, 33267], 33268, 32622, 24092, 23769, 21046, 26234,
  13906. 31209, 31258, 36136, 28825, 30164, 28382, 27835, 31378, 20013, 30405,
  13907. 24544, 38047, 34935, 32456, 31181, 32959, 37325, 20210, 20247,
  13908. [12168, 33311], 21608, 24030, 27954, 35788, 31909, 36724, 32920, 24090,
  13909. 21650, 30385, 23449, 26172, 39588, 29664, 26666, 34523, 26417, 29482,
  13910. 35832, 35803, 36880, [12149, 31481], 28891, 29038, 25284, 30633, 22065,
  13911. 20027, 33879, 26609, 21161, 34496, 36142, 38136, 31569, 20303, 27880,
  13912. 31069, 39547, 25235, [12118, 29226], 25341, 19987, 30742, 36716, 25776,
  13913. 36186, 31686, 26729, 24196, 35013, 22918, 25758, 22766, 29366, 26894,
  13914. 38181, 36861, 36184, 22368, 32512, 35846, 20934, 25417, 25305, 21331,
  13915. 26700, 29730, 33537, 37196, 21828, 30528, 28796, 27978, 20857, 21672,
  13916. 36164, 23039, 28363, 28100, 23388, 32043, 20180, 31869, 28371,
  13917. [12070, 23376], [12163, 33258], 28173, 23383, 39683, 26837, 36394, 23447,
  13918. 32508, 24635, 32437, 37049, [12187, 36208], 22863, 25549, 31199,
  13919. [12188, 36275], 21330, 26063, 31062, 35781, 38459, 32452, 38075, 32386,
  13920. 22068, 37257, 26368, 32618, 23562, 36981, 26152, 24038, 20304, 26590,
  13921. 20570, 20316, 22352, 24231, 20109, 19980, 20800, 19984, 24319, 21317,
  13922. 19989, 20120, 19998, [12224, 39730], 23404, 22121, [12033, 20008], 31162,
  13923. [12035, 20031], [12052, 21269], 20039, 22829, [12120, 29243], 21358, 27664,
  13924. 22239, 32996, 39319, 27603, 30590, 40727, [12034, 20022], 20127, 40720,
  13925. 20060, 20073, 20115, 33416, 23387, 21868, 22031, 20164, 21389, 21405,
  13926. 21411, 21413, 21422, 38757, 36189, [12053, 21274], 21493, 21286, 21294,
  13927. 21310, 36188, 21350, 21347, 20994, 21000, 21006, 21037, 21043,
  13928. {f: 2, c: 21055}, 21068, 21086, 21089, 21084, 33967, 21117, 21122, 21121,
  13929. 21136, 21139, [12044, 20866], 32596, 20155, 20163, 20169, 20162, 20200,
  13930. 20193, 20203, 20190, 20251, 20211, 20258, 20324, 20213, 20261, 20263,
  13931. 20233, 20267, 20318, 20327, 25912, 20314, 20317, 20319, 20311, 20274,
  13932. 20285, 20342, 20340, 20369, 20361, 20355, 20367, 20350, 20347, 20394,
  13933. 20348, 20396, 20372, 20454, 20456, 20458, 20421, 20442, 20451, 20444,
  13934. 20433, 20447, 20472, 20521, 20556, 20467, 20524, 20495, 20526, 20525,
  13935. 20478, 20508, 20492, 20517, 20520, 20606, 20547, 20565, 20552, 20558,
  13936. 20588, 20603, 20645, 20647, 20649, 20666, 20694, 20742, 20717, 20716,
  13937. 20710, 20718, 20743, 20747, 20189, 27709, 20312, 20325, 20430,
  13938. [12245, 40864], 27718, 31860, 20846, 24061, 40649, 39320, 20865, 22804,
  13939. [12051, 21241], 21261, 35335, 21264, 20971, 22809, 20821, [12039, 20128],
  13940. 20822, 20147, 34926, 34980, 20149, 33044, 35026, 31104, 23348, 34819,
  13941. 32696, [12046, 20907], 20913, 20925, 20924, 20935, [12045, 20886], 20898,
  13942. 20901, 35744, {f: 2, c: 35750}, 35754, {f: 2, c: 35764}, 35767,
  13943. {f: 2, c: 35778}, 35787, 35791, 35790, {f: 3, c: 35794}, 35798,
  13944. {f: 2, c: 35800}, 35804, {f: 2, c: 35807}, 35812, {f: 2, c: 35816}, 35822,
  13945. 35824, 35827, 35830, 35833, 35836, {f: 2, c: 35839}, 35842, 35844, 35847,
  13946. 35852, 35855, {f: 2, c: 35857}, {f: 3, c: 35860}, 35865, 35867, 35864,
  13947. 35869, {f: 3, c: 35871}, 35877, 35879, {f: 2, c: 35882}, {f: 2, c: 35886},
  13948. {f: 2, c: 35890}, {f: 2, c: 35893}, [12057, 21353], 21370, 38429, 38434,
  13949. 38433, 38449, 38442, 38461, 38460, 38466, 38473, 38484, 38495, 38503,
  13950. 38508, 38514, 38516, 38536, 38541, 38551, 38576, 37015, 37019, 37021,
  13951. 37017, 37036, 37025, 37044, 37043, 37046, 37050, 37048, 37040, 37071,
  13952. 37061, 37054, 37072, 37060, 37063, 37075, 37094, 37090, 37084, 37079,
  13953. 37083, 37099, 37103, 37118, 37124, 37154, 37150, 37155, 37169, 37167,
  13954. 37177, 37187, 37190, 21005, 22850, 21154, {f: 2, c: 21164}, 21182, 21759,
  13955. 21200, 21206, 21232, 21471, 29166, 30669, [12085, 24308], [12048, 20981],
  13956. 20988, [12223, 39727], [12059, 21430], 24321, 30042, 24047, 22348, 22441,
  13957. 22433, 22654, 22716, 22725, 22737, 22313, 22316, 22314, 22323, 22329,
  13958. {f: 2, c: 22318}, 22364, 22331, 22338, 22377, 22405, 22379, 22406, 22396,
  13959. 22395, 22376, 22381, 22390, 22387, 22445, 22436, 22412, 22450, 22479,
  13960. 22439, 22452, 22419, 22432, 22485, 22488, 22490, 22489, 22482, 22456,
  13961. 22516, 22511, 22520, 22500, 22493, 22539, 22541, 22525, 22509, 22528,
  13962. 22558, 22553, 22596, 22560, 22629, 22636, 22657, 22665, 22682, 22656,
  13963. 39336, 40729, 25087, 33401, 33405, 33407, 33423, 33418, 33448, 33412,
  13964. 33422, 33425, 33431, 33433, 33451, 33464, 33470, 33456, 33480, 33482,
  13965. 33507, 33432, 33463, 33454, {f: 2, c: 33483}, 33473, 33449, 33460, 33441,
  13966. 33450, 33439, 33476, 33486, 33444, 33505, 33545, 33527, 33508, 33551,
  13967. 33543, 33500, 33524, 33490, 33496, 33548, 33531, 33491, 33553, 33562,
  13968. 33542, {f: 2, c: 33556}, 33504, 33493, 33564, 33617, {f: 2, c: 33627},
  13969. 33544, 33682, 33596, 33588, 33585, 33691, 33630, 33583, 33615, 33607,
  13970. 33603, 33631, 33600, 33559, 33632, 33581, 33594, 33587, 33638, 33637,
  13971. 33640, 33563, 33641, 33644, 33642, {f: 2, c: 33645}, 33712, 33656,
  13972. {f: 2, c: 33715}, 33696, 33706, 33683, 33692, 33669, 33660, 33718, 33705,
  13973. 33661, 33720, 33659, 33688, 33694, 33704, 33722, 33724, 33729, 33793,
  13974. 33765, 33752, 22535, 33816, 33803, 33757, 33789, 33750, 33820, 33848,
  13975. 33809, 33798, 33748, 33759, 33807, 33795, {f: 2, c: 33784}, 33770, 33733,
  13976. 33728, 33830, 33776, 33761, 33884, 33873, 33882, 33881, 33907,
  13977. {f: 2, c: 33927}, 33914, 33929, 33912, 33852, 33862, 33897, 33910, 33932,
  13978. 33934, 33841, 33901, 33985, 33997, 34000, 34022, 33981, 34003, 33994,
  13979. 33983, 33978, 34016, 33953, 33977, 33972, 33943, 34021, 34019, 34060,
  13980. 29965, 34104, 34032, 34105, 34079, 34106, 34134, 34107, 34047, 34044,
  13981. 34137, 34120, 34152, 34148, 34142, 34170, 30626, 34115, 34162, 34171,
  13982. 34212, 34216, 34183, 34191, 34169, 34222, 34204, 34181, 34233, 34231,
  13983. 34224, 34259, 34241, 34268, 34303, 34343, 34309, 34345, 34326, 34364,
  13984. [12086, 24318], 24328, 22844, 22849, 32823, 22869, 22874, 22872, 21263,
  13985. [12074, 23586], 23589, 23596, 23604, 25164, 25194, 25247, 25275, 25290,
  13986. 25306, 25303, 25326, 25378, 25334, 25401, 25419, 25411, 25517, 25590,
  13987. 25457, 25466, 25486, 25524, 25453, 25516, 25482, 25449, 25518, 25532,
  13988. 25586, 25592, 25568, 25599, 25540, 25566, 25550, 25682, 25542, 25534,
  13989. 25669, 25665, 25611, 25627, 25632, 25612, 25638, 25633, 25694, 25732,
  13990. 25709, 25750, 25722, {f: 2, c: 25783}, 25753, 25786, 25792, 25808, 25815,
  13991. 25828, 25826, 25865, 25893, 25902, [12087, 24331], 24530, 29977, 24337,
  13992. 21343, 21489, 21501, 21481, 21480, 21499, 21522, 21526, 21510, 21579,
  13993. {f: 3, c: 21586}, 21590, 21571, 21537, 21591, 21593, 21539, 21554, 21634,
  13994. 21652, 21623, 21617, 21604, {f: 2, c: 21658}, 21636, 21622, 21606, 21661,
  13995. 21712, 21677, 21698, 21684, 21714, 21671, 21670, {f: 2, c: 21715}, 21618,
  13996. 21667, 21717, 21691, 21695, 21708, {f: 2, c: 21721}, 21724,
  13997. {f: 2, c: 21673}, 21668, 21725, 21711, 21726, 21787, 21735, 21792, 21757,
  13998. 21780, 21747, {f: 2, c: 21794}, 21775, 21777, 21799, 21802, 21863, 21903,
  13999. 21941, 21833, 21869, 21825, 21845, 21823, 21840, 21820, 21815, 21846,
  14000. {f: 3, c: 21877}, 21811, 21808, 21852, 21899, 21970, 21891, 21937, 21945,
  14001. 21896, 21889, 21919, 21886, 21974, 21905, 21883, 21983, {f: 2, c: 21949},
  14002. 21908, 21913, 21994, 22007, 21961, 22047, 21969, {f: 2, c: 21995}, 21972,
  14003. 21990, 21981, 21956, 21999, 21989, {f: 2, c: 22002}, {f: 2, c: 21964},
  14004. 21992, 22005, 21988, 36756, 22046, 22024, 22028, 22017, 22052, 22051,
  14005. 22014, 22016, 22055, 22061, 22104, 22073, 22103, 22060, 22093, 22114,
  14006. 22105, 22108, 22092, 22100, 22150, 22116, 22129, 22123, {f: 2, c: 22139},
  14007. 22149, 22163, 22191, 22228, [12062, 22231], 22237, 22241, 22261, 22251,
  14008. 22265, 22271, 22276, 22282, 22281, 22300, 24079, 24089, 24084, 24081,
  14009. 24113, {f: 2, c: 24123}, 24119, 24132, 24148, 24155, 24158, 24161, 23692,
  14010. 23674, 23693, 23696, 23702, 23688, {f: 2, c: 23704}, 23697, 23706, 23708,
  14011. 23733, 23714, 23741, 23724, 23723, 23729, 23715, 23745, 23735, 23748,
  14012. 23762, 23780, 23755, 23781, {f: 2, c: 23810}, 23847, 23846, 23854, 23844,
  14013. 23838, 23814, 23835, 23896, 23870, 23860, 23869, 23916, 23899, 23919,
  14014. 23901, 23915, 23883, 23882, 23913, 23924, 23938, 23961, 23965, 35955,
  14015. 23991, 24005, [12091, 24435], 24439, 24450, 24455, 24457, 24460, 24469,
  14016. 24473, 24476, 24488, 24493, 24501, 24508, 34914, [12090, 24417], 29357,
  14017. 29360, 29364, {f: 2, c: 29367}, 29379, 29377, 29390, 29389, 29394, 29416,
  14018. 29423, 29417, 29426, 29428, 29431, 29441, 29427, 29443, {f: 2, c: 29434},
  14019. 29463, 29459, 29473, 29450, 29470, 29469, 29461, 29474, 29497, 29477,
  14020. 29484, 29496, 29489, 29520, 29517, 29527, 29536, 29548, 29551, 29566,
  14021. [12167, 33307], 22821, 39143, 22820, [12065, 22786], 39267,
  14022. {f: 6, c: 39271}, 39284, 39287, 39293, 39296, 39300, 39303, 39306, 39309,
  14023. {f: 2, c: 39312}, {f: 3, c: 39315}, 24192, 24209, 24203, 24214, 24229,
  14024. 24224, 24249, 24245, 24254, 24243, 36179, 24274, 24273, 24283, 24296,
  14025. 24298, 33210, 24516, 24521, 24534, 24527, 24579, 24558, 24580, 24545,
  14026. 24548, 24574, {f: 2, c: 24581}, 24554, 24557, 24568, 24601, 24629, 24614,
  14027. 24603, 24591, 24589, 24617, 24619, 24586, 24639, 24609, {f: 2, c: 24696},
  14028. 24699, 24698, 24642, 24682, 24701, 24726, 24730, 24749, 24733, 24707,
  14029. 24722, 24716, 24731, 24812, 24763, 24753, 24797, 24792, 24774, 24794,
  14030. 24756, 24864, 24870, 24853, 24867, 24820, 24832, 24846, 24875, 24906,
  14031. 24949, 25004, 24980, 24999, 25015, 25044, 25077, 24541, 38579, 38377,
  14032. 38379, 38385, 38387, {f: 2, c: 38389}, 38396, 38398, {f: 2, c: 38403},
  14033. 38406, 38408, {f: 4, c: 38410}, 38415, 38418, {f: 3, c: 38421},
  14034. {f: 2, c: 38425}, 20012, [12121, 29247], 25109, 27701, 27732, 27740, 27722,
  14035. 27811, 27781, 27792, 27796, 27788, {f: 2, c: 27752}, 27764, 27766, 27782,
  14036. 27817, 27856, 27860, 27821, {f: 2, c: 27895}, 27889, 27863, 27826, 27872,
  14037. 27862, 27898, 27883, 27886, 27825, 27859, 27887, 27902, 27961, 27943,
  14038. 27916, 27971, 27976, 27911, 27908, 27929, 27918, 27947, 27981, 27950,
  14039. 27957, 27930, 27983, 27986, 27988, 27955, 28049, 28015, 28062, 28064,
  14040. 27998, {f: 2, c: 28051}, 27996, 28000, 28028, 28003, 28186, 28103, 28101,
  14041. 28126, 28174, 28095, 28128, 28177, 28134, 28125, 28121, 28182, 28075,
  14042. 28172, 28078, 28203, 28270, 28238, 28267, 28338, 28255, 28294,
  14043. {f: 2, c: 28243}, 28210, 28197, 28228, 28383, 28337, 28312, 28384, 28461,
  14044. 28386, 28325, 28327, 28349, 28347, 28343, 28375, 28340, 28367, 28303,
  14045. 28354, 28319, 28514, {f: 2, c: 28486}, 28452, 28437, 28409, 28463, 28470,
  14046. 28491, 28532, 28458, 28425, 28457, 28553, 28557, 28556, 28536, 28530,
  14047. 28540, 28538, 28625, 28617, 28583, 28601, 28598, 28610, 28641, 28654,
  14048. 28638, 28640, 28655, 28698, 28707, 28699, 28729, 28725, 28751, 28766,
  14049. [12071, 23424], 23428, 23445, 23443, 23461, 23480, 29999, 39582, 25652,
  14050. 23524, 23534, 35120, 23536, 36423, 35591, 36790, 36819, 36821, 36837,
  14051. 36846, 36836, 36841, 36838, 36851, 36840, 36869, 36868, 36875, 36902,
  14052. 36881, 36877, 36886, 36897, {f: 2, c: 36917}, 36909, 36911, 36932,
  14053. {f: 2, c: 36945}, 36944, 36968, 36952, 36962, 36955, 26297, 36980, 36989,
  14054. 36994, 37000, 36995, 37003, [12089, 24400], 24407, 24406, 24408, 23611,
  14055. 21675, 23632, 23641, 23409, 23651, 23654, 32700, 24362, 24361, 24365,
  14056. 33396, 24380, 39739, [12076, 23662], 22913, 22915, 22925, {f: 2, c: 22953},
  14057. 22947, 22935, 22986, 22955, 22942, 22948, 22994, 22962, 22959, 22999,
  14058. 22974, {f: 2, c: 23045}, 23005, 23048, 23011, 23000, 23033, 23052, 23049,
  14059. 23090, 23092, 23057, 23075, 23059, 23104, 23143, 23114, 23125, 23100,
  14060. 23138, 23157, 33004, 23210, 23195, 23159, 23162, 23230, 23275, 23218,
  14061. 23250, 23252, 23224, 23264, 23267, 23281, 23254, 23270, 23256, 23260,
  14062. 23305, 23319, 23318, 23346, 23351, 23360, 23573, 23580, 23386, 23397,
  14063. 23411, 23377, 23379, 23394, 39541, {f: 2, c: 39543}, 39546, 39551, 39549,
  14064. {f: 2, c: 39552}, 39557, 39560, 39562, 39568, {f: 2, c: 39570}, 39574,
  14065. 39576, {f: 3, c: 39579}, {f: 2, c: 39583}, {f: 2, c: 39586}, 39589, 39591,
  14066. 32415, 32417, 32419, 32421, {f: 2, c: 32424}, 32429, 32432, 32446,
  14067. {f: 3, c: 32448}, 32457, {f: 2, c: 32459}, 32464, 32468, 32471, 32475,
  14068. {f: 2, c: 32480}, 32488, 32491, {f: 2, c: 32494}, {f: 2, c: 32497}, 32525,
  14069. 32502, {f: 2, c: 32506}, 32510, {f: 3, c: 32513}, {f: 2, c: 32519},
  14070. {f: 2, c: 32523}, 32527, {f: 2, c: 32529}, 32535, 32537, 32540, 32539,
  14071. 32543, {f: 7, c: 32545}, {f: 4, c: 32554}, {f: 5, c: 32559}, 32565,
  14072. [12083, 24186], 30079, [12078, 24027], 30014, 37013, 29582, 29585, 29614,
  14073. 29602, 29599, 29647, 29634, 29649, 29623, 29619, 29632, 29641, 29640,
  14074. 29669, 29657, 39036, 29706, 29673, 29671, 29662, 29626, 29682, 29711,
  14075. 29738, 29787, 29734, 29733, 29736, 29744, 29742, 29740, 29723, 29722,
  14076. 29761, 29788, 29783, 29781, 29785, 29815, 29805, 29822, 29852, 29838,
  14077. {f: 2, c: 29824}, 29831, 29835, 29854, {f: 2, c: 29864}, 29840, 29863,
  14078. 29906, 29882, {f: 3, c: 38890}, 26444, 26451, 26462, 26440, 26473, 26533,
  14079. 26503, 26474, 26483, 26520, 26535, 26485, 26536, 26526, 26541, 26507,
  14080. 26487, 26492, 26608, 26633, 26584, 26634, 26601, 26544, 26636, 26585,
  14081. 26549, 26586, 26547, 26589, 26624, 26563, 26552, 26594, 26638, 26561,
  14082. 26621, {f: 2, c: 26674}, {f: 2, c: 26720}, 26702, 26722, 26692, 26724,
  14083. 26755, 26653, 26709, 26726, 26689, 26727, 26688, 26686, 26698, 26697,
  14084. 26665, 26805, 26767, 26740, 26743, 26771, 26731, 26818, 26990, 26876,
  14085. {f: 2, c: 26911}, 26873, 26916, 26864, 26891, 26881, 26967, 26851, 26896,
  14086. 26993, 26937, 26976, 26946, 26973, 27012, 26987, 27008, 27032, 27000,
  14087. 26932, 27084, {f: 2, c: 27015}, 27086, 27017, 26982, 26979, 27001, 27035,
  14088. 27047, 27067, 27051, 27053, 27092, 27057, 27073, 27082, 27103, 27029,
  14089. 27104, 27021, 27135, 27183, 27117, {f: 2, c: 27159}, 27237, 27122, 27204,
  14090. 27198, 27296, 27216, 27227, 27189, 27278, 27257, 27197, 27176, 27224,
  14091. 27260, 27281, 27280, 27305, 27287, 27307, 29495, 29522, {f: 2, c: 27521},
  14092. 27527, 27524, {f: 2, c: 27538}, 27533, {f: 2, c: 27546}, 27553, 27562,
  14093. 36715, 36717, {f: 3, c: 36721}, {f: 2, c: 36725}, 36728, 36727,
  14094. {f: 2, c: 36729}, 36732, 36734, {f: 2, c: 36737}, 36740, 36743, 36747,
  14095. {f: 3, c: 36749}, 36760, 36762, 36558, 25099, 25111, 25115, 25119, 25122,
  14096. 25121, 25125, 25124, 25132, 33255, 29935, 29940, 29951, 29967, 29969,
  14097. 29971, [12097, 25908], {f: 3, c: 26094}, 26122, 26137, 26482, 26115, 26133,
  14098. 26112, 28805, 26359, 26141, 26164, 26161, 26166, 26165, 32774, 26207,
  14099. 26196, 26177, 26191, 26198, 26209, 26199, 26231, 26244, 26252, 26279,
  14100. 26269, 26302, {f: 2, c: 26331}, 26342, 26345, {f: 2, c: 36146}, 36150,
  14101. 36155, 36157, 36160, {f: 2, c: 36165}, {f: 2, c: 36168}, 36167, 36173,
  14102. 36181, 36185, 35271, {f: 3, c: 35274}, {f: 4, c: 35278}, 29294, 29343,
  14103. 29277, 29286, 29295, {f: 2, c: 29310}, 29316, 29323, 29325, 29327, 29330,
  14104. 25352, 25394, 25520, 25663, 25816, 32772, 27626, 27635, 27645, 27637,
  14105. 27641, 27653, 27655, 27654, 27661, 27669, {f: 3, c: 27672}, 27681, 27689,
  14106. 27684, 27690, 27698, 25909, 25941, 25963, 29261, 29266, 29270, 29232,
  14107. 34402, 21014, 32927, 32924, 32915, 32956, 26378, 32957, 32945, 32939,
  14108. 32941, 32948, 32951, {f: 4, c: 32999}, 32987, 32962, 32964, 32985, 32973,
  14109. 32983, 26384, 32989, 33003, 33009, 33012, 33005, {f: 2, c: 33037}, 33010,
  14110. 33020, 26389, 33042, 35930, 33078, 33054, 33068, 33048, 33074, 33096,
  14111. 33100, 33107, 33140, {f: 2, c: 33113}, 33137, 33120, 33129,
  14112. {f: 2, c: 33148}, 33133, 33127, 22605, 23221, 33160, 33154, 33169, 28373,
  14113. 33187, 33194, 33228, 26406, 33226, 33211, 33217, 33190, 27428, 27447,
  14114. 27449, 27459, 27462, 27481, {f: 3, c: 39121}, 39125, {f: 2, c: 39129},
  14115. [12110, 27571], 24384, 27586, 35315, 26000, 40785, 26003, 26044, 26054,
  14116. 26052, 26051, 26060, 26062, 26066, 26070, 28800, 28828, 28822, 28829,
  14117. 28859, 28864, 28855, 28843, 28849, 28904, 28874, 28944, 28947, 28950,
  14118. 28975, 28977, 29043, 29020, 29032, 28997, 29042, 29002, 29048, 29050,
  14119. 29080, 29107, 29109, 29096, 29088, 29152, 29140, 29159, 29177, 29213,
  14120. 29224, 28780, 28952, 29030, 29113, 25150, 25149, 25155, {f: 2, c: 25160},
  14121. 31035, 31040, 31046, 31049, {f: 2, c: 31067}, 31059, 31066, 31074, 31063,
  14122. 31072, 31087, 31079, 31098, 31109, 31114, 31130, 31143, 31155, 24529,
  14123. 24528, 24636, 24669, 24666, 24679, 24641, 24665, 24675, 24747, 24838,
  14124. 24845, 24925, 25001, 24989, 25035, 25041, 25094, 32896, [12160, 32895],
  14125. 27795, 27894, 28156, 30710, 30712, 30720, 30729, {f: 2, c: 30743}, 30737,
  14126. 26027, 30765, {f: 2, c: 30748}, {f: 3, c: 30777}, 30751, 30780, 30757,
  14127. 30764, 30755, 30761, 30798, 30829, {f: 2, c: 30806}, 30758, 30800, 30791,
  14128. 30796, 30826, 30875, 30867, 30874, 30855, 30876, 30881, 30883, 30898,
  14129. 30905, 30885, 30932, 30937, 30921, 30956, 30962, 30981, 30964, 30995,
  14130. 31012, 31006, 31028, 40859, [12235, 40697], {f: 2, c: 40699}, 30449, 30468,
  14131. 30477, 30457, {f: 2, c: 30471}, 30490, 30498, 30489, 30509, 30502, 30517,
  14132. 30520, {f: 2, c: 30544}, 30535, 30531, 30554, 30568, 30562, 30565, 30591,
  14133. 30605, 30589, 30592, 30604, 30609, {f: 2, c: 30623}, 30640, 30645, 30653,
  14134. 30010, 30016, 30030, 30027, 30024, 30043, 30066, 30073, 30083, 32600,
  14135. 32609, 32607, 35400, 32616, 32628, 32625, 32633, 32641, 32638, 30413,
  14136. 30437, 34866, {f: 3, c: 38021}, 38027, 38026, {f: 2, c: 38028},
  14137. {f: 2, c: 38031}, 38036, 38039, 38037, {f: 3, c: 38042}, {f: 2, c: 38051},
  14138. 38059, 38058, 38061, 38060, {f: 2, c: 38063}, 38066, 38068,
  14139. {f: 5, c: 38070}, {f: 2, c: 38076}, 38079, 38084, {f: 7, c: 38088},
  14140. {f: 3, c: 38096}, {f: 3, c: 38101}, 38105, 38104, 38107, {f: 3, c: 38110},
  14141. 38114, {f: 2, c: 38116}, {f: 2, c: 38119}, 38122, 38121, 38123,
  14142. {f: 2, c: 38126}, {f: 3, c: 38131}, 38135, 38137, {f: 2, c: 38140}, 38143,
  14143. 38147, 38146, {f: 2, c: 38150}, {f: 2, c: 38153}, {f: 3, c: 38157},
  14144. {f: 5, c: 38162}, 38168, 38171, {f: 3, c: 38173}, 38178, {f: 2, c: 38186},
  14145. 38185, 38188, {f: 2, c: 38193}, 38196, {f: 3, c: 38198}, 38204,
  14146. {f: 2, c: 38206}, 38210, 38197, {f: 3, c: 38212}, 38217, 38220,
  14147. {f: 2, c: 38222}, {f: 3, c: 38226}, {f: 4, c: 38230}, 38235,
  14148. {f: 2, c: 38238}, 38237, {f: 2, c: 38241}, {f: 9, c: 38244}, 38255,
  14149. {f: 3, c: 38257}, 38202, 30695, 30700, 38601, 31189, 31213, 31203, 31211,
  14150. 31238, 23879, 31235, 31234, 31262, 31252, 31289, 31287, 31313, 40655,
  14151. 39333, 31344, 30344, 30350, 30355, 30361, 30372, 29918, 29920, 29996,
  14152. 40480, 40482, {f: 5, c: 40488}, 40498, 40497, 40502, 40504, 40503,
  14153. {f: 2, c: 40505}, 40510, {f: 2, c: 40513}, 40516, {f: 4, c: 40518},
  14154. {f: 2, c: 40523}, 40526, 40529, 40533, 40535, {f: 3, c: 40538}, 40542,
  14155. 40547, {f: 7, c: 40550}, 40561, 40557, 40563, [12135, 30098], 30100, 30102,
  14156. 30112, 30109, 30124, 30115, {f: 2, c: 30131}, 30136, 30148, 30129, 30128,
  14157. 30147, 30146, 30166, 30157, 30179, 30184, 30182, 30180, 30187, 30183,
  14158. 30211, 30193, 30204, 30207, 30224, 30208, 30213, 30220, 30231, 30218,
  14159. 30245, 30232, 30229, 30233, 30235, 30268, 30242, 30240, 30272, 30253,
  14160. 30256, 30271, 30261, 30275, 30270, 30259, 30285, 30302, 30292, 30300,
  14161. 30294, 30315, 30319, 32714, 31462, {f: 2, c: 31352}, 31360, 31366, 31368,
  14162. 31381, 31398, 31392, 31404, 31400, 31405, 31411, 34916, 34921, 34930,
  14163. 34941, 34943, 34946, 34978, 35014, 34999, 35004, 35017, 35042, 35022,
  14164. 35043, 35045, 35057, 35098, 35068, 35048, 35070, 35056, 35105, 35097,
  14165. 35091, 35099, 35082, 35124, 35115, 35126, 35137, 35174, 35195,
  14166. [12134, 30091], 32997, 30386, 30388, 30684, [12158, 32786], 32788, 32790,
  14167. 32796, 32800, 32802, {f: 3, c: 32805}, 32809, 32808, 32817, 32779, 32821,
  14168. 32835, 32838, 32845, 32850, 32873, 32881, 35203, 39032, 39040, 39043,
  14169. 39049, {f: 2, c: 39052}, 39055, 39060, {f: 2, c: 39066}, {f: 2, c: 39070},
  14170. {f: 2, c: 39073}, {f: 2, c: 39077}, [12172, 34381], 34388, 34412, 34414,
  14171. 34431, 34426, 34428, 34427, 34472, 34445, 34443, 34476, 34461, 34471,
  14172. 34467, 34474, 34451, 34473, 34486, 34500, 34485, 34510, 34480, 34490,
  14173. 34481, 34479, 34505, 34511, 34484, 34537, {f: 2, c: 34545}, 34541, 34547,
  14174. 34512, 34579, 34526, 34548, 34527, 34520, 34513, 34563, 34567, 34552,
  14175. 34568, 34570, 34573, 34569, 34595, 34619, 34590, 34597, 34606, 34586,
  14176. 34622, 34632, 34612, 34609, 34601, 34615, 34623, 34690, 34594,
  14177. {f: 2, c: 34685}, 34683, 34656, 34672, 34636, 34670, 34699, 34643, 34659,
  14178. 34684, 34660, 34649, 34661, 34707, 34735, 34728, 34770, 34758, 34696,
  14179. 34693, 34733, 34711, 34691, 34731, 34789, 34732, 34741, 34739, 34763,
  14180. 34771, 34749, 34769, 34752, 34762, 34779, 34794, 34784, 34798, 34838,
  14181. 34835, 34814, 34826, 34843, 34849, 34873, 34876, [12152, 32566], 32578,
  14182. {f: 2, c: 32580}, 33296, 31482, 31485, 31496, {f: 2, c: 31491}, 31509,
  14183. 31498, 31531, 31503, 31559, 31544, 31530, 31513, 31534, 31537, 31520,
  14184. 31525, 31524, 31539, 31550, 31518, 31576, 31578, 31557, 31605, 31564,
  14185. 31581, 31584, 31598, 31611, 31586, 31602, 31601, 31632, {f: 2, c: 31654},
  14186. 31672, 31660, 31645, 31656, 31621, 31658, 31644, 31650, 31659, 31668,
  14187. 31697, 31681, 31692, 31709, 31706, {f: 2, c: 31717}, 31722, 31756, 31742,
  14188. 31740, 31759, 31766, 31755, 31775, 31786, 31782, 31800, 31809, 31808,
  14189. 33278, {f: 2, c: 33281}, 33284, 33260, 34884, {f: 3, c: 33313}, 33325,
  14190. 33327, 33320, 33323, 33336, 33339, {f: 2, c: 33331}, 33342, 33348, 33353,
  14191. 33355, 33359, 33370, 33375, 33384, 34942, 34949, 34952, 35032, 35039,
  14192. 35166, 32669, 32671, 32679, {f: 2, c: 32687}, 32690, 31868, 25929, 31889,
  14193. 31901, 31900, 31902, 31906, 31922, {f: 2, c: 31932}, 31937, 31943,
  14194. {f: 2, c: 31948}, 31944, 31941, 31959, 31976, [12169, 33390], 26280, 32703,
  14195. 32718, 32725, 32741, 32737, 32742, 32745, 32750, 32755, [12151, 31992],
  14196. 32119, 32166, 32174, 32327, 32411, 40632, 40628, 36211, 36228, 36244,
  14197. 36241, 36273, 36199, 36205, 35911, 35913, 37194, 37200, {f: 2, c: 37198},
  14198. 37220, 37218, 37217, 37232, 37225, 37231, {f: 2, c: 37245}, 37234, 37236,
  14199. 37241, 37260, 37253, 37264, 37261, 37265, {f: 2, c: 37282}, 37290,
  14200. {f: 3, c: 37293}, 37301, 37300, 37306, [12183, 35925], 40574, 36280, 36331,
  14201. 36357, 36441, 36457, 36277, 36287, 36284, 36282, 36292, {f: 2, c: 36310},
  14202. 36314, 36318, {f: 2, c: 36302}, 36315, 36294, 36332, {f: 2, c: 36343},
  14203. 36323, 36345, 36347, 36324, 36361, 36349, 36372, 36381, 36383, 36396,
  14204. 36398, 36387, 36399, 36410, 36416, 36409, 36405, 36413, 36401, 36425,
  14205. {f: 2, c: 36417}, {f: 2, c: 36433}, 36426, 36464, 36470, 36476, 36463,
  14206. 36468, 36485, 36495, 36500, 36496, 36508, 36510, [12184, 35960], 35970,
  14207. 35978, 35973, 35992, 35988, 26011, 35286, 35294, 35290, 35292, 35301,
  14208. 35307, 35311, 35390, 35622, 38739, 38633, 38643, 38639, 38662, 38657,
  14209. 38664, 38671, 38670, 38698, 38701, 38704, 38718, 40832, 40835,
  14210. {f: 6, c: 40837}, 40844, 40702, 40715, 40717, [12203, 38585],
  14211. {f: 2, c: 38588}, 38606, 38610, 30655, 38624, 37518, 37550, 37576, 37694,
  14212. 37738, 37834, 37775, 37950, 37995, 40063, 40066, {f: 4, c: 40069}, 31267,
  14213. 40075, 40078, {f: 3, c: 40080}, {f: 2, c: 40084}, {f: 2, c: 40090},
  14214. {f: 6, c: 40094}, {f: 5, c: 40101}, 40107, {f: 2, c: 40109},
  14215. {f: 8, c: 40112}, {f: 4, c: 40122}, {f: 4, c: 40132}, {f: 7, c: 40138},
  14216. {f: 3, c: 40147}, {f: 3, c: 40151}, {f: 2, c: 40156}, 40159, 40162, 38780,
  14217. 38789, {f: 2, c: 38801}, 38804, 38831, 38827, 38819, 38834, 38836, 39601,
  14218. 39600, 39607, 40536, 39606, 39610, 39612, 39617, 39616, 39621, 39618,
  14219. {f: 2, c: 39627}, 39633, 39749, 39747, 39751, 39753, 39752, 39757, 39761,
  14220. 39144, 39181, 39214, 39253, 39252, [12221, 39647], 39649, 39654, 39663,
  14221. 39659, 39675, 39661, 39673, 39688, 39695, 39699, 39711, 39715,
  14222. {f: 2, c: 40637}, 32315, 40578, {f: 2, c: 40583}, 40587, 40594, 37846,
  14223. 40605, 40607, {f: 3, c: 40667}, 40672, 40671, 40674, 40681, 40679, 40677,
  14224. 40682, 40687, 40738, 40748, 40751, 40761, 40759, {f: 2, c: 40765}, 40772,
  14225. 12295, {s: 13}, 30362, 34297, 31001, 24859, 39599, 35158, 22761, 32631,
  14226. 25850, 25943, 38930, 36774, 32070, 24171, 32129, 37770, 35607, 39165,
  14227. 23542, 22577, 39825, 36649, [12185, 35997], 37575, 29437, 20633, 24970,
  14228. 32179, 31558, 30050, 25987, 24163, 38281, 37002, 32232, 36022, 35722,
  14229. 36783, 36782, 27161, 40009, 30303, 28693, 28657, 36051, 25839, 39173,
  14230. 25765, 37474, 37457, 39361, 35036, 36001, 21443, 34870, 27544, 24922,
  14231. 24920, 29158, 33980, 33369, 20489, 28356, 21408, 20596, 28204, 23652,
  14232. 35435, 25881, 25723, 34796, 39262, 35730, 32399, 37855, 29987, 38369,
  14233. 39019, 22580, 22039, [12199, 38263], 20767, 33144, 24288, 26274, 37396,
  14234. [12190, 36554], 24505, 22645, 38515, 35183, 31281, 25074, 35488, 39425,
  14235. 36978, 39347, [12242, 40786], 29118, 34909, 34802, 23541, 30087, 36490,
  14236. 31820, 32162, 37276, 37604, 38619, 30990, 20786, 35320, 34389, 20659,
  14237. 30241, 38358, 21109, 37656, 32020, 32189, 36781, 35422, 36060, 32880,
  14238. 24478, 21474, 36517, 31428, 37679, 36948, 24118, 36024, 25812, 21934,
  14239. 37170, 25763, 33213, 24986, 35477, 24392, 30070, 25803, 40680, 34153,
  14240. 27284, 25623, 23798, 31153, 23566, 29128, 37159, 25973, 28364, 36958,
  14241. 32224, 39003, 40670, 22666, 38651, 28593, 37347, 35519, 35548, 37336,
  14242. 38914, 37664, 35330, 26481, 21205, 26847, 20941, [12222, 39717], 29346,
  14243. 29544, 35712, 36077, 37709, 37723, 26039, 32222, 38538, 23565, 22136,
  14244. 38931, 37389, 22890, 22702, 40285, 38989, 35355, 24801, 39187, 20818,
  14245. 29246, 39180, 36019, 30332, 32624, 38309, 31020, 37353, 29033, 31684,
  14246. 36009, 39151, 35370, 32033, [12214, 39131], 35513, 24290, 36027, 32027,
  14247. 22707, 22894, 24996, 31966, 35920, 26963, 37586, [12213, 39080], 30219,
  14248. 39342, 32299, 35575, 40179, 33178, 36667, 25771, 36628, 36070, 24489,
  14249. 36000, 35331, 23142, 32283, 35442, 37411, 33995, 24185, 36245, 36123,
  14250. 23713, 21083, 37628, 32177, 23831, 37804, 25841, 40255, 38307, 37499,
  14251. 20491, 32102, 40852, 38799, 36002, 37390, 28317, 27083, 36092, 34865,
  14252. 39015, 21102, 38364, 35264, 39208, 24931, 36011, 24291, 35215, 27512,
  14253. [12244, 40860], 38312, 36556, 35437, 27331, 36020, 21130, 36645, 37707,
  14254. 22283, 36942, 39405, 38867, 28450, 34399, 38305, 40372, 36032, 36703,
  14255. 40251, 32005, 22778, 35703, 28396, 22057, 33775, 30059, 21123, 35441,
  14256. 25079, 22750, 27489, 29872, 36996, 32233, 35594, 25582, 36637, 36036,
  14257. 31330, 26371, 29172, 21295, 35569, 35496, 32362, 33911, 28222, 29554,
  14258. 36008, 31117, 25802, 27231, 31309, 39249, 35663, 40388, 32318, 32221,
  14259. 26997, 36655, 32026, 25824, 24190, 34186, 21137, 28639, 35336, 35352,
  14260. 38555, 32380, 32000, 22846, 33698, 38960, 36040, 37440, 20729, 39381,
  14261. 27570, 30435, 22533, 31627, 38291, 33393, 32216, 32365, 27298, 40572,
  14262. 25536, 25791, 31777, 20745, 34214, 27323, 37970, 36368, 36068,
  14263. [12178, 35211], 37749, 33382, 21133, 39198, 28472, 28666, 28567, 23559,
  14264. 28479, 34083, 27123, 22892, 35611, 37292, 33184, 28550, 39509, 23308,
  14265. 25898, 37496, 30703, 20709, 39171, 32371, 32094, 36686, 36611, 38542,
  14266. 31680, 28500, 32080, 35489, 32202, 37670, 20677, 35641, 36914, 29180,
  14267. 30433, 21185, 33686, 39912, 39514, 32147, 38968, 37857, 24465, 30169,
  14268. 31478, 31998, 33290, 39378, 33289, 25818, 37624, 25084, 21127, 40273,
  14269. 32121, 35258, 35363, 32118, 37406, 36557, 39423, 38283, 20977, 38982,
  14270. 27579, 35506, 22718, 25031, 25715, 24235, 35122, 35463, 22602, 20744,
  14271. 23532, 31014, 26336, 34407, 24011, 31418, 39243, 28528, 25844, 38346,
  14272. 34847, 33240, 33802, 20358, 36084, 34253, 27396, 25876, 31811, 38348,
  14273. 34349, 28734, 35733, 25900, 35261, 25078, 32412, 29211, 28651, 25736,
  14274. 21214, 28551, 27138, 37939, 22744, 39006, 31852, 38626, 28757, 35023,
  14275. 39881, 31150, 40599, 21426, 21237, 31019, 27511, 28701, 38584, 20486,
  14276. 32879, 34030, 36899, 37934, 24976, 28451, 31806, 25986, 33225, 37832,
  14277. 25088, 29001, 32244, 31975, 20841, 36635, 35538, 30274, 36988, 37904,
  14278. 29557, 33256, 37168, 40023, 36035, 40801, 37428, 38728, 23994, 38936,
  14279. 39230, 21129, [12243, 40845], 32894, 22184, 31840, 22751, 25871, 38580,
  14280. 27155, 23105, 25695, 31757, 34310, 30439, 39025, 24300, 29200, 25796,
  14281. 28407, 34396, 39791, 36034, 37682, 38520, 39522, 37569, 23650, 32311,
  14282. 24942, 28670, 32209, 24018, 25891, 23423, 28772, 20098, 25476, 36650,
  14283. 20523, 20374, 28138, 32184, 35542, 34367, 32645, 37007, 38012, 31854,
  14284. 39486, 39409, 32097, 23229, 29802, 30908, 34718, [12218, 39340], 39393,
  14285. 21966, 36023, [12230, 40613], 36067, 36993, 30622, 39237, 34875, 28415,
  14286. 35646, 37672, 37466, 36031, 37762, [12200, 38272], 24758, 20497, 37683,
  14287. 22818, 35598, 24396, 35219, 32191, 32236, 24287, 28357, 25003, 38313,
  14288. 40180, 37528, 35628, 35584, 30045, 37385, 32013, 38627, 25747, 33126,
  14289. 24817, 39719, 39186, 25836, 33193, 25862, 37312, [12227, 40165], 32886,
  14290. 22169, 38007, 37811, 27320, 29552, 23527, 25840, 28632, 37397, 32016,
  14291. 33215, 28611, 36786, 30247, 35582, 27472, 40407, 27590, 22036, 28442,
  14292. 30436, 40848, 36064, 22132, 40300, 39449, 39108, 38971, 36007, 34315,
  14293. 24977, 35413, 28497, 38935, 25778, 37610, 20693, 27192, 35676, 33229,
  14294. [12241, 40778], 39438, 35912, 21843, 27683, 35350, 29309, 37370, 37467,
  14295. 36983, 31805, 35609, 37666, 37463, 28154, 35700, 22649, 27085, 21958,
  14296. 22715, 34196, 25654, 37740, 27211, 21932, 20689, 32761, 31429, 31434,
  14297. 27453, 35242, 23522, 36629, 27691, 20670, 38915, 35531, 24950, 29898,
  14298. 31406, 36264, 21312, 36544, 39493, 40818, 39028, 27402, 21240, 40306,
  14299. 30906, 35731, 39250, 25854, 32350, 29105, 38860, 35469, 32009, 27054,
  14300. 32104, 36575, 37613, 38287, 28516, 28753, 34217, 39955, 36093, 20632,
  14301. 21930, 39479, 25475, 28544, 27578, 32023, 31721, 26348, 38275, 38493,
  14302. 36109, 32341, 20663, 36062, 29138, 32057, 36050, 25448, 25885, 25086,
  14303. 35373, 32051, 23529, 23352, 33102, 28402, 32882, 32361, 21213, 32854,
  14304. 24107, 29509, 28629, 35433, 26178, 34645, 23526, 35672, 39387, 21218,
  14305. 36969, 37323, 39166, 35222, 35430, 22781, 29560, 27166, 36664, 26360,
  14306. 36118, 23660, 34899, 27193, 31466, 25976, 24101, 38617, 35504, 38918,
  14307. 35500, 30889, 29197, 32114, 39164, 39686, 32883, 24939, 38924, 35359,
  14308. 35494, 25851, 34311, 35380, 32901, 38614, 38568, 32143, 27506, 23403,
  14309. 25613, 32302, 29795, 37782, 29562, 25787, 33274, 24907, 25892, 36010,
  14310. 30321, 28760, 22727, 35674, 35527, 22022, 28271, 29145, 28644, 32295,
  14311. 35342, 39472, 35588, 37563, 38988, 39636, 26781, 36028, 37941, 24307,
  14312. 32893, 28916, 37509, 32113, 38957, 22294, 22615, 22296, 38973, 40213,
  14313. 39345, 39389, 27234, 31402, 35178, 24398, 28771, 38929, 33836, 32178,
  14314. [12209, 38859], 36949, 22285, 29234, 28656, 32173, 33894, 20553, 20702,
  14315. 32239, 35586, 34907, 32862, 32011, 31337, 21839, 25790, 34680, 28198,
  14316. 31401, 21978, 37794, 28879, 35491, 28961, 34154, 22626, 38695, 21209,
  14317. 35492, 37675, 29351, 35186, 32722, 37521, 25138, 32048, 34662, 36676,
  14318. 23805, 20448, 29433, 22151, 37697, 39854, 32406, 36066, 37532, 38289,
  14319. 39023, 38570, 29694, 29563, 32291, 39201, 25010, 32171, 38002, 37129,
  14320. 35443, 38911, 38917, 34157, 22210, 37559, 26313, 22063, 21332, 25406,
  14321. 33029, 35559, 23531, 28681, 35613, 37573, 37313, 33288, 37561, 32137,
  14322. 38920, 35377, 32210, 32396, 36562, 25080, 36984, 30316, 32098, 23416,
  14323. 21211, 35426, 23563, 39348, 35347, 35338, 36956, 22739, 40201, 40232,
  14324. 21854, 20126, 35357, 38329, 40573, 22196, 38996, 38331, 33399, 21421,
  14325. 30831, 35578, 39511, 40230, 26954, 25562, 30221, 38525, 30306, 39178,
  14326. 27171, 22575, 35617, 34277, 29242, [12212, 38913], 26989, 33865, 37291,
  14327. 37541, 38948, 36986, 20736, 34811, 34269, 20740, 25014, 32681, 35427,
  14328. 35696, 35516, 35695, 32377, 34093, 38512, 37504, 39154, 38577, 27387,
  14329. 23344, 40441, 25033, 32403, 29801, 34722, 29151, 29074, 34821, 36111,
  14330. 31310, 21938, 25793, 20653, 30320, 36404, 20778, 24962, 37109, 37438,
  14331. 29494, 35480, 36671, 39192, [12226, 39770], 28417, 33287, 23996, 35486,
  14332. 39729, 29508, 35709, 38928, 39341, 40219, 28149, 36677, 22290, 21729,
  14333. 22291, 32227, 36960, 39000, 32004, 36493, 38000, 38322, 38642, 37142,
  14334. 38549, 36939, 34292, 37270, 26248, 38620, 36617, 25890, 26283, 36106,
  14335. 36124, 33247, 38015, 26839, 31432, 36012, 25799, 21063, 28580, 36042,
  14336. 36104, 36555, 37720, 38296, 35408, 40779, 20661, 27656, 30430, 26028,
  14337. 36670, 23940, 26855, 25136, 32187, 24373, 28466, 24115, 36076, 33081,
  14338. 36249, 34756, 36685, 37754, 36889, 35998, 37341, 20597, 35386, 37806,
  14339. 38499, 24128, 30309, 37165, 35657, 32340, 32887, 22519, 34937, 32025,
  14340. 25711, 25842, 24159, 36074, 28399, 37912, 32066, 31278, 33131, 34886,
  14341. 35589, 36600, 30394, 26205, 39519, 35576, 35461, 29165, 30682, 22225,
  14342. 36015, 37956, 31689, 39376, 23560, 30938, 36681, 36090, 27137, 33674,
  14343. 35037, 22941, 22767, 29376, 37648, 36101, 22684, 32180, 35524, 28310,
  14344. 28609, 36039, 28460, 32156, 32317, 32305, 37138, 35419, 32068, 38013,
  14345. 21959, 21401, 21428, 38760, 36107, 21293, 21297, 36094, 21060, 21132,
  14346. 21108, 20660, 20480, 20630, 20757, 20738, 20756, 20796, 20791, 20712,
  14347. 20674, 20795, 20752, 20794, 20681, 31988, 40652, 22213, 40172, 35131,
  14348. 33248, 35329, 35344, 35340, 35349, 35635, 35406, 35365, 35393, 35382,
  14349. 35398, 35412, 35416, 35410, 35462, 35460, 35455, 35440, 35452, 35445,
  14350. 35436, 35438, 35533, 35554, 35425, 35482, 35493, {f: 2, c: 35473}, 35535,
  14351. 35537, 35529, 35547, 35543, 35522, 35510, 35574, 35563, 35604, 35585,
  14352. 35556, 35565, 35580, 35571, 35558, 35566, 35550, 35624, 35740, 35606,
  14353. 35610, 35600, 35627, 35629, 35670, 35673, 35662, 35742, 35691, 35734,
  14354. 38488, 37178, 37140, 37172, 37087, 37174, 37126, 37192, 33467, 21233,
  14355. 24048, 22538, 22745, 22754, 22752, 22746, 22497, 22607, 22550, 22610,
  14356. 22557, 22628, 34188, 34131, 34294, 33703, 33799, 34031, 33511, 34338,
  14357. 34086, 22603, 29026, 34136, 34045, 34126, 34184, 34234, 29334, 28366,
  14358. 34113, 34254, 34130, 33984, 33874, 33892, 33940, 33845, 34207, 34133,
  14359. 40367, 33939, 32264, 34118, 34146, 34078, 39488, 34362, 37795, 34167,
  14360. 34334, 34298, 34308, 34282, 34330, 22889, 23607, 25451, 25718, 25759,
  14361. 25681, 25692, 25779, 25860, 25878, 25847, 25852, 25883, 22064, 22072,
  14362. 22216, 22182, 21764, 21692, 22144, 22109, 22112, 22069, 22006, 22118,
  14363. 22130, 22156, 22117, 22044, 22062, 21993, 22038, 22208, 22029, 22195,
  14364. 22209, 22127, 36705, 22198, 22165, 22279, 24131, 24172, 24152, 24151,
  14365. 23943, 23796, 23888, 23852, 23975, 23968, 23959, 23821, 23992, 23937,
  14366. 24020, 24480, 29559, 29505, 29546, 29499, 29547, 29568, 29564, 39136,
  14367. 39219, 39145, 39228, {f: 2, c: 39146}, 39149, 39156, 39177, 39185, 39195,
  14368. 39223, 39231, 39235, {f: 3, c: 39240}, 39244, 39266, 24289, 36065, 25082,
  14369. 25006, 24938, 24894, 24757, 24884, 25036, 24927, 25064, 24827, 24887,
  14370. 24818, 24947, 24860, 24978, 38274, 38278, 38344, 38286, 38292, 38284,
  14371. 38373, 38317, 38315, 39726, 38316, 38334, 38326, 39721, 38335, 38333,
  14372. 38332, 38339, 38347, 38356, 38352, 38357, 38366, 28739, 28505, 28711,
  14373. 28696, 28668, 28039, 28025, 28254, 28590, 28687, 28408, 28527, 28150,
  14374. 28543, 28678, 28576, 28683, 28775, 28740, 28677, 28535, 28704, 28703,
  14375. 28722, 28712, 28765, 39467, 36999, 36885, 37008, 23656, 24371, 23285,
  14376. 23255, 23296, 23149, 23304, 23372, 23207, 23291, 23307, 23329, 23338,
  14377. 23321, 39380, 39391, 39385, 39478, 39515, 39377, 39384, 39501, 39498,
  14378. 39394, 39530, 39439, 39437, 39429, 39490, 39469, 39446, 39489, 39470,
  14379. 39480, {f: 2, c: 39491}, 39503, 39525, 39524, 31993, 32006, 32002,
  14380. {f: 2, c: 32007}, 32394, 32028, 32021, 32019, 32058, 32050, 32049, 32272,
  14381. 32060, 32064, 32063, 32093, 32078, 32115, 32134, 32131, 32136, 32190,
  14382. 32186, 32203, 32212, 32196, 32158, 32172, 32185, 32163, 32176, 32199,
  14383. 32217, 32215, 32249, 32242, 32354, 32230, 32246, 32241, 32267, 32225,
  14384. 32265, 32285, 32287, 32286, 32301, 32266, 32273, 32381, 32313, 32309,
  14385. 32306, 32326, 32325, 32392, 32346, 32338, 32366, 32382, 32368, 32367,
  14386. 32408, 29859, 29771, 29903, 38922, 29885, 29759, 29833, 29862, 29908,
  14387. 29914, 38873, 38878, 38876, 27050, 27370, 26776, 26838, 27141, 26783,
  14388. 27355, 27379, 27368, 27359, 27273, 26895, 27208, 26984, 27071, 27194,
  14389. 27292, 27410, 27422, 27357, 27111, 27407, 27414, 27372, 27354, 27384,
  14390. 27315, 27367, 27299, 27347, 27358, 27556, 27550, 27566, 27563, 27567,
  14391. 36564, 36571, 36594, 36603, 36708, 36601, 36604, 36587, 36580, 36706,
  14392. 36602, 36606, 36618, 36615, 36613, 36626, 36646, {f: 2, c: 36638}, 36636,
  14393. 36659, 36678, 36692, 25108, 25127, 29964, 26311, 26308, 26249, 26326,
  14394. 36033, 36016, 36026, 36029, 36100, 36018, 36037, 36112, 36049, 36058,
  14395. 36053, 36075, 36071, 36091, 35224, 35244, 35233, 35263, 35238, 35247,
  14396. 35250, 35255, 27647, 27660, 27692, 29272, 26407, 33110, 33242, 33051,
  14397. 33214, 33121, 33231, 27487, {f: 2, c: 39086}, 39094, 39100, 39110, 39112,
  14398. 36674, 40783, 26005, 29036, 29010, 29079, 29121, 29148, 29182, 31152,
  14399. 31118, 31146, 25055, 24932, 25059, 25095, 28585, 30959, 30893, 30824,
  14400. 30904, 31018, 31025, 30820, 30973, 30951, 30947, 40853, 30616, 30558,
  14401. 30652, 32646, 32648, {f: 3, c: 37330}, 37337, 37335, 37333, 37367, 37351,
  14402. 37348, 37702, 37365, 37369, 37384, 37414, 37445, 37393, 37392, 37377,
  14403. 37415, 37380, 37413, 37376, 37434, 37478, 37431, 37427, 37461, 37437,
  14404. 37432, 37470, {f: 2, c: 37484}, 37439, 37984, 37424, 37449, 37448, 37453,
  14405. 37422, 37433, 37944, 37548, 37536, 37498, 37546, 37614, 37583, 37891,
  14406. 37603, 37946, 37553, 37542, 37799, 37526, 37580, 37545, 37877, 37523,
  14407. 37503, 37801, 37530, 37658, 37547, 37507, 37899, 37544, 37539, 37906,
  14408. 37688, 37617, 37847, 37605, 37616, 37615, 37608, 37564, 37597, 37622,
  14409. {f: 2, c: 37926}, 37571, 37599, 37606, 37650, 37638, 37737, 37659, 37696,
  14410. 37633, 37653, 37678, 37699, {f: 2, c: 37639}, 37663, 37657, 37733, 37703,
  14411. 37750, 37716, 37732, 37802, 37744, 37764, 37860, 37848, 37928, 37767,
  14412. 37836, 37784, 37816, 37823, 37798, 37808, 37813, 37964, 37858,
  14413. {f: 2, c: 37852}, 37837, 37854, 37827, 37831, 37841, 37908, 37917, 37879,
  14414. 37989, 37907, 37997, 37920, 38009, 37881, 37913, 37962, 37938, 37951,
  14415. 37972, 37987, 37758, 31329, 40169, 40182, 40199, 40198, 40227, 40327,
  14416. 40469, 40221, 40223, 40421, 40239, 40409, 40240, 40258, 40478, 40275,
  14417. 40477, 40288, 40274, 40435, 40284, 40289, 40339, 40298, 40303, 40329,
  14418. 40344, 40346, 40384, 40357, 40361, 40386, 40380, 40474, 40403, 40410,
  14419. 40431, 40422, 40434, 40440, 40460, 40442, 40475, 30308, 30296, 30311,
  14420. 30210, {f: 2, c: 30278}, 30281, 30238, 30267, {f: 2, c: 30317}, 30313,
  14421. 30322, 31431, 31414, 35168, 35123, 35165, 35143, 35128, 35172, 30392,
  14422. 32814, 32812, 32889, 32885, 38919, {f: 2, c: 38926}, 38945, 38940, 28481,
  14423. 38950, 38967, 38990, 38995, 39027, 39010, 39001, 39013, 39020, 39024,
  14424. 34787, 34822, 34566, 34851, 34806, 34554, 34799, 34692, 34832, 34760,
  14425. 34833, 34747, 34766, 32588, 31716, 31591, 31849, 31731, 31744, 31691,
  14426. 31836, 31774, 31787, 31779, 31850, 31839, 33380, 33387, 35018, 32677,
  14427. 31986, 31990, 31965, 32310, 40617, 36274, 37317, 37315, 40570, 36489,
  14428. 36428, 36498, 36474, 36437, 36506, 36491, 36499, 36497, 36513, 36451,
  14429. 36522, 36518, 35316, 35318, 38746, 38722, 38717, 38724, 40788, 40799,
  14430. 40793, 40800, 40796, 40806, 40812, 40810, 40823, [12236, 40701], 40703,
  14431. 40713, 35726, 38014, 37864, 39799, 39796, 39809, 39811, 39822, 40056,
  14432. 31308, 39826, 40031, 39824, 39853, 39834, 39850, 39838, 40045, 39851,
  14433. 39837, 40024, 39873, 40058, 39985, 39993, 39971, 39991, 39872, 39882,
  14434. 39879, 39933, 39894, {f: 2, c: 39914}, 39905, 39908, 39911, 39901, 39906,
  14435. 39920, 39899, 39924, 39892, 40029, 39944, 39952, 39949, 39954, 39945,
  14436. 39935, 39968, 39986, 39981, 39976, 39973, 39977, 39987, 39998, 40008,
  14437. 39995, 39989, 40005, 40022, 40020, 40018, 40039, 38851, 38845, 38857,
  14438. 40379, 39631, 39638, 39637, 39768, 39758, 39255, 39260, 39714, 40695,
  14439. 40690, 35180, 38342, 37686, 24390, 34068, 32404, 40803, 22137, 40725,
  14440. 22081, 39662, 35079, 31296, 39091, 38308, 39693, 36852, 24409, 31339,
  14441. 39138, 20642, 34193, 20760, 25458, 21067, 30543, 32397, 26310, 30637,
  14442. [12228, 40565], 22217, 40692, 28635, 25054, 30663, 28720, 40629, 34890,
  14443. 38370, 38854, 31844, 32308, 38822, 40623, 22220, 39089, 27311, 32590,
  14444. 31984, 20418, 32363, 40569, 22190, 39706, 33903, 31142, 31858, 39634,
  14445. 38587, 32251, 35069, 30787, {f: 10, c: 8560}, {f: 2, c: 714}, 729, 8211,
  14446. 8213, 8229, 8245, 8453, 8457, {f: 4, c: 8598}, 8725, 8735, 8739, 8786,
  14447. {f: 2, c: 8806}, 8895, {f: 36, c: 9552}, {f: 15, c: 9601}, {f: 3, c: 9619},
  14448. {f: 2, c: 9660}, {f: 4, c: 9698}, 9737, 8853, 12306, {f: 2, c: 12317},
  14449. {f: 9, c: 12321}, 12963, {f: 2, c: 13198}, {f: 3, c: 13212}, 13217, 13252,
  14450. 13262, {f: 2, c: 13265}, 13269, 65072, 65506, 65508, 8481, 12849, 8208,
  14451. 12540, {f: 2, c: 12443}, {f: 2, c: 12541}, 12294, {f: 2, c: 12445},
  14452. {f: 10, c: 65097}, {f: 4, c: 65108}, {f: 14, c: 65113}, {f: 4, c: 65128},
  14453. 12350, {f: 12, c: 12272}, 19970, {f: 3, c: 19972}, 19983, 19986, 19991,
  14454. {f: 3, c: 19999}, 20003, 20006, 20009, {f: 2, c: 20014}, 20017, 20019,
  14455. 20021, 20023, 20028, {f: 3, c: 20032}, 20036, 20038, 20042, 20049, 20053,
  14456. 20055, {f: 2, c: 20058}, {f: 4, c: 20066}, {f: 2, c: 20071},
  14457. {f: 6, c: 20074}, 20082, {f: 10, c: 20084}, {f: 3, c: 20095},
  14458. {f: 2, c: 20099}, [12037, 20101], 20103, 20106, 20112, {f: 2, c: 20118},
  14459. 20121, {f: 2, c: 20124}, 20131, 20138, {f: 3, c: 20143}, 20148,
  14460. {f: 4, c: 20150}, {f: 3, c: 20156}, 20168, 20172, {f: 2, c: 20175}, 20178,
  14461. {f: 3, c: 20186}, 20192, 20194, {f: 2, c: 20198}, 20201, {f: 3, c: 20205},
  14462. 20209, 20212, {f: 3, c: 20216}, 20220, 20222, 20224, {f: 7, c: 20226},
  14463. {f: 2, c: 20235}, {f: 5, c: 20242}, {f: 2, c: 20252}, 20257, 20259,
  14464. {f: 2, c: 20264}, {f: 3, c: 20268}, 20273, 20275, 20277, 20279, 20281,
  14465. 20283, {f: 5, c: 20286}, {f: 2, c: 20292}, {f: 6, c: 20295}, 20306, 20308,
  14466. 20310, {f: 2, c: 20321}, 20326, 20328, {f: 2, c: 20330}, {f: 2, c: 20333},
  14467. {f: 2, c: 20337}, 20341, {f: 4, c: 20343}, 20349, {f: 3, c: 20352}, 20357,
  14468. 20359, 20362, 20364, 20366, 20368, {f: 2, c: 20370}, 20373,
  14469. {f: 3, c: 20376}, 20380, {f: 2, c: 20382}, {f: 2, c: 20385}, 20388, 20395,
  14470. 20397, {f: 5, c: 20400}, {f: 9, c: 20406}, {f: 2, c: 20416},
  14471. {f: 4, c: 20422}, {f: 3, c: 20427}, {f: 5, c: 20434}, 20441, 20443, 20450,
  14472. {f: 2, c: 20452}, 20455, {f: 2, c: 20459}, 20464, 20466, {f: 4, c: 20468},
  14473. 20473, {f: 3, c: 20475}, 20479, {f: 5, c: 20481}, {f: 2, c: 20487}, 20490,
  14474. 20494, 20496, 20499, {f: 3, c: 20501}, 20507, {f: 2, c: 20509}, 20512,
  14475. {f: 3, c: 20514}, 20519, {f: 11, c: 20527}, 20539, 20541, {f: 4, c: 20543},
  14476. {f: 3, c: 20548}, {f: 2, c: 20554}, 20557, {f: 5, c: 20560},
  14477. {f: 4, c: 20566}, 20571, {f: 8, c: 20573}, {f: 6, c: 20582},
  14478. {f: 7, c: 20589}, {f: 3, c: 20600}, {f: 2, c: 20604}, {f: 4, c: 20609},
  14479. {f: 2, c: 20614}, {f: 4, c: 20617}, {f: 8, c: 20622}, 20631,
  14480. {f: 8, c: 20634}, 20644, 20646, {f: 2, c: 20650}, {f: 4, c: 20654}, 20662,
  14481. {f: 2, c: 20664}, {f: 2, c: 20668}, {f: 3, c: 20671}, {f: 2, c: 20675},
  14482. {f: 3, c: 20678}, {f: 5, c: 20682}, 20688, {f: 3, c: 20690},
  14483. {f: 3, c: 20695}, {f: 3, c: 20699}, {f: 6, c: 20703}, {f: 3, c: 20713},
  14484. {f: 4, c: 20719}, 20724, {f: 3, c: 20726}, 20730, {f: 4, c: 20732}, 20737,
  14485. 20739, 20741, 20746, {f: 4, c: 20748}, 20753, 20755, {f: 2, c: 20758},
  14486. {f: 6, c: 20761}, 20768, {f: 8, c: 20770}, {f: 7, c: 20779},
  14487. {f: 4, c: 20787}, {f: 2, c: 20792}, {f: 2, c: 20797}, 20802, 20807, 20810,
  14488. 20812, {f: 3, c: 20814}, 20819, {f: 3, c: 20823}, 20827, {f: 5, c: 20829},
  14489. {f: 2, c: 20835}, {f: 2, c: 20838}, 20842, 20847, 20850, 20858,
  14490. {f: 2, c: 20862}, {f: 2, c: 20867}, {f: 2, c: 20870}, {f: 2, c: 20874},
  14491. {f: 4, c: 20878}, {f: 2, c: 20883}, 20888, 20890, {f: 3, c: 20893}, 20897,
  14492. 20899, {f: 5, c: 20902}, {f: 2, c: 20909}, 20916, {f: 3, c: 20920},
  14493. {f: 2, c: 20926}, {f: 3, c: 20929}, 20933, 20936, 20938, 20942, 20944,
  14494. {f: 9, c: 20946}, 20956, {f: 2, c: 20958}, {f: 2, c: 20962},
  14495. {f: 6, c: 20965}, 20972, 20974, 20978, 20980, 20983, 20990,
  14496. {f: 2, c: 20996}, 21001, {f: 2, c: 21003}, {f: 2, c: 21007},
  14497. {f: 3, c: 21011}, 21020, {f: 2, c: 21022}, {f: 3, c: 21025},
  14498. {f: 3, c: 21029}, 21034, 21036, 21039, {f: 2, c: 21041}, {f: 2, c: 21044},
  14499. 21052, 21054, {f: 2, c: 21061}, {f: 2, c: 21064}, {f: 2, c: 21070},
  14500. {f: 2, c: 21074}, 21077, {f: 4, c: 21079}, 21085, {f: 2, c: 21087},
  14501. {f: 3, c: 21090}, 21094, 21096, {f: 3, c: 21099}, {f: 2, c: 21104}, 21107,
  14502. {f: 7, c: 21110}, 21118, 21120, {f: 3, c: 21124}, 21131, {f: 2, c: 21134},
  14503. 21138, {f: 7, c: 21140}, 21148, {f: 4, c: 21156}, {f: 3, c: 21166},
  14504. {f: 10, c: 21172}, 21184, 21186, {f: 3, c: 21188}, 21192, 21194,
  14505. {f: 4, c: 21196}, 21201, {f: 2, c: 21203}, 21207, 21210, 21212,
  14506. {f: 2, c: 21216}, 21219, {f: 11, c: 21221}, {f: 3, c: 21234},
  14507. {f: 2, c: 21238}, {f: 3, c: 21243}, {f: 4, c: 21249}, 21255,
  14508. {f: 4, c: 21257}, 21262, {f: 4, c: 21265}, 21272, {f: 2, c: 21275},
  14509. {f: 2, c: 21278}, 21282, {f: 2, c: 21284}, {f: 3, c: 21287},
  14510. {f: 2, c: 21291}, 21296, {f: 6, c: 21298}, [12054, 21304],
  14511. {f: 2, c: 21308}, 21314, 21316, 21318, {f: 3, c: 21323}, 21328,
  14512. {f: 2, c: 21336}, 21339, 21341, 21349, 21352, 21354, {f: 2, c: 21356},
  14513. 21362, 21366, 21369, {f: 4, c: 21371}, {f: 2, c: 21376}, 21379,
  14514. {f: 2, c: 21383}, 21386, {f: 7, c: 21390}, {f: 2, c: 21398},
  14515. {f: 2, c: 21403}, 21406, 21409, 21412, 21415, {f: 3, c: 21418},
  14516. {f: 3, c: 21423}, 21427, 21429, {f: 4, c: 21431}, {f: 3, c: 21436}, 21440,
  14517. {f: 4, c: 21444}, {f: 3, c: 21454}, {f: 2, c: 21458}, 21461, 21466,
  14518. {f: 3, c: 21468}, 21473, 21479, 21492, 21498, {f: 3, c: 21502}, 21506,
  14519. 21509, 21511, 21515, 21524, {f: 3, c: 21528}, 21532, 21538,
  14520. {f: 2, c: 21540}, 21546, 21552, 21555, {f: 2, c: 21558}, 21562, 21565,
  14521. 21567, {f: 2, c: 21569}, {f: 2, c: 21572}, 21575, 21577, {f: 4, c: 21580},
  14522. 21585, 21594, {f: 5, c: 21597}, 21603, 21605, 21607, {f: 8, c: 21609},
  14523. 21620, {f: 2, c: 21625}, {f: 2, c: 21630}, 21633, 21635, 21637,
  14524. {f: 4, c: 21639}, 21645, 21649, 21651, {f: 2, c: 21655}, 21660,
  14525. {f: 5, c: 21662}, 21669, 21678, 21680, 21682, {f: 3, c: 21685},
  14526. {f: 2, c: 21689}, 21694, 21699, 21701, {f: 2, c: 21706}, 21718, 21720,
  14527. 21723, 21728, {f: 3, c: 21730}, {f: 2, c: 21739}, {f: 3, c: 21743},
  14528. {f: 6, c: 21748}, 21755, 21758, 21760, {f: 2, c: 21762}, 21765, 21768,
  14529. {f: 5, c: 21770}, {f: 2, c: 21778}, {f: 6, c: 21781}, {f: 4, c: 21788},
  14530. 21793, {f: 2, c: 21797}, {f: 2, c: 21800}, 21803, 21805, 21810,
  14531. {f: 3, c: 21812}, {f: 4, c: 21816}, 21821, 21824, 21826, 21829,
  14532. {f: 2, c: 21831}, {f: 4, c: 21835}, {f: 2, c: 21841}, 21844,
  14533. {f: 5, c: 21847}, 21853, {f: 2, c: 21855}, {f: 2, c: 21858},
  14534. {f: 2, c: 21864}, 21867, {f: 6, c: 21871}, {f: 2, c: 21881}, 21885, 21887,
  14535. {f: 2, c: 21893}, {f: 3, c: 21900}, 21904, {f: 2, c: 21906},
  14536. {f: 3, c: 21909}, {f: 2, c: 21914}, 21918, {f: 7, c: 21920},
  14537. {f: 2, c: 21928}, 21931, 21933, {f: 2, c: 21935}, 21940, 21942, 21944,
  14538. 21946, 21948, {f: 5, c: 21951}, 21960, {f: 2, c: 21962}, {f: 2, c: 21967},
  14539. 21973, {f: 3, c: 21975}, 21979, 21982, 21984, 21986, 21991,
  14540. {f: 2, c: 21997}, {f: 2, c: 22000}, 22004, {f: 5, c: 22008}, 22015,
  14541. {f: 4, c: 22018}, 22023, {f: 2, c: 22026}, {f: 4, c: 22032}, 22037,
  14542. {f: 2, c: 22041}, 22045, {f: 3, c: 22048}, {f: 2, c: 22053}, 22056,
  14543. {f: 2, c: 22058}, 22067, 22071, 22074, {f: 3, c: 22076}, 22080,
  14544. {f: 10, c: 22082}, {f: 5, c: 22095}, {f: 2, c: 22101}, {f: 2, c: 22106},
  14545. {f: 2, c: 22110}, 22113, 22115, 22119, {f: 2, c: 22125}, 22128, 22131,
  14546. 22133, 22135, 22138, {f: 3, c: 22141}, {f: 4, c: 22145}, {f: 4, c: 22152},
  14547. 22157, {f: 3, c: 22160}, 22164, {f: 3, c: 22166}, {f: 9, c: 22170},
  14548. {f: 2, c: 22180}, 22183, {f: 5, c: 22185}, {f: 3, c: 22192}, 22197,
  14549. {f: 4, c: 22200}, {f: 3, c: 22205}, {f: 2, c: 22211}, {f: 2, c: 22214},
  14550. 22219, {f: 4, c: 22221}, {f: 2, c: 22226}, {f: 2, c: 22229},
  14551. {f: 2, c: 22232}, 22236, 22243, {f: 6, c: 22245}, 22252, {f: 2, c: 22254},
  14552. {f: 2, c: 22258}, {f: 3, c: 22262}, {f: 2, c: 22267}, {f: 3, c: 22272},
  14553. 22277, 22284, {f: 4, c: 22286}, {f: 2, c: 22292}, 22295, {f: 3, c: 22297},
  14554. {f: 2, c: 22301}, {f: 3, c: 22304}, {f: 4, c: 22308}, 22315,
  14555. {f: 2, c: 22321}, {f: 5, c: 22324}, {f: 2, c: 22332}, 22335, 22337,
  14556. {f: 4, c: 22339}, {f: 2, c: 22344}, 22347, {f: 5, c: 22354},
  14557. {f: 2, c: 22360}, {f: 2, c: 22370}, 22373, 22375, 22380, 22382,
  14558. {f: 3, c: 22384}, {f: 2, c: 22388}, {f: 3, c: 22392}, {f: 5, c: 22397},
  14559. {f: 4, c: 22407}, {f: 5, c: 22413}, {f: 7, c: 22420}, {f: 4, c: 22428},
  14560. 22437, 22440, 22442, 22444, {f: 3, c: 22447}, 22451, {f: 3, c: 22453},
  14561. {f: 9, c: 22457}, {f: 7, c: 22468}, {f: 2, c: 22476}, {f: 2, c: 22480},
  14562. 22483, {f: 2, c: 22486}, {f: 2, c: 22491}, 22494, {f: 2, c: 22498},
  14563. {f: 8, c: 22501}, 22510, {f: 4, c: 22512}, {f: 2, c: 22517},
  14564. {f: 2, c: 22523}, {f: 2, c: 22526}, 22529, {f: 2, c: 22531},
  14565. {f: 2, c: 22536}, 22540, {f: 3, c: 22542}, {f: 3, c: 22546},
  14566. {f: 2, c: 22551}, {f: 3, c: 22554}, 22559, {f: 2, c: 22562},
  14567. {f: 5, c: 22565}, {f: 4, c: 22571}, {f: 2, c: 22578}, {f: 14, c: 22582},
  14568. {f: 5, c: 22597}, 22606, 22608, 22611, {f: 2, c: 22613}, {f: 5, c: 22617},
  14569. {f: 3, c: 22623}, 22627, {f: 5, c: 22630}, {f: 8, c: 22637},
  14570. {f: 3, c: 22646}, {f: 4, c: 22650}, 22655, 22658, 22660, {f: 3, c: 22662},
  14571. {f: 7, c: 22667}, {f: 5, c: 22676}, 22683, 22685, {f: 8, c: 22688},
  14572. {f: 4, c: 22698}, {f: 4, c: 22703}, {f: 7, c: 22708}, 22717,
  14573. {f: 2, c: 22719}, {f: 3, c: 22722}, 22726, {f: 9, c: 22728}, 22738, 22740,
  14574. {f: 2, c: 22742}, {f: 3, c: 22747}, 22753, 22755, {f: 4, c: 22757}, 22762,
  14575. 22765, {f: 2, c: 22769}, {f: 2, c: 22772}, {f: 2, c: 22775},
  14576. {f: 2, c: 22779}, {f: 4, c: 22782}, 22787, {f: 2, c: 22789},
  14577. {f: 2, c: 22792}, [12066, 22794], {f: 2, c: 22795}, 22798,
  14578. {f: 4, c: 22800}, {f: 2, c: 22807}, 22811, {f: 2, c: 22813},
  14579. {f: 2, c: 22816}, 22819, 22822, 22824, 22828, 22832, {f: 2, c: 22834},
  14580. {f: 2, c: 22837}, 22843, 22845, {f: 2, c: 22847}, 22851, {f: 2, c: 22853},
  14581. 22858, {f: 2, c: 22860}, 22864, {f: 2, c: 22866}, 22873, {f: 5, c: 22875},
  14582. 22881, {f: 2, c: 22883}, {f: 3, c: 22886}, 22891, 22893, {f: 4, c: 22895},
  14583. 22901, 22903, {f: 3, c: 22906}, {f: 3, c: 22910}, 22917, 22921,
  14584. {f: 2, c: 22923}, {f: 4, c: 22926}, {f: 2, c: 22932}, 22936,
  14585. {f: 3, c: 22938}, {f: 4, c: 22943}, {f: 2, c: 22950}, {f: 2, c: 22956},
  14586. {f: 2, c: 22960}, {f: 6, c: 22963}, 22970, {f: 2, c: 22972},
  14587. {f: 7, c: 22975}, {f: 3, c: 22983}, {f: 4, c: 22988}, {f: 2, c: 22997},
  14588. 23001, 23003, {f: 5, c: 23006}, 23012, {f: 2, c: 23014}, {f: 3, c: 23017},
  14589. {f: 12, c: 23021}, 23034, {f: 3, c: 23036}, 23040, 23042, {f: 2, c: 23050},
  14590. {f: 4, c: 23053}, 23058, {f: 4, c: 23060}, {f: 3, c: 23065},
  14591. {f: 2, c: 23069}, {f: 2, c: 23073}, 23076, {f: 3, c: 23078},
  14592. {f: 7, c: 23082}, 23091, 23093, {f: 5, c: 23095}, {f: 3, c: 23101},
  14593. {f: 4, c: 23106}, {f: 2, c: 23111}, {f: 10, c: 23115}, {f: 4, c: 23126},
  14594. {f: 7, c: 23131}, {f: 3, c: 23139}, {f: 2, c: 23144}, {f: 2, c: 23147},
  14595. {f: 6, c: 23150}, {f: 2, c: 23160}, {f: 4, c: 23163}, {f: 18, c: 23168},
  14596. {f: 7, c: 23187}, {f: 11, c: 23196}, {f: 2, c: 23208}, {f: 7, c: 23211},
  14597. 23220, {f: 2, c: 23222}, {f: 4, c: 23225}, {f: 2, c: 23231},
  14598. {f: 6, c: 23235}, {f: 2, c: 23242}, {f: 5, c: 23245}, 23251, 23253,
  14599. {f: 3, c: 23257}, {f: 3, c: 23261}, 23266, {f: 2, c: 23268},
  14600. {f: 2, c: 23271}, 23274, {f: 5, c: 23276}, {f: 3, c: 23282},
  14601. {f: 5, c: 23286}, {f: 4, c: 23292}, {f: 7, c: 23297}, 23306,
  14602. {f: 9, c: 23309}, 23320, {f: 7, c: 23322}, {f: 8, c: 23330},
  14603. {f: 5, c: 23339}, 23345, 23347, {f: 2, c: 23349}, {f: 7, c: 23353},
  14604. {f: 11, c: 23361}, {f: 3, c: 23373}, 23378, 23382, 23390, {f: 2, c: 23392},
  14605. {f: 2, c: 23399}, {f: 3, c: 23405}, 23410, 23412, {f: 2, c: 23414}, 23417,
  14606. {f: 2, c: 23419}, 23422, 23426, 23430, 23434, {f: 2, c: 23437},
  14607. {f: 3, c: 23440}, 23444, 23446, 23455, {f: 3, c: 23463}, {f: 4, c: 23468},
  14608. {f: 2, c: 23473}, 23479, {f: 3, c: 23482}, {f: 2, c: 23488}, 23491,
  14609. {f: 4, c: 23496}, {f: 3, c: 23501}, 23505, {f: 9, c: 23508}, 23520, 23523,
  14610. 23530, 23533, 23535, {f: 4, c: 23537}, 23543, {f: 2, c: 23549}, 23552,
  14611. {f: 2, c: 23554}, 23557, 23564, 23568, {f: 2, c: 23570}, 23575, 23577,
  14612. 23579, {f: 4, c: 23582}, 23587, 23590, {f: 4, c: 23592}, {f: 4, c: 23597},
  14613. {f: 2, c: 23602}, {f: 2, c: 23605}, {f: 2, c: 23619}, {f: 2, c: 23622},
  14614. {f: 2, c: 23628}, {f: 3, c: 23634}, {f: 3, c: 23638}, {f: 4, c: 23642},
  14615. 23647, 23655, {f: 3, c: 23657}, 23661, 23664, {f: 7, c: 23666},
  14616. {f: 4, c: 23675}, 23680, {f: 5, c: 23683}, {f: 3, c: 23689},
  14617. {f: 2, c: 23694}, {f: 2, c: 23698}, 23701, {f: 4, c: 23709},
  14618. {f: 5, c: 23716}, 23722, {f: 3, c: 23726}, 23730, 23732, 23734,
  14619. {f: 4, c: 23737}, 23742, 23744, {f: 2, c: 23746}, {f: 6, c: 23749},
  14620. {f: 6, c: 23756}, {f: 6, c: 23763}, {f: 7, c: 23770}, {f: 2, c: 23778},
  14621. 23783, 23785, {f: 2, c: 23787}, {f: 2, c: 23790}, {f: 3, c: 23793}, 23797,
  14622. {f: 4, c: 23799}, 23804, {f: 4, c: 23806}, {f: 2, c: 23812},
  14623. {f: 5, c: 23816}, {f: 5, c: 23823}, 23829, {f: 3, c: 23832},
  14624. {f: 2, c: 23836}, {f: 5, c: 23839}, 23845, 23848, {f: 2, c: 23850},
  14625. {f: 5, c: 23855}, {f: 8, c: 23861}, {f: 8, c: 23871}, {f: 2, c: 23880},
  14626. {f: 3, c: 23885}, {f: 7, c: 23889}, {f: 2, c: 23897}, 23900,
  14627. {f: 11, c: 23902}, 23914, {f: 2, c: 23917}, {f: 4, c: 23920},
  14628. {f: 12, c: 23925}, 23939, {f: 2, c: 23941}, {f: 15, c: 23944}, 23960,
  14629. {f: 3, c: 23962}, {f: 2, c: 23966}, {f: 6, c: 23969}, {f: 15, c: 23976},
  14630. 23993, 23995, {f: 8, c: 23997}, {f: 5, c: 24006}, 24012, {f: 4, c: 24014},
  14631. 24019, {f: 6, c: 24021}, 24028, {f: 2, c: 24031}, {f: 2, c: 24035}, 24042,
  14632. {f: 2, c: 24044}, {f: 2, c: 24053}, {f: 5, c: 24056}, {f: 2, c: 24063},
  14633. 24068, 24071, {f: 3, c: 24073}, {f: 2, c: 24077}, {f: 2, c: 24082}, 24087,
  14634. {f: 7, c: 24094}, {f: 3, c: 24104}, 24108, {f: 2, c: 24111}, 24114,
  14635. {f: 2, c: 24116}, {f: 2, c: 24121}, {f: 2, c: 24126}, 24129,
  14636. {f: 6, c: 24134}, {f: 7, c: 24141}, 24150, {f: 2, c: 24153},
  14637. {f: 2, c: 24156}, 24160, {f: 7, c: 24164}, {f: 5, c: 24173}, 24181, 24183,
  14638. {f: 3, c: 24193}, 24197, {f: 2, c: 24200}, {f: 3, c: 24204}, 24210, 24216,
  14639. 24219, 24221, {f: 4, c: 24225}, {f: 3, c: 24232}, 24236, {f: 5, c: 24238},
  14640. 24244, {f: 4, c: 24250}, {f: 10, c: 24255}, {f: 6, c: 24267},
  14641. {f: 2, c: 24276}, {f: 4, c: 24279}, {f: 3, c: 24284}, {f: 4, c: 24292},
  14642. 24297, 24299, {f: 6, c: 24301}, 24309, {f: 2, c: 24312}, {f: 3, c: 24315},
  14643. {f: 3, c: 24325}, 24329, {f: 3, c: 24332}, 24336, 24338, 24340, 24342,
  14644. {f: 2, c: 24345}, {f: 3, c: 24348}, {f: 4, c: 24353}, 24360,
  14645. {f: 2, c: 24363}, 24366, 24368, 24370, 24372, {f: 3, c: 24374}, 24379,
  14646. {f: 3, c: 24381}, {f: 5, c: 24385}, 24391, {f: 3, c: 24393}, 24397, 24399,
  14647. 24401, 24404, {f: 3, c: 24410}, {f: 3, c: 24414}, 24419, 24421,
  14648. {f: 2, c: 24423}, 24427, {f: 2, c: 24430}, 24434, {f: 3, c: 24436}, 24440,
  14649. 24442, {f: 3, c: 24445}, 24451, 24454, {f: 3, c: 24461}, {f: 2, c: 24467},
  14650. 24470, {f: 2, c: 24474}, 24477, 24479, {f: 6, c: 24482}, {f: 2, c: 24491},
  14651. {f: 6, c: 24495}, 24502, 24504, {f: 2, c: 24506}, {f: 5, c: 24510},
  14652. {f: 2, c: 24519}, {f: 2, c: 24522}, 24526, {f: 3, c: 24531},
  14653. {f: 3, c: 24538}, {f: 2, c: 24542}, {f: 2, c: 24546}, {f: 2, c: 24549},
  14654. {f: 2, c: 24552}, 24556, {f: 2, c: 24559}, {f: 3, c: 24562},
  14655. {f: 2, c: 24566}, {f: 2, c: 24569}, 24572, {f: 3, c: 24583},
  14656. {f: 2, c: 24587}, {f: 2, c: 24592}, 24595, {f: 2, c: 24599}, 24602,
  14657. {f: 2, c: 24606}, {f: 3, c: 24610}, {f: 3, c: 24620}, {f: 5, c: 24624},
  14658. {f: 5, c: 24630}, {f: 2, c: 24637}, 24640, {f: 7, c: 24644}, 24652,
  14659. {f: 2, c: 24654}, 24657, {f: 2, c: 24659}, {f: 3, c: 24662},
  14660. {f: 2, c: 24667}, {f: 4, c: 24670}, {f: 2, c: 24677}, 24686,
  14661. {f: 2, c: 24689}, {f: 2, c: 24692}, 24695, 24702, {f: 3, c: 24704},
  14662. {f: 4, c: 24709}, {f: 2, c: 24714}, {f: 4, c: 24718}, 24723, 24725,
  14663. {f: 3, c: 24727}, 24732, 24734, {f: 2, c: 24737}, {f: 2, c: 24740}, 24743,
  14664. {f: 2, c: 24745}, 24750, 24752, 24755, 24759, {f: 2, c: 24761},
  14665. {f: 8, c: 24765}, {f: 3, c: 24775}, {f: 5, c: 24780}, {f: 3, c: 24786},
  14666. {f: 2, c: 24790}, 24793, 24795, 24798, {f: 4, c: 24802}, 24810, 24821,
  14667. {f: 2, c: 24823}, {f: 4, c: 24828}, {f: 4, c: 24834}, 24839,
  14668. {f: 3, c: 24842}, {f: 5, c: 24848}, {f: 4, c: 24854}, {f: 2, c: 24861},
  14669. {f: 2, c: 24865}, 24869, {f: 3, c: 24872}, {f: 8, c: 24876},
  14670. {f: 2, c: 24885}, {f: 6, c: 24888}, {f: 8, c: 24896}, 24905, 24909,
  14671. {f: 2, c: 24911}, {f: 3, c: 24914}, {f: 2, c: 24918}, 24921,
  14672. {f: 2, c: 24923}, 24926, {f: 2, c: 24928}, {f: 2, c: 24933}, 24937,
  14673. {f: 2, c: 24940}, 24943, {f: 2, c: 24945}, 24948, {f: 10, c: 24952},
  14674. {f: 7, c: 24963}, {f: 2, c: 24972}, 24975, 24979, {f: 5, c: 24981},
  14675. {f: 2, c: 24987}, {f: 6, c: 24990}, {f: 2, c: 24997}, 25002, 25005,
  14676. {f: 3, c: 25007}, {f: 3, c: 25011}, {f: 6, c: 25016}, {f: 3, c: 25023},
  14677. {f: 4, c: 25027}, {f: 4, c: 25037}, 25043, {f: 9, c: 25045},
  14678. {f: 3, c: 25056}, {f: 2, c: 25060}, 25063, {f: 9, c: 25065},
  14679. {f: 2, c: 25075}, 25081, 25083, 25085, {f: 5, c: 25089}, 25097, 25107,
  14680. 25113, {f: 3, c: 25116}, 25120, 25123, 25126, {f: 2, c: 25128}, 25131,
  14681. 25133, 25135, 25137, 25141, [12094, 25142], {f: 5, c: 25144}, 25154,
  14682. {f: 3, c: 25156}, 25162, {f: 2, c: 25167}, {f: 3, c: 25173},
  14683. {f: 2, c: 25177}, {f: 7, c: 25180}, {f: 2, c: 25188}, 25192,
  14684. {f: 2, c: 25201}, {f: 2, c: 25204}, {f: 2, c: 25207}, {f: 2, c: 25210},
  14685. 25213, {f: 3, c: 25217}, {f: 4, c: 25221}, {f: 6, c: 25227}, 25236, 25241,
  14686. {f: 3, c: 25244}, 25251, {f: 2, c: 25254}, {f: 2, c: 25257},
  14687. {f: 4, c: 25261}, {f: 3, c: 25266}, {f: 3, c: 25270}, 25274, 25278,
  14688. {f: 2, c: 25280}, 25283, 25291, 25295, 25297, 25301, {f: 2, c: 25309},
  14689. {f: 2, c: 25312}, 25316, {f: 2, c: 25322}, 25328, 25330, 25333,
  14690. {f: 4, c: 25336}, 25344, {f: 4, c: 25347}, {f: 4, c: 25354},
  14691. {f: 2, c: 25359}, {f: 4, c: 25362}, {f: 3, c: 25367}, 25372,
  14692. {f: 2, c: 25382}, 25385, {f: 3, c: 25388}, {f: 2, c: 25392},
  14693. {f: 6, c: 25395}, {f: 2, c: 25403}, {f: 3, c: 25407}, 25412,
  14694. {f: 2, c: 25415}, 25418, {f: 4, c: 25425}, {f: 8, c: 25430}, 25440,
  14695. {f: 3, c: 25444}, 25450, 25452, {f: 2, c: 25455}, {f: 3, c: 25459},
  14696. {f: 2, c: 25464}, {f: 4, c: 25468}, 25473, {f: 2, c: 25477}, 25483, 25485,
  14697. 25489, {f: 3, c: 25491}, 25495, {f: 7, c: 25497}, 25505, 25508, 25510,
  14698. 25515, 25519, {f: 2, c: 25521}, {f: 2, c: 25525}, 25529, 25531, 25533,
  14699. 25535, {f: 3, c: 25537}, 25541, {f: 2, c: 25543}, {f: 3, c: 25546}, 25553,
  14700. {f: 3, c: 25555}, {f: 3, c: 25559}, {f: 3, c: 25563}, 25567, 25570,
  14701. {f: 5, c: 25572}, {f: 2, c: 25579}, {f: 3, c: 25583}, 25587, 25589, 25591,
  14702. {f: 4, c: 25593}, 25598, {f: 2, c: 25603}, {f: 5, c: 25606}, 25614,
  14703. {f: 2, c: 25617}, {f: 2, c: 25621}, {f: 3, c: 25624}, 25629, 25631,
  14704. {f: 4, c: 25634}, {f: 3, c: 25639}, 25643, {f: 6, c: 25646}, 25653,
  14705. {f: 3, c: 25655}, {f: 2, c: 25659}, 25662, 25664, {f: 2, c: 25666}, 25673,
  14706. {f: 6, c: 25675}, 25683, {f: 3, c: 25685}, {f: 3, c: 25689}, 25693,
  14707. {f: 7, c: 25696}, 25704, {f: 3, c: 25706}, 25710, {f: 3, c: 25712},
  14708. {f: 2, c: 25716}, 25719, {f: 6, c: 25724}, 25731, 25734, {f: 8, c: 25737},
  14709. 25748, {f: 2, c: 25751}, {f: 4, c: 25754}, {f: 3, c: 25760},
  14710. {f: 3, c: 25766}, 25770, 25775, 25777, 25780, 25782, 25785, 25789, 25795,
  14711. 25798, {f: 2, c: 25800}, 25804, 25807, 25809, 25811, {f: 2, c: 25813},
  14712. 25817, {f: 3, c: 25819}, 25823, 25825, 25827, 25829, {f: 5, c: 25831},
  14713. {f: 2, c: 25837}, 25843, {f: 2, c: 25845}, {f: 2, c: 25848}, 25853, 25855,
  14714. {f: 3, c: 25857}, 25861, {f: 2, c: 25863}, {f: 5, c: 25866},
  14715. {f: 2, c: 25872}, 25875, 25877, 25879, 25882, 25884, {f: 4, c: 25886},
  14716. {f: 4, c: 25894}, 25901, {f: 4, c: 25904}, 25911, 25914, {f: 2, c: 25916},
  14717. {f: 5, c: 25920}, {f: 2, c: 25926}, {f: 2, c: 25930}, {f: 2, c: 25933},
  14718. 25936, {f: 3, c: 25938}, 25944, 25946, 25948, {f: 3, c: 25951},
  14719. {f: 2, c: 25956}, {f: 4, c: 25959}, {f: 3, c: 25965}, 25969, 25971, 25974,
  14720. {f: 9, c: 25977}, {f: 3, c: 25988}, {f: 3, c: 25992}, {f: 3, c: 25997},
  14721. 26002, 26004, 26006, 26008, 26010, {f: 2, c: 26013}, 26016,
  14722. {f: 2, c: 26018}, 26022, 26024, 26026, 26030, {f: 6, c: 26033}, 26040,
  14723. {f: 2, c: 26042}, {f: 3, c: 26046}, 26050, {f: 4, c: 26055}, 26061,
  14724. {f: 2, c: 26064}, {f: 3, c: 26067}, {f: 8, c: 26072}, 26081,
  14725. {f: 2, c: 26083}, {f: 2, c: 26090}, {f: 4, c: 26098}, {f: 2, c: 26104},
  14726. {f: 5, c: 26107}, 26113, {f: 2, c: 26116}, {f: 3, c: 26119}, 26123, 26125,
  14727. {f: 3, c: 26128}, {f: 3, c: 26134}, {f: 3, c: 26138}, 26142,
  14728. {f: 4, c: 26145}, 26150, {f: 4, c: 26153}, 26158, 26160, {f: 2, c: 26162},
  14729. {f: 5, c: 26167}, 26173, {f: 2, c: 26175}, {f: 7, c: 26180},
  14730. {f: 2, c: 26189}, {f: 2, c: 26192}, {f: 2, c: 26200}, {f: 2, c: 26203},
  14731. 26206, 26208, {f: 2, c: 26210}, 26213, 26215, {f: 5, c: 26217},
  14732. {f: 3, c: 26225}, 26229, {f: 2, c: 26232}, {f: 3, c: 26235},
  14733. {f: 3, c: 26239}, 26243, {f: 2, c: 26245}, {f: 2, c: 26250},
  14734. {f: 4, c: 26253}, {f: 4, c: 26258}, {f: 5, c: 26264}, {f: 4, c: 26270},
  14735. {f: 4, c: 26275}, {f: 2, c: 26281}, {f: 2, c: 26284}, {f: 5, c: 26287},
  14736. {f: 4, c: 26293}, {f: 4, c: 26298}, {f: 5, c: 26303}, 26309, 26312,
  14737. {f: 12, c: 26314}, {f: 2, c: 26327}, 26330, {f: 2, c: 26334},
  14738. {f: 5, c: 26337}, {f: 2, c: 26343}, {f: 2, c: 26346}, {f: 3, c: 26349},
  14739. 26353, {f: 2, c: 26357}, {f: 2, c: 26362}, 26365, {f: 2, c: 26369},
  14740. {f: 4, c: 26372}, 26380, {f: 2, c: 26382}, {f: 3, c: 26385}, 26390,
  14741. {f: 3, c: 26392}, 26396, 26398, {f: 6, c: 26400}, 26409, 26414, 26416,
  14742. {f: 2, c: 26418}, {f: 4, c: 26422}, {f: 2, c: 26427}, {f: 2, c: 26430},
  14743. 26433, {f: 2, c: 26436}, 26439, {f: 2, c: 26442}, 26445, 26450,
  14744. {f: 2, c: 26452}, {f: 5, c: 26455}, 26461, {f: 3, c: 26466},
  14745. {f: 2, c: 26470}, {f: 2, c: 26475}, 26478, 26484, 26486, {f: 4, c: 26488},
  14746. 26493, 26496, {f: 2, c: 26498}, {f: 2, c: 26501}, 26504, 26506,
  14747. {f: 4, c: 26508}, {f: 4, c: 26513}, 26518, 26521, 26523, {f: 3, c: 26527},
  14748. 26532, 26534, 26537, 26540, 26542, {f: 2, c: 26545}, 26548,
  14749. {f: 8, c: 26553}, 26562, {f: 10, c: 26565}, {f: 3, c: 26581}, 26587, 26591,
  14750. 26593, {f: 2, c: 26595}, {f: 3, c: 26598}, {f: 2, c: 26602},
  14751. {f: 2, c: 26605}, 26610, {f: 8, c: 26613}, 26622, {f: 4, c: 26625}, 26630,
  14752. 26637, 26640, 26642, {f: 2, c: 26644}, {f: 5, c: 26648}, {f: 3, c: 26654},
  14753. {f: 7, c: 26658}, {f: 7, c: 26667}, {f: 3, c: 26676}, {f: 2, c: 26682},
  14754. 26687, 26695, 26699, 26701, 26703, 26706, {f: 10, c: 26710}, 26730,
  14755. {f: 8, c: 26732}, 26741, {f: 9, c: 26744}, 26754, 26756, {f: 8, c: 26759},
  14756. {f: 3, c: 26768}, {f: 3, c: 26772}, {f: 4, c: 26777}, 26782,
  14757. {f: 2, c: 26784}, {f: 3, c: 26787}, {f: 4, c: 26793}, 26798,
  14758. {f: 2, c: 26801}, 26804, {f: 10, c: 26806}, 26817, {f: 6, c: 26819}, 26826,
  14759. 26828, {f: 4, c: 26830}, {f: 2, c: 26835}, 26841, {f: 4, c: 26843},
  14760. {f: 2, c: 26849}, {f: 3, c: 26852}, {f: 6, c: 26856}, 26863,
  14761. {f: 3, c: 26866}, {f: 3, c: 26870}, 26875, {f: 4, c: 26877},
  14762. {f: 3, c: 26882}, {f: 5, c: 26886}, 26892, 26897, {f: 12, c: 26899},
  14763. {f: 3, c: 26913}, {f: 8, c: 26917}, {f: 2, c: 26926}, {f: 3, c: 26929},
  14764. {f: 4, c: 26933}, {f: 3, c: 26938}, 26942, {f: 2, c: 26944},
  14765. {f: 7, c: 26947}, {f: 8, c: 26955}, {f: 2, c: 26965}, {f: 2, c: 26968},
  14766. {f: 2, c: 26971}, 26975, {f: 2, c: 26977}, {f: 2, c: 26980}, 26983,
  14767. {f: 2, c: 26985}, 26988, {f: 2, c: 26991}, {f: 3, c: 26994}, 26998,
  14768. {f: 2, c: 27002}, {f: 3, c: 27005}, 27009, 27011, 27013, {f: 3, c: 27018},
  14769. {f: 6, c: 27022}, {f: 2, c: 27030}, {f: 2, c: 27033}, {f: 10, c: 27037},
  14770. 27049, 27052, {f: 2, c: 27055}, {f: 2, c: 27058}, {f: 2, c: 27061},
  14771. {f: 3, c: 27064}, {f: 3, c: 27068}, 27072, {f: 8, c: 27074}, 27087,
  14772. {f: 3, c: 27089}, {f: 6, c: 27093}, {f: 3, c: 27100}, {f: 6, c: 27105},
  14773. {f: 5, c: 27112}, {f: 4, c: 27118}, {f: 9, c: 27124}, 27134, 27136,
  14774. {f: 2, c: 27139}, {f: 4, c: 27142}, {f: 8, c: 27147}, {f: 3, c: 27156},
  14775. {f: 4, c: 27162}, 27168, 27170, {f: 4, c: 27172}, 27177, {f: 4, c: 27179},
  14776. 27184, {f: 3, c: 27186}, {f: 2, c: 27190}, {f: 2, c: 27195},
  14777. {f: 5, c: 27199}, {f: 2, c: 27205}, {f: 2, c: 27209}, {f: 4, c: 27212},
  14778. {f: 7, c: 27217}, 27226, {f: 3, c: 27228}, 27232, {f: 2, c: 27235},
  14779. {f: 11, c: 27238}, {f: 7, c: 27250}, {f: 2, c: 27258}, {f: 3, c: 27261},
  14780. {f: 3, c: 27265}, {f: 4, c: 27269}, {f: 4, c: 27274}, 27279,
  14781. {f: 2, c: 27282}, {f: 2, c: 27285}, {f: 4, c: 27288}, {f: 3, c: 27293},
  14782. 27297, {f: 5, c: 27300}, 27306, {f: 2, c: 27309}, {f: 3, c: 27312},
  14783. {f: 4, c: 27316}, {f: 2, c: 27321}, {f: 7, c: 27324}, {f: 15, c: 27332},
  14784. {f: 6, c: 27348}, 27356, {f: 7, c: 27360}, 27369, 27371, {f: 6, c: 27373},
  14785. {f: 4, c: 27380}, {f: 2, c: 27385}, {f: 8, c: 27388}, {f: 5, c: 27397},
  14786. {f: 4, c: 27403}, {f: 2, c: 27408}, {f: 3, c: 27411}, {f: 7, c: 27415},
  14787. 27423, {f: 2, c: 27429}, {f: 10, c: 27432}, {f: 4, c: 27443}, 27448,
  14788. {f: 2, c: 27451}, {f: 4, c: 27455}, {f: 2, c: 27460}, 27464,
  14789. {f: 2, c: 27466}, {f: 3, c: 27469}, {f: 8, c: 27473}, {f: 5, c: 27482},
  14790. 27488, {f: 2, c: 27496}, {f: 7, c: 27499}, {f: 4, c: 27507}, 27514,
  14791. {f: 4, c: 27517}, 27525, 27528, 27532, {f: 4, c: 27534}, {f: 2, c: 27540},
  14792. 27543, 27545, {f: 2, c: 27548}, {f: 2, c: 27551}, {f: 2, c: 27554},
  14793. {f: 5, c: 27557}, {f: 2, c: 27564}, {f: 2, c: 27568}, 27574,
  14794. {f: 2, c: 27576}, {f: 3, c: 27580}, 27584, {f: 2, c: 27587},
  14795. {f: 4, c: 27591}, 27596, 27598, {f: 2, c: 27600}, 27608, 27610,
  14796. {f: 5, c: 27612}, {f: 8, c: 27618}, {f: 3, c: 27628}, {f: 3, c: 27632},
  14797. 27636, {f: 3, c: 27638}, {f: 3, c: 27642}, 27646, {f: 5, c: 27648},
  14798. {f: 3, c: 27657}, 27662, 27666, 27671, {f: 3, c: 27676}, 27680, 27685,
  14799. 27693, 27697, 27699, {f: 2, c: 27702}, {f: 4, c: 27705}, {f: 2, c: 27710},
  14800. {f: 3, c: 27715}, 27720, {f: 5, c: 27723}, {f: 3, c: 27729}, 27734,
  14801. {f: 3, c: 27736}, {f: 2, c: 27746}, {f: 3, c: 27749}, {f: 5, c: 27755},
  14802. 27761, 27763, 27765, {f: 2, c: 27767}, {f: 3, c: 27770}, {f: 2, c: 27775},
  14803. 27780, 27783, {f: 2, c: 27786}, {f: 2, c: 27789}, {f: 2, c: 27793},
  14804. {f: 4, c: 27797}, 27802, {f: 3, c: 27804}, 27808, 27810, 27816, 27820,
  14805. {f: 2, c: 27823}, {f: 4, c: 27828}, 27834, {f: 4, c: 27840},
  14806. {f: 3, c: 27846}, 27851, {f: 3, c: 27853}, {f: 2, c: 27857},
  14807. {f: 3, c: 27864}, {f: 2, c: 27868}, 27871, 27876, {f: 2, c: 27878}, 27881,
  14808. {f: 2, c: 27884}, 27890, 27892, 27897, {f: 2, c: 27903}, {f: 2, c: 27906},
  14809. {f: 2, c: 27909}, {f: 3, c: 27912}, 27917, {f: 3, c: 27919},
  14810. {f: 4, c: 27923}, 27928, {f: 2, c: 27932}, {f: 6, c: 27935}, 27942,
  14811. {f: 2, c: 27944}, {f: 2, c: 27948}, {f: 2, c: 27951}, 27956,
  14812. {f: 3, c: 27958}, 27962, {f: 2, c: 27967}, 27970, 27972, 27977, 27980,
  14813. 27984, {f: 4, c: 27989}, 27995, 27997, 27999, {f: 2, c: 28001},
  14814. {f: 2, c: 28004}, {f: 2, c: 28007}, {f: 3, c: 28011}, {f: 4, c: 28016},
  14815. {f: 2, c: 28021}, {f: 2, c: 28026}, {f: 5, c: 28029}, {f: 2, c: 28035},
  14816. 28038, {f: 2, c: 28042}, 28045, {f: 2, c: 28047}, 28050, {f: 5, c: 28054},
  14817. 28060, 28066, 28069, {f: 2, c: 28076}, {f: 2, c: 28080}, {f: 2, c: 28083},
  14818. {f: 2, c: 28086}, {f: 6, c: 28089}, {f: 3, c: 28097}, {f: 3, c: 28104},
  14819. {f: 4, c: 28109}, {f: 4, c: 28114}, 28119, {f: 3, c: 28122}, 28127,
  14820. {f: 2, c: 28130}, 28133, {f: 3, c: 28135}, 28141, {f: 2, c: 28143}, 28146,
  14821. 28148, 28152, {f: 8, c: 28157}, {f: 4, c: 28166}, 28171, 28175,
  14822. {f: 2, c: 28178}, 28181, {f: 2, c: 28184}, {f: 2, c: 28187},
  14823. {f: 2, c: 28190}, 28194, {f: 2, c: 28199}, 28202, 28206, {f: 2, c: 28208},
  14824. 28211, {f: 3, c: 28213}, 28217, {f: 3, c: 28219}, {f: 4, c: 28223},
  14825. {f: 8, c: 28229}, {f: 4, c: 28239}, 28245, 28247, {f: 2, c: 28249},
  14826. {f: 2, c: 28252}, {f: 11, c: 28256}, {f: 2, c: 28268}, {f: 14, c: 28272},
  14827. {f: 3, c: 28288}, 28292, {f: 2, c: 28295}, {f: 5, c: 28298},
  14828. {f: 5, c: 28305}, 28311, {f: 3, c: 28313}, 28318, {f: 2, c: 28320},
  14829. {f: 2, c: 28323}, 28326, {f: 2, c: 28328}, {f: 4, c: 28331}, 28336, 28339,
  14830. 28341, {f: 2, c: 28344}, 28348, {f: 3, c: 28350}, 28355, 28358,
  14831. {f: 3, c: 28360}, 28365, 28368, 28370, 28374, {f: 2, c: 28376},
  14832. {f: 3, c: 28379}, 28387, 28391, {f: 2, c: 28394}, {f: 2, c: 28397},
  14833. {f: 2, c: 28400}, 28403, {f: 2, c: 28405}, {f: 5, c: 28410}, 28416,
  14834. {f: 3, c: 28419}, {f: 2, c: 28423}, {f: 5, c: 28426}, {f: 3, c: 28432},
  14835. {f: 4, c: 28438}, {f: 5, c: 28443}, 28449, {f: 4, c: 28453}, 28462, 28464,
  14836. {f: 2, c: 28468}, 28471, {f: 5, c: 28473}, 28480, {f: 4, c: 28482},
  14837. {f: 3, c: 28488}, 28492, {f: 3, c: 28494}, {f: 2, c: 28498},
  14838. {f: 3, c: 28501}, {f: 2, c: 28506}, 28509, {f: 3, c: 28511}, 28515, 28517,
  14839. {f: 6, c: 28519}, 28529, 28531, {f: 2, c: 28533}, 28537, 28539,
  14840. {f: 2, c: 28541}, {f: 3, c: 28545}, 28549, {f: 2, c: 28554},
  14841. {f: 8, c: 28559}, {f: 4, c: 28568}, {f: 3, c: 28573}, {f: 2, c: 28578},
  14842. {f: 2, c: 28581}, 28584, {f: 4, c: 28586}, {f: 2, c: 28591}, 28594,
  14843. {f: 2, c: 28596}, {f: 2, c: 28599}, {f: 6, c: 28602}, {f: 5, c: 28612},
  14844. {f: 7, c: 28618}, {f: 2, c: 28627}, {f: 2, c: 28630}, {f: 2, c: 28633},
  14845. {f: 2, c: 28636}, {f: 2, c: 28642}, {f: 6, c: 28645}, {f: 2, c: 28652},
  14846. {f: 8, c: 28658}, 28667, 28669, {f: 6, c: 28671}, {f: 2, c: 28679}, 28682,
  14847. {f: 3, c: 28684}, 28688, {f: 3, c: 28690}, {f: 2, c: 28694}, 28697, 28700,
  14848. 28702, {f: 2, c: 28705}, {f: 3, c: 28708}, {f: 7, c: 28713}, 28721,
  14849. {f: 2, c: 28723}, {f: 3, c: 28726}, {f: 4, c: 28730}, {f: 4, c: 28735},
  14850. {f: 7, c: 28741}, {f: 2, c: 28749}, 28752, {f: 3, c: 28754},
  14851. {f: 2, c: 28758}, {f: 4, c: 28761}, {f: 4, c: 28767}, {f: 2, c: 28773},
  14852. {f: 3, c: 28776}, 28782, {f: 4, c: 28785}, 28791, {f: 3, c: 28793}, 28797,
  14853. {f: 4, c: 28801}, {f: 3, c: 28806}, {f: 3, c: 28811}, {f: 3, c: 28815},
  14854. 28819, {f: 2, c: 28823}, {f: 2, c: 28826}, {f: 13, c: 28830}, 28848, 28850,
  14855. {f: 3, c: 28852}, 28858, {f: 2, c: 28862}, {f: 4, c: 28868}, 28873,
  14856. {f: 4, c: 28875}, {f: 8, c: 28880}, 28890, {f: 3, c: 28892},
  14857. {f: 4, c: 28896}, 28901, 28906, 28910, {f: 4, c: 28912}, {f: 2, c: 28917},
  14858. 28920, {f: 3, c: 28922}, {f: 11, c: 28926}, {f: 5, c: 28939},
  14859. {f: 2, c: 28945}, 28948, 28951, {f: 6, c: 28955}, {f: 4, c: 28962},
  14860. {f: 8, c: 28967}, {f: 4, c: 28978}, {f: 14, c: 28983}, {f: 3, c: 28998},
  14861. 29003, 29005, {f: 3, c: 29007}, {f: 9, c: 29011}, 29021, {f: 3, c: 29023},
  14862. 29027, 29029, {f: 2, c: 29034}, 29037, {f: 3, c: 29039}, {f: 4, c: 29044},
  14863. 29049, {f: 2, c: 29051}, {f: 6, c: 29054}, {f: 5, c: 29061},
  14864. {f: 4, c: 29067}, {f: 2, c: 29072}, 29075, {f: 2, c: 29077},
  14865. {f: 5, c: 29082}, {f: 7, c: 29089}, {f: 3, c: 29097}, {f: 4, c: 29101},
  14866. 29106, 29108, {f: 3, c: 29110}, {f: 4, c: 29114}, {f: 2, c: 29119}, 29122,
  14867. {f: 4, c: 29124}, {f: 5, c: 29129}, {f: 3, c: 29135}, 29139,
  14868. {f: 3, c: 29142}, {f: 2, c: 29146}, {f: 2, c: 29149}, {f: 4, c: 29153},
  14869. {f: 5, c: 29160}, {f: 5, c: 29167}, {f: 4, c: 29173}, {f: 2, c: 29178},
  14870. 29181, {f: 7, c: 29183}, {f: 6, c: 29191}, {f: 2, c: 29198},
  14871. {f: 10, c: 29201}, 29212, {f: 10, c: 29214}, 29225, 29227,
  14872. {f: 3, c: 29229}, {f: 2, c: 29235}, 29244, {f: 7, c: 29248},
  14873. {f: 3, c: 29257}, {f: 4, c: 29262}, {f: 3, c: 29267}, 29271, 29274, 29276,
  14874. 29278, 29280, {f: 3, c: 29283}, 29288, {f: 4, c: 29290}, {f: 2, c: 29296},
  14875. {f: 2, c: 29299}, {f: 3, c: 29302}, {f: 2, c: 29307}, {f: 2, c: 29314},
  14876. {f: 5, c: 29317}, 29324, 29326, {f: 2, c: 29328}, {f: 3, c: 29331},
  14877. {f: 8, c: 29335}, {f: 2, c: 29344}, {f: 4, c: 29347}, {f: 4, c: 29352},
  14878. 29358, {f: 3, c: 29361}, 29365, {f: 6, c: 29370}, {f: 3, c: 29381},
  14879. {f: 4, c: 29385}, 29391, 29393, {f: 4, c: 29395}, 29400, {f: 4, c: 29402},
  14880. 29407, {f: 6, c: 29410}, {f: 2, c: 29418}, {f: 2, c: 29429},
  14881. {f: 3, c: 29438}, 29442, {f: 6, c: 29444}, {f: 3, c: 29451},
  14882. {f: 4, c: 29455}, 29460, {f: 3, c: 29464}, {f: 2, c: 29471},
  14883. {f: 2, c: 29475}, {f: 3, c: 29478}, 29485, {f: 2, c: 29487},
  14884. {f: 2, c: 29490}, 29493, 29498, {f: 2, c: 29500}, 29504, {f: 2, c: 29506},
  14885. {f: 7, c: 29510}, {f: 2, c: 29518}, 29521, {f: 4, c: 29523},
  14886. {f: 8, c: 29528}, {f: 7, c: 29537}, 29545, 29550, 29553, {f: 2, c: 29555},
  14887. 29558, 29561, 29565, 29567, {f: 3, c: 29569}, {f: 2, c: 29573}, 29576,
  14888. 29578, {f: 2, c: 29580}, {f: 2, c: 29583}, {f: 4, c: 29586},
  14889. {f: 4, c: 29591}, {f: 3, c: 29596}, {f: 2, c: 29600}, {f: 6, c: 29603},
  14890. 29610, {f: 2, c: 29612}, 29617, {f: 3, c: 29620}, {f: 2, c: 29624},
  14891. {f: 4, c: 29628}, 29633, {f: 5, c: 29635}, {f: 2, c: 29643}, 29646,
  14892. {f: 7, c: 29650}, {f: 4, c: 29658}, 29663, {f: 4, c: 29665}, 29670, 29672,
  14893. {f: 3, c: 29674}, {f: 4, c: 29678}, {f: 11, c: 29683}, {f: 4, c: 29695},
  14894. 29700, {f: 2, c: 29703}, {f: 4, c: 29707}, {f: 9, c: 29713},
  14895. {f: 6, c: 29724}, {f: 2, c: 29731}, 29735, 29737, 29739, 29741, 29743,
  14896. {f: 2, c: 29745}, {f: 5, c: 29751}, {f: 2, c: 29757}, 29760,
  14897. {f: 9, c: 29762}, {f: 9, c: 29772}, 29782, 29784, 29789, {f: 3, c: 29792},
  14898. {f: 5, c: 29796}, {f: 2, c: 29803}, {f: 2, c: 29806}, {f: 5, c: 29809},
  14899. {f: 6, c: 29816}, 29823, 29826, {f: 3, c: 29828}, 29832, 29834,
  14900. {f: 2, c: 29836}, 29839, {f: 11, c: 29841}, 29853, {f: 4, c: 29855},
  14901. {f: 2, c: 29860}, {f: 6, c: 29866}, {f: 9, c: 29873}, {f: 2, c: 29883},
  14902. {f: 12, c: 29886}, {f: 4, c: 29899}, {f: 2, c: 29904}, 29907,
  14903. {f: 5, c: 29909}, 29915, 29917, 29919, 29921, 29925, {f: 7, c: 29927},
  14904. {f: 4, c: 29936}, 29941, {f: 7, c: 29944}, {f: 4, c: 29952},
  14905. {f: 7, c: 29957}, 29966, 29968, 29970, {f: 4, c: 29972}, 29979,
  14906. {f: 2, c: 29981}, {f: 3, c: 29984}, 29988, {f: 2, c: 29990}, 29994, 29998,
  14907. 30004, 30006, 30009, {f: 2, c: 30012}, 30015, {f: 4, c: 30017},
  14908. {f: 2, c: 30022}, {f: 2, c: 30025}, 30029, {f: 4, c: 30032},
  14909. {f: 4, c: 30037}, {f: 4, c: 30046}, {f: 2, c: 30051}, {f: 3, c: 30055},
  14910. {f: 6, c: 30060}, 30067, 30069, 30071, {f: 5, c: 30074}, {f: 3, c: 30080},
  14911. {f: 2, c: 30084}, {f: 3, c: 30088}, {f: 3, c: 30092}, 30096, 30099, 30101,
  14912. 30104, {f: 2, c: 30107}, 30110, 30114, {f: 5, c: 30118}, 30125,
  14913. {f: 2, c: 30134}, {f: 2, c: 30138}, {f: 3, c: 30143}, 30150,
  14914. {f: 2, c: 30155}, {f: 4, c: 30158}, 30163, 30167, 30170, {f: 2, c: 30172},
  14915. {f: 3, c: 30175}, 30181, 30185, {f: 4, c: 30188}, {f: 2, c: 30194},
  14916. {f: 4, c: 30197}, {f: 2, c: 30202}, {f: 2, c: 30205}, 30212,
  14917. {f: 4, c: 30214}, {f: 2, c: 30222}, {f: 4, c: 30225}, 30230, 30234,
  14918. {f: 2, c: 30236}, 30243, 30248, 30252, {f: 2, c: 30254}, {f: 2, c: 30257},
  14919. {f: 2, c: 30262}, {f: 2, c: 30265}, 30269, 30273, {f: 2, c: 30276}, 30280,
  14920. {f: 2, c: 30282}, {f: 6, c: 30286}, 30293, 30295, {f: 3, c: 30297}, 30301,
  14921. {f: 2, c: 30304}, 30310, 30312, 30314, {f: 3, c: 30323}, [12136, 30326],
  14922. 30327, {f: 2, c: 30329}, {f: 3, c: 30335}, 30339, 30341, {f: 2, c: 30345},
  14923. {f: 2, c: 30348}, {f: 2, c: 30351}, 30354, {f: 2, c: 30356},
  14924. {f: 2, c: 30359}, {f: 9, c: 30363}, {f: 9, c: 30373}, {f: 2, c: 30383},
  14925. 30387, {f: 3, c: 30389}, 30393, {f: 4, c: 30395}, {f: 2, c: 30400},
  14926. {f: 2, c: 30403}, 30407, 30409, {f: 2, c: 30411}, 30419, 30421,
  14927. {f: 2, c: 30425}, {f: 2, c: 30428}, 30432, 30434, 30438, {f: 6, c: 30440},
  14928. 30448, 30451, {f: 3, c: 30453}, {f: 2, c: 30458}, 30461, {f: 2, c: 30463},
  14929. {f: 2, c: 30466}, {f: 2, c: 30469}, 30474, 30476, {f: 11, c: 30478},
  14930. {f: 4, c: 30491}, 30497, {f: 3, c: 30499}, 30503, {f: 3, c: 30506}, 30510,
  14931. {f: 5, c: 30512}, 30521, 30523, {f: 3, c: 30525}, 30530, {f: 3, c: 30532},
  14932. {f: 7, c: 30536}, {f: 8, c: 30546}, {f: 2, c: 30556}, {f: 2, c: 30559},
  14933. 30564, 30567, {f: 2, c: 30569}, {f: 12, c: 30573}, {f: 3, c: 30586},
  14934. {f: 3, c: 30593}, {f: 6, c: 30598}, {f: 2, c: 30607}, {f: 5, c: 30611},
  14935. {f: 5, c: 30617}, 30625, {f: 2, c: 30627}, 30630, 30632, 30635,
  14936. {f: 2, c: 30638}, {f: 2, c: 30641}, 30644, {f: 5, c: 30646}, 30654,
  14937. {f: 7, c: 30656}, {f: 5, c: 30664}, {f: 9, c: 30670}, {f: 2, c: 30680},
  14938. {f: 5, c: 30685}, 30692, 30694, 30696, 30698, {f: 3, c: 30704},
  14939. {f: 2, c: 30708}, 30711, {f: 4, c: 30713}, {f: 6, c: 30723},
  14940. {f: 2, c: 30730}, {f: 3, c: 30734}, 30739, 30741, 30745, 30747, 30750,
  14941. {f: 3, c: 30752}, 30756, 30760, {f: 2, c: 30762}, {f: 2, c: 30766},
  14942. {f: 3, c: 30769}, {f: 2, c: 30773}, 30781, 30783, {f: 2, c: 30785}, 30788,
  14943. 30790, {f: 4, c: 30792}, 30797, 30799, 30801, {f: 2, c: 30803},
  14944. {f: 5, c: 30808}, {f: 6, c: 30814}, {f: 3, c: 30821}, 30825,
  14945. {f: 7, c: 30832}, {f: 4, c: 30840}, {f: 10, c: 30845}, 30856,
  14946. {f: 2, c: 30858}, {f: 2, c: 30863}, 30866, {f: 3, c: 30868}, 30873,
  14947. {f: 2, c: 30877}, 30880, 30882, 30884, 30886, 30888, {f: 3, c: 30890},
  14948. {f: 2, c: 30894}, {f: 3, c: 30901}, 30907, 30909, {f: 2, c: 30911},
  14949. {f: 3, c: 30914}, {f: 3, c: 30918}, {f: 4, c: 30924}, {f: 3, c: 30929},
  14950. {f: 3, c: 30934}, {f: 8, c: 30939}, {f: 3, c: 30948}, {f: 3, c: 30953},
  14951. {f: 2, c: 30957}, {f: 2, c: 30960}, 30963, {f: 2, c: 30965},
  14952. {f: 2, c: 30968}, {f: 2, c: 30971}, {f: 3, c: 30974}, {f: 3, c: 30978},
  14953. {f: 8, c: 30982}, {f: 4, c: 30991}, {f: 5, c: 30996}, {f: 4, c: 31002},
  14954. {f: 5, c: 31007}, 31013, {f: 3, c: 31015}, {f: 4, c: 31021},
  14955. {f: 2, c: 31026}, {f: 5, c: 31029}, 31037, 31039, {f: 4, c: 31042}, 31047,
  14956. {f: 9, c: 31050}, {f: 2, c: 31060}, {f: 2, c: 31064}, 31073,
  14957. {f: 2, c: 31075}, 31078, {f: 4, c: 31081}, 31086, {f: 7, c: 31088}, 31097,
  14958. {f: 5, c: 31099}, {f: 2, c: 31106}, {f: 4, c: 31110}, {f: 2, c: 31115},
  14959. {f: 10, c: 31120}, {f: 11, c: 31131}, {f: 2, c: 31144}, {f: 3, c: 31147},
  14960. 31151, 31154, {f: 4, c: 31156}, [12145, 31160], 31164, 31167, 31170,
  14961. {f: 2, c: 31172}, {f: 2, c: 31175}, 31178, 31180, {f: 3, c: 31182},
  14962. {f: 2, c: 31187}, {f: 2, c: 31190}, {f: 6, c: 31193}, {f: 3, c: 31200},
  14963. 31205, 31208, 31210, 31212, 31214, {f: 7, c: 31217}, {f: 2, c: 31225},
  14964. 31228, {f: 2, c: 31230}, 31233, {f: 2, c: 31236}, {f: 4, c: 31239}, 31244,
  14965. {f: 5, c: 31247}, {f: 2, c: 31253}, {f: 2, c: 31256}, {f: 3, c: 31259},
  14966. 31263, {f: 2, c: 31265}, {f: 10, c: 31268}, {f: 2, c: 31279}, 31282,
  14967. {f: 3, c: 31284}, 31288, 31290, 31294, {f: 5, c: 31297}, {f: 5, c: 31303},
  14968. {f: 2, c: 31311}, {f: 5, c: 31314}, {f: 9, c: 31320}, {f: 6, c: 31331},
  14969. 31338, {f: 4, c: 31340}, {f: 3, c: 31345}, 31349, {f: 4, c: 31355}, 31362,
  14970. 31365, 31367, {f: 4, c: 31369}, {f: 3, c: 31374}, {f: 2, c: 31379},
  14971. {f: 3, c: 31385}, 31390, {f: 4, c: 31393}, 31399, 31403, {f: 4, c: 31407},
  14972. {f: 2, c: 31412}, {f: 3, c: 31415}, {f: 4, c: 31419}, {f: 4, c: 31424},
  14973. 31430, 31433, {f: 10, c: 31436}, {f: 2, c: 31447}, {f: 4, c: 31450},
  14974. {f: 2, c: 31457}, 31460, {f: 3, c: 31463}, {f: 2, c: 31467}, 31470,
  14975. {f: 6, c: 31472}, {f: 2, c: 31479}, {f: 2, c: 31483}, 31486,
  14976. {f: 3, c: 31488}, 31493, 31495, 31497, {f: 3, c: 31500}, 31504,
  14977. {f: 2, c: 31506}, {f: 3, c: 31510}, 31514, {f: 2, c: 31516}, 31519,
  14978. {f: 3, c: 31521}, 31527, 31529, 31533, {f: 2, c: 31535}, 31538,
  14979. {f: 4, c: 31540}, 31545, 31547, 31549, {f: 6, c: 31551}, 31560, 31562,
  14980. {f: 2, c: 31565}, 31571, 31573, 31575, 31577, 31580, {f: 2, c: 31582},
  14981. 31585, {f: 4, c: 31587}, {f: 6, c: 31592}, {f: 2, c: 31599},
  14982. {f: 2, c: 31603}, 31606, 31608, 31610, {f: 2, c: 31612}, 31615,
  14983. {f: 4, c: 31617}, {f: 5, c: 31622}, 31628, {f: 2, c: 31630},
  14984. {f: 3, c: 31633}, 31638, {f: 4, c: 31640}, {f: 3, c: 31646},
  14985. {f: 3, c: 31651}, {f: 3, c: 31662}, {f: 2, c: 31666}, {f: 3, c: 31669},
  14986. {f: 7, c: 31673}, {f: 2, c: 31682}, 31685, 31688, 31690, {f: 4, c: 31693},
  14987. 31698, {f: 5, c: 31700}, {f: 2, c: 31707}, {f: 3, c: 31710},
  14988. {f: 2, c: 31714}, {f: 2, c: 31719}, {f: 3, c: 31723}, {f: 2, c: 31727},
  14989. 31730, {f: 3, c: 31732}, {f: 4, c: 31736}, 31741, 31743, {f: 6, c: 31745},
  14990. {f: 3, c: 31752}, 31758, {f: 6, c: 31760}, {f: 7, c: 31767}, 31776, 31778,
  14991. {f: 2, c: 31780}, {f: 2, c: 31784}, {f: 12, c: 31788}, {f: 4, c: 31801},
  14992. 31810, {f: 8, c: 31812}, {f: 14, c: 31822}, {f: 2, c: 31837},
  14993. {f: 3, c: 31841}, {f: 4, c: 31845}, 31851, 31853, {f: 3, c: 31855},
  14994. {f: 6, c: 31861}, {f: 11, c: 31870}, {f: 7, c: 31882}, {f: 2, c: 31891},
  14995. 31894, {f: 3, c: 31897}, {f: 2, c: 31904}, 31907, {f: 4, c: 31910},
  14996. {f: 3, c: 31915}, {f: 2, c: 31919}, {f: 5, c: 31924}, {f: 2, c: 31930},
  14997. {f: 2, c: 31935}, {f: 3, c: 31938}, 31942, 31945, 31947, {f: 7, c: 31950},
  14998. 31960, {f: 2, c: 31962}, {f: 6, c: 31969}, {f: 6, c: 31977}, 31985, 31987,
  14999. 31989, 31991, 31994, {f: 2, c: 31996}, 31999, 32001, 32003, 32012,
  15000. {f: 2, c: 32014}, {f: 2, c: 32017}, 32022, 32024, {f: 3, c: 32029},
  15001. {f: 4, c: 32035}, {f: 3, c: 32040}, {f: 3, c: 32044}, {f: 5, c: 32052},
  15002. 32059, {f: 2, c: 32061}, 32065, 32067, 32069, {f: 7, c: 32071}, 32079,
  15003. {f: 12, c: 32081}, {f: 2, c: 32095}, {f: 3, c: 32099}, 32103,
  15004. {f: 5, c: 32105}, {f: 2, c: 32111}, {f: 2, c: 32116}, 32120,
  15005. {f: 7, c: 32122}, 32130, {f: 2, c: 32132}, 32135, {f: 5, c: 32138},
  15006. {f: 3, c: 32144}, {f: 8, c: 32148}, 32157, {f: 3, c: 32159},
  15007. {f: 2, c: 32164}, {f: 4, c: 32167}, 32175, {f: 3, c: 32181}, 32188,
  15008. {f: 4, c: 32192}, {f: 2, c: 32197}, {f: 2, c: 32200}, {f: 5, c: 32204},
  15009. 32211, {f: 2, c: 32213}, {f: 3, c: 32218}, 32223, 32226, {f: 2, c: 32228},
  15010. 32231, {f: 2, c: 32234}, {f: 2, c: 32237}, 32240, 32243, 32245,
  15011. {f: 2, c: 32247}, 32250, {f: 12, c: 32252}, {f: 4, c: 32268},
  15012. {f: 9, c: 32274}, 32284, {f: 3, c: 32288}, {f: 3, c: 32292},
  15013. {f: 3, c: 32296}, 32300, {f: 2, c: 32303}, 32307, 32312, 32314, 32316,
  15014. {f: 2, c: 32319}, {f: 3, c: 32322}, {f: 10, c: 32328}, 32339,
  15015. {f: 4, c: 32342}, {f: 3, c: 32347}, {f: 3, c: 32351}, {f: 6, c: 32355},
  15016. 32364, {f: 2, c: 32369}, {f: 5, c: 32372}, {f: 2, c: 32378},
  15017. {f: 3, c: 32383}, {f: 5, c: 32387}, 32393, 32395, 32398, {f: 3, c: 32400},
  15018. 32405, 32407, {f: 2, c: 32409}, {f: 2, c: 32413}, 32430, 32436,
  15019. {f: 2, c: 32443}, 32470, 32484, 32492, 32505, 32522, 32528, 32542, 32567,
  15020. 32569, {f: 7, c: 32571}, 32579, {f: 6, c: 32582}, 32589, 32591,
  15021. {f: 2, c: 32594}, 32598, 32601, {f: 4, c: 32603}, 32608, {f: 5, c: 32611},
  15022. {f: 3, c: 32619}, 32623, 32627, {f: 2, c: 32629}, 32632, {f: 4, c: 32634},
  15023. {f: 2, c: 32639}, {f: 3, c: 32642}, 32647, 32649, 32651, 32653,
  15024. {f: 5, c: 32655}, {f: 5, c: 32661}, {f: 2, c: 32667}, 32672,
  15025. {f: 2, c: 32674}, 32678, 32680, {f: 5, c: 32682}, 32689, {f: 5, c: 32691},
  15026. {f: 2, c: 32698}, 32702, 32704, {f: 3, c: 32706}, {f: 4, c: 32710}, 32715,
  15027. 32717, {f: 3, c: 32719}, 32723, {f: 2, c: 32726}, {f: 6, c: 32729},
  15028. {f: 3, c: 32738}, {f: 2, c: 32743}, {f: 4, c: 32746}, 32751, 32754,
  15029. {f: 5, c: 32756}, 32762, {f: 3, c: 32765}, 32770, {f: 4, c: 32775},
  15030. {f: 2, c: 32782}, 32785, 32787, {f: 2, c: 32794}, {f: 3, c: 32797}, 32801,
  15031. {f: 2, c: 32803}, 32811, 32813, {f: 2, c: 32815}, 32818, 32820,
  15032. {f: 2, c: 32825}, 32828, 32830, {f: 2, c: 32832}, {f: 2, c: 32836},
  15033. {f: 3, c: 32839}, {f: 4, c: 32846}, 32851, 32853, 32855, 32857,
  15034. {f: 3, c: 32859}, {f: 10, c: 32863}, {f: 4, c: 32875}, 32884, 32888,
  15035. {f: 3, c: 32890}, {f: 2, c: 32897}, 32904, 32906, {f: 6, c: 32909},
  15036. {f: 2, c: 32916}, 32919, 32921, 32926, 32931, {f: 3, c: 32934}, 32940,
  15037. 32944, 32947, {f: 2, c: 32949}, {f: 2, c: 32952}, 32955, 32965,
  15038. {f: 5, c: 32967}, {f: 7, c: 32975}, 32984, {f: 2, c: 32991},
  15039. {f: 2, c: 32994}, 32998, 33006, 33013, 33015, 33017, 33019,
  15040. {f: 4, c: 33022}, {f: 2, c: 33027}, {f: 2, c: 33031}, {f: 2, c: 33035},
  15041. 33045, 33047, 33049, {f: 2, c: 33052}, {f: 13, c: 33055}, {f: 2, c: 33069},
  15042. 33072, {f: 3, c: 33075}, 33079, {f: 4, c: 33082}, {f: 7, c: 33087}, 33095,
  15043. 33097, 33101, 33103, 33106, {f: 2, c: 33111}, {f: 5, c: 33115},
  15044. {f: 3, c: 33122}, 33128, 33130, 33132, 33135, {f: 2, c: 33138},
  15045. {f: 3, c: 33141}, 33153, {f: 5, c: 33155}, 33161, {f: 4, c: 33163}, 33168,
  15046. {f: 6, c: 33170}, 33177, {f: 2, c: 33182}, {f: 2, c: 33185},
  15047. {f: 2, c: 33188}, 33191, {f: 8, c: 33195}, {f: 6, c: 33204}, 33212,
  15048. {f: 2, c: 33220}, {f: 2, c: 33223}, 33227, 33230, {f: 8, c: 33232}, 33241,
  15049. {f: 4, c: 33243}, {f: 2, c: 33249}, {f: 3, c: 33252}, 33257, 33259,
  15050. {f: 5, c: 33262}, {f: 5, c: 33269}, 33277, 33279, 33283, 33291,
  15051. {f: 2, c: 33294}, 33297, 33299, {f: 6, c: 33301}, 33309, 33312,
  15052. {f: 4, c: 33316}, 33321, 33326, 33330, 33338, {f: 2, c: 33340},
  15053. {f: 5, c: 33343}, {f: 2, c: 33349}, 33352, 33354, {f: 3, c: 33356},
  15054. {f: 8, c: 33360}, {f: 4, c: 33371}, {f: 4, c: 33376}, 33381, 33383,
  15055. {f: 2, c: 33385}, {f: 2, c: 33388}, {f: 2, c: 33397}, [12171, 33400],
  15056. {f: 2, c: 33403}, {f: 2, c: 33408}, 33411, {f: 3, c: 33413}, 33417, 33420,
  15057. 33424, {f: 4, c: 33427}, {f: 2, c: 33434}, 33438, 33440, {f: 2, c: 33442},
  15058. 33447, 33458, {f: 2, c: 33461}, 33466, 33468, {f: 2, c: 33471},
  15059. {f: 2, c: 33474}, {f: 2, c: 33477}, 33481, 33488, 33494, {f: 2, c: 33497},
  15060. 33501, 33506, {f: 3, c: 33512}, {f: 3, c: 33516}, 33520, {f: 2, c: 33522},
  15061. {f: 2, c: 33525}, 33528, 33530, {f: 5, c: 33532}, {f: 2, c: 33546}, 33549,
  15062. 33552, {f: 2, c: 33554}, 33558, {f: 2, c: 33560}, {f: 10, c: 33565},
  15063. {f: 2, c: 33577}, 33582, 33584, 33586, 33591, 33595, {f: 3, c: 33597},
  15064. {f: 2, c: 33601}, {f: 2, c: 33604}, 33608, {f: 5, c: 33610}, 33619,
  15065. {f: 5, c: 33621}, 33629, 33634, {f: 7, c: 33648}, {f: 2, c: 33657},
  15066. {f: 7, c: 33662}, {f: 2, c: 33671}, {f: 3, c: 33675}, {f: 3, c: 33679},
  15067. {f: 2, c: 33684}, 33687, {f: 2, c: 33689}, 33693, 33695, 33697,
  15068. {f: 4, c: 33699}, {f: 4, c: 33708}, 33717, 33723, {f: 2, c: 33726},
  15069. {f: 3, c: 33730}, 33734, {f: 2, c: 33736}, 33739, {f: 2, c: 33741},
  15070. {f: 4, c: 33744}, 33749, 33751, {f: 3, c: 33753}, 33758, {f: 3, c: 33762},
  15071. {f: 3, c: 33766}, {f: 4, c: 33771}, {f: 5, c: 33779}, {f: 3, c: 33786},
  15072. {f: 3, c: 33790}, 33794, 33797, {f: 2, c: 33800}, 33808, {f: 6, c: 33810},
  15073. {f: 3, c: 33817}, {f: 6, c: 33822}, {f: 3, c: 33833}, {f: 4, c: 33837},
  15074. {f: 3, c: 33842}, {f: 2, c: 33846}, {f: 3, c: 33849}, {f: 8, c: 33854},
  15075. {f: 2, c: 33863}, {f: 7, c: 33866}, {f: 4, c: 33875}, 33880,
  15076. {f: 4, c: 33885}, 33890, 33893, {f: 2, c: 33895}, 33898, 33902, 33904,
  15077. 33906, 33908, 33913, {f: 7, c: 33915}, {f: 4, c: 33923}, 33930, 33933,
  15078. {f: 4, c: 33935}, {f: 2, c: 33941}, 33944, {f: 2, c: 33946},
  15079. {f: 4, c: 33949}, {f: 13, c: 33954}, {f: 2, c: 33968}, 33971,
  15080. {f: 3, c: 33973}, 33979, 33982, {f: 2, c: 33986}, {f: 4, c: 33989}, 33996,
  15081. {f: 2, c: 33998}, 34002, {f: 2, c: 34004}, {f: 6, c: 34007}, 34014,
  15082. {f: 2, c: 34017}, 34020, {f: 5, c: 34023}, 34029, {f: 11, c: 34033}, 34046,
  15083. {f: 12, c: 34048}, {f: 4, c: 34061}, 34066, {f: 2, c: 34069},
  15084. {f: 2, c: 34072}, {f: 3, c: 34075}, 34080, 34082, {f: 2, c: 34084},
  15085. {f: 4, c: 34087}, {f: 9, c: 34094}, {f: 3, c: 34110}, 34114,
  15086. {f: 2, c: 34116}, 34119, {f: 3, c: 34123}, {f: 3, c: 34127}, 34132, 34135,
  15087. {f: 4, c: 34138}, {f: 3, c: 34143}, 34147, {f: 3, c: 34149},
  15088. {f: 2, c: 34155}, {f: 4, c: 34158}, 34163, {f: 2, c: 34165}, 34168,
  15089. {f: 2, c: 34172}, {f: 5, c: 34175}, 34182, 34185, 34187, {f: 2, c: 34189},
  15090. 34192, {f: 2, c: 34194}, {f: 6, c: 34197}, {f: 2, c: 34205},
  15091. {f: 4, c: 34208}, 34213, 34215, {f: 3, c: 34219}, {f: 6, c: 34225}, 34232,
  15092. {f: 6, c: 34235}, {f: 7, c: 34242}, {f: 3, c: 34250}, {f: 2, c: 34257},
  15093. 34260, {f: 6, c: 34262}, {f: 6, c: 34270}, {f: 3, c: 34278},
  15094. {f: 9, c: 34283}, 34293, {f: 2, c: 34295}, {f: 3, c: 34300},
  15095. {f: 4, c: 34304}, {f: 3, c: 34312}, {f: 5, c: 34316}, {f: 4, c: 34322},
  15096. {f: 3, c: 34327}, {f: 3, c: 34331}, {f: 3, c: 34335}, {f: 4, c: 34339},
  15097. 34344, {f: 3, c: 34346}, {f: 10, c: 34350}, 34361, 34363, {f: 2, c: 34365},
  15098. {f: 13, c: 34368}, {f: 2, c: 34386}, {f: 4, c: 34390}, 34395, 34397,
  15099. {f: 2, c: 34400}, {f: 4, c: 34403}, {f: 3, c: 34408}, 34413,
  15100. {f: 2, c: 34415}, {f: 7, c: 34418}, {f: 7, c: 34435}, {f: 5, c: 34446},
  15101. 34452, {f: 6, c: 34454}, {f: 5, c: 34462}, {f: 2, c: 34469}, 34475,
  15102. {f: 2, c: 34477}, {f: 2, c: 34482}, {f: 3, c: 34487}, {f: 5, c: 34491},
  15103. {f: 3, c: 34497}, 34501, 34504, {f: 2, c: 34508}, {f: 2, c: 34514},
  15104. {f: 3, c: 34517}, 34522, {f: 2, c: 34524}, {f: 4, c: 34528},
  15105. {f: 4, c: 34533}, {f: 3, c: 34538}, 34543, {f: 3, c: 34549},
  15106. {f: 3, c: 34555}, 34559, 34561, {f: 2, c: 34564}, {f: 2, c: 34571},
  15107. {f: 4, c: 34574}, 34580, 34582, 34585, 34587, 34589, {f: 2, c: 34591},
  15108. 34596, {f: 3, c: 34598}, {f: 4, c: 34602}, {f: 2, c: 34607},
  15109. {f: 2, c: 34610}, {f: 2, c: 34613}, {f: 3, c: 34616}, {f: 2, c: 34620},
  15110. {f: 7, c: 34624}, {f: 2, c: 34634}, 34637, {f: 4, c: 34639}, 34644, 34646,
  15111. 34648, {f: 6, c: 34650}, {f: 2, c: 34657}, {f: 7, c: 34663}, 34671,
  15112. {f: 3, c: 34673}, 34677, 34679, {f: 2, c: 34681}, {f: 3, c: 34687},
  15113. {f: 2, c: 34694}, {f: 2, c: 34697}, 34700, {f: 5, c: 34702},
  15114. {f: 3, c: 34708}, {f: 6, c: 34712}, {f: 2, c: 34720}, {f: 5, c: 34723},
  15115. {f: 2, c: 34729}, 34734, {f: 3, c: 34736}, 34740, {f: 4, c: 34742}, 34748,
  15116. {f: 2, c: 34750}, {f: 3, c: 34753}, 34757, 34759, 34761, {f: 2, c: 34764},
  15117. {f: 2, c: 34767}, {f: 7, c: 34772}, {f: 4, c: 34780}, {f: 2, c: 34785},
  15118. 34788, {f: 4, c: 34790}, 34795, 34797, {f: 2, c: 34800}, {f: 3, c: 34803},
  15119. {f: 2, c: 34807}, 34810, {f: 2, c: 34812}, {f: 4, c: 34815}, 34820,
  15120. {f: 3, c: 34823}, {f: 5, c: 34827}, 34834, 34836, {f: 4, c: 34839},
  15121. {f: 3, c: 34844}, 34848, {f: 13, c: 34852}, {f: 3, c: 34867},
  15122. {f: 2, c: 34871}, 34874, {f: 3, c: 34877}, {f: 3, c: 34881},
  15123. {f: 3, c: 34887}, 34891, {f: 5, c: 34894}, {f: 2, c: 34901}, 34904, 34906,
  15124. 34908, {f: 3, c: 34910}, {f: 2, c: 34918}, 34922, 34925, 34927, 34929,
  15125. {f: 4, c: 34931}, 34936, {f: 3, c: 34938}, 34944, 34947, {f: 2, c: 34950},
  15126. {f: 2, c: 34953}, 34956, {f: 4, c: 34958}, {f: 3, c: 34963},
  15127. {f: 5, c: 34967}, {f: 5, c: 34973}, 34979, {f: 6, c: 34981}, 34988,
  15128. {f: 3, c: 34990}, {f: 5, c: 34994}, {f: 4, c: 35000}, {f: 4, c: 35005},
  15129. {f: 2, c: 35011}, {f: 2, c: 35015}, {f: 3, c: 35019}, {f: 2, c: 35024},
  15130. 35027, {f: 2, c: 35030}, {f: 2, c: 35034}, 35038, {f: 2, c: 35040},
  15131. {f: 2, c: 35046}, {f: 7, c: 35049}, 35058, {f: 3, c: 35061},
  15132. {f: 2, c: 35066}, {f: 3, c: 35071}, {f: 4, c: 35075}, {f: 2, c: 35080},
  15133. {f: 5, c: 35083}, 35089, {f: 5, c: 35092}, {f: 5, c: 35100},
  15134. {f: 3, c: 35106}, {f: 4, c: 35110}, {f: 4, c: 35116}, 35121, 35125, 35127,
  15135. {f: 2, c: 35129}, {f: 5, c: 35132}, {f: 2, c: 35138}, {f: 2, c: 35141},
  15136. {f: 14, c: 35144}, {f: 6, c: 35159}, {f: 3, c: 35169}, 35173,
  15137. {f: 3, c: 35175}, 35179, {f: 2, c: 35181}, {f: 2, c: 35184},
  15138. {f: 8, c: 35187}, {f: 2, c: 35196}, [12177, 35198], 35200, 35202,
  15139. {f: 2, c: 35204}, {f: 4, c: 35207}, {f: 3, c: 35212}, {f: 3, c: 35216},
  15140. {f: 2, c: 35220}, 35223, {f: 8, c: 35225}, {f: 4, c: 35234},
  15141. {f: 3, c: 35239}, 35243, {f: 2, c: 35245}, {f: 2, c: 35248},
  15142. {f: 4, c: 35251}, {f: 2, c: 35256}, {f: 2, c: 35259}, 35262, 35267, 35277,
  15143. {f: 3, c: 35283}, {f: 3, c: 35287}, 35291, 35293, {f: 4, c: 35295}, 35300,
  15144. {f: 4, c: 35303}, {f: 3, c: 35308}, {f: 3, c: 35312}, 35317, 35319,
  15145. {f: 7, c: 35321}, {f: 3, c: 35332}, 35337, 35339, 35341, 35343,
  15146. {f: 2, c: 35345}, 35348, 35351, {f: 2, c: 35353}, 35356, 35358,
  15147. {f: 3, c: 35360}, 35364, {f: 4, c: 35366}, {f: 2, c: 35371},
  15148. {f: 3, c: 35374}, {f: 2, c: 35378}, 35381, {f: 3, c: 35383},
  15149. {f: 3, c: 35387}, {f: 2, c: 35391}, {f: 4, c: 35394}, 35399,
  15150. {f: 5, c: 35401}, 35407, 35409, 35411, {f: 2, c: 35414}, {f: 2, c: 35417},
  15151. {f: 2, c: 35420}, {f: 2, c: 35423}, {f: 2, c: 35428}, {f: 2, c: 35431},
  15152. 35434, 35439, 35444, {f: 3, c: 35446}, {f: 2, c: 35450}, {f: 2, c: 35453},
  15153. {f: 4, c: 35456}, 35464, {f: 2, c: 35467}, {f: 3, c: 35470}, 35476,
  15154. {f: 2, c: 35478}, 35481, {f: 3, c: 35483}, 35487, 35490, 35495,
  15155. {f: 3, c: 35497}, {f: 3, c: 35501}, 35505, {f: 3, c: 35507},
  15156. {f: 2, c: 35511}, {f: 2, c: 35514}, {f: 2, c: 35517}, {f: 2, c: 35520},
  15157. 35523, {f: 2, c: 35525}, 35528, 35530, 35532, 35534, 35536,
  15158. {f: 3, c: 35539}, {f: 3, c: 35544}, 35549, {f: 3, c: 35551}, 35555, 35557,
  15159. {f: 3, c: 35560}, 35564, {f: 2, c: 35567}, 35570, {f: 2, c: 35572}, 35577,
  15160. 35579, 35581, 35583, 35587, 35590, {f: 2, c: 35592}, {f: 3, c: 35595},
  15161. 35599, {f: 3, c: 35601}, 35605, 35608, 35612, {f: 3, c: 35614},
  15162. {f: 4, c: 35618}, 35623, {f: 2, c: 35625}, {f: 5, c: 35630},
  15163. {f: 5, c: 35636}, {f: 4, c: 35642}, {f: 10, c: 35647}, {f: 4, c: 35658},
  15164. {f: 6, c: 35664}, 35671, 35675, {f: 9, c: 35677}, {f: 4, c: 35687},
  15165. {f: 2, c: 35693}, {f: 3, c: 35697}, {f: 2, c: 35701}, {f: 5, c: 35704},
  15166. {f: 2, c: 35710}, {f: 9, c: 35713}, {f: 3, c: 35723}, {f: 3, c: 35727},
  15167. 35732, {f: 5, c: 35735}, 35741, 35743, 35756, 35761, 35771, 35783, 35792,
  15168. 35818, 35849, 35870, {f: 9, c: 35896}, {f: 4, c: 35906}, {f: 2, c: 35914},
  15169. {f: 3, c: 35917}, {f: 4, c: 35921}, {f: 4, c: 35926}, {f: 6, c: 35931},
  15170. {f: 7, c: 35939}, {f: 7, c: 35948}, {f: 4, c: 35956}, {f: 7, c: 35963},
  15171. {f: 2, c: 35971}, {f: 3, c: 35974}, 35979, {f: 7, c: 35981},
  15172. {f: 3, c: 35989}, {f: 4, c: 35993}, 35999, {f: 4, c: 36003},
  15173. {f: 2, c: 36013}, 36017, 36021, 36025, 36030, 36038, 36041,
  15174. {f: 6, c: 36043}, 36052, {f: 4, c: 36054}, 36059, 36061, 36063, 36069,
  15175. {f: 2, c: 36072}, {f: 6, c: 36078}, {f: 5, c: 36085}, {f: 5, c: 36095},
  15176. {f: 2, c: 36102}, 36105, 36108, 36110, {f: 5, c: 36113}, {f: 4, c: 36119},
  15177. 36128, {f: 2, c: 36177}, 36183, 36191, 36197, {f: 3, c: 36200}, 36204,
  15178. {f: 2, c: 36206}, {f: 2, c: 36209}, {f: 9, c: 36216}, {f: 2, c: 36226},
  15179. {f: 4, c: 36230}, {f: 5, c: 36236}, {f: 2, c: 36242}, {f: 3, c: 36246},
  15180. {f: 5, c: 36250}, {f: 3, c: 36256}, {f: 4, c: 36260}, {f: 8, c: 36265},
  15181. {f: 2, c: 36278}, 36281, 36283, 36285, {f: 3, c: 36288}, 36293,
  15182. {f: 4, c: 36295}, 36301, 36304, {f: 4, c: 36306}, {f: 2, c: 36312}, 36316,
  15183. {f: 3, c: 36320}, {f: 3, c: 36325}, 36329, {f: 2, c: 36333},
  15184. {f: 3, c: 36336}, 36340, 36342, 36348, {f: 7, c: 36350}, {f: 3, c: 36358},
  15185. 36363, {f: 2, c: 36365}, {f: 3, c: 36369}, {f: 8, c: 36373},
  15186. {f: 2, c: 36384}, {f: 5, c: 36388}, 36395, 36397, 36400, {f: 2, c: 36402},
  15187. {f: 3, c: 36406}, {f: 2, c: 36411}, {f: 2, c: 36414}, 36419,
  15188. {f: 2, c: 36421}, {f: 4, c: 36429}, {f: 2, c: 36435}, {f: 3, c: 36438},
  15189. {f: 9, c: 36442}, {f: 2, c: 36452}, {f: 2, c: 36455}, {f: 2, c: 36458},
  15190. 36462, 36465, 36467, 36469, {f: 3, c: 36471}, 36475, {f: 2, c: 36477},
  15191. 36480, {f: 3, c: 36482}, 36486, 36488, 36492, 36494, {f: 5, c: 36501},
  15192. 36507, 36509, {f: 2, c: 36511}, {f: 3, c: 36514}, {f: 3, c: 36519},
  15193. {f: 2, c: 36525}, {f: 2, c: 36528}, {f: 7, c: 36531}, {f: 5, c: 36539},
  15194. {f: 9, c: 36545}, {f: 3, c: 36559}, 36563, {f: 6, c: 36565},
  15195. {f: 3, c: 36572}, {f: 4, c: 36576}, {f: 6, c: 36581}, {f: 6, c: 36588},
  15196. {f: 5, c: 36595}, 36605, {f: 4, c: 36607}, 36612, 36614, 36616,
  15197. {f: 7, c: 36619}, 36627, {f: 5, c: 36630}, {f: 5, c: 36640},
  15198. {f: 2, c: 36647}, {f: 4, c: 36651}, {f: 3, c: 36656}, {f: 4, c: 36660},
  15199. {f: 2, c: 36665}, {f: 2, c: 36668}, {f: 2, c: 36672}, 36675,
  15200. {f: 2, c: 36679}, {f: 3, c: 36682}, {f: 5, c: 36687}, {f: 10, c: 36693},
  15201. 36704, 36707, 36709, 36714, 36736, 36748, 36754, 36765, {f: 3, c: 36768},
  15202. {f: 2, c: 36772}, 36775, 36778, 36780, {f: 2, c: 36787}, [12193, 36789],
  15203. {f: 2, c: 36791}, {f: 3, c: 36794}, {f: 2, c: 36799}, 36803, 36806,
  15204. {f: 5, c: 36809}, 36815, 36818, {f: 2, c: 36822}, 36826, {f: 2, c: 36832},
  15205. 36835, 36839, 36844, 36847, {f: 2, c: 36849}, {f: 2, c: 36853},
  15206. {f: 3, c: 36858}, {f: 2, c: 36862}, {f: 2, c: 36871}, 36876, 36878, 36883,
  15207. 36888, 36892, {f: 2, c: 36900}, {f: 6, c: 36903}, {f: 2, c: 36912},
  15208. {f: 2, c: 36915}, 36919, {f: 2, c: 36921}, 36925, {f: 2, c: 36927}, 36931,
  15209. {f: 2, c: 36933}, {f: 3, c: 36936}, 36940, 36950, {f: 2, c: 36953}, 36957,
  15210. 36959, 36961, 36964, {f: 2, c: 36966}, {f: 3, c: 36970}, {f: 3, c: 36975},
  15211. 36979, 36982, 36985, 36987, 36990, {f: 2, c: 36997}, 37001,
  15212. {f: 3, c: 37004}, 37010, 37012, 37014, 37016, 37018, 37020,
  15213. {f: 3, c: 37022}, {f: 2, c: 37028}, {f: 3, c: 37031}, 37035, 37037, 37042,
  15214. 37047, {f: 2, c: 37052}, {f: 2, c: 37055}, {f: 2, c: 37058}, 37062,
  15215. {f: 2, c: 37064}, {f: 3, c: 37067}, 37074, {f: 3, c: 37076},
  15216. {f: 3, c: 37080}, 37086, 37088, {f: 3, c: 37091}, {f: 2, c: 37097}, 37100,
  15217. 37102, {f: 4, c: 37104}, {f: 2, c: 37110}, {f: 4, c: 37113},
  15218. {f: 3, c: 37119}, 37123, 37125, {f: 2, c: 37127}, {f: 8, c: 37130}, 37139,
  15219. 37141, {f: 2, c: 37143}, {f: 4, c: 37146}, {f: 3, c: 37151},
  15220. {f: 3, c: 37156}, {f: 5, c: 37160}, 37166, 37171, 37173, {f: 2, c: 37175},
  15221. {f: 8, c: 37179}, {f: 2, c: 37188}, 37191, 37201, {f: 4, c: 37203},
  15222. {f: 2, c: 37208}, {f: 2, c: 37211}, {f: 2, c: 37215}, {f: 3, c: 37222},
  15223. 37227, 37229, 37235, {f: 3, c: 37242}, {f: 5, c: 37248}, 37254, 37256,
  15224. 37258, {f: 2, c: 37262}, {f: 3, c: 37267}, {f: 3, c: 37271},
  15225. {f: 5, c: 37277}, {f: 6, c: 37284}, {f: 4, c: 37296}, {f: 4, c: 37302},
  15226. {f: 5, c: 37307}, 37314, 37316, [12196, 37318], 37320, 37328, 37334,
  15227. {f: 2, c: 37338}, {f: 5, c: 37342}, {f: 2, c: 37349}, 37352,
  15228. {f: 11, c: 37354}, 37366, 37368, {f: 5, c: 37371}, {f: 2, c: 37378},
  15229. {f: 3, c: 37381}, {f: 3, c: 37386}, 37391, {f: 2, c: 37394},
  15230. {f: 8, c: 37398}, {f: 4, c: 37407}, 37412, {f: 6, c: 37416}, 37423,
  15231. {f: 2, c: 37425}, {f: 2, c: 37429}, {f: 2, c: 37435}, {f: 4, c: 37441},
  15232. {f: 2, c: 37446}, {f: 3, c: 37450}, {f: 3, c: 37454}, {f: 3, c: 37458},
  15233. 37462, {f: 2, c: 37464}, {f: 2, c: 37468}, {f: 3, c: 37471},
  15234. {f: 3, c: 37475}, {f: 5, c: 37479}, {f: 6, c: 37486}, {f: 3, c: 37493},
  15235. 37497, {f: 3, c: 37500}, {f: 2, c: 37505}, 37508, {f: 8, c: 37510},
  15236. {f: 2, c: 37519}, 37522, {f: 2, c: 37524}, 37527, 37529, 37531,
  15237. {f: 3, c: 37533}, {f: 2, c: 37537}, 37540, 37543, 37549, {f: 2, c: 37551},
  15238. {f: 5, c: 37554}, 37560, 37562, {f: 4, c: 37565}, 37570, 37572, 37574,
  15239. {f: 3, c: 37577}, {f: 2, c: 37581}, {f: 2, c: 37584}, {f: 10, c: 37587},
  15240. 37598, {f: 3, c: 37600}, 37607, 37609, {f: 2, c: 37611}, {f: 4, c: 37618},
  15241. 37623, {f: 3, c: 37625}, {f: 4, c: 37629}, {f: 4, c: 37634},
  15242. {f: 7, c: 37641}, 37649, {f: 2, c: 37651}, {f: 2, c: 37654},
  15243. {f: 3, c: 37660}, 37665, {f: 3, c: 37667}, 37671, {f: 2, c: 37673},
  15244. {f: 2, c: 37676}, {f: 2, c: 37680}, {f: 2, c: 37684}, 37687,
  15245. {f: 5, c: 37689}, 37695, 37698, {f: 2, c: 37700}, {f: 3, c: 37704}, 37708,
  15246. {f: 6, c: 37710}, {f: 3, c: 37717}, {f: 2, c: 37721}, {f: 8, c: 37724},
  15247. {f: 3, c: 37734}, 37739, {f: 3, c: 37741}, {f: 4, c: 37745},
  15248. {f: 3, c: 37751}, {f: 3, c: 37755}, {f: 3, c: 37759}, 37763,
  15249. {f: 2, c: 37765}, {f: 2, c: 37768}, {f: 4, c: 37771}, {f: 6, c: 37776},
  15250. 37783, {f: 9, c: 37785}, {f: 2, c: 37796}, 37800, 37803, 37805, 37807,
  15251. {f: 2, c: 37809}, 37812, {f: 2, c: 37814}, {f: 6, c: 37817},
  15252. {f: 3, c: 37824}, {f: 3, c: 37828}, 37833, 37835, {f: 3, c: 37838},
  15253. {f: 4, c: 37842}, {f: 3, c: 37849}, 37856, 37859, {f: 3, c: 37861},
  15254. {f: 12, c: 37865}, 37878, 37880, {f: 9, c: 37882}, {f: 7, c: 37892},
  15255. {f: 4, c: 37900}, 37905, {f: 3, c: 37909}, {f: 3, c: 37914},
  15256. {f: 2, c: 37918}, {f: 5, c: 37921}, {f: 5, c: 37929}, {f: 3, c: 37935},
  15257. 37940, {f: 2, c: 37942}, 37945, {f: 3, c: 37947}, {f: 4, c: 37952},
  15258. {f: 5, c: 37957}, 37963, {f: 5, c: 37965}, 37971, {f: 11, c: 37973},
  15259. {f: 2, c: 37985}, 37988, {f: 5, c: 37990}, 37996, {f: 2, c: 37998}, 38001,
  15260. {f: 4, c: 38003}, 38008, {f: 2, c: 38010}, {f: 5, c: 38016}, 38033, 38038,
  15261. 38040, 38087, 38095, {f: 2, c: 38099}, 38106, 38118, 38139, 38172, 38176,
  15262. 38183, 38195, 38205, 38211, 38216, 38219, 38229, 38234, 38240, 38254,
  15263. {f: 2, c: 38260}, {f: 7, c: 38264}, 38273, {f: 2, c: 38276},
  15264. {f: 2, c: 38279}, 38282, 38285, 38288, 38290, {f: 3, c: 38293},
  15265. {f: 8, c: 38297}, 38306, {f: 2, c: 38310}, 38314, {f: 4, c: 38318},
  15266. {f: 3, c: 38323}, {f: 2, c: 38327}, 38330, {f: 3, c: 38336},
  15267. {f: 2, c: 38340}, 38343, 38345, {f: 3, c: 38349}, {f: 3, c: 38353},
  15268. {f: 5, c: 38359}, 38365, {f: 2, c: 38367}, {f: 2, c: 38371},
  15269. {f: 2, c: 38374}, 38380, 38399, 38407, 38419, 38424, 38427, 38430, 38432,
  15270. {f: 7, c: 38435}, {f: 3, c: 38443}, {f: 2, c: 38447}, {f: 4, c: 38455},
  15271. 38462, 38465, 38467, 38474, {f: 2, c: 38478}, {f: 3, c: 38481},
  15272. {f: 2, c: 38486}, {f: 2, c: 38489}, 38492, 38494, 38496, {f: 2, c: 38501},
  15273. 38507, {f: 3, c: 38509}, 38513, {f: 4, c: 38521}, {f: 7, c: 38526}, 38535,
  15274. 38537, 38540, {f: 3, c: 38545}, 38550, 38554, {f: 10, c: 38557}, 38569,
  15275. {f: 5, c: 38571}, 38578, 38581, 38583, 38586, 38591, {f: 2, c: 38594},
  15276. 38600, {f: 2, c: 38602}, {f: 2, c: 38608}, {f: 2, c: 38611},
  15277. {f: 2, c: 38615}, 38618, {f: 3, c: 38621}, 38625, {f: 4, c: 38628},
  15278. {f: 4, c: 38635}, {f: 2, c: 38640}, {f: 2, c: 38644}, 38648, 38650,
  15279. {f: 2, c: 38652}, 38655, {f: 2, c: 38658}, 38661, {f: 3, c: 38666},
  15280. {f: 3, c: 38672}, {f: 2, c: 38676}, {f: 5, c: 38679}, 38685,
  15281. {f: 8, c: 38687}, {f: 2, c: 38696}, {f: 2, c: 38699}, {f: 2, c: 38702},
  15282. 38705, {f: 5, c: 38707}, {f: 3, c: 38714}, {f: 3, c: 38719}, 38723,
  15283. {f: 3, c: 38725}, {f: 8, c: 38729}, [12205, 38737], {f: 2, c: 38740},
  15284. {f: 2, c: 38743}, {f: 2, c: 38748}, 38751, {f: 2, c: 38755},
  15285. {f: 2, c: 38758}, {f: 9, c: 38762}, 38773, {f: 5, c: 38775},
  15286. {f: 8, c: 38781}, {f: 5, c: 38790}, 38796, 38798, 38800, 38803,
  15287. {f: 3, c: 38805}, {f: 7, c: 38809}, {f: 2, c: 38817}, {f: 2, c: 38820},
  15288. {f: 4, c: 38823}, 38828, 38830, {f: 2, c: 38832}, 38835, {f: 8, c: 38837},
  15289. {f: 5, c: 38846}, {f: 2, c: 38852}, {f: 2, c: 38855}, 38858,
  15290. {f: 6, c: 38861}, {f: 5, c: 38868}, {f: 2, c: 38874}, 38877,
  15291. {f: 7, c: 38879}, 38888, {f: 5, c: 38894}, 38900, {f: 8, c: 38903}, 38912,
  15292. 38916, 38921, 38923, 38925, {f: 3, c: 38932}, {f: 3, c: 38937},
  15293. {f: 4, c: 38941}, {f: 2, c: 38946}, 38949, {f: 6, c: 38951},
  15294. {f: 2, c: 38958}, {f: 6, c: 38961}, {f: 2, c: 38969}, 38972,
  15295. {f: 8, c: 38974}, {f: 5, c: 38983}, {f: 4, c: 38991}, {f: 3, c: 38997},
  15296. 39002, {f: 2, c: 39004}, {f: 3, c: 39007}, {f: 2, c: 39011}, 39014,
  15297. {f: 3, c: 39016}, {f: 2, c: 39021}, 39026, 39051, 39054, 39058, 39061,
  15298. 39065, 39075, {f: 5, c: 39081}, 39088, 39090, {f: 2, c: 39092},
  15299. {f: 5, c: 39095}, {f: 7, c: 39101}, 39109, 39111, {f: 5, c: 39113},
  15300. {f: 2, c: 39119}, 39124, {f: 2, c: 39126}, {f: 2, c: 39132}, 39137,
  15301. {f: 4, c: 39139}, 39148, 39150, {f: 2, c: 39152}, 39155, {f: 7, c: 39157},
  15302. {f: 4, c: 39167}, 39172, {f: 3, c: 39174}, 39179, {f: 2, c: 39182},
  15303. {f: 4, c: 39188}, {f: 2, c: 39193}, {f: 2, c: 39196}, {f: 2, c: 39199},
  15304. {f: 6, c: 39202}, {f: 5, c: 39209}, {f: 4, c: 39215}, {f: 3, c: 39220},
  15305. {f: 4, c: 39224}, 39229, {f: 3, c: 39232}, 39236, {f: 2, c: 39238},
  15306. {f: 4, c: 39245}, 39251, 39254, {f: 4, c: 39256}, 39261, {f: 3, c: 39263},
  15307. 39268, 39270, 39283, {f: 2, c: 39288}, 39291, 39294, {f: 2, c: 39298},
  15308. 39305, 39308, 39310, {f: 11, c: 39322}, {f: 2, c: 39334}, {f: 3, c: 39337},
  15309. {f: 2, c: 39343}, 39346, {f: 12, c: 39349}, {f: 14, c: 39362}, 39379,
  15310. {f: 2, c: 39382}, 39386, 39388, 39390, 39392, {f: 10, c: 39395},
  15311. {f: 3, c: 39406}, {f: 13, c: 39410}, 39424, {f: 3, c: 39426},
  15312. {f: 7, c: 39430}, {f: 6, c: 39440}, {f: 2, c: 39447}, {f: 17, c: 39450},
  15313. 39468, 39471, {f: 5, c: 39473}, {f: 5, c: 39481}, 39487, {f: 4, c: 39494},
  15314. {f: 2, c: 39499}, 39502, {f: 5, c: 39504}, 39510, {f: 2, c: 39512},
  15315. {f: 3, c: 39516}, {f: 2, c: 39520}, 39523, {f: 4, c: 39526}, 39531, 39538,
  15316. 39555, 39561, {f: 2, c: 39565}, {f: 2, c: 39572}, 39577, 39590,
  15317. {f: 6, c: 39593}, {f: 4, c: 39602}, 39609, 39611, {f: 3, c: 39613},
  15318. {f: 2, c: 39619}, {f: 5, c: 39622}, {f: 2, c: 39629}, 39632, 39639,
  15319. {f: 6, c: 39641}, 39648, {f: 4, c: 39650}, {f: 4, c: 39655}, 39660,
  15320. {f: 9, c: 39664}, 39674, {f: 7, c: 39676}, {f: 2, c: 39684}, 39687,
  15321. {f: 4, c: 39689}, 39694, {f: 3, c: 39696}, {f: 6, c: 39700},
  15322. {f: 4, c: 39707}, {f: 2, c: 39712}, 39716, 39718, 39720, {f: 4, c: 39722},
  15323. 39728, {f: 8, c: 39731}, {f: 4, c: 39741}, 39750, {f: 3, c: 39754}, 39760,
  15324. {f: 2, c: 39762}, {f: 3, c: 39765}, 39769, {f: 20, c: 39771},
  15325. {f: 4, c: 39792}, {f: 2, c: 39797}, {f: 9, c: 39800}, 39810,
  15326. {f: 10, c: 39812}, 39823, {f: 7, c: 39827}, {f: 2, c: 39835},
  15327. {f: 11, c: 39839}, 39852, {f: 17, c: 39855}, {f: 5, c: 39874}, 39880,
  15328. {f: 9, c: 39883}, 39893, {f: 4, c: 39895}, 39900, {f: 3, c: 39902}, 39907,
  15329. {f: 2, c: 39909}, 39913, {f: 4, c: 39916}, {f: 3, c: 39921},
  15330. {f: 8, c: 39925}, 39934, {f: 8, c: 39936}, {f: 3, c: 39946},
  15331. {f: 2, c: 39950}, 39953, {f: 12, c: 39956}, {f: 2, c: 39969}, 39972,
  15332. {f: 2, c: 39974}, {f: 3, c: 39978}, {f: 3, c: 39982}, 39988, 39990, 39992,
  15333. 39994, {f: 2, c: 39996}, {f: 6, c: 39999}, {f: 2, c: 40006},
  15334. {f: 8, c: 40010}, 40019, 40021, {f: 4, c: 40025}, 40030, {f: 7, c: 40032},
  15335. {f: 5, c: 40040}, {f: 10, c: 40046}, 40057, 40059, {f: 2, c: 40061}, 40064,
  15336. {f: 2, c: 40067}, {f: 2, c: 40073}, 40076, 40079, 40083, {f: 4, c: 40086},
  15337. 40093, 40106, 40108, 40111, 40121, {f: 5, c: 40126}, {f: 2, c: 40136},
  15338. {f: 2, c: 40145}, {f: 2, c: 40154}, {f: 2, c: 40160}, {f: 2, c: 40163},
  15339. {f: 3, c: 40166}, {f: 2, c: 40170}, {f: 6, c: 40173}, 40181,
  15340. {f: 15, c: 40183}, 40200, {f: 11, c: 40202}, {f: 5, c: 40214}, 40220,
  15341. 40222, {f: 3, c: 40224}, {f: 2, c: 40228}, 40231, {f: 6, c: 40233},
  15342. {f: 10, c: 40241}, {f: 3, c: 40252}, {f: 2, c: 40256}, {f: 14, c: 40259},
  15343. {f: 8, c: 40276}, {f: 2, c: 40286}, {f: 8, c: 40290}, 40299,
  15344. {f: 2, c: 40301}, {f: 2, c: 40304}, {f: 20, c: 40307}, 40328,
  15345. {f: 9, c: 40330}, {f: 4, c: 40340}, 40345, {f: 10, c: 40347},
  15346. {f: 3, c: 40358}, {f: 5, c: 40362}, {f: 4, c: 40368}, {f: 6, c: 40373},
  15347. {f: 3, c: 40381}, 40385, 40387, {f: 14, c: 40389}, {f: 3, c: 40404}, 40408,
  15348. {f: 10, c: 40411}, {f: 8, c: 40423}, {f: 2, c: 40432}, {f: 4, c: 40436},
  15349. {f: 17, c: 40443}, {f: 8, c: 40461}, {f: 4, c: 40470}, 40476, 40484, 40487,
  15350. 40494, 40496, 40500, {f: 2, c: 40507}, 40512, 40525, 40528,
  15351. {f: 3, c: 40530}, 40534, 40537, 40541, {f: 4, c: 40543}, 40549,
  15352. {f: 2, c: 40558}, 40562, 40564, {f: 3, c: 40566}, 40571, {f: 2, c: 40576},
  15353. {f: 4, c: 40579}, {f: 2, c: 40585}, {f: 6, c: 40588}, {f: 3, c: 40596},
  15354. {f: 5, c: 40600}, 40606, {f: 5, c: 40608}, {f: 2, c: 40615},
  15355. {f: 5, c: 40618}, {f: 4, c: 40624}, {f: 2, c: 40630}, {f: 2, c: 40633},
  15356. 40636, {f: 4, c: 40639}, [12232, 40643], {f: 4, c: 40645},
  15357. {f: 2, c: 40650}, 40656, {f: 2, c: 40658}, {f: 3, c: 40661},
  15358. {f: 2, c: 40665}, 40673, {f: 2, c: 40675}, 40678, {f: 4, c: 40683},
  15359. {f: 2, c: 40688}, 40691, {f: 2, c: 40693}, 40696, 40698, {f: 9, c: 40704},
  15360. 40714, 40716, 40719, {f: 2, c: 40721}, 40724, 40726, 40728,
  15361. {f: 6, c: 40730}, 40737, {f: 9, c: 40739}, {f: 2, c: 40749},
  15362. {f: 7, c: 40752}, 40760, 40762, 40764, {f: 5, c: 40767}, {f: 5, c: 40773},
  15363. {f: 3, c: 40780}, 40787, {f: 4, c: 40789}, {f: 2, c: 40794},
  15364. {f: 2, c: 40797}, 40802, {f: 2, c: 40804}, {f: 3, c: 40807}, 40811,
  15365. {f: 5, c: 40813}, {f: 4, c: 40819}, {f: 7, c: 40824}, {f: 2, c: 40833},
  15366. {f: 2, c: 40846}, {f: 3, c: 40849}, {f: 3, c: 40854}, {f: 2, c: 40861},
  15367. {f: 5, c: 40865}, 63788, {f: 3, c: 64013}, 64017, {f: 2, c: 64019}, 64024,
  15368. {f: 3, c: 64031}, {f: 2, c: 64035}, {f: 3, c: 64039}, 11905,
  15369. [59414, 131207], [59415, 131209], [59416, 131276], 11908, 13427, 13383,
  15370. 11912, 11915, 59422, 13726, 13850, 13838, 11916, 11927, 14702, 14616,
  15371. 59430, 14799, 14815, 14963, 14800, {f: 2, c: 59435}, 15182, 15470, 15584,
  15372. 11943, [59441, 136663], 59442, 11946, 16470, 16735, 11950, 17207, 11955,
  15373. {f: 2, c: 11958}, [59451, 141711], 17329, 17324, 11963, 17373, 17622,
  15374. 18017, 17996, [59459, 132361], 18211, 18217, 18300, 18317, 11978, 18759,
  15375. 18810, 18813, {f: 2, c: 18818}, {f: 2, c: 18821}, 18847, 18843, 18871,
  15376. 18870, [59476, 133533], [59477, 147966], 19619, {f: 3, c: 19615}, 19575,
  15377. 19618, {f: 7, c: 19731}, 19886, 59492, {s: 226}, 8364, 165, 0, 0, 12351,
  15378. {s: 17}, 12436, {s: 14}, 12535, 12537, 12536, 12538, 0, {f: 3, c: 12339},
  15379. {f: 3, c: 12344}, {f: 3, c: 12586}, {f: 24, c: 12704}, 11904,
  15380. {f: 2, c: 11906}, {f: 3, c: 11909}, {f: 2, c: 11913}, {f: 10, c: 11917},
  15381. {f: 2, c: 11928}, {f: 12, c: 11931}, {f: 2, c: 11944}, {f: 3, c: 11947},
  15382. {f: 4, c: 11951}, {f: 2, c: 11956}, {f: 3, c: 11960}, {f: 14, c: 11964},
  15383. {f: 41, c: 11979}, {f: 71, c: 13312}, {f: 43, c: 13384},
  15384. {f: 298, c: 13428}, {f: 111, c: 13727}, {f: 11, c: 13839},
  15385. {f: 765, c: 13851}, {f: 85, c: 14617}, {f: 96, c: 14703},
  15386. {f: 14, c: 14801}, {f: 147, c: 14816}, {f: 218, c: 14964},
  15387. {f: 287, c: 15183}, {f: 113, c: 15471}, {f: 885, c: 15585},
  15388. {f: 264, c: 16471}, {f: 471, c: 16736}, {f: 116, c: 17208},
  15389. {f: 4, c: 17325}, {f: 43, c: 17330}, {f: 248, c: 17374},
  15390. {f: 373, c: 17623}, {f: 20, c: 17997}, {f: 193, c: 18018},
  15391. {f: 5, c: 18212}, {f: 82, c: 18218}, {f: 16, c: 18301}, {f: 441, c: 18318},
  15392. {f: 50, c: 18760}, {f: 2, c: 18811}, {f: 4, c: 18814}, 18820,
  15393. {f: 20, c: 18823}, {f: 3, c: 18844}, {f: 22, c: 18848}, {f: 703, c: 18872},
  15394. {f: 39, c: 19576}, {f: 111, c: 19620}, {f: 148, c: 19738},
  15395. {f: 7, c: 19887}]
  15396. };
  15397. var DEFAULT_ICON_SIZE = 22; // px
  15398. var SUPPORTED_TYPES = ['Link', 'Text', 'Widget'];
  15399. var Annotation = (function AnnotationClosure() {
  15400. // 12.5.5: Algorithm: Appearance streams
  15401. function getTransformMatrix(rect, bbox, matrix) {
  15402. var bounds = Util.getAxialAlignedBoundingBox(bbox, matrix);
  15403. var minX = bounds[0];
  15404. var minY = bounds[1];
  15405. var maxX = bounds[2];
  15406. var maxY = bounds[3];
  15407. if (minX === maxX || minY === maxY) {
  15408. // From real-life file, bbox was [0, 0, 0, 0]. In this case,
  15409. // just apply the transform for rect
  15410. return [1, 0, 0, 1, rect[0], rect[1]];
  15411. }
  15412. var xRatio = (rect[2] - rect[0]) / (maxX - minX);
  15413. var yRatio = (rect[3] - rect[1]) / (maxY - minY);
  15414. return [
  15415. xRatio,
  15416. 0,
  15417. 0,
  15418. yRatio,
  15419. rect[0] - minX * xRatio,
  15420. rect[1] - minY * yRatio
  15421. ];
  15422. }
  15423. function getDefaultAppearance(dict) {
  15424. var appearanceState = dict.get('AP');
  15425. if (!isDict(appearanceState)) {
  15426. return;
  15427. }
  15428. var appearance;
  15429. var appearances = appearanceState.get('N');
  15430. if (isDict(appearances)) {
  15431. var as = dict.get('AS');
  15432. if (as && appearances.has(as.name)) {
  15433. appearance = appearances.get(as.name);
  15434. }
  15435. } else {
  15436. appearance = appearances;
  15437. }
  15438. return appearance;
  15439. }
  15440. function Annotation(params) {
  15441. var dict = params.dict;
  15442. var data = this.data = {};
  15443. data.subtype = dict.get('Subtype').name;
  15444. var rect = dict.get('Rect') || [0, 0, 0, 0];
  15445. data.rect = Util.normalizeRect(rect);
  15446. data.annotationFlags = dict.get('F');
  15447. var color = dict.get('C');
  15448. if (isArray(color) && color.length === 3) {
  15449. // TODO(mack): currently only supporting rgb; need support different
  15450. // colorspaces
  15451. data.color = color;
  15452. } else {
  15453. data.color = [0, 0, 0];
  15454. }
  15455. // Some types of annotations have border style dict which has more
  15456. // info than the border array
  15457. if (dict.has('BS')) {
  15458. var borderStyle = dict.get('BS');
  15459. data.borderWidth = borderStyle.has('W') ? borderStyle.get('W') : 1;
  15460. } else {
  15461. var borderArray = dict.get('Border') || [0, 0, 1];
  15462. data.borderWidth = borderArray[2] || 0;
  15463. // TODO: implement proper support for annotations with line dash patterns.
  15464. var dashArray = borderArray[3];
  15465. if (data.borderWidth > 0 && dashArray) {
  15466. if (!isArray(dashArray)) {
  15467. // Ignore the border if dashArray is not actually an array,
  15468. // this is consistent with the behaviour in Adobe Reader.
  15469. data.borderWidth = 0;
  15470. } else {
  15471. var dashArrayLength = dashArray.length;
  15472. if (dashArrayLength > 0) {
  15473. // According to the PDF specification: the elements in a dashArray
  15474. // shall be numbers that are nonnegative and not all equal to zero.
  15475. var isInvalid = false;
  15476. var numPositive = 0;
  15477. for (var i = 0; i < dashArrayLength; i++) {
  15478. var validNumber = (+dashArray[i] >= 0);
  15479. if (!validNumber) {
  15480. isInvalid = true;
  15481. break;
  15482. } else if (dashArray[i] > 0) {
  15483. numPositive++;
  15484. }
  15485. }
  15486. if (isInvalid || numPositive === 0) {
  15487. data.borderWidth = 0;
  15488. }
  15489. }
  15490. }
  15491. }
  15492. }
  15493. this.appearance = getDefaultAppearance(dict);
  15494. data.hasAppearance = !!this.appearance;
  15495. data.id = params.ref.num;
  15496. }
  15497. Annotation.prototype = {
  15498. getData: function Annotation_getData() {
  15499. return this.data;
  15500. },
  15501. isInvisible: function Annotation_isInvisible() {
  15502. var data = this.data;
  15503. if (data && SUPPORTED_TYPES.indexOf(data.subtype) !== -1) {
  15504. return false;
  15505. } else {
  15506. return !!(data &&
  15507. data.annotationFlags && // Default: not invisible
  15508. data.annotationFlags & 0x1); // Invisible
  15509. }
  15510. },
  15511. isViewable: function Annotation_isViewable() {
  15512. var data = this.data;
  15513. return !!(!this.isInvisible() &&
  15514. data &&
  15515. (!data.annotationFlags ||
  15516. !(data.annotationFlags & 0x22)) && // Hidden or NoView
  15517. data.rect); // rectangle is necessary
  15518. },
  15519. isPrintable: function Annotation_isPrintable() {
  15520. var data = this.data;
  15521. return !!(!this.isInvisible() &&
  15522. data &&
  15523. data.annotationFlags && // Default: not printable
  15524. data.annotationFlags & 0x4 && // Print
  15525. !(data.annotationFlags & 0x2) && // Hidden
  15526. data.rect); // rectangle is necessary
  15527. },
  15528. loadResources: function Annotation_loadResources(keys) {
  15529. return new Promise(function (resolve, reject) {
  15530. this.appearance.dict.getAsync('Resources').then(function (resources) {
  15531. if (!resources) {
  15532. resolve();
  15533. return;
  15534. }
  15535. var objectLoader = new ObjectLoader(resources.map,
  15536. keys,
  15537. resources.xref);
  15538. objectLoader.load().then(function() {
  15539. resolve(resources);
  15540. }, reject);
  15541. }, reject);
  15542. }.bind(this));
  15543. },
  15544. getOperatorList: function Annotation_getOperatorList(evaluator) {
  15545. if (!this.appearance) {
  15546. return Promise.resolve(new OperatorList());
  15547. }
  15548. var data = this.data;
  15549. var appearanceDict = this.appearance.dict;
  15550. var resourcesPromise = this.loadResources([
  15551. 'ExtGState',
  15552. 'ColorSpace',
  15553. 'Pattern',
  15554. 'Shading',
  15555. 'XObject',
  15556. 'Font'
  15557. // ProcSet
  15558. // Properties
  15559. ]);
  15560. var bbox = appearanceDict.get('BBox') || [0, 0, 1, 1];
  15561. var matrix = appearanceDict.get('Matrix') || [1, 0, 0, 1, 0 ,0];
  15562. var transform = getTransformMatrix(data.rect, bbox, matrix);
  15563. var self = this;
  15564. return resourcesPromise.then(function(resources) {
  15565. var opList = new OperatorList();
  15566. opList.addOp(OPS.beginAnnotation, [data.rect, transform, matrix]);
  15567. return evaluator.getOperatorList(self.appearance, resources, opList).
  15568. then(function () {
  15569. opList.addOp(OPS.endAnnotation, []);
  15570. self.appearance.reset();
  15571. return opList;
  15572. });
  15573. });
  15574. }
  15575. };
  15576. Annotation.getConstructor =
  15577. function Annotation_getConstructor(subtype, fieldType) {
  15578. if (!subtype) {
  15579. return;
  15580. }
  15581. // TODO(mack): Implement FreeText annotations
  15582. if (subtype === 'Link') {
  15583. return LinkAnnotation;
  15584. } else if (subtype === 'Text') {
  15585. return TextAnnotation;
  15586. } else if (subtype === 'Widget') {
  15587. if (!fieldType) {
  15588. return;
  15589. }
  15590. if (fieldType === 'Tx') {
  15591. return TextWidgetAnnotation;
  15592. } else {
  15593. return WidgetAnnotation;
  15594. }
  15595. } else {
  15596. return Annotation;
  15597. }
  15598. };
  15599. Annotation.fromRef = function Annotation_fromRef(xref, ref) {
  15600. var dict = xref.fetchIfRef(ref);
  15601. if (!isDict(dict)) {
  15602. return;
  15603. }
  15604. var subtype = dict.get('Subtype');
  15605. subtype = isName(subtype) ? subtype.name : '';
  15606. if (!subtype) {
  15607. return;
  15608. }
  15609. var fieldType = Util.getInheritableProperty(dict, 'FT');
  15610. fieldType = isName(fieldType) ? fieldType.name : '';
  15611. var Constructor = Annotation.getConstructor(subtype, fieldType);
  15612. if (!Constructor) {
  15613. return;
  15614. }
  15615. var params = {
  15616. dict: dict,
  15617. ref: ref,
  15618. };
  15619. var annotation = new Constructor(params);
  15620. if (annotation.isViewable() || annotation.isPrintable()) {
  15621. return annotation;
  15622. } else {
  15623. if (SUPPORTED_TYPES.indexOf(subtype) === -1) {
  15624. warn('unimplemented annotation type: ' + subtype);
  15625. }
  15626. }
  15627. };
  15628. Annotation.appendToOperatorList = function Annotation_appendToOperatorList(
  15629. annotations, opList, pdfManager, partialEvaluator, intent) {
  15630. function reject(e) {
  15631. annotationsReadyCapability.reject(e);
  15632. }
  15633. var annotationsReadyCapability = createPromiseCapability();
  15634. var annotationPromises = [];
  15635. for (var i = 0, n = annotations.length; i < n; ++i) {
  15636. if (intent === 'display' && annotations[i].isViewable() ||
  15637. intent === 'print' && annotations[i].isPrintable()) {
  15638. annotationPromises.push(
  15639. annotations[i].getOperatorList(partialEvaluator));
  15640. }
  15641. }
  15642. Promise.all(annotationPromises).then(function(datas) {
  15643. opList.addOp(OPS.beginAnnotations, []);
  15644. for (var i = 0, n = datas.length; i < n; ++i) {
  15645. var annotOpList = datas[i];
  15646. opList.addOpList(annotOpList);
  15647. }
  15648. opList.addOp(OPS.endAnnotations, []);
  15649. annotationsReadyCapability.resolve();
  15650. }, reject);
  15651. return annotationsReadyCapability.promise;
  15652. };
  15653. return Annotation;
  15654. })();
  15655. var WidgetAnnotation = (function WidgetAnnotationClosure() {
  15656. function WidgetAnnotation(params) {
  15657. Annotation.call(this, params);
  15658. var dict = params.dict;
  15659. var data = this.data;
  15660. data.fieldValue = stringToPDFString(
  15661. Util.getInheritableProperty(dict, 'V') || '');
  15662. data.alternativeText = stringToPDFString(dict.get('TU') || '');
  15663. data.defaultAppearance = Util.getInheritableProperty(dict, 'DA') || '';
  15664. var fieldType = Util.getInheritableProperty(dict, 'FT');
  15665. data.fieldType = isName(fieldType) ? fieldType.name : '';
  15666. data.fieldFlags = Util.getInheritableProperty(dict, 'Ff') || 0;
  15667. this.fieldResources = Util.getInheritableProperty(dict, 'DR') || Dict.empty;
  15668. // Building the full field name by collecting the field and
  15669. // its ancestors 'T' data and joining them using '.'.
  15670. var fieldName = [];
  15671. var namedItem = dict;
  15672. var ref = params.ref;
  15673. while (namedItem) {
  15674. var parent = namedItem.get('Parent');
  15675. var parentRef = namedItem.getRaw('Parent');
  15676. var name = namedItem.get('T');
  15677. if (name) {
  15678. fieldName.unshift(stringToPDFString(name));
  15679. } else {
  15680. // The field name is absent, that means more than one field
  15681. // with the same name may exist. Replacing the empty name
  15682. // with the '`' plus index in the parent's 'Kids' array.
  15683. // This is not in the PDF spec but necessary to id the
  15684. // the input controls.
  15685. var kids = parent.get('Kids');
  15686. var j, jj;
  15687. for (j = 0, jj = kids.length; j < jj; j++) {
  15688. var kidRef = kids[j];
  15689. if (kidRef.num == ref.num && kidRef.gen == ref.gen) {
  15690. break;
  15691. }
  15692. }
  15693. fieldName.unshift('`' + j);
  15694. }
  15695. namedItem = parent;
  15696. ref = parentRef;
  15697. }
  15698. data.fullName = fieldName.join('.');
  15699. }
  15700. var parent = Annotation.prototype;
  15701. Util.inherit(WidgetAnnotation, Annotation, {
  15702. isViewable: function WidgetAnnotation_isViewable() {
  15703. if (this.data.fieldType === 'Sig') {
  15704. warn('unimplemented annotation type: Widget signature');
  15705. return false;
  15706. }
  15707. return parent.isViewable.call(this);
  15708. }
  15709. });
  15710. return WidgetAnnotation;
  15711. })();
  15712. var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
  15713. function TextWidgetAnnotation(params) {
  15714. WidgetAnnotation.call(this, params);
  15715. this.data.textAlignment = Util.getInheritableProperty(params.dict, 'Q');
  15716. this.data.annotationType = AnnotationType.WIDGET;
  15717. this.data.hasHtml = !this.data.hasAppearance && !!this.data.fieldValue;
  15718. }
  15719. Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
  15720. getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator) {
  15721. if (this.appearance) {
  15722. return Annotation.prototype.getOperatorList.call(this, evaluator);
  15723. }
  15724. var opList = new OperatorList();
  15725. var data = this.data;
  15726. // Even if there is an appearance stream, ignore it. This is the
  15727. // behaviour used by Adobe Reader.
  15728. if (!data.defaultAppearance) {
  15729. return Promise.resolve(opList);
  15730. }
  15731. var stream = new Stream(stringToBytes(data.defaultAppearance));
  15732. return evaluator.getOperatorList(stream, this.fieldResources, opList).
  15733. then(function () {
  15734. return opList;
  15735. });
  15736. }
  15737. });
  15738. return TextWidgetAnnotation;
  15739. })();
  15740. var InteractiveAnnotation = (function InteractiveAnnotationClosure() {
  15741. function InteractiveAnnotation(params) {
  15742. Annotation.call(this, params);
  15743. this.data.hasHtml = true;
  15744. }
  15745. Util.inherit(InteractiveAnnotation, Annotation, { });
  15746. return InteractiveAnnotation;
  15747. })();
  15748. var TextAnnotation = (function TextAnnotationClosure() {
  15749. function TextAnnotation(params) {
  15750. InteractiveAnnotation.call(this, params);
  15751. var dict = params.dict;
  15752. var data = this.data;
  15753. var content = dict.get('Contents');
  15754. var title = dict.get('T');
  15755. data.annotationType = AnnotationType.TEXT;
  15756. data.content = stringToPDFString(content || '');
  15757. data.title = stringToPDFString(title || '');
  15758. if (data.hasAppearance) {
  15759. data.name = 'NoIcon';
  15760. } else {
  15761. data.rect[1] = data.rect[3] - DEFAULT_ICON_SIZE;
  15762. data.rect[2] = data.rect[0] + DEFAULT_ICON_SIZE;
  15763. data.name = dict.has('Name') ? dict.get('Name').name : 'Note';
  15764. }
  15765. if (dict.has('C')) {
  15766. data.hasBgColor = true;
  15767. }
  15768. }
  15769. Util.inherit(TextAnnotation, InteractiveAnnotation, { });
  15770. return TextAnnotation;
  15771. })();
  15772. var LinkAnnotation = (function LinkAnnotationClosure() {
  15773. function LinkAnnotation(params) {
  15774. InteractiveAnnotation.call(this, params);
  15775. var dict = params.dict;
  15776. var data = this.data;
  15777. data.annotationType = AnnotationType.LINK;
  15778. var action = dict.get('A');
  15779. if (action) {
  15780. var linkType = action.get('S').name;
  15781. if (linkType === 'URI') {
  15782. var url = action.get('URI');
  15783. if (isName(url)) {
  15784. // Some bad PDFs do not put parentheses around relative URLs.
  15785. url = '/' + url.name;
  15786. } else if (url) {
  15787. url = addDefaultProtocolToUrl(url);
  15788. }
  15789. // TODO: pdf spec mentions urls can be relative to a Base
  15790. // entry in the dictionary.
  15791. if (!isValidUrl(url, false)) {
  15792. url = '';
  15793. }
  15794. data.url = url;
  15795. } else if (linkType === 'GoTo') {
  15796. data.dest = action.get('D');
  15797. } else if (linkType === 'GoToR') {
  15798. var urlDict = action.get('F');
  15799. if (isDict(urlDict)) {
  15800. // We assume that the 'url' is a Filspec dictionary
  15801. // and fetch the url without checking any further
  15802. url = urlDict.get('F') || '';
  15803. }
  15804. // TODO: pdf reference says that GoToR
  15805. // can also have 'NewWindow' attribute
  15806. if (!isValidUrl(url, false)) {
  15807. url = '';
  15808. }
  15809. data.url = url;
  15810. data.dest = action.get('D');
  15811. } else if (linkType === 'Named') {
  15812. data.action = action.get('N').name;
  15813. } else {
  15814. warn('unrecognized link type: ' + linkType);
  15815. }
  15816. } else if (dict.has('Dest')) {
  15817. // simple destination link
  15818. var dest = dict.get('Dest');
  15819. data.dest = isName(dest) ? dest.name : dest;
  15820. }
  15821. }
  15822. // Lets URLs beginning with 'www.' default to using the 'http://' protocol.
  15823. function addDefaultProtocolToUrl(url) {
  15824. if (url && url.indexOf('www.') === 0) {
  15825. return ('http://' + url);
  15826. }
  15827. return url;
  15828. }
  15829. Util.inherit(LinkAnnotation, InteractiveAnnotation, {
  15830. hasOperatorList: function LinkAnnotation_hasOperatorList() {
  15831. return false;
  15832. }
  15833. });
  15834. return LinkAnnotation;
  15835. })();
  15836. var PDFFunction = (function PDFFunctionClosure() {
  15837. var CONSTRUCT_SAMPLED = 0;
  15838. var CONSTRUCT_INTERPOLATED = 2;
  15839. var CONSTRUCT_STICHED = 3;
  15840. var CONSTRUCT_POSTSCRIPT = 4;
  15841. return {
  15842. getSampleArray: function PDFFunction_getSampleArray(size, outputSize, bps,
  15843. str) {
  15844. var i, ii;
  15845. var length = 1;
  15846. for (i = 0, ii = size.length; i < ii; i++) {
  15847. length *= size[i];
  15848. }
  15849. length *= outputSize;
  15850. var array = [];
  15851. var codeSize = 0;
  15852. var codeBuf = 0;
  15853. // 32 is a valid bps so shifting won't work
  15854. var sampleMul = 1.0 / (Math.pow(2.0, bps) - 1);
  15855. var strBytes = str.getBytes((length * bps + 7) / 8);
  15856. var strIdx = 0;
  15857. for (i = 0; i < length; i++) {
  15858. while (codeSize < bps) {
  15859. codeBuf <<= 8;
  15860. codeBuf |= strBytes[strIdx++];
  15861. codeSize += 8;
  15862. }
  15863. codeSize -= bps;
  15864. array.push((codeBuf >> codeSize) * sampleMul);
  15865. codeBuf &= (1 << codeSize) - 1;
  15866. }
  15867. return array;
  15868. },
  15869. getIR: function PDFFunction_getIR(xref, fn) {
  15870. var dict = fn.dict;
  15871. if (!dict) {
  15872. dict = fn;
  15873. }
  15874. var types = [this.constructSampled,
  15875. null,
  15876. this.constructInterpolated,
  15877. this.constructStiched,
  15878. this.constructPostScript];
  15879. var typeNum = dict.get('FunctionType');
  15880. var typeFn = types[typeNum];
  15881. if (!typeFn) {
  15882. error('Unknown type of function');
  15883. }
  15884. return typeFn.call(this, fn, dict, xref);
  15885. },
  15886. fromIR: function PDFFunction_fromIR(IR) {
  15887. var type = IR[0];
  15888. switch (type) {
  15889. case CONSTRUCT_SAMPLED:
  15890. return this.constructSampledFromIR(IR);
  15891. case CONSTRUCT_INTERPOLATED:
  15892. return this.constructInterpolatedFromIR(IR);
  15893. case CONSTRUCT_STICHED:
  15894. return this.constructStichedFromIR(IR);
  15895. //case CONSTRUCT_POSTSCRIPT:
  15896. default:
  15897. return this.constructPostScriptFromIR(IR);
  15898. }
  15899. },
  15900. parse: function PDFFunction_parse(xref, fn) {
  15901. var IR = this.getIR(xref, fn);
  15902. return this.fromIR(IR);
  15903. },
  15904. constructSampled: function PDFFunction_constructSampled(str, dict) {
  15905. function toMultiArray(arr) {
  15906. var inputLength = arr.length;
  15907. var out = [];
  15908. var index = 0;
  15909. for (var i = 0; i < inputLength; i += 2) {
  15910. out[index] = [arr[i], arr[i + 1]];
  15911. ++index;
  15912. }
  15913. return out;
  15914. }
  15915. var domain = dict.get('Domain');
  15916. var range = dict.get('Range');
  15917. if (!domain || !range) {
  15918. error('No domain or range');
  15919. }
  15920. var inputSize = domain.length / 2;
  15921. var outputSize = range.length / 2;
  15922. domain = toMultiArray(domain);
  15923. range = toMultiArray(range);
  15924. var size = dict.get('Size');
  15925. var bps = dict.get('BitsPerSample');
  15926. var order = dict.get('Order') || 1;
  15927. if (order !== 1) {
  15928. // No description how cubic spline interpolation works in PDF32000:2008
  15929. // As in poppler, ignoring order, linear interpolation may work as good
  15930. info('No support for cubic spline interpolation: ' + order);
  15931. }
  15932. var encode = dict.get('Encode');
  15933. if (!encode) {
  15934. encode = [];
  15935. for (var i = 0; i < inputSize; ++i) {
  15936. encode.push(0);
  15937. encode.push(size[i] - 1);
  15938. }
  15939. }
  15940. encode = toMultiArray(encode);
  15941. var decode = dict.get('Decode');
  15942. if (!decode) {
  15943. decode = range;
  15944. } else {
  15945. decode = toMultiArray(decode);
  15946. }
  15947. var samples = this.getSampleArray(size, outputSize, bps, str);
  15948. return [
  15949. CONSTRUCT_SAMPLED, inputSize, domain, encode, decode, samples, size,
  15950. outputSize, Math.pow(2, bps) - 1, range
  15951. ];
  15952. },
  15953. constructSampledFromIR: function PDFFunction_constructSampledFromIR(IR) {
  15954. // See chapter 3, page 109 of the PDF reference
  15955. function interpolate(x, xmin, xmax, ymin, ymax) {
  15956. return ymin + ((x - xmin) * ((ymax - ymin) / (xmax - xmin)));
  15957. }
  15958. return function constructSampledFromIRResult(args) {
  15959. // See chapter 3, page 110 of the PDF reference.
  15960. var m = IR[1];
  15961. var domain = IR[2];
  15962. var encode = IR[3];
  15963. var decode = IR[4];
  15964. var samples = IR[5];
  15965. var size = IR[6];
  15966. var n = IR[7];
  15967. //var mask = IR[8];
  15968. var range = IR[9];
  15969. if (m != args.length) {
  15970. error('Incorrect number of arguments: ' + m + ' != ' +
  15971. args.length);
  15972. }
  15973. var x = args;
  15974. // Building the cube vertices: its part and sample index
  15975. // http://rjwagner49.com/Mathematics/Interpolation.pdf
  15976. var cubeVertices = 1 << m;
  15977. var cubeN = new Float64Array(cubeVertices);
  15978. var cubeVertex = new Uint32Array(cubeVertices);
  15979. var i, j;
  15980. for (j = 0; j < cubeVertices; j++) {
  15981. cubeN[j] = 1;
  15982. }
  15983. var k = n, pos = 1;
  15984. // Map x_i to y_j for 0 <= i < m using the sampled function.
  15985. for (i = 0; i < m; ++i) {
  15986. // x_i' = min(max(x_i, Domain_2i), Domain_2i+1)
  15987. var domain_2i = domain[i][0];
  15988. var domain_2i_1 = domain[i][1];
  15989. var xi = Math.min(Math.max(x[i], domain_2i), domain_2i_1);
  15990. // e_i = Interpolate(x_i', Domain_2i, Domain_2i+1,
  15991. // Encode_2i, Encode_2i+1)
  15992. var e = interpolate(xi, domain_2i, domain_2i_1,
  15993. encode[i][0], encode[i][1]);
  15994. // e_i' = min(max(e_i, 0), Size_i - 1)
  15995. var size_i = size[i];
  15996. e = Math.min(Math.max(e, 0), size_i - 1);
  15997. // Adjusting the cube: N and vertex sample index
  15998. var e0 = e < size_i - 1 ? Math.floor(e) : e - 1; // e1 = e0 + 1;
  15999. var n0 = e0 + 1 - e; // (e1 - e) / (e1 - e0);
  16000. var n1 = e - e0; // (e - e0) / (e1 - e0);
  16001. var offset0 = e0 * k;
  16002. var offset1 = offset0 + k; // e1 * k
  16003. for (j = 0; j < cubeVertices; j++) {
  16004. if (j & pos) {
  16005. cubeN[j] *= n1;
  16006. cubeVertex[j] += offset1;
  16007. } else {
  16008. cubeN[j] *= n0;
  16009. cubeVertex[j] += offset0;
  16010. }
  16011. }
  16012. k *= size_i;
  16013. pos <<= 1;
  16014. }
  16015. var y = new Float64Array(n);
  16016. for (j = 0; j < n; ++j) {
  16017. // Sum all cube vertices' samples portions
  16018. var rj = 0;
  16019. for (i = 0; i < cubeVertices; i++) {
  16020. rj += samples[cubeVertex[i] + j] * cubeN[i];
  16021. }
  16022. // r_j' = Interpolate(r_j, 0, 2^BitsPerSample - 1,
  16023. // Decode_2j, Decode_2j+1)
  16024. rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]);
  16025. // y_j = min(max(r_j, range_2j), range_2j+1)
  16026. y[j] = Math.min(Math.max(rj, range[j][0]), range[j][1]);
  16027. }
  16028. return y;
  16029. };
  16030. },
  16031. constructInterpolated: function PDFFunction_constructInterpolated(str,
  16032. dict) {
  16033. var c0 = dict.get('C0') || [0];
  16034. var c1 = dict.get('C1') || [1];
  16035. var n = dict.get('N');
  16036. if (!isArray(c0) || !isArray(c1)) {
  16037. error('Illegal dictionary for interpolated function');
  16038. }
  16039. var length = c0.length;
  16040. var diff = [];
  16041. for (var i = 0; i < length; ++i) {
  16042. diff.push(c1[i] - c0[i]);
  16043. }
  16044. return [CONSTRUCT_INTERPOLATED, c0, diff, n];
  16045. },
  16046. constructInterpolatedFromIR:
  16047. function PDFFunction_constructInterpolatedFromIR(IR) {
  16048. var c0 = IR[1];
  16049. var diff = IR[2];
  16050. var n = IR[3];
  16051. var length = diff.length;
  16052. return function constructInterpolatedFromIRResult(args) {
  16053. var x = n == 1 ? args[0] : Math.pow(args[0], n);
  16054. var out = [];
  16055. for (var j = 0; j < length; ++j) {
  16056. out.push(c0[j] + (x * diff[j]));
  16057. }
  16058. return out;
  16059. };
  16060. },
  16061. constructStiched: function PDFFunction_constructStiched(fn, dict, xref) {
  16062. var domain = dict.get('Domain');
  16063. if (!domain) {
  16064. error('No domain');
  16065. }
  16066. var inputSize = domain.length / 2;
  16067. if (inputSize != 1) {
  16068. error('Bad domain for stiched function');
  16069. }
  16070. var fnRefs = dict.get('Functions');
  16071. var fns = [];
  16072. for (var i = 0, ii = fnRefs.length; i < ii; ++i) {
  16073. fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
  16074. }
  16075. var bounds = dict.get('Bounds');
  16076. var encode = dict.get('Encode');
  16077. return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
  16078. },
  16079. constructStichedFromIR: function PDFFunction_constructStichedFromIR(IR) {
  16080. var domain = IR[1];
  16081. var bounds = IR[2];
  16082. var encode = IR[3];
  16083. var fnsIR = IR[4];
  16084. var fns = [];
  16085. for (var i = 0, ii = fnsIR.length; i < ii; i++) {
  16086. fns.push(PDFFunction.fromIR(fnsIR[i]));
  16087. }
  16088. return function constructStichedFromIRResult(args) {
  16089. var clip = function constructStichedFromIRClip(v, min, max) {
  16090. if (v > max) {
  16091. v = max;
  16092. } else if (v < min) {
  16093. v = min;
  16094. }
  16095. return v;
  16096. };
  16097. // clip to domain
  16098. var v = clip(args[0], domain[0], domain[1]);
  16099. // calulate which bound the value is in
  16100. for (var i = 0, ii = bounds.length; i < ii; ++i) {
  16101. if (v < bounds[i]) {
  16102. break;
  16103. }
  16104. }
  16105. // encode value into domain of function
  16106. var dmin = domain[0];
  16107. if (i > 0) {
  16108. dmin = bounds[i - 1];
  16109. }
  16110. var dmax = domain[1];
  16111. if (i < bounds.length) {
  16112. dmax = bounds[i];
  16113. }
  16114. var rmin = encode[2 * i];
  16115. var rmax = encode[2 * i + 1];
  16116. var v2 = rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin);
  16117. // call the appropriate function
  16118. return fns[i]([v2]);
  16119. };
  16120. },
  16121. constructPostScript: function PDFFunction_constructPostScript(fn, dict,
  16122. xref) {
  16123. var domain = dict.get('Domain');
  16124. var range = dict.get('Range');
  16125. if (!domain) {
  16126. error('No domain.');
  16127. }
  16128. if (!range) {
  16129. error('No range.');
  16130. }
  16131. var lexer = new PostScriptLexer(fn);
  16132. var parser = new PostScriptParser(lexer);
  16133. var code = parser.parse();
  16134. return [CONSTRUCT_POSTSCRIPT, domain, range, code];
  16135. },
  16136. constructPostScriptFromIR: function PDFFunction_constructPostScriptFromIR(
  16137. IR) {
  16138. var domain = IR[1];
  16139. var range = IR[2];
  16140. var code = IR[3];
  16141. var numOutputs = range.length >> 1;
  16142. var numInputs = domain.length >> 1;
  16143. var evaluator = new PostScriptEvaluator(code);
  16144. // Cache the values for a big speed up, the cache size is limited though
  16145. // since the number of possible values can be huge from a PS function.
  16146. var cache = {};
  16147. // The MAX_CACHE_SIZE is set to ~4x the maximum number of distinct values
  16148. // seen in our tests.
  16149. var MAX_CACHE_SIZE = 2048 * 4;
  16150. var cache_available = MAX_CACHE_SIZE;
  16151. return function constructPostScriptFromIRResult(args) {
  16152. var i, value;
  16153. var key = '';
  16154. var input = new Array(numInputs);
  16155. for (i = 0; i < numInputs; i++) {
  16156. value = args[i];
  16157. input[i] = value;
  16158. key += value + '_';
  16159. }
  16160. var cachedValue = cache[key];
  16161. if (cachedValue !== undefined) {
  16162. return cachedValue;
  16163. }
  16164. var output = new Array(numOutputs);
  16165. var stack = evaluator.execute(input);
  16166. var stackIndex = stack.length - numOutputs;
  16167. for (i = 0; i < numOutputs; i++) {
  16168. value = stack[stackIndex + i];
  16169. var bound = range[i * 2];
  16170. if (value < bound) {
  16171. value = bound;
  16172. } else {
  16173. bound = range[i * 2 +1];
  16174. if (value > bound) {
  16175. value = bound;
  16176. }
  16177. }
  16178. output[i] = value;
  16179. }
  16180. if (cache_available > 0) {
  16181. cache_available--;
  16182. cache[key] = output;
  16183. }
  16184. return output;
  16185. };
  16186. }
  16187. };
  16188. })();
  16189. function isPDFFunction(v) {
  16190. var fnDict;
  16191. if (typeof v != 'object') {
  16192. return false;
  16193. } else if (isDict(v)) {
  16194. fnDict = v;
  16195. } else if (isStream(v)) {
  16196. fnDict = v.dict;
  16197. } else {
  16198. return false;
  16199. }
  16200. return fnDict.has('FunctionType');
  16201. }
  16202. var PostScriptStack = (function PostScriptStackClosure() {
  16203. var MAX_STACK_SIZE = 100;
  16204. function PostScriptStack(initialStack) {
  16205. this.stack = initialStack || [];
  16206. }
  16207. PostScriptStack.prototype = {
  16208. push: function PostScriptStack_push(value) {
  16209. if (this.stack.length >= MAX_STACK_SIZE) {
  16210. error('PostScript function stack overflow.');
  16211. }
  16212. this.stack.push(value);
  16213. },
  16214. pop: function PostScriptStack_pop() {
  16215. if (this.stack.length <= 0) {
  16216. error('PostScript function stack underflow.');
  16217. }
  16218. return this.stack.pop();
  16219. },
  16220. copy: function PostScriptStack_copy(n) {
  16221. if (this.stack.length + n >= MAX_STACK_SIZE) {
  16222. error('PostScript function stack overflow.');
  16223. }
  16224. var stack = this.stack;
  16225. for (var i = stack.length - n, j = n - 1; j >= 0; j--, i++) {
  16226. stack.push(stack[i]);
  16227. }
  16228. },
  16229. index: function PostScriptStack_index(n) {
  16230. this.push(this.stack[this.stack.length - n - 1]);
  16231. },
  16232. // rotate the last n stack elements p times
  16233. roll: function PostScriptStack_roll(n, p) {
  16234. var stack = this.stack;
  16235. var l = stack.length - n;
  16236. var r = stack.length - 1, c = l + (p - Math.floor(p / n) * n), i, j, t;
  16237. for (i = l, j = r; i < j; i++, j--) {
  16238. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  16239. }
  16240. for (i = l, j = c - 1; i < j; i++, j--) {
  16241. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  16242. }
  16243. for (i = c, j = r; i < j; i++, j--) {
  16244. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  16245. }
  16246. }
  16247. };
  16248. return PostScriptStack;
  16249. })();
  16250. var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
  16251. function PostScriptEvaluator(operators) {
  16252. this.operators = operators;
  16253. }
  16254. PostScriptEvaluator.prototype = {
  16255. execute: function PostScriptEvaluator_execute(initialStack) {
  16256. var stack = new PostScriptStack(initialStack);
  16257. var counter = 0;
  16258. var operators = this.operators;
  16259. var length = operators.length;
  16260. var operator, a, b;
  16261. while (counter < length) {
  16262. operator = operators[counter++];
  16263. if (typeof operator == 'number') {
  16264. // Operator is really an operand and should be pushed to the stack.
  16265. stack.push(operator);
  16266. continue;
  16267. }
  16268. switch (operator) {
  16269. // non standard ps operators
  16270. case 'jz': // jump if false
  16271. b = stack.pop();
  16272. a = stack.pop();
  16273. if (!a) {
  16274. counter = b;
  16275. }
  16276. break;
  16277. case 'j': // jump
  16278. a = stack.pop();
  16279. counter = a;
  16280. break;
  16281. // all ps operators in alphabetical order (excluding if/ifelse)
  16282. case 'abs':
  16283. a = stack.pop();
  16284. stack.push(Math.abs(a));
  16285. break;
  16286. case 'add':
  16287. b = stack.pop();
  16288. a = stack.pop();
  16289. stack.push(a + b);
  16290. break;
  16291. case 'and':
  16292. b = stack.pop();
  16293. a = stack.pop();
  16294. if (isBool(a) && isBool(b)) {
  16295. stack.push(a && b);
  16296. } else {
  16297. stack.push(a & b);
  16298. }
  16299. break;
  16300. case 'atan':
  16301. a = stack.pop();
  16302. stack.push(Math.atan(a));
  16303. break;
  16304. case 'bitshift':
  16305. b = stack.pop();
  16306. a = stack.pop();
  16307. if (a > 0) {
  16308. stack.push(a << b);
  16309. } else {
  16310. stack.push(a >> b);
  16311. }
  16312. break;
  16313. case 'ceiling':
  16314. a = stack.pop();
  16315. stack.push(Math.ceil(a));
  16316. break;
  16317. case 'copy':
  16318. a = stack.pop();
  16319. stack.copy(a);
  16320. break;
  16321. case 'cos':
  16322. a = stack.pop();
  16323. stack.push(Math.cos(a));
  16324. break;
  16325. case 'cvi':
  16326. a = stack.pop() | 0;
  16327. stack.push(a);
  16328. break;
  16329. case 'cvr':
  16330. // noop
  16331. break;
  16332. case 'div':
  16333. b = stack.pop();
  16334. a = stack.pop();
  16335. stack.push(a / b);
  16336. break;
  16337. case 'dup':
  16338. stack.copy(1);
  16339. break;
  16340. case 'eq':
  16341. b = stack.pop();
  16342. a = stack.pop();
  16343. stack.push(a == b);
  16344. break;
  16345. case 'exch':
  16346. stack.roll(2, 1);
  16347. break;
  16348. case 'exp':
  16349. b = stack.pop();
  16350. a = stack.pop();
  16351. stack.push(Math.pow(a, b));
  16352. break;
  16353. case 'false':
  16354. stack.push(false);
  16355. break;
  16356. case 'floor':
  16357. a = stack.pop();
  16358. stack.push(Math.floor(a));
  16359. break;
  16360. case 'ge':
  16361. b = stack.pop();
  16362. a = stack.pop();
  16363. stack.push(a >= b);
  16364. break;
  16365. case 'gt':
  16366. b = stack.pop();
  16367. a = stack.pop();
  16368. stack.push(a > b);
  16369. break;
  16370. case 'idiv':
  16371. b = stack.pop();
  16372. a = stack.pop();
  16373. stack.push((a / b) | 0);
  16374. break;
  16375. case 'index':
  16376. a = stack.pop();
  16377. stack.index(a);
  16378. break;
  16379. case 'le':
  16380. b = stack.pop();
  16381. a = stack.pop();
  16382. stack.push(a <= b);
  16383. break;
  16384. case 'ln':
  16385. a = stack.pop();
  16386. stack.push(Math.log(a));
  16387. break;
  16388. case 'log':
  16389. a = stack.pop();
  16390. stack.push(Math.log(a) / Math.LN10);
  16391. break;
  16392. case 'lt':
  16393. b = stack.pop();
  16394. a = stack.pop();
  16395. stack.push(a < b);
  16396. break;
  16397. case 'mod':
  16398. b = stack.pop();
  16399. a = stack.pop();
  16400. stack.push(a % b);
  16401. break;
  16402. case 'mul':
  16403. b = stack.pop();
  16404. a = stack.pop();
  16405. stack.push(a * b);
  16406. break;
  16407. case 'ne':
  16408. b = stack.pop();
  16409. a = stack.pop();
  16410. stack.push(a != b);
  16411. break;
  16412. case 'neg':
  16413. a = stack.pop();
  16414. stack.push(-a);
  16415. break;
  16416. case 'not':
  16417. a = stack.pop();
  16418. if (isBool(a)) {
  16419. stack.push(!a);
  16420. } else {
  16421. stack.push(~a);
  16422. }
  16423. break;
  16424. case 'or':
  16425. b = stack.pop();
  16426. a = stack.pop();
  16427. if (isBool(a) && isBool(b)) {
  16428. stack.push(a || b);
  16429. } else {
  16430. stack.push(a | b);
  16431. }
  16432. break;
  16433. case 'pop':
  16434. stack.pop();
  16435. break;
  16436. case 'roll':
  16437. b = stack.pop();
  16438. a = stack.pop();
  16439. stack.roll(a, b);
  16440. break;
  16441. case 'round':
  16442. a = stack.pop();
  16443. stack.push(Math.round(a));
  16444. break;
  16445. case 'sin':
  16446. a = stack.pop();
  16447. stack.push(Math.sin(a));
  16448. break;
  16449. case 'sqrt':
  16450. a = stack.pop();
  16451. stack.push(Math.sqrt(a));
  16452. break;
  16453. case 'sub':
  16454. b = stack.pop();
  16455. a = stack.pop();
  16456. stack.push(a - b);
  16457. break;
  16458. case 'true':
  16459. stack.push(true);
  16460. break;
  16461. case 'truncate':
  16462. a = stack.pop();
  16463. a = a < 0 ? Math.ceil(a) : Math.floor(a);
  16464. stack.push(a);
  16465. break;
  16466. case 'xor':
  16467. b = stack.pop();
  16468. a = stack.pop();
  16469. if (isBool(a) && isBool(b)) {
  16470. stack.push(a != b);
  16471. } else {
  16472. stack.push(a ^ b);
  16473. }
  16474. break;
  16475. default:
  16476. error('Unknown operator ' + operator);
  16477. break;
  16478. }
  16479. }
  16480. return stack.stack;
  16481. }
  16482. };
  16483. return PostScriptEvaluator;
  16484. })();
  16485. var ColorSpace = (function ColorSpaceClosure() {
  16486. // Constructor should define this.numComps, this.defaultColor, this.name
  16487. function ColorSpace() {
  16488. error('should not call ColorSpace constructor');
  16489. }
  16490. ColorSpace.prototype = {
  16491. /**
  16492. * Converts the color value to the RGB color. The color components are
  16493. * located in the src array starting from the srcOffset. Returns the array
  16494. * of the rgb components, each value ranging from [0,255].
  16495. */
  16496. getRgb: function ColorSpace_getRgb(src, srcOffset) {
  16497. var rgb = new Uint8Array(3);
  16498. this.getRgbItem(src, srcOffset, rgb, 0);
  16499. return rgb;
  16500. },
  16501. /**
  16502. * Converts the color value to the RGB color, similar to the getRgb method.
  16503. * The result placed into the dest array starting from the destOffset.
  16504. */
  16505. getRgbItem: function ColorSpace_getRgbItem(src, srcOffset,
  16506. dest, destOffset) {
  16507. error('Should not call ColorSpace.getRgbItem');
  16508. },
  16509. /**
  16510. * Converts the specified number of the color values to the RGB colors.
  16511. * The colors are located in the src array starting from the srcOffset.
  16512. * The result is placed into the dest array starting from the destOffset.
  16513. * The src array items shall be in [0,2^bits) range, the dest array items
  16514. * will be in [0,255] range. alpha01 indicates how many alpha components
  16515. * there are in the dest array; it will be either 0 (RGB array) or 1 (RGBA
  16516. * array).
  16517. */
  16518. getRgbBuffer: function ColorSpace_getRgbBuffer(src, srcOffset, count,
  16519. dest, destOffset, bits,
  16520. alpha01) {
  16521. error('Should not call ColorSpace.getRgbBuffer');
  16522. },
  16523. /**
  16524. * Determines the number of bytes required to store the result of the
  16525. * conversion done by the getRgbBuffer method. As in getRgbBuffer,
  16526. * |alpha01| is either 0 (RGB output) or 1 (RGBA output).
  16527. */
  16528. getOutputLength: function ColorSpace_getOutputLength(inputLength,
  16529. alpha01) {
  16530. error('Should not call ColorSpace.getOutputLength');
  16531. },
  16532. /**
  16533. * Returns true if source data will be equal the result/output data.
  16534. */
  16535. isPassthrough: function ColorSpace_isPassthrough(bits) {
  16536. return false;
  16537. },
  16538. /**
  16539. * Fills in the RGB colors in the destination buffer. alpha01 indicates
  16540. * how many alpha components there are in the dest array; it will be either
  16541. * 0 (RGB array) or 1 (RGBA array).
  16542. */
  16543. fillRgb: function ColorSpace_fillRgb(dest, originalWidth,
  16544. originalHeight, width, height,
  16545. actualHeight, bpc, comps, alpha01) {
  16546. var count = originalWidth * originalHeight;
  16547. var rgbBuf = null;
  16548. var numComponentColors = 1 << bpc;
  16549. var needsResizing = originalHeight != height || originalWidth != width;
  16550. var i, ii;
  16551. if (this.isPassthrough(bpc)) {
  16552. rgbBuf = comps;
  16553. } else if (this.numComps === 1 && count > numComponentColors &&
  16554. this.name !== 'DeviceGray' && this.name !== 'DeviceRGB') {
  16555. // Optimization: create a color map when there is just one component and
  16556. // we are converting more colors than the size of the color map. We
  16557. // don't build the map if the colorspace is gray or rgb since those
  16558. // methods are faster than building a map. This mainly offers big speed
  16559. // ups for indexed and alternate colorspaces.
  16560. //
  16561. // TODO it may be worth while to cache the color map. While running
  16562. // testing I never hit a cache so I will leave that out for now (perhaps
  16563. // we are reparsing colorspaces too much?).
  16564. var allColors = bpc <= 8 ? new Uint8Array(numComponentColors) :
  16565. new Uint16Array(numComponentColors);
  16566. var key;
  16567. for (i = 0; i < numComponentColors; i++) {
  16568. allColors[i] = i;
  16569. }
  16570. var colorMap = new Uint8Array(numComponentColors * 3);
  16571. this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc,
  16572. /* alpha01 = */ 0);
  16573. var destPos, rgbPos;
  16574. if (!needsResizing) {
  16575. // Fill in the RGB values directly into |dest|.
  16576. destPos = 0;
  16577. for (i = 0; i < count; ++i) {
  16578. key = comps[i] * 3;
  16579. dest[destPos++] = colorMap[key];
  16580. dest[destPos++] = colorMap[key + 1];
  16581. dest[destPos++] = colorMap[key + 2];
  16582. destPos += alpha01;
  16583. }
  16584. } else {
  16585. rgbBuf = new Uint8Array(count * 3);
  16586. rgbPos = 0;
  16587. for (i = 0; i < count; ++i) {
  16588. key = comps[i] * 3;
  16589. rgbBuf[rgbPos++] = colorMap[key];
  16590. rgbBuf[rgbPos++] = colorMap[key + 1];
  16591. rgbBuf[rgbPos++] = colorMap[key + 2];
  16592. }
  16593. }
  16594. } else {
  16595. if (!needsResizing) {
  16596. // Fill in the RGB values directly into |dest|.
  16597. this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc,
  16598. alpha01);
  16599. } else {
  16600. rgbBuf = new Uint8Array(count * 3);
  16601. this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc,
  16602. /* alpha01 = */ 0);
  16603. }
  16604. }
  16605. if (rgbBuf) {
  16606. if (needsResizing) {
  16607. PDFImage.resize(rgbBuf, bpc, 3, originalWidth, originalHeight, width,
  16608. height, dest, alpha01);
  16609. } else {
  16610. rgbPos = 0;
  16611. destPos = 0;
  16612. for (i = 0, ii = width * actualHeight; i < ii; i++) {
  16613. dest[destPos++] = rgbBuf[rgbPos++];
  16614. dest[destPos++] = rgbBuf[rgbPos++];
  16615. dest[destPos++] = rgbBuf[rgbPos++];
  16616. destPos += alpha01;
  16617. }
  16618. }
  16619. }
  16620. },
  16621. /**
  16622. * True if the colorspace has components in the default range of [0, 1].
  16623. * This should be true for all colorspaces except for lab color spaces
  16624. * which are [0,100], [-128, 127], [-128, 127].
  16625. */
  16626. usesZeroToOneRange: true
  16627. };
  16628. ColorSpace.parse = function ColorSpace_parse(cs, xref, res) {
  16629. var IR = ColorSpace.parseToIR(cs, xref, res);
  16630. if (IR instanceof AlternateCS) {
  16631. return IR;
  16632. }
  16633. return ColorSpace.fromIR(IR);
  16634. };
  16635. ColorSpace.fromIR = function ColorSpace_fromIR(IR) {
  16636. var name = isArray(IR) ? IR[0] : IR;
  16637. var whitePoint, blackPoint;
  16638. switch (name) {
  16639. case 'DeviceGrayCS':
  16640. return this.singletons.gray;
  16641. case 'DeviceRgbCS':
  16642. return this.singletons.rgb;
  16643. case 'DeviceCmykCS':
  16644. return this.singletons.cmyk;
  16645. case 'CalGrayCS':
  16646. whitePoint = IR[1].WhitePoint;
  16647. blackPoint = IR[1].BlackPoint;
  16648. var gamma = IR[1].Gamma;
  16649. return new CalGrayCS(whitePoint, blackPoint, gamma);
  16650. case 'PatternCS':
  16651. var basePatternCS = IR[1];
  16652. if (basePatternCS) {
  16653. basePatternCS = ColorSpace.fromIR(basePatternCS);
  16654. }
  16655. return new PatternCS(basePatternCS);
  16656. case 'IndexedCS':
  16657. var baseIndexedCS = IR[1];
  16658. var hiVal = IR[2];
  16659. var lookup = IR[3];
  16660. return new IndexedCS(ColorSpace.fromIR(baseIndexedCS), hiVal, lookup);
  16661. case 'AlternateCS':
  16662. var numComps = IR[1];
  16663. var alt = IR[2];
  16664. var tintFnIR = IR[3];
  16665. return new AlternateCS(numComps, ColorSpace.fromIR(alt),
  16666. PDFFunction.fromIR(tintFnIR));
  16667. case 'LabCS':
  16668. whitePoint = IR[1].WhitePoint;
  16669. blackPoint = IR[1].BlackPoint;
  16670. var range = IR[1].Range;
  16671. return new LabCS(whitePoint, blackPoint, range);
  16672. default:
  16673. error('Unkown name ' + name);
  16674. }
  16675. return null;
  16676. };
  16677. ColorSpace.parseToIR = function ColorSpace_parseToIR(cs, xref, res) {
  16678. if (isName(cs)) {
  16679. var colorSpaces = res.get('ColorSpace');
  16680. if (isDict(colorSpaces)) {
  16681. var refcs = colorSpaces.get(cs.name);
  16682. if (refcs) {
  16683. cs = refcs;
  16684. }
  16685. }
  16686. }
  16687. cs = xref.fetchIfRef(cs);
  16688. var mode;
  16689. if (isName(cs)) {
  16690. mode = cs.name;
  16691. this.mode = mode;
  16692. switch (mode) {
  16693. case 'DeviceGray':
  16694. case 'G':
  16695. return 'DeviceGrayCS';
  16696. case 'DeviceRGB':
  16697. case 'RGB':
  16698. return 'DeviceRgbCS';
  16699. case 'DeviceCMYK':
  16700. case 'CMYK':
  16701. return 'DeviceCmykCS';
  16702. case 'Pattern':
  16703. return ['PatternCS', null];
  16704. default:
  16705. error('unrecognized colorspace ' + mode);
  16706. }
  16707. } else if (isArray(cs)) {
  16708. mode = cs[0].name;
  16709. this.mode = mode;
  16710. var numComps, params;
  16711. switch (mode) {
  16712. case 'DeviceGray':
  16713. case 'G':
  16714. return 'DeviceGrayCS';
  16715. case 'DeviceRGB':
  16716. case 'RGB':
  16717. return 'DeviceRgbCS';
  16718. case 'DeviceCMYK':
  16719. case 'CMYK':
  16720. return 'DeviceCmykCS';
  16721. case 'CalGray':
  16722. params = cs[1].getAll();
  16723. return ['CalGrayCS', params];
  16724. case 'CalRGB':
  16725. return 'DeviceRgbCS';
  16726. case 'ICCBased':
  16727. var stream = xref.fetchIfRef(cs[1]);
  16728. var dict = stream.dict;
  16729. numComps = dict.get('N');
  16730. if (numComps == 1) {
  16731. return 'DeviceGrayCS';
  16732. } else if (numComps == 3) {
  16733. return 'DeviceRgbCS';
  16734. } else if (numComps == 4) {
  16735. return 'DeviceCmykCS';
  16736. }
  16737. break;
  16738. case 'Pattern':
  16739. var basePatternCS = cs[1];
  16740. if (basePatternCS) {
  16741. basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res);
  16742. }
  16743. return ['PatternCS', basePatternCS];
  16744. case 'Indexed':
  16745. case 'I':
  16746. var baseIndexedCS = ColorSpace.parseToIR(cs[1], xref, res);
  16747. var hiVal = cs[2] + 1;
  16748. var lookup = xref.fetchIfRef(cs[3]);
  16749. if (isStream(lookup)) {
  16750. lookup = lookup.getBytes();
  16751. }
  16752. return ['IndexedCS', baseIndexedCS, hiVal, lookup];
  16753. case 'Separation':
  16754. case 'DeviceN':
  16755. var name = cs[1];
  16756. numComps = 1;
  16757. if (isName(name)) {
  16758. numComps = 1;
  16759. } else if (isArray(name)) {
  16760. numComps = name.length;
  16761. }
  16762. var alt = ColorSpace.parseToIR(cs[2], xref, res);
  16763. var tintFnIR = PDFFunction.getIR(xref, xref.fetchIfRef(cs[3]));
  16764. return ['AlternateCS', numComps, alt, tintFnIR];
  16765. case 'Lab':
  16766. params = cs[1].getAll();
  16767. return ['LabCS', params];
  16768. default:
  16769. error('unimplemented color space object "' + mode + '"');
  16770. }
  16771. } else {
  16772. error('unrecognized color space object: "' + cs + '"');
  16773. }
  16774. return null;
  16775. };
  16776. /**
  16777. * Checks if a decode map matches the default decode map for a color space.
  16778. * This handles the general decode maps where there are two values per
  16779. * component. e.g. [0, 1, 0, 1, 0, 1] for a RGB color.
  16780. * This does not handle Lab, Indexed, or Pattern decode maps since they are
  16781. * slightly different.
  16782. * @param {Array} decode Decode map (usually from an image).
  16783. * @param {Number} n Number of components the color space has.
  16784. */
  16785. ColorSpace.isDefaultDecode = function ColorSpace_isDefaultDecode(decode, n) {
  16786. if (!decode) {
  16787. return true;
  16788. }
  16789. if (n * 2 !== decode.length) {
  16790. warn('The decode map is not the correct length');
  16791. return true;
  16792. }
  16793. for (var i = 0, ii = decode.length; i < ii; i += 2) {
  16794. if (decode[i] !== 0 || decode[i + 1] != 1) {
  16795. return false;
  16796. }
  16797. }
  16798. return true;
  16799. };
  16800. ColorSpace.singletons = {
  16801. get gray() {
  16802. return shadow(this, 'gray', new DeviceGrayCS());
  16803. },
  16804. get rgb() {
  16805. return shadow(this, 'rgb', new DeviceRgbCS());
  16806. },
  16807. get cmyk() {
  16808. return shadow(this, 'cmyk', new DeviceCmykCS());
  16809. }
  16810. };
  16811. return ColorSpace;
  16812. })();
  16813. /**
  16814. * Alternate color space handles both Separation and DeviceN color spaces. A
  16815. * Separation color space is actually just a DeviceN with one color component.
  16816. * Both color spaces use a tinting function to convert colors to a base color
  16817. * space.
  16818. */
  16819. var AlternateCS = (function AlternateCSClosure() {
  16820. function AlternateCS(numComps, base, tintFn) {
  16821. this.name = 'Alternate';
  16822. this.numComps = numComps;
  16823. this.defaultColor = new Float32Array(numComps);
  16824. for (var i = 0; i < numComps; ++i) {
  16825. this.defaultColor[i] = 1;
  16826. }
  16827. this.base = base;
  16828. this.tintFn = tintFn;
  16829. }
  16830. AlternateCS.prototype = {
  16831. getRgb: ColorSpace.prototype.getRgb,
  16832. getRgbItem: function AlternateCS_getRgbItem(src, srcOffset,
  16833. dest, destOffset) {
  16834. var baseNumComps = this.base.numComps;
  16835. var input = 'subarray' in src ?
  16836. src.subarray(srcOffset, srcOffset + this.numComps) :
  16837. Array.prototype.slice.call(src, srcOffset, srcOffset + this.numComps);
  16838. var tinted = this.tintFn(input);
  16839. this.base.getRgbItem(tinted, 0, dest, destOffset);
  16840. },
  16841. getRgbBuffer: function AlternateCS_getRgbBuffer(src, srcOffset, count,
  16842. dest, destOffset, bits,
  16843. alpha01) {
  16844. var tinted;
  16845. var tintFn = this.tintFn;
  16846. var base = this.base;
  16847. var scale = 1 / ((1 << bits) - 1);
  16848. var baseNumComps = base.numComps;
  16849. var usesZeroToOneRange = base.usesZeroToOneRange;
  16850. var isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) &&
  16851. alpha01 === 0;
  16852. var pos = isPassthrough ? destOffset : 0;
  16853. var baseBuf = isPassthrough ? dest : new Uint8Array(baseNumComps * count);
  16854. var numComps = this.numComps;
  16855. var scaled = new Float32Array(numComps);
  16856. var i, j;
  16857. if (usesZeroToOneRange) {
  16858. for (i = 0; i < count; i++) {
  16859. for (j = 0; j < numComps; j++) {
  16860. scaled[j] = src[srcOffset++] * scale;
  16861. }
  16862. tinted = tintFn(scaled);
  16863. for (j = 0; j < baseNumComps; j++) {
  16864. baseBuf[pos++] = tinted[j] * 255;
  16865. }
  16866. }
  16867. } else {
  16868. for (i = 0; i < count; i++) {
  16869. for (j = 0; j < numComps; j++) {
  16870. scaled[j] = src[srcOffset++] * scale;
  16871. }
  16872. tinted = tintFn(scaled);
  16873. base.getRgbItem(tinted, 0, baseBuf, pos);
  16874. pos += baseNumComps;
  16875. }
  16876. }
  16877. if (!isPassthrough) {
  16878. base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01);
  16879. }
  16880. },
  16881. getOutputLength: function AlternateCS_getOutputLength(inputLength,
  16882. alpha01) {
  16883. return this.base.getOutputLength(inputLength *
  16884. this.base.numComps / this.numComps,
  16885. alpha01);
  16886. },
  16887. isPassthrough: ColorSpace.prototype.isPassthrough,
  16888. fillRgb: ColorSpace.prototype.fillRgb,
  16889. isDefaultDecode: function AlternateCS_isDefaultDecode(decodeMap) {
  16890. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  16891. },
  16892. usesZeroToOneRange: true
  16893. };
  16894. return AlternateCS;
  16895. })();
  16896. var PatternCS = (function PatternCSClosure() {
  16897. function PatternCS(baseCS) {
  16898. this.name = 'Pattern';
  16899. this.base = baseCS;
  16900. }
  16901. PatternCS.prototype = {};
  16902. return PatternCS;
  16903. })();
  16904. var IndexedCS = (function IndexedCSClosure() {
  16905. function IndexedCS(base, highVal, lookup) {
  16906. this.name = 'Indexed';
  16907. this.numComps = 1;
  16908. this.defaultColor = new Uint8Array([0]);
  16909. this.base = base;
  16910. this.highVal = highVal;
  16911. var baseNumComps = base.numComps;
  16912. var length = baseNumComps * highVal;
  16913. var lookupArray;
  16914. if (isStream(lookup)) {
  16915. lookupArray = new Uint8Array(length);
  16916. var bytes = lookup.getBytes(length);
  16917. lookupArray.set(bytes);
  16918. } else if (isString(lookup)) {
  16919. lookupArray = new Uint8Array(length);
  16920. for (var i = 0; i < length; ++i) {
  16921. lookupArray[i] = lookup.charCodeAt(i);
  16922. }
  16923. } else if (lookup instanceof Uint8Array || lookup instanceof Array) {
  16924. lookupArray = lookup;
  16925. } else {
  16926. error('Unrecognized lookup table: ' + lookup);
  16927. }
  16928. this.lookup = lookupArray;
  16929. }
  16930. IndexedCS.prototype = {
  16931. getRgb: ColorSpace.prototype.getRgb,
  16932. getRgbItem: function IndexedCS_getRgbItem(src, srcOffset,
  16933. dest, destOffset) {
  16934. var numComps = this.base.numComps;
  16935. var start = src[srcOffset] * numComps;
  16936. this.base.getRgbItem(this.lookup, start, dest, destOffset);
  16937. },
  16938. getRgbBuffer: function IndexedCS_getRgbBuffer(src, srcOffset, count,
  16939. dest, destOffset, bits,
  16940. alpha01) {
  16941. var base = this.base;
  16942. var numComps = base.numComps;
  16943. var outputDelta = base.getOutputLength(numComps, alpha01);
  16944. var lookup = this.lookup;
  16945. for (var i = 0; i < count; ++i) {
  16946. var lookupPos = src[srcOffset++] * numComps;
  16947. base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01);
  16948. destOffset += outputDelta;
  16949. }
  16950. },
  16951. getOutputLength: function IndexedCS_getOutputLength(inputLength, alpha01) {
  16952. return this.base.getOutputLength(inputLength * this.base.numComps,
  16953. alpha01);
  16954. },
  16955. isPassthrough: ColorSpace.prototype.isPassthrough,
  16956. fillRgb: ColorSpace.prototype.fillRgb,
  16957. isDefaultDecode: function IndexedCS_isDefaultDecode(decodeMap) {
  16958. // indexed color maps shouldn't be changed
  16959. return true;
  16960. },
  16961. usesZeroToOneRange: true
  16962. };
  16963. return IndexedCS;
  16964. })();
  16965. var DeviceGrayCS = (function DeviceGrayCSClosure() {
  16966. function DeviceGrayCS() {
  16967. this.name = 'DeviceGray';
  16968. this.numComps = 1;
  16969. this.defaultColor = new Float32Array([0]);
  16970. }
  16971. DeviceGrayCS.prototype = {
  16972. getRgb: ColorSpace.prototype.getRgb,
  16973. getRgbItem: function DeviceGrayCS_getRgbItem(src, srcOffset,
  16974. dest, destOffset) {
  16975. var c = (src[srcOffset] * 255) | 0;
  16976. c = c < 0 ? 0 : c > 255 ? 255 : c;
  16977. dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c;
  16978. },
  16979. getRgbBuffer: function DeviceGrayCS_getRgbBuffer(src, srcOffset, count,
  16980. dest, destOffset, bits,
  16981. alpha01) {
  16982. var scale = 255 / ((1 << bits) - 1);
  16983. var j = srcOffset, q = destOffset;
  16984. for (var i = 0; i < count; ++i) {
  16985. var c = (scale * src[j++]) | 0;
  16986. dest[q++] = c;
  16987. dest[q++] = c;
  16988. dest[q++] = c;
  16989. q += alpha01;
  16990. }
  16991. },
  16992. getOutputLength: function DeviceGrayCS_getOutputLength(inputLength,
  16993. alpha01) {
  16994. return inputLength * (3 + alpha01);
  16995. },
  16996. isPassthrough: ColorSpace.prototype.isPassthrough,
  16997. fillRgb: ColorSpace.prototype.fillRgb,
  16998. isDefaultDecode: function DeviceGrayCS_isDefaultDecode(decodeMap) {
  16999. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  17000. },
  17001. usesZeroToOneRange: true
  17002. };
  17003. return DeviceGrayCS;
  17004. })();
  17005. var DeviceRgbCS = (function DeviceRgbCSClosure() {
  17006. function DeviceRgbCS() {
  17007. this.name = 'DeviceRGB';
  17008. this.numComps = 3;
  17009. this.defaultColor = new Float32Array([0, 0, 0]);
  17010. }
  17011. DeviceRgbCS.prototype = {
  17012. getRgb: ColorSpace.prototype.getRgb,
  17013. getRgbItem: function DeviceRgbCS_getRgbItem(src, srcOffset,
  17014. dest, destOffset) {
  17015. var r = (src[srcOffset] * 255) | 0;
  17016. var g = (src[srcOffset + 1] * 255) | 0;
  17017. var b = (src[srcOffset + 2] * 255) | 0;
  17018. dest[destOffset] = r < 0 ? 0 : r > 255 ? 255 : r;
  17019. dest[destOffset + 1] = g < 0 ? 0 : g > 255 ? 255 : g;
  17020. dest[destOffset + 2] = b < 0 ? 0 : b > 255 ? 255 : b;
  17021. },
  17022. getRgbBuffer: function DeviceRgbCS_getRgbBuffer(src, srcOffset, count,
  17023. dest, destOffset, bits,
  17024. alpha01) {
  17025. if (bits === 8 && alpha01 === 0) {
  17026. dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset);
  17027. return;
  17028. }
  17029. var scale = 255 / ((1 << bits) - 1);
  17030. var j = srcOffset, q = destOffset;
  17031. for (var i = 0; i < count; ++i) {
  17032. dest[q++] = (scale * src[j++]) | 0;
  17033. dest[q++] = (scale * src[j++]) | 0;
  17034. dest[q++] = (scale * src[j++]) | 0;
  17035. q += alpha01;
  17036. }
  17037. },
  17038. getOutputLength: function DeviceRgbCS_getOutputLength(inputLength,
  17039. alpha01) {
  17040. return (inputLength * (3 + alpha01) / 3) | 0;
  17041. },
  17042. isPassthrough: function DeviceRgbCS_isPassthrough(bits) {
  17043. return bits == 8;
  17044. },
  17045. fillRgb: ColorSpace.prototype.fillRgb,
  17046. isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) {
  17047. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  17048. },
  17049. usesZeroToOneRange: true
  17050. };
  17051. return DeviceRgbCS;
  17052. })();
  17053. var DeviceCmykCS = (function DeviceCmykCSClosure() {
  17054. // The coefficients below was found using numerical analysis: the method of
  17055. // steepest descent for the sum((f_i - color_value_i)^2) for r/g/b colors,
  17056. // where color_value is the tabular value from the table of sampled RGB colors
  17057. // from CMYK US Web Coated (SWOP) colorspace, and f_i is the corresponding
  17058. // CMYK color conversion using the estimation below:
  17059. // f(A, B,.. N) = Acc+Bcm+Ccy+Dck+c+Fmm+Gmy+Hmk+Im+Jyy+Kyk+Ly+Mkk+Nk+255
  17060. function convertToRgb(src, srcOffset, srcScale, dest, destOffset) {
  17061. var c = src[srcOffset + 0] * srcScale;
  17062. var m = src[srcOffset + 1] * srcScale;
  17063. var y = src[srcOffset + 2] * srcScale;
  17064. var k = src[srcOffset + 3] * srcScale;
  17065. var r =
  17066. (c * (-4.387332384609988 * c + 54.48615194189176 * m +
  17067. 18.82290502165302 * y + 212.25662451639585 * k +
  17068. -285.2331026137004) +
  17069. m * (1.7149763477362134 * m - 5.6096736904047315 * y +
  17070. -17.873870861415444 * k - 5.497006427196366) +
  17071. y * (-2.5217340131683033 * y - 21.248923337353073 * k +
  17072. 17.5119270841813) +
  17073. k * (-21.86122147463605 * k - 189.48180835922747) + 255) | 0;
  17074. var g =
  17075. (c * (8.841041422036149 * c + 60.118027045597366 * m +
  17076. 6.871425592049007 * y + 31.159100130055922 * k +
  17077. -79.2970844816548) +
  17078. m * (-15.310361306967817 * m + 17.575251261109482 * y +
  17079. 131.35250912493976 * k - 190.9453302588951) +
  17080. y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) +
  17081. k * (-20.737325471181034 * k - 187.80453709719578) + 255) | 0;
  17082. var b =
  17083. (c * (0.8842522430003296 * c + 8.078677503112928 * m +
  17084. 30.89978309703729 * y - 0.23883238689178934 * k +
  17085. -14.183576799673286) +
  17086. m * (10.49593273432072 * m + 63.02378494754052 * y +
  17087. 50.606957656360734 * k - 112.23884253719248) +
  17088. y * (0.03296041114873217 * y + 115.60384449646641 * k +
  17089. -193.58209356861505) +
  17090. k * (-22.33816807309886 * k - 180.12613974708367) + 255) | 0;
  17091. dest[destOffset] = r > 255 ? 255 : r < 0 ? 0 : r;
  17092. dest[destOffset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;
  17093. dest[destOffset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;
  17094. }
  17095. function DeviceCmykCS() {
  17096. this.name = 'DeviceCMYK';
  17097. this.numComps = 4;
  17098. this.defaultColor = new Float32Array([0, 0, 0, 1]);
  17099. }
  17100. DeviceCmykCS.prototype = {
  17101. getRgb: ColorSpace.prototype.getRgb,
  17102. getRgbItem: function DeviceCmykCS_getRgbItem(src, srcOffset,
  17103. dest, destOffset) {
  17104. convertToRgb(src, srcOffset, 1, dest, destOffset);
  17105. },
  17106. getRgbBuffer: function DeviceCmykCS_getRgbBuffer(src, srcOffset, count,
  17107. dest, destOffset, bits,
  17108. alpha01) {
  17109. var scale = 1 / ((1 << bits) - 1);
  17110. for (var i = 0; i < count; i++) {
  17111. convertToRgb(src, srcOffset, scale, dest, destOffset);
  17112. srcOffset += 4;
  17113. destOffset += 3 + alpha01;
  17114. }
  17115. },
  17116. getOutputLength: function DeviceCmykCS_getOutputLength(inputLength,
  17117. alpha01) {
  17118. return (inputLength / 4 * (3 + alpha01)) | 0;
  17119. },
  17120. isPassthrough: ColorSpace.prototype.isPassthrough,
  17121. fillRgb: ColorSpace.prototype.fillRgb,
  17122. isDefaultDecode: function DeviceCmykCS_isDefaultDecode(decodeMap) {
  17123. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  17124. },
  17125. usesZeroToOneRange: true
  17126. };
  17127. return DeviceCmykCS;
  17128. })();
  17129. //
  17130. // CalGrayCS: Based on "PDF Reference, Sixth Ed", p.245
  17131. //
  17132. var CalGrayCS = (function CalGrayCSClosure() {
  17133. function CalGrayCS(whitePoint, blackPoint, gamma) {
  17134. this.name = 'CalGray';
  17135. this.numComps = 1;
  17136. this.defaultColor = new Float32Array([0]);
  17137. if (!whitePoint) {
  17138. error('WhitePoint missing - required for color space CalGray');
  17139. }
  17140. blackPoint = blackPoint || [0, 0, 0];
  17141. gamma = gamma || 1;
  17142. // Translate arguments to spec variables.
  17143. this.XW = whitePoint[0];
  17144. this.YW = whitePoint[1];
  17145. this.ZW = whitePoint[2];
  17146. this.XB = blackPoint[0];
  17147. this.YB = blackPoint[1];
  17148. this.ZB = blackPoint[2];
  17149. this.G = gamma;
  17150. // Validate variables as per spec.
  17151. if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) {
  17152. error('Invalid WhitePoint components for ' + this.name +
  17153. ', no fallback available');
  17154. }
  17155. if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  17156. info('Invalid BlackPoint for ' + this.name + ', falling back to default');
  17157. this.XB = this.YB = this.ZB = 0;
  17158. }
  17159. if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) {
  17160. warn(this.name + ', BlackPoint: XB: ' + this.XB + ', YB: ' + this.YB +
  17161. ', ZB: ' + this.ZB + ', only default values are supported.');
  17162. }
  17163. if (this.G < 1) {
  17164. info('Invalid Gamma: ' + this.G + ' for ' + this.name +
  17165. ', falling back to default');
  17166. this.G = 1;
  17167. }
  17168. }
  17169. function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) {
  17170. // A represents a gray component of a calibrated gray space.
  17171. // A <---> AG in the spec
  17172. var A = src[srcOffset] * scale;
  17173. var AG = Math.pow(A, cs.G);
  17174. // Computes L as per spec. ( = cs.YW * AG )
  17175. // Except if other than default BlackPoint values are used.
  17176. var L = cs.YW * AG;
  17177. // http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html, Ch 4.
  17178. // Convert values to rgb range [0, 255].
  17179. var val = Math.max(295.8 * Math.pow(L, 0.333333333333333333) - 40.8, 0) | 0;
  17180. dest[destOffset] = val;
  17181. dest[destOffset + 1] = val;
  17182. dest[destOffset + 2] = val;
  17183. }
  17184. CalGrayCS.prototype = {
  17185. getRgb: ColorSpace.prototype.getRgb,
  17186. getRgbItem: function CalGrayCS_getRgbItem(src, srcOffset,
  17187. dest, destOffset) {
  17188. convertToRgb(this, src, srcOffset, dest, destOffset, 1);
  17189. },
  17190. getRgbBuffer: function CalGrayCS_getRgbBuffer(src, srcOffset, count,
  17191. dest, destOffset, bits,
  17192. alpha01) {
  17193. var scale = 1 / ((1 << bits) - 1);
  17194. for (var i = 0; i < count; ++i) {
  17195. convertToRgb(this, src, srcOffset, dest, destOffset, scale);
  17196. srcOffset += 1;
  17197. destOffset += 3 + alpha01;
  17198. }
  17199. },
  17200. getOutputLength: function CalGrayCS_getOutputLength(inputLength, alpha01) {
  17201. return inputLength * (3 + alpha01);
  17202. },
  17203. isPassthrough: ColorSpace.prototype.isPassthrough,
  17204. fillRgb: ColorSpace.prototype.fillRgb,
  17205. isDefaultDecode: function CalGrayCS_isDefaultDecode(decodeMap) {
  17206. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  17207. },
  17208. usesZeroToOneRange: true
  17209. };
  17210. return CalGrayCS;
  17211. })();
  17212. //
  17213. // LabCS: Based on "PDF Reference, Sixth Ed", p.250
  17214. //
  17215. var LabCS = (function LabCSClosure() {
  17216. function LabCS(whitePoint, blackPoint, range) {
  17217. this.name = 'Lab';
  17218. this.numComps = 3;
  17219. this.defaultColor = new Float32Array([0, 0, 0]);
  17220. if (!whitePoint) {
  17221. error('WhitePoint missing - required for color space Lab');
  17222. }
  17223. blackPoint = blackPoint || [0, 0, 0];
  17224. range = range || [-100, 100, -100, 100];
  17225. // Translate args to spec variables
  17226. this.XW = whitePoint[0];
  17227. this.YW = whitePoint[1];
  17228. this.ZW = whitePoint[2];
  17229. this.amin = range[0];
  17230. this.amax = range[1];
  17231. this.bmin = range[2];
  17232. this.bmax = range[3];
  17233. // These are here just for completeness - the spec doesn't offer any
  17234. // formulas that use BlackPoint in Lab
  17235. this.XB = blackPoint[0];
  17236. this.YB = blackPoint[1];
  17237. this.ZB = blackPoint[2];
  17238. // Validate vars as per spec
  17239. if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) {
  17240. error('Invalid WhitePoint components, no fallback available');
  17241. }
  17242. if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  17243. info('Invalid BlackPoint, falling back to default');
  17244. this.XB = this.YB = this.ZB = 0;
  17245. }
  17246. if (this.amin > this.amax || this.bmin > this.bmax) {
  17247. info('Invalid Range, falling back to defaults');
  17248. this.amin = -100;
  17249. this.amax = 100;
  17250. this.bmin = -100;
  17251. this.bmax = 100;
  17252. }
  17253. }
  17254. // Function g(x) from spec
  17255. function fn_g(x) {
  17256. if (x >= 6 / 29) {
  17257. return x * x * x;
  17258. } else {
  17259. return (108 / 841) * (x - 4 / 29);
  17260. }
  17261. }
  17262. function decode(value, high1, low2, high2) {
  17263. return low2 + (value) * (high2 - low2) / (high1);
  17264. }
  17265. // If decoding is needed maxVal should be 2^bits per component - 1.
  17266. function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) {
  17267. // XXX: Lab input is in the range of [0, 100], [amin, amax], [bmin, bmax]
  17268. // not the usual [0, 1]. If a command like setFillColor is used the src
  17269. // values will already be within the correct range. However, if we are
  17270. // converting an image we have to map the values to the correct range given
  17271. // above.
  17272. // Ls,as,bs <---> L*,a*,b* in the spec
  17273. var Ls = src[srcOffset];
  17274. var as = src[srcOffset + 1];
  17275. var bs = src[srcOffset + 2];
  17276. if (maxVal !== false) {
  17277. Ls = decode(Ls, maxVal, 0, 100);
  17278. as = decode(as, maxVal, cs.amin, cs.amax);
  17279. bs = decode(bs, maxVal, cs.bmin, cs.bmax);
  17280. }
  17281. // Adjust limits of 'as' and 'bs'
  17282. as = as > cs.amax ? cs.amax : as < cs.amin ? cs.amin : as;
  17283. bs = bs > cs.bmax ? cs.bmax : bs < cs.bmin ? cs.bmin : bs;
  17284. // Computes intermediate variables X,Y,Z as per spec
  17285. var M = (Ls + 16) / 116;
  17286. var L = M + (as / 500);
  17287. var N = M - (bs / 200);
  17288. var X = cs.XW * fn_g(L);
  17289. var Y = cs.YW * fn_g(M);
  17290. var Z = cs.ZW * fn_g(N);
  17291. var r, g, b;
  17292. // Using different conversions for D50 and D65 white points,
  17293. // per http://www.color.org/srgb.pdf
  17294. if (cs.ZW < 1) {
  17295. // Assuming D50 (X=0.9642, Y=1.00, Z=0.8249)
  17296. r = X * 3.1339 + Y * -1.6170 + Z * -0.4906;
  17297. g = X * -0.9785 + Y * 1.9160 + Z * 0.0333;
  17298. b = X * 0.0720 + Y * -0.2290 + Z * 1.4057;
  17299. } else {
  17300. // Assuming D65 (X=0.9505, Y=1.00, Z=1.0888)
  17301. r = X * 3.2406 + Y * -1.5372 + Z * -0.4986;
  17302. g = X * -0.9689 + Y * 1.8758 + Z * 0.0415;
  17303. b = X * 0.0557 + Y * -0.2040 + Z * 1.0570;
  17304. }
  17305. // clamp color values to [0,1] range then convert to [0,255] range.
  17306. dest[destOffset] = r <= 0 ? 0 : r >= 1 ? 255 : Math.sqrt(r) * 255 | 0;
  17307. dest[destOffset + 1] = g <= 0 ? 0 : g >= 1 ? 255 : Math.sqrt(g) * 255 | 0;
  17308. dest[destOffset + 2] = b <= 0 ? 0 : b >= 1 ? 255 : Math.sqrt(b) * 255 | 0;
  17309. }
  17310. LabCS.prototype = {
  17311. getRgb: ColorSpace.prototype.getRgb,
  17312. getRgbItem: function LabCS_getRgbItem(src, srcOffset, dest, destOffset) {
  17313. convertToRgb(this, src, srcOffset, false, dest, destOffset);
  17314. },
  17315. getRgbBuffer: function LabCS_getRgbBuffer(src, srcOffset, count,
  17316. dest, destOffset, bits,
  17317. alpha01) {
  17318. var maxVal = (1 << bits) - 1;
  17319. for (var i = 0; i < count; i++) {
  17320. convertToRgb(this, src, srcOffset, maxVal, dest, destOffset);
  17321. srcOffset += 3;
  17322. destOffset += 3 + alpha01;
  17323. }
  17324. },
  17325. getOutputLength: function LabCS_getOutputLength(inputLength, alpha01) {
  17326. return (inputLength * (3 + alpha01) / 3) | 0;
  17327. },
  17328. isPassthrough: ColorSpace.prototype.isPassthrough,
  17329. isDefaultDecode: function LabCS_isDefaultDecode(decodeMap) {
  17330. // XXX: Decoding is handled with the lab conversion because of the strange
  17331. // ranges that are used.
  17332. return true;
  17333. },
  17334. usesZeroToOneRange: false
  17335. };
  17336. return LabCS;
  17337. })();
  17338. var ARCFourCipher = (function ARCFourCipherClosure() {
  17339. function ARCFourCipher(key) {
  17340. this.a = 0;
  17341. this.b = 0;
  17342. var s = new Uint8Array(256);
  17343. var i, j = 0, tmp, keyLength = key.length;
  17344. for (i = 0; i < 256; ++i) {
  17345. s[i] = i;
  17346. }
  17347. for (i = 0; i < 256; ++i) {
  17348. tmp = s[i];
  17349. j = (j + tmp + key[i % keyLength]) & 0xFF;
  17350. s[i] = s[j];
  17351. s[j] = tmp;
  17352. }
  17353. this.s = s;
  17354. }
  17355. ARCFourCipher.prototype = {
  17356. encryptBlock: function ARCFourCipher_encryptBlock(data) {
  17357. var i, n = data.length, tmp, tmp2;
  17358. var a = this.a, b = this.b, s = this.s;
  17359. var output = new Uint8Array(n);
  17360. for (i = 0; i < n; ++i) {
  17361. a = (a + 1) & 0xFF;
  17362. tmp = s[a];
  17363. b = (b + tmp) & 0xFF;
  17364. tmp2 = s[b];
  17365. s[a] = tmp2;
  17366. s[b] = tmp;
  17367. output[i] = data[i] ^ s[(tmp + tmp2) & 0xFF];
  17368. }
  17369. this.a = a;
  17370. this.b = b;
  17371. return output;
  17372. }
  17373. };
  17374. ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock;
  17375. return ARCFourCipher;
  17376. })();
  17377. var calculateMD5 = (function calculateMD5Closure() {
  17378. var r = new Uint8Array([
  17379. 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
  17380. 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
  17381. 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
  17382. 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]);
  17383. var k = new Int32Array([
  17384. -680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426,
  17385. -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162,
  17386. 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632,
  17387. 643717713, -373897302, -701558691, 38016083, -660478335, -405537848,
  17388. 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784,
  17389. 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556,
  17390. -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222,
  17391. -722521979, 76029189, -640364487, -421815835, 530742520, -995338651,
  17392. -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606,
  17393. -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649,
  17394. -145523070, -1120210379, 718787259, -343485551]);
  17395. function hash(data, offset, length) {
  17396. var h0 = 1732584193, h1 = -271733879, h2 = -1732584194, h3 = 271733878;
  17397. // pre-processing
  17398. var paddedLength = (length + 72) & ~63; // data + 9 extra bytes
  17399. var padded = new Uint8Array(paddedLength);
  17400. var i, j, n;
  17401. for (i = 0; i < length; ++i) {
  17402. padded[i] = data[offset++];
  17403. }
  17404. padded[i++] = 0x80;
  17405. n = paddedLength - 8;
  17406. while (i < n) {
  17407. padded[i++] = 0;
  17408. }
  17409. padded[i++] = (length << 3) & 0xFF;
  17410. padded[i++] = (length >> 5) & 0xFF;
  17411. padded[i++] = (length >> 13) & 0xFF;
  17412. padded[i++] = (length >> 21) & 0xFF;
  17413. padded[i++] = (length >>> 29) & 0xFF;
  17414. padded[i++] = 0;
  17415. padded[i++] = 0;
  17416. padded[i++] = 0;
  17417. var w = new Int32Array(16);
  17418. for (i = 0; i < paddedLength;) {
  17419. for (j = 0; j < 16; ++j, i += 4) {
  17420. w[j] = (padded[i] | (padded[i + 1] << 8) |
  17421. (padded[i + 2] << 16) | (padded[i + 3] << 24));
  17422. }
  17423. var a = h0, b = h1, c = h2, d = h3, f, g;
  17424. for (j = 0; j < 64; ++j) {
  17425. if (j < 16) {
  17426. f = (b & c) | ((~b) & d);
  17427. g = j;
  17428. } else if (j < 32) {
  17429. f = (d & b) | ((~d) & c);
  17430. g = (5 * j + 1) & 15;
  17431. } else if (j < 48) {
  17432. f = b ^ c ^ d;
  17433. g = (3 * j + 5) & 15;
  17434. } else {
  17435. f = c ^ (b | (~d));
  17436. g = (7 * j) & 15;
  17437. }
  17438. var tmp = d, rotateArg = (a + f + k[j] + w[g]) | 0, rotate = r[j];
  17439. d = c;
  17440. c = b;
  17441. b = (b + ((rotateArg << rotate) | (rotateArg >>> (32 - rotate)))) | 0;
  17442. a = tmp;
  17443. }
  17444. h0 = (h0 + a) | 0;
  17445. h1 = (h1 + b) | 0;
  17446. h2 = (h2 + c) | 0;
  17447. h3 = (h3 + d) | 0;
  17448. }
  17449. return new Uint8Array([
  17450. h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >>> 24) & 0xFF,
  17451. h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >>> 24) & 0xFF,
  17452. h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >>> 24) & 0xFF,
  17453. h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >>> 24) & 0xFF
  17454. ]);
  17455. }
  17456. return hash;
  17457. })();
  17458. var Word64 = (function Word64Closure() {
  17459. function Word64(highInteger, lowInteger) {
  17460. this.high = highInteger | 0;
  17461. this.low = lowInteger | 0;
  17462. }
  17463. Word64.prototype = {
  17464. and: function Word64_and(word) {
  17465. this.high &= word.high;
  17466. this.low &= word.low;
  17467. },
  17468. xor: function Word64_xor(word) {
  17469. this.high ^= word.high;
  17470. this.low ^= word.low;
  17471. },
  17472. or: function Word64_or(word) {
  17473. this.high |= word.high;
  17474. this.low |= word.low;
  17475. },
  17476. shiftRight: function Word64_shiftRight(places) {
  17477. if (places >= 32) {
  17478. this.low = (this.high >>> (places - 32)) | 0;
  17479. this.high = 0;
  17480. } else {
  17481. this.low = (this.low >>> places) | (this.high << (32 - places));
  17482. this.high = (this.high >>> places) | 0;
  17483. }
  17484. },
  17485. shiftLeft: function Word64_shiftLeft(places) {
  17486. if (places >= 32) {
  17487. this.high = this.low << (places - 32);
  17488. this.low = 0;
  17489. } else {
  17490. this.high = (this.high << places) | (this.low >>> (32 - places));
  17491. this.low = this.low << places;
  17492. }
  17493. },
  17494. rotateRight: function Word64_rotateRight(places) {
  17495. var low, high;
  17496. if (places & 32) {
  17497. high = this.low;
  17498. low = this.high;
  17499. } else {
  17500. low = this.low;
  17501. high = this.high;
  17502. }
  17503. places &= 31;
  17504. this.low = (low >>> places) | (high << (32 - places));
  17505. this.high = (high >>> places) | (low << (32 - places));
  17506. },
  17507. not: function Word64_not() {
  17508. this.high = ~this.high;
  17509. this.low = ~this.low;
  17510. },
  17511. add: function Word64_add(word) {
  17512. var lowAdd = (this.low >>> 0) + (word.low >>> 0);
  17513. var highAdd = (this.high >>> 0) + (word.high >>> 0);
  17514. if (lowAdd > 0xFFFFFFFF) {
  17515. highAdd += 1;
  17516. }
  17517. this.low = lowAdd | 0;
  17518. this.high = highAdd | 0;
  17519. },
  17520. copyTo: function Word64_copyTo(bytes, offset) {
  17521. bytes[offset] = (this.high >>> 24) & 0xFF;
  17522. bytes[offset + 1] = (this.high >> 16) & 0xFF;
  17523. bytes[offset + 2] = (this.high >> 8) & 0xFF;
  17524. bytes[offset + 3] = this.high & 0xFF;
  17525. bytes[offset + 4] = (this.low >>> 24) & 0xFF;
  17526. bytes[offset + 5] = (this.low >> 16) & 0xFF;
  17527. bytes[offset + 6] = (this.low >> 8) & 0xFF;
  17528. bytes[offset + 7] = this.low & 0xFF;
  17529. },
  17530. assign: function Word64_assign(word) {
  17531. this.high = word.high;
  17532. this.low = word.low;
  17533. }
  17534. };
  17535. return Word64;
  17536. })();
  17537. var calculateSHA256 = (function calculateSHA256Closure() {
  17538. function rotr(x, n) {
  17539. return (x >>> n) | (x << 32 - n);
  17540. }
  17541. function ch(x, y, z) {
  17542. return (x & y) ^ (~x & z);
  17543. }
  17544. function maj(x, y, z) {
  17545. return (x & y) ^ (x & z) ^ (y & z);
  17546. }
  17547. function sigma(x) {
  17548. return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22);
  17549. }
  17550. function sigmaPrime(x) {
  17551. return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25);
  17552. }
  17553. function littleSigma(x) {
  17554. return rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3;
  17555. }
  17556. function littleSigmaPrime(x) {
  17557. return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10;
  17558. }
  17559. var k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
  17560. 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
  17561. 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
  17562. 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
  17563. 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
  17564. 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
  17565. 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
  17566. 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
  17567. 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
  17568. 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
  17569. 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
  17570. 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
  17571. 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
  17572. 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
  17573. 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
  17574. 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];
  17575. function hash(data, offset, length) {
  17576. // initial hash values
  17577. var h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372,
  17578. h3 = 0xa54ff53a, h4 = 0x510e527f, h5 = 0x9b05688c,
  17579. h6 = 0x1f83d9ab, h7 = 0x5be0cd19;
  17580. // pre-processing
  17581. var paddedLength = Math.ceil((length + 9) / 64) * 64;
  17582. var padded = new Uint8Array(paddedLength);
  17583. var i, j, n;
  17584. for (i = 0; i < length; ++i) {
  17585. padded[i] = data[offset++];
  17586. }
  17587. padded[i++] = 0x80;
  17588. n = paddedLength - 8;
  17589. while (i < n) {
  17590. padded[i++] = 0;
  17591. }
  17592. padded[i++] = 0;
  17593. padded[i++] = 0;
  17594. padded[i++] = 0;
  17595. padded[i++] = (length >>> 29) & 0xFF;
  17596. padded[i++] = (length >> 21) & 0xFF;
  17597. padded[i++] = (length >> 13) & 0xFF;
  17598. padded[i++] = (length >> 5) & 0xFF;
  17599. padded[i++] = (length << 3) & 0xFF;
  17600. var w = new Uint32Array(64);
  17601. // for each 512 bit block
  17602. for (i = 0; i < paddedLength;) {
  17603. for (j = 0; j < 16; ++j) {
  17604. w[j] = (padded[i] << 24 | (padded[i + 1] << 16) |
  17605. (padded[i + 2] << 8) | (padded[i + 3]));
  17606. i += 4;
  17607. }
  17608. for (j = 16; j < 64; ++j) {
  17609. w[j] = littleSigmaPrime(w[j - 2]) + w[j - 7] +
  17610. littleSigma(w[j - 15]) + w[j - 16] | 0;
  17611. }
  17612. var a = h0, b = h1, c = h2, d = h3, e = h4,
  17613. f = h5, g = h6, h = h7, t1, t2;
  17614. for (j = 0; j < 64; ++j) {
  17615. t1 = h + sigmaPrime(e) + ch(e, f, g) + k[j] + w[j];
  17616. t2 = sigma(a) + maj(a, b, c);
  17617. h = g;
  17618. g = f;
  17619. f = e;
  17620. e = (d + t1) | 0;
  17621. d = c;
  17622. c = b;
  17623. b = a;
  17624. a = (t1 + t2) | 0;
  17625. }
  17626. h0 = (h0 + a) | 0;
  17627. h1 = (h1 + b) | 0;
  17628. h2 = (h2 + c) | 0;
  17629. h3 = (h3 + d) | 0;
  17630. h4 = (h4 + e) | 0;
  17631. h5 = (h5 + f) | 0;
  17632. h6 = (h6 + g) | 0;
  17633. h7 = (h7 + h) | 0;
  17634. }
  17635. return new Uint8Array([
  17636. (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, (h0) & 0xFF,
  17637. (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, (h1) & 0xFF,
  17638. (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, (h2) & 0xFF,
  17639. (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, (h3) & 0xFF,
  17640. (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, (h4) & 0xFF,
  17641. (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, (h5) & 0xFF,
  17642. (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, (h6) & 0xFF,
  17643. (h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, (h7) & 0xFF
  17644. ]);
  17645. }
  17646. return hash;
  17647. })();
  17648. var calculateSHA512 = (function calculateSHA512Closure() {
  17649. function ch(result, x, y, z, tmp) {
  17650. result.assign(x);
  17651. result.and(y);
  17652. tmp.assign(x);
  17653. tmp.not();
  17654. tmp.and(z);
  17655. result.xor(tmp);
  17656. }
  17657. function maj(result, x, y, z, tmp) {
  17658. result.assign(x);
  17659. result.and(y);
  17660. tmp.assign(x);
  17661. tmp.and(z);
  17662. result.xor(tmp);
  17663. tmp.assign(y);
  17664. tmp.and(z);
  17665. result.xor(tmp);
  17666. }
  17667. function sigma(result, x, tmp) {
  17668. result.assign(x);
  17669. result.rotateRight(28);
  17670. tmp.assign(x);
  17671. tmp.rotateRight(34);
  17672. result.xor(tmp);
  17673. tmp.assign(x);
  17674. tmp.rotateRight(39);
  17675. result.xor(tmp);
  17676. }
  17677. function sigmaPrime(result, x, tmp) {
  17678. result.assign(x);
  17679. result.rotateRight(14);
  17680. tmp.assign(x);
  17681. tmp.rotateRight(18);
  17682. result.xor(tmp);
  17683. tmp.assign(x);
  17684. tmp.rotateRight(41);
  17685. result.xor(tmp);
  17686. }
  17687. function littleSigma(result, x, tmp) {
  17688. result.assign(x);
  17689. result.rotateRight(1);
  17690. tmp.assign(x);
  17691. tmp.rotateRight(8);
  17692. result.xor(tmp);
  17693. tmp.assign(x);
  17694. tmp.shiftRight(7);
  17695. result.xor(tmp);
  17696. }
  17697. function littleSigmaPrime(result, x, tmp) {
  17698. result.assign(x);
  17699. result.rotateRight(19);
  17700. tmp.assign(x);
  17701. tmp.rotateRight(61);
  17702. result.xor(tmp);
  17703. tmp.assign(x);
  17704. tmp.shiftRight(6);
  17705. result.xor(tmp);
  17706. }
  17707. var k = [
  17708. new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd),
  17709. new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc),
  17710. new Word64(0x3956c25b, 0xf348b538), new Word64(0x59f111f1, 0xb605d019),
  17711. new Word64(0x923f82a4, 0xaf194f9b), new Word64(0xab1c5ed5, 0xda6d8118),
  17712. new Word64(0xd807aa98, 0xa3030242), new Word64(0x12835b01, 0x45706fbe),
  17713. new Word64(0x243185be, 0x4ee4b28c), new Word64(0x550c7dc3, 0xd5ffb4e2),
  17714. new Word64(0x72be5d74, 0xf27b896f), new Word64(0x80deb1fe, 0x3b1696b1),
  17715. new Word64(0x9bdc06a7, 0x25c71235), new Word64(0xc19bf174, 0xcf692694),
  17716. new Word64(0xe49b69c1, 0x9ef14ad2), new Word64(0xefbe4786, 0x384f25e3),
  17717. new Word64(0x0fc19dc6, 0x8b8cd5b5), new Word64(0x240ca1cc, 0x77ac9c65),
  17718. new Word64(0x2de92c6f, 0x592b0275), new Word64(0x4a7484aa, 0x6ea6e483),
  17719. new Word64(0x5cb0a9dc, 0xbd41fbd4), new Word64(0x76f988da, 0x831153b5),
  17720. new Word64(0x983e5152, 0xee66dfab), new Word64(0xa831c66d, 0x2db43210),
  17721. new Word64(0xb00327c8, 0x98fb213f), new Word64(0xbf597fc7, 0xbeef0ee4),
  17722. new Word64(0xc6e00bf3, 0x3da88fc2), new Word64(0xd5a79147, 0x930aa725),
  17723. new Word64(0x06ca6351, 0xe003826f), new Word64(0x14292967, 0x0a0e6e70),
  17724. new Word64(0x27b70a85, 0x46d22ffc), new Word64(0x2e1b2138, 0x5c26c926),
  17725. new Word64(0x4d2c6dfc, 0x5ac42aed), new Word64(0x53380d13, 0x9d95b3df),
  17726. new Word64(0x650a7354, 0x8baf63de), new Word64(0x766a0abb, 0x3c77b2a8),
  17727. new Word64(0x81c2c92e, 0x47edaee6), new Word64(0x92722c85, 0x1482353b),
  17728. new Word64(0xa2bfe8a1, 0x4cf10364), new Word64(0xa81a664b, 0xbc423001),
  17729. new Word64(0xc24b8b70, 0xd0f89791), new Word64(0xc76c51a3, 0x0654be30),
  17730. new Word64(0xd192e819, 0xd6ef5218), new Word64(0xd6990624, 0x5565a910),
  17731. new Word64(0xf40e3585, 0x5771202a), new Word64(0x106aa070, 0x32bbd1b8),
  17732. new Word64(0x19a4c116, 0xb8d2d0c8), new Word64(0x1e376c08, 0x5141ab53),
  17733. new Word64(0x2748774c, 0xdf8eeb99), new Word64(0x34b0bcb5, 0xe19b48a8),
  17734. new Word64(0x391c0cb3, 0xc5c95a63), new Word64(0x4ed8aa4a, 0xe3418acb),
  17735. new Word64(0x5b9cca4f, 0x7763e373), new Word64(0x682e6ff3, 0xd6b2b8a3),
  17736. new Word64(0x748f82ee, 0x5defb2fc), new Word64(0x78a5636f, 0x43172f60),
  17737. new Word64(0x84c87814, 0xa1f0ab72), new Word64(0x8cc70208, 0x1a6439ec),
  17738. new Word64(0x90befffa, 0x23631e28), new Word64(0xa4506ceb, 0xde82bde9),
  17739. new Word64(0xbef9a3f7, 0xb2c67915), new Word64(0xc67178f2, 0xe372532b),
  17740. new Word64(0xca273ece, 0xea26619c), new Word64(0xd186b8c7, 0x21c0c207),
  17741. new Word64(0xeada7dd6, 0xcde0eb1e), new Word64(0xf57d4f7f, 0xee6ed178),
  17742. new Word64(0x06f067aa, 0x72176fba), new Word64(0x0a637dc5, 0xa2c898a6),
  17743. new Word64(0x113f9804, 0xbef90dae), new Word64(0x1b710b35, 0x131c471b),
  17744. new Word64(0x28db77f5, 0x23047d84), new Word64(0x32caab7b, 0x40c72493),
  17745. new Word64(0x3c9ebe0a, 0x15c9bebc), new Word64(0x431d67c4, 0x9c100d4c),
  17746. new Word64(0x4cc5d4be, 0xcb3e42b6), new Word64(0x597f299c, 0xfc657e2a),
  17747. new Word64(0x5fcb6fab, 0x3ad6faec), new Word64(0x6c44198c, 0x4a475817)];
  17748. function hash(data, offset, length, mode384) {
  17749. mode384 = !!mode384;
  17750. // initial hash values
  17751. var h0, h1, h2, h3, h4, h5, h6, h7;
  17752. if (!mode384) {
  17753. h0 = new Word64(0x6a09e667, 0xf3bcc908);
  17754. h1 = new Word64(0xbb67ae85, 0x84caa73b);
  17755. h2 = new Word64(0x3c6ef372, 0xfe94f82b);
  17756. h3 = new Word64(0xa54ff53a, 0x5f1d36f1);
  17757. h4 = new Word64(0x510e527f, 0xade682d1);
  17758. h5 = new Word64(0x9b05688c, 0x2b3e6c1f);
  17759. h6 = new Word64(0x1f83d9ab, 0xfb41bd6b);
  17760. h7 = new Word64(0x5be0cd19, 0x137e2179);
  17761. }
  17762. else {
  17763. // SHA384 is exactly the same
  17764. // except with different starting values and a trimmed result
  17765. h0 = new Word64(0xcbbb9d5d, 0xc1059ed8);
  17766. h1 = new Word64(0x629a292a, 0x367cd507);
  17767. h2 = new Word64(0x9159015a, 0x3070dd17);
  17768. h3 = new Word64(0x152fecd8, 0xf70e5939);
  17769. h4 = new Word64(0x67332667, 0xffc00b31);
  17770. h5 = new Word64(0x8eb44a87, 0x68581511);
  17771. h6 = new Word64(0xdb0c2e0d, 0x64f98fa7);
  17772. h7 = new Word64(0x47b5481d, 0xbefa4fa4);
  17773. }
  17774. // pre-processing
  17775. var paddedLength = Math.ceil((length + 17) / 128) * 128;
  17776. var padded = new Uint8Array(paddedLength);
  17777. var i, j, n;
  17778. for (i = 0; i < length; ++i) {
  17779. padded[i] = data[offset++];
  17780. }
  17781. padded[i++] = 0x80;
  17782. n = paddedLength - 16;
  17783. while (i < n) {
  17784. padded[i++] = 0;
  17785. }
  17786. padded[i++] = 0;
  17787. padded[i++] = 0;
  17788. padded[i++] = 0;
  17789. padded[i++] = 0;
  17790. padded[i++] = 0;
  17791. padded[i++] = 0;
  17792. padded[i++] = 0;
  17793. padded[i++] = 0;
  17794. padded[i++] = 0;
  17795. padded[i++] = 0;
  17796. padded[i++] = 0;
  17797. padded[i++] = (length >>> 29) & 0xFF;
  17798. padded[i++] = (length >> 21) & 0xFF;
  17799. padded[i++] = (length >> 13) & 0xFF;
  17800. padded[i++] = (length >> 5) & 0xFF;
  17801. padded[i++] = (length << 3) & 0xFF;
  17802. var w = new Array(80);
  17803. for (i = 0; i < 80; i++) {
  17804. w[i] = new Word64(0, 0);
  17805. }
  17806. var a = new Word64(0, 0), b = new Word64(0, 0), c = new Word64(0, 0);
  17807. var d = new Word64(0, 0), e = new Word64(0, 0), f = new Word64(0, 0);
  17808. var g = new Word64(0, 0), h = new Word64(0, 0);
  17809. var t1 = new Word64(0, 0), t2 = new Word64(0, 0);
  17810. var tmp1 = new Word64(0, 0), tmp2 = new Word64(0, 0), tmp3;
  17811. // for each 1024 bit block
  17812. for (i = 0; i < paddedLength;) {
  17813. for (j = 0; j < 16; ++j) {
  17814. w[j].high = (padded[i] << 24) | (padded[i + 1] << 16) |
  17815. (padded[i + 2] << 8) | (padded[i + 3]);
  17816. w[j].low = (padded[i + 4]) << 24 | (padded[i + 5]) << 16 |
  17817. (padded[i + 6]) << 8 | (padded[i + 7]);
  17818. i += 8;
  17819. }
  17820. for (j = 16; j < 80; ++j) {
  17821. tmp3 = w[j];
  17822. littleSigmaPrime(tmp3, w[j - 2], tmp2);
  17823. tmp3.add(w[j - 7]);
  17824. littleSigma(tmp1, w[j - 15], tmp2);
  17825. tmp3.add(tmp1);
  17826. tmp3.add(w[j - 16]);
  17827. }
  17828. a.assign(h0); b.assign(h1); c.assign(h2); d.assign(h3);
  17829. e.assign(h4); f.assign(h5); g.assign(h6); h.assign(h7);
  17830. for (j = 0; j < 80; ++j) {
  17831. t1.assign(h);
  17832. sigmaPrime(tmp1, e, tmp2);
  17833. t1.add(tmp1);
  17834. ch(tmp1, e, f, g, tmp2);
  17835. t1.add(tmp1);
  17836. t1.add(k[j]);
  17837. t1.add(w[j]);
  17838. sigma(t2, a, tmp2);
  17839. maj(tmp1, a, b, c, tmp2);
  17840. t2.add(tmp1);
  17841. tmp3 = h;
  17842. h = g;
  17843. g = f;
  17844. f = e;
  17845. d.add(t1);
  17846. e = d;
  17847. d = c;
  17848. c = b;
  17849. b = a;
  17850. tmp3.assign(t1);
  17851. tmp3.add(t2);
  17852. a = tmp3;
  17853. }
  17854. h0.add(a);
  17855. h1.add(b);
  17856. h2.add(c);
  17857. h3.add(d);
  17858. h4.add(e);
  17859. h5.add(f);
  17860. h6.add(g);
  17861. h7.add(h);
  17862. }
  17863. var result;
  17864. if (!mode384) {
  17865. result = new Uint8Array(64);
  17866. h0.copyTo(result,0);
  17867. h1.copyTo(result,8);
  17868. h2.copyTo(result,16);
  17869. h3.copyTo(result,24);
  17870. h4.copyTo(result,32);
  17871. h5.copyTo(result,40);
  17872. h6.copyTo(result,48);
  17873. h7.copyTo(result,56);
  17874. }
  17875. else {
  17876. result = new Uint8Array(48);
  17877. h0.copyTo(result,0);
  17878. h1.copyTo(result,8);
  17879. h2.copyTo(result,16);
  17880. h3.copyTo(result,24);
  17881. h4.copyTo(result,32);
  17882. h5.copyTo(result,40);
  17883. }
  17884. return result;
  17885. }
  17886. return hash;
  17887. })();
  17888. var calculateSHA384 = (function calculateSHA384Closure() {
  17889. function hash(data, offset, length) {
  17890. return calculateSHA512(data, offset, length, true);
  17891. }
  17892. return hash;
  17893. })();
  17894. var NullCipher = (function NullCipherClosure() {
  17895. function NullCipher() {
  17896. }
  17897. NullCipher.prototype = {
  17898. decryptBlock: function NullCipher_decryptBlock(data) {
  17899. return data;
  17900. }
  17901. };
  17902. return NullCipher;
  17903. })();
  17904. var AES128Cipher = (function AES128CipherClosure() {
  17905. var rcon = new Uint8Array([
  17906. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  17907. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  17908. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  17909. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  17910. 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
  17911. 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6,
  17912. 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72,
  17913. 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,
  17914. 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10,
  17915. 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e,
  17916. 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5,
  17917. 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94,
  17918. 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02,
  17919. 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d,
  17920. 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d,
  17921. 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f,
  17922. 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb,
  17923. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  17924. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  17925. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  17926. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  17927. 0x74, 0xe8, 0xcb, 0x8d]);
  17928. var s = new Uint8Array([
  17929. 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
  17930. 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
  17931. 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26,
  17932. 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
  17933. 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2,
  17934. 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0,
  17935. 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed,
  17936. 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
  17937. 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f,
  17938. 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,
  17939. 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec,
  17940. 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
  17941. 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14,
  17942. 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c,
  17943. 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d,
  17944. 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
  17945. 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f,
  17946. 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e,
  17947. 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11,
  17948. 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
  17949. 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f,
  17950. 0xb0, 0x54, 0xbb, 0x16]);
  17951. var inv_s = new Uint8Array([
  17952. 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
  17953. 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
  17954. 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32,
  17955. 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
  17956. 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49,
  17957. 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16,
  17958. 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50,
  17959. 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
  17960. 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05,
  17961. 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02,
  17962. 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41,
  17963. 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
  17964. 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8,
  17965. 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89,
  17966. 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b,
  17967. 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
  17968. 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59,
  17969. 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d,
  17970. 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d,
  17971. 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
  17972. 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63,
  17973. 0x55, 0x21, 0x0c, 0x7d]);
  17974. var mixCol = new Uint8Array(256);
  17975. for (var i = 0; i < 256; i++) {
  17976. if (i < 128) {
  17977. mixCol[i] = i << 1;
  17978. } else {
  17979. mixCol[i] = (i << 1) ^ 0x1b;
  17980. }
  17981. }
  17982. var mix = new Uint32Array([
  17983. 0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927,
  17984. 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45,
  17985. 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb,
  17986. 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381,
  17987. 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf,
  17988. 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66,
  17989. 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28,
  17990. 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012,
  17991. 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec,
  17992. 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e,
  17993. 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd,
  17994. 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7,
  17995. 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89,
  17996. 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b,
  17997. 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815,
  17998. 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f,
  17999. 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa,
  18000. 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8,
  18001. 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36,
  18002. 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c,
  18003. 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742,
  18004. 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea,
  18005. 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4,
  18006. 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e,
  18007. 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360,
  18008. 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502,
  18009. 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87,
  18010. 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd,
  18011. 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3,
  18012. 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621,
  18013. 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f,
  18014. 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55,
  18015. 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26,
  18016. 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844,
  18017. 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba,
  18018. 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480,
  18019. 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce,
  18020. 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67,
  18021. 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929,
  18022. 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713,
  18023. 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed,
  18024. 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f,
  18025. 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]);
  18026. function expandKey128(cipherKey) {
  18027. var b = 176, result = new Uint8Array(b);
  18028. result.set(cipherKey);
  18029. for (var j = 16, i = 1; j < b; ++i) {
  18030. // RotWord
  18031. var t1 = result[j - 3], t2 = result[j - 2],
  18032. t3 = result[j - 1], t4 = result[j - 4];
  18033. // SubWord
  18034. t1 = s[t1];
  18035. t2 = s[t2];
  18036. t3 = s[t3];
  18037. t4 = s[t4];
  18038. // Rcon
  18039. t1 = t1 ^ rcon[i];
  18040. for (var n = 0; n < 4; ++n) {
  18041. result[j] = (t1 ^= result[j - 16]);
  18042. j++;
  18043. result[j] = (t2 ^= result[j - 16]);
  18044. j++;
  18045. result[j] = (t3 ^= result[j - 16]);
  18046. j++;
  18047. result[j] = (t4 ^= result[j - 16]);
  18048. j++;
  18049. }
  18050. }
  18051. return result;
  18052. }
  18053. function decrypt128(input, key) {
  18054. var state = new Uint8Array(16);
  18055. state.set(input);
  18056. var i, j, k;
  18057. var t, u, v;
  18058. // AddRoundKey
  18059. for (j = 0, k = 160; j < 16; ++j, ++k) {
  18060. state[j] ^= key[k];
  18061. }
  18062. for (i = 9; i >= 1; --i) {
  18063. // InvShiftRows
  18064. t = state[13];
  18065. state[13] = state[9];
  18066. state[9] = state[5];
  18067. state[5] = state[1];
  18068. state[1] = t;
  18069. t = state[14];
  18070. u = state[10];
  18071. state[14] = state[6];
  18072. state[10] = state[2];
  18073. state[6] = t;
  18074. state[2] = u;
  18075. t = state[15];
  18076. u = state[11];
  18077. v = state[7];
  18078. state[15] = state[3];
  18079. state[11] = t;
  18080. state[7] = u;
  18081. state[3] = v;
  18082. // InvSubBytes
  18083. for (j = 0; j < 16; ++j) {
  18084. state[j] = inv_s[state[j]];
  18085. }
  18086. // AddRoundKey
  18087. for (j = 0, k = i * 16; j < 16; ++j, ++k) {
  18088. state[j] ^= key[k];
  18089. }
  18090. // InvMixColumns
  18091. for (j = 0; j < 16; j += 4) {
  18092. var s0 = mix[state[j]], s1 = mix[state[j + 1]],
  18093. s2 = mix[state[j + 2]], s3 = mix[state[j + 3]];
  18094. t = (s0 ^ (s1 >>> 8) ^ (s1 << 24) ^ (s2 >>> 16) ^ (s2 << 16) ^
  18095. (s3 >>> 24) ^ (s3 << 8));
  18096. state[j] = (t >>> 24) & 0xFF;
  18097. state[j + 1] = (t >> 16) & 0xFF;
  18098. state[j + 2] = (t >> 8) & 0xFF;
  18099. state[j + 3] = t & 0xFF;
  18100. }
  18101. }
  18102. // InvShiftRows
  18103. t = state[13];
  18104. state[13] = state[9];
  18105. state[9] = state[5];
  18106. state[5] = state[1];
  18107. state[1] = t;
  18108. t = state[14];
  18109. u = state[10];
  18110. state[14] = state[6];
  18111. state[10] = state[2];
  18112. state[6] = t;
  18113. state[2] = u;
  18114. t = state[15];
  18115. u = state[11];
  18116. v = state[7];
  18117. state[15] = state[3];
  18118. state[11] = t;
  18119. state[7] = u;
  18120. state[3] = v;
  18121. for (j = 0; j < 16; ++j) {
  18122. // InvSubBytes
  18123. state[j] = inv_s[state[j]];
  18124. // AddRoundKey
  18125. state[j] ^= key[j];
  18126. }
  18127. return state;
  18128. }
  18129. function encrypt128(input, key) {
  18130. var t, u, v, k;
  18131. var state = new Uint8Array(16);
  18132. state.set(input);
  18133. for (j = 0; j < 16; ++j) {
  18134. // AddRoundKey
  18135. state[j] ^= key[j];
  18136. }
  18137. for (i = 1; i < 10; i++) {
  18138. //SubBytes
  18139. for (j = 0; j < 16; ++j) {
  18140. state[j] = s[state[j]];
  18141. }
  18142. //ShiftRows
  18143. v = state[1];
  18144. state[1] = state[5];
  18145. state[5] = state[9];
  18146. state[9] = state[13];
  18147. state[13] = v;
  18148. v = state[2];
  18149. u = state[6];
  18150. state[2] = state[10];
  18151. state[6] = state[14];
  18152. state[10] = v;
  18153. state[14] = u;
  18154. v = state[3];
  18155. u = state[7];
  18156. t = state[11];
  18157. state[3] = state[15];
  18158. state[7] = v;
  18159. state[11] = u;
  18160. state[15] = t;
  18161. //MixColumns
  18162. for (var j = 0; j < 16; j += 4) {
  18163. var s0 = state[j + 0], s1 = state[j + 1];
  18164. var s2 = state[j + 2], s3 = state[j + 3];
  18165. t = s0 ^ s1 ^ s2 ^ s3;
  18166. state[j + 0] ^= t ^ mixCol[s0 ^ s1];
  18167. state[j + 1] ^= t ^ mixCol[s1 ^ s2];
  18168. state[j + 2] ^= t ^ mixCol[s2 ^ s3];
  18169. state[j + 3] ^= t ^ mixCol[s3 ^ s0];
  18170. }
  18171. //AddRoundKey
  18172. for (j = 0, k = i * 16; j < 16; ++j, ++k) {
  18173. state[j] ^= key[k];
  18174. }
  18175. }
  18176. //SubBytes
  18177. for (j = 0; j < 16; ++j) {
  18178. state[j] = s[state[j]];
  18179. }
  18180. //ShiftRows
  18181. v = state[1];
  18182. state[1] = state[5];
  18183. state[5] = state[9];
  18184. state[9] = state[13];
  18185. state[13] = v;
  18186. v = state[2];
  18187. u = state[6];
  18188. state[2] = state[10];
  18189. state[6] = state[14];
  18190. state[10] = v;
  18191. state[14] = u;
  18192. v = state[3];
  18193. u = state[7];
  18194. t = state[11];
  18195. state[3] = state[15];
  18196. state[7] = v;
  18197. state[11] = u;
  18198. state[15] = t;
  18199. //AddRoundKey
  18200. for (j = 0, k = 160; j < 16; ++j, ++k) {
  18201. state[j] ^= key[k];
  18202. }
  18203. return state;
  18204. }
  18205. function AES128Cipher(key) {
  18206. this.key = expandKey128(key);
  18207. this.buffer = new Uint8Array(16);
  18208. this.bufferPosition = 0;
  18209. }
  18210. function decryptBlock2(data, finalize) {
  18211. var i, j, ii, sourceLength = data.length,
  18212. buffer = this.buffer, bufferLength = this.bufferPosition,
  18213. result = [], iv = this.iv;
  18214. for (i = 0; i < sourceLength; ++i) {
  18215. buffer[bufferLength] = data[i];
  18216. ++bufferLength;
  18217. if (bufferLength < 16) {
  18218. continue;
  18219. }
  18220. // buffer is full, decrypting
  18221. var plain = decrypt128(buffer, this.key);
  18222. // xor-ing the IV vector to get plain text
  18223. for (j = 0; j < 16; ++j) {
  18224. plain[j] ^= iv[j];
  18225. }
  18226. iv = buffer;
  18227. result.push(plain);
  18228. buffer = new Uint8Array(16);
  18229. bufferLength = 0;
  18230. }
  18231. // saving incomplete buffer
  18232. this.buffer = buffer;
  18233. this.bufferLength = bufferLength;
  18234. this.iv = iv;
  18235. if (result.length === 0) {
  18236. return new Uint8Array([]);
  18237. }
  18238. // combining plain text blocks into one
  18239. var outputLength = 16 * result.length;
  18240. if (finalize) {
  18241. // undo a padding that is described in RFC 2898
  18242. var lastBlock = result[result.length - 1];
  18243. outputLength -= lastBlock[15];
  18244. result[result.length - 1] = lastBlock.subarray(0, 16 - lastBlock[15]);
  18245. }
  18246. var output = new Uint8Array(outputLength);
  18247. for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) {
  18248. output.set(result[i], j);
  18249. }
  18250. return output;
  18251. }
  18252. AES128Cipher.prototype = {
  18253. decryptBlock: function AES128Cipher_decryptBlock(data, finalize) {
  18254. var i, sourceLength = data.length;
  18255. var buffer = this.buffer, bufferLength = this.bufferPosition;
  18256. // waiting for IV values -- they are at the start of the stream
  18257. for (i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) {
  18258. buffer[bufferLength] = data[i];
  18259. }
  18260. if (bufferLength < 16) {
  18261. // need more data
  18262. this.bufferLength = bufferLength;
  18263. return new Uint8Array([]);
  18264. }
  18265. this.iv = buffer;
  18266. this.buffer = new Uint8Array(16);
  18267. this.bufferLength = 0;
  18268. // starting decryption
  18269. this.decryptBlock = decryptBlock2;
  18270. return this.decryptBlock(data.subarray(16), finalize);
  18271. },
  18272. encrypt: function AES128Cipher_encrypt(data, iv) {
  18273. var i, j, ii, sourceLength = data.length,
  18274. buffer = this.buffer, bufferLength = this.bufferPosition,
  18275. result = [];
  18276. if (!iv) {
  18277. iv = new Uint8Array(16);
  18278. }
  18279. for (i = 0; i < sourceLength; ++i) {
  18280. buffer[bufferLength] = data[i];
  18281. ++bufferLength;
  18282. if (bufferLength < 16) {
  18283. continue;
  18284. }
  18285. for (j = 0; j < 16; ++j) {
  18286. buffer[j] ^= iv[j];
  18287. }
  18288. // buffer is full, encrypting
  18289. var cipher = encrypt128(buffer, this.key);
  18290. iv = cipher;
  18291. result.push(cipher);
  18292. buffer = new Uint8Array(16);
  18293. bufferLength = 0;
  18294. }
  18295. // saving incomplete buffer
  18296. this.buffer = buffer;
  18297. this.bufferLength = bufferLength;
  18298. this.iv = iv;
  18299. if (result.length === 0) {
  18300. return new Uint8Array([]);
  18301. }
  18302. // combining plain text blocks into one
  18303. var outputLength = 16 * result.length;
  18304. var output = new Uint8Array(outputLength);
  18305. for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) {
  18306. output.set(result[i], j);
  18307. }
  18308. return output;
  18309. }
  18310. };
  18311. return AES128Cipher;
  18312. })();
  18313. var AES256Cipher = (function AES256CipherClosure() {
  18314. var rcon = new Uint8Array([
  18315. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  18316. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  18317. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  18318. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  18319. 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
  18320. 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6,
  18321. 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72,
  18322. 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,
  18323. 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10,
  18324. 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e,
  18325. 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5,
  18326. 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94,
  18327. 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02,
  18328. 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d,
  18329. 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d,
  18330. 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f,
  18331. 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb,
  18332. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  18333. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  18334. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  18335. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  18336. 0x74, 0xe8, 0xcb, 0x8d]);
  18337. var s = new Uint8Array([
  18338. 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
  18339. 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
  18340. 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26,
  18341. 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
  18342. 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2,
  18343. 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0,
  18344. 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed,
  18345. 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
  18346. 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f,
  18347. 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,
  18348. 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec,
  18349. 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
  18350. 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14,
  18351. 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c,
  18352. 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d,
  18353. 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
  18354. 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f,
  18355. 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e,
  18356. 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11,
  18357. 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
  18358. 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f,
  18359. 0xb0, 0x54, 0xbb, 0x16]);
  18360. var inv_s = new Uint8Array([
  18361. 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
  18362. 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
  18363. 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32,
  18364. 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
  18365. 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49,
  18366. 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16,
  18367. 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50,
  18368. 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
  18369. 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05,
  18370. 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02,
  18371. 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41,
  18372. 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
  18373. 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8,
  18374. 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89,
  18375. 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b,
  18376. 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
  18377. 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59,
  18378. 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d,
  18379. 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d,
  18380. 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
  18381. 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63,
  18382. 0x55, 0x21, 0x0c, 0x7d]);
  18383. var mixCol = new Uint8Array(256);
  18384. for (var i = 0; i < 256; i++) {
  18385. if (i < 128) {
  18386. mixCol[i] = i << 1;
  18387. } else {
  18388. mixCol[i] = (i << 1) ^ 0x1b;
  18389. }
  18390. }
  18391. var mix = new Uint32Array([
  18392. 0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927,
  18393. 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45,
  18394. 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb,
  18395. 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381,
  18396. 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf,
  18397. 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66,
  18398. 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28,
  18399. 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012,
  18400. 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec,
  18401. 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e,
  18402. 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd,
  18403. 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7,
  18404. 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89,
  18405. 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b,
  18406. 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815,
  18407. 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f,
  18408. 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa,
  18409. 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8,
  18410. 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36,
  18411. 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c,
  18412. 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742,
  18413. 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea,
  18414. 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4,
  18415. 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e,
  18416. 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360,
  18417. 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502,
  18418. 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87,
  18419. 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd,
  18420. 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3,
  18421. 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621,
  18422. 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f,
  18423. 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55,
  18424. 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26,
  18425. 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844,
  18426. 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba,
  18427. 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480,
  18428. 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce,
  18429. 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67,
  18430. 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929,
  18431. 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713,
  18432. 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed,
  18433. 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f,
  18434. 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]);
  18435. function expandKey256(cipherKey) {
  18436. var b = 240, result = new Uint8Array(b);
  18437. var r = 1;
  18438. result.set(cipherKey);
  18439. for (var j = 32, i = 1; j < b; ++i) {
  18440. if (j % 32 === 16) {
  18441. t1 = s[t1];
  18442. t2 = s[t2];
  18443. t3 = s[t3];
  18444. t4 = s[t4];
  18445. } else if (j % 32 === 0) {
  18446. // RotWord
  18447. var t1 = result[j - 3], t2 = result[j - 2],
  18448. t3 = result[j - 1], t4 = result[j - 4];
  18449. // SubWord
  18450. t1 = s[t1];
  18451. t2 = s[t2];
  18452. t3 = s[t3];
  18453. t4 = s[t4];
  18454. // Rcon
  18455. t1 = t1 ^ r;
  18456. if ((r <<= 1) >= 256) {
  18457. r = (r ^ 0x1b) & 0xFF;
  18458. }
  18459. }
  18460. for (var n = 0; n < 4; ++n) {
  18461. result[j] = (t1 ^= result[j - 32]);
  18462. j++;
  18463. result[j] = (t2 ^= result[j - 32]);
  18464. j++;
  18465. result[j] = (t3 ^= result[j - 32]);
  18466. j++;
  18467. result[j] = (t4 ^= result[j - 32]);
  18468. j++;
  18469. }
  18470. }
  18471. return result;
  18472. }
  18473. function decrypt256(input, key) {
  18474. var state = new Uint8Array(16);
  18475. state.set(input);
  18476. var i, j, k;
  18477. var t, u, v;
  18478. // AddRoundKey
  18479. for (j = 0, k = 224; j < 16; ++j, ++k) {
  18480. state[j] ^= key[k];
  18481. }
  18482. for (i = 13; i >= 1; --i) {
  18483. // InvShiftRows
  18484. t = state[13];
  18485. state[13] = state[9];
  18486. state[9] = state[5];
  18487. state[5] = state[1];
  18488. state[1] = t;
  18489. t = state[14];
  18490. u = state[10];
  18491. state[14] = state[6];
  18492. state[10] = state[2];
  18493. state[6] = t;
  18494. state[2] = u;
  18495. t = state[15];
  18496. u = state[11];
  18497. v = state[7];
  18498. state[15] = state[3];
  18499. state[11] = t;
  18500. state[7] = u;
  18501. state[3] = v;
  18502. // InvSubBytes
  18503. for (j = 0; j < 16; ++j) {
  18504. state[j] = inv_s[state[j]];
  18505. }
  18506. // AddRoundKey
  18507. for (j = 0, k = i * 16; j < 16; ++j, ++k) {
  18508. state[j] ^= key[k];
  18509. }
  18510. // InvMixColumns
  18511. for (j = 0; j < 16; j += 4) {
  18512. var s0 = mix[state[j]], s1 = mix[state[j + 1]],
  18513. s2 = mix[state[j + 2]], s3 = mix[state[j + 3]];
  18514. t = (s0 ^ (s1 >>> 8) ^ (s1 << 24) ^ (s2 >>> 16) ^ (s2 << 16) ^
  18515. (s3 >>> 24) ^ (s3 << 8));
  18516. state[j] = (t >>> 24) & 0xFF;
  18517. state[j + 1] = (t >> 16) & 0xFF;
  18518. state[j + 2] = (t >> 8) & 0xFF;
  18519. state[j + 3] = t & 0xFF;
  18520. }
  18521. }
  18522. // InvShiftRows
  18523. t = state[13];
  18524. state[13] = state[9];
  18525. state[9] = state[5];
  18526. state[5] = state[1];
  18527. state[1] = t;
  18528. t = state[14];
  18529. u = state[10];
  18530. state[14] = state[6];
  18531. state[10] = state[2];
  18532. state[6] = t;
  18533. state[2] = u;
  18534. t = state[15];
  18535. u = state[11];
  18536. v = state[7];
  18537. state[15] = state[3];
  18538. state[11] = t;
  18539. state[7] = u;
  18540. state[3] = v;
  18541. for (j = 0; j < 16; ++j) {
  18542. // InvSubBytes
  18543. state[j] = inv_s[state[j]];
  18544. // AddRoundKey
  18545. state[j] ^= key[j];
  18546. }
  18547. return state;
  18548. }
  18549. function encrypt256(input, key) {
  18550. var t, u, v, k;
  18551. var state = new Uint8Array(16);
  18552. state.set(input);
  18553. for (j = 0; j < 16; ++j) {
  18554. // AddRoundKey
  18555. state[j] ^= key[j];
  18556. }
  18557. for (i = 1; i < 14; i++) {
  18558. //SubBytes
  18559. for (j = 0; j < 16; ++j) {
  18560. state[j] = s[state[j]];
  18561. }
  18562. //ShiftRows
  18563. v = state[1];
  18564. state[1] = state[5];
  18565. state[5] = state[9];
  18566. state[9] = state[13];
  18567. state[13] = v;
  18568. v = state[2];
  18569. u = state[6];
  18570. state[2] = state[10];
  18571. state[6] = state[14];
  18572. state[10] = v;
  18573. state[14] = u;
  18574. v = state[3];
  18575. u = state[7];
  18576. t = state[11];
  18577. state[3] = state[15];
  18578. state[7] = v;
  18579. state[11] = u;
  18580. state[15] = t;
  18581. //MixColumns
  18582. for (var j = 0; j < 16; j += 4) {
  18583. var s0 = state[j + 0], s1 = state[j + 1];
  18584. var s2 = state[j + 2], s3 = state[j + 3];
  18585. t = s0 ^ s1 ^ s2 ^ s3;
  18586. state[j + 0] ^= t ^ mixCol[s0 ^ s1];
  18587. state[j + 1] ^= t ^ mixCol[s1 ^ s2];
  18588. state[j + 2] ^= t ^ mixCol[s2 ^ s3];
  18589. state[j + 3] ^= t ^ mixCol[s3 ^ s0];
  18590. }
  18591. //AddRoundKey
  18592. for (j = 0, k = i * 16; j < 16; ++j, ++k) {
  18593. state[j] ^= key[k];
  18594. }
  18595. }
  18596. //SubBytes
  18597. for (j = 0; j < 16; ++j) {
  18598. state[j] = s[state[j]];
  18599. }
  18600. //ShiftRows
  18601. v = state[1];
  18602. state[1] = state[5];
  18603. state[5] = state[9];
  18604. state[9] = state[13];
  18605. state[13] = v;
  18606. v = state[2];
  18607. u = state[6];
  18608. state[2] = state[10];
  18609. state[6] = state[14];
  18610. state[10] = v;
  18611. state[14] = u;
  18612. v = state[3];
  18613. u = state[7];
  18614. t = state[11];
  18615. state[3] = state[15];
  18616. state[7] = v;
  18617. state[11] = u;
  18618. state[15] = t;
  18619. //AddRoundKey
  18620. for (j = 0, k = 224; j < 16; ++j, ++k) {
  18621. state[j] ^= key[k];
  18622. }
  18623. return state;
  18624. }
  18625. function AES256Cipher(key) {
  18626. this.key = expandKey256(key);
  18627. this.buffer = new Uint8Array(16);
  18628. this.bufferPosition = 0;
  18629. }
  18630. function decryptBlock2(data, finalize) {
  18631. var i, j, ii, sourceLength = data.length,
  18632. buffer = this.buffer, bufferLength = this.bufferPosition,
  18633. result = [], iv = this.iv;
  18634. for (i = 0; i < sourceLength; ++i) {
  18635. buffer[bufferLength] = data[i];
  18636. ++bufferLength;
  18637. if (bufferLength < 16) {
  18638. continue;
  18639. }
  18640. // buffer is full, encrypting
  18641. var plain = decrypt256(buffer, this.key);
  18642. // xor-ing the IV vector to get plain text
  18643. for (j = 0; j < 16; ++j) {
  18644. plain[j] ^= iv[j];
  18645. }
  18646. iv = buffer;
  18647. result.push(plain);
  18648. buffer = new Uint8Array(16);
  18649. bufferLength = 0;
  18650. }
  18651. // saving incomplete buffer
  18652. this.buffer = buffer;
  18653. this.bufferLength = bufferLength;
  18654. this.iv = iv;
  18655. if (result.length === 0) {
  18656. return new Uint8Array([]);
  18657. }
  18658. // combining plain text blocks into one
  18659. var outputLength = 16 * result.length;
  18660. if (finalize) {
  18661. // undo a padding that is described in RFC 2898
  18662. var lastBlock = result[result.length - 1];
  18663. outputLength -= lastBlock[15];
  18664. result[result.length - 1] = lastBlock.subarray(0, 16 - lastBlock[15]);
  18665. }
  18666. var output = new Uint8Array(outputLength);
  18667. for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) {
  18668. output.set(result[i], j);
  18669. }
  18670. return output;
  18671. }
  18672. AES256Cipher.prototype = {
  18673. decryptBlock: function AES256Cipher_decryptBlock(data, finalize, iv) {
  18674. var i, sourceLength = data.length;
  18675. var buffer = this.buffer, bufferLength = this.bufferPosition;
  18676. // if not supplied an IV wait for IV values
  18677. // they are at the start of the stream
  18678. if (iv) {
  18679. this.iv = iv;
  18680. } else {
  18681. for (i = 0; bufferLength < 16 &&
  18682. i < sourceLength; ++i, ++bufferLength) {
  18683. buffer[bufferLength] = data[i];
  18684. }
  18685. if (bufferLength < 16) {
  18686. //need more data
  18687. this.bufferLength = bufferLength;
  18688. return new Uint8Array([]);
  18689. }
  18690. this.iv = buffer;
  18691. data = data.subarray(16);
  18692. }
  18693. this.buffer = new Uint8Array(16);
  18694. this.bufferLength = 0;
  18695. // starting decryption
  18696. this.decryptBlock = decryptBlock2;
  18697. return this.decryptBlock(data, finalize);
  18698. },
  18699. encrypt: function AES256Cipher_encrypt(data, iv) {
  18700. var i, j, ii, sourceLength = data.length,
  18701. buffer = this.buffer, bufferLength = this.bufferPosition,
  18702. result = [];
  18703. if (!iv) {
  18704. iv = new Uint8Array(16);
  18705. }
  18706. for (i = 0; i < sourceLength; ++i) {
  18707. buffer[bufferLength] = data[i];
  18708. ++bufferLength;
  18709. if (bufferLength < 16) {
  18710. continue;
  18711. }
  18712. for (j = 0; j < 16; ++j) {
  18713. buffer[j] ^= iv[j];
  18714. }
  18715. // buffer is full, encrypting
  18716. var cipher = encrypt256(buffer, this.key);
  18717. this.iv = cipher;
  18718. result.push(cipher);
  18719. buffer = new Uint8Array(16);
  18720. bufferLength = 0;
  18721. }
  18722. // saving incomplete buffer
  18723. this.buffer = buffer;
  18724. this.bufferLength = bufferLength;
  18725. this.iv = iv;
  18726. if (result.length === 0) {
  18727. return new Uint8Array([]);
  18728. }
  18729. // combining plain text blocks into one
  18730. var outputLength = 16 * result.length;
  18731. var output = new Uint8Array(outputLength);
  18732. for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) {
  18733. output.set(result[i], j);
  18734. }
  18735. return output;
  18736. }
  18737. };
  18738. return AES256Cipher;
  18739. })();
  18740. var PDF17 = (function PDF17Closure() {
  18741. function compareByteArrays(array1, array2) {
  18742. if (array1.length !== array2.length) {
  18743. return false;
  18744. }
  18745. for (var i = 0; i < array1.length; i++) {
  18746. if (array1[i] !== array2[i]) {
  18747. return false;
  18748. }
  18749. }
  18750. return true;
  18751. }
  18752. function PDF17() {
  18753. }
  18754. PDF17.prototype = {
  18755. checkOwnerPassword: function PDF17_checkOwnerPassword(password,
  18756. ownerValidationSalt,
  18757. userBytes,
  18758. ownerPassword) {
  18759. var hashData = new Uint8Array(password.length + 56);
  18760. hashData.set(password, 0);
  18761. hashData.set(ownerValidationSalt, password.length);
  18762. hashData.set(userBytes, password.length + ownerValidationSalt.length);
  18763. var result = calculateSHA256(hashData, 0, hashData.length);
  18764. return compareByteArrays(result, ownerPassword);
  18765. },
  18766. checkUserPassword: function PDF17_checkUserPassword(password,
  18767. userValidationSalt,
  18768. userPassword) {
  18769. var hashData = new Uint8Array(password.length + 8);
  18770. hashData.set(password, 0);
  18771. hashData.set(userValidationSalt, password.length);
  18772. var result = calculateSHA256(hashData, 0, hashData.length);
  18773. return compareByteArrays(result, userPassword);
  18774. },
  18775. getOwnerKey: function PDF17_getOwnerKey(password, ownerKeySalt, userBytes,
  18776. ownerEncryption) {
  18777. var hashData = new Uint8Array(password.length + 56);
  18778. hashData.set(password, 0);
  18779. hashData.set(ownerKeySalt, password.length);
  18780. hashData.set(userBytes, password.length + ownerKeySalt.length);
  18781. var key = calculateSHA256(hashData, 0, hashData.length);
  18782. var cipher = new AES256Cipher(key);
  18783. return cipher.decryptBlock(ownerEncryption,
  18784. false,
  18785. new Uint8Array(16));
  18786. },
  18787. getUserKey: function PDF17_getUserKey(password, userKeySalt,
  18788. userEncryption) {
  18789. var hashData = new Uint8Array(password.length + 8);
  18790. hashData.set(password, 0);
  18791. hashData.set(userKeySalt, password.length);
  18792. //key is the decryption key for the UE string
  18793. var key = calculateSHA256(hashData, 0, hashData.length);
  18794. var cipher = new AES256Cipher(key);
  18795. return cipher.decryptBlock(userEncryption,
  18796. false,
  18797. new Uint8Array(16));
  18798. }
  18799. };
  18800. return PDF17;
  18801. })();
  18802. var PDF20 = (function PDF20Closure() {
  18803. function concatArrays(array1, array2) {
  18804. var t = new Uint8Array(array1.length + array2.length);
  18805. t.set(array1, 0);
  18806. t.set(array2, array1.length);
  18807. return t;
  18808. }
  18809. function calculatePDF20Hash(password, input, userBytes) {
  18810. //This refers to Algorithm 2.B as defined in ISO 32000-2
  18811. var k = calculateSHA256(input, 0, input.length).subarray(0, 32);
  18812. var e = [0];
  18813. var i = 0;
  18814. while (i < 64 || e[e.length - 1] > i - 32) {
  18815. var arrayLength = password.length + k.length + userBytes.length;
  18816. var k1 = new Uint8Array(arrayLength * 64);
  18817. var array = concatArrays(password, k);
  18818. array = concatArrays(array, userBytes);
  18819. for (var j = 0, pos = 0; j < 64; j++, pos += arrayLength) {
  18820. k1.set(array, pos);
  18821. }
  18822. //AES128 CBC NO PADDING with
  18823. //first 16 bytes of k as the key and the second 16 as the iv.
  18824. var cipher = new AES128Cipher(k.subarray(0, 16));
  18825. e = cipher.encrypt(k1, k.subarray(16, 32));
  18826. //Now we have to take the first 16 bytes of an unsigned
  18827. //big endian integer... and compute the remainder
  18828. //modulo 3.... That is a fairly large number and
  18829. //JavaScript isn't going to handle that well...
  18830. //So we're using a trick that allows us to perform
  18831. //modulo math byte by byte
  18832. var remainder = 0;
  18833. for (var z = 0; z < 16; z++) {
  18834. remainder *= (256 % 3);
  18835. remainder %= 3;
  18836. remainder += ((e[z] >>> 0) % 3);
  18837. remainder %= 3;
  18838. }
  18839. if (remainder === 0) {
  18840. k = calculateSHA256(e, 0, e.length);
  18841. }
  18842. else if (remainder === 1) {
  18843. k = calculateSHA384(e, 0, e.length);
  18844. }
  18845. else if (remainder === 2) {
  18846. k = calculateSHA512(e, 0, e.length);
  18847. }
  18848. i++;
  18849. }
  18850. return k.subarray(0, 32);
  18851. }
  18852. function PDF20() {
  18853. }
  18854. function compareByteArrays(array1, array2) {
  18855. if (array1.length !== array2.length) {
  18856. return false;
  18857. }
  18858. for (var i = 0; i < array1.length; i++) {
  18859. if (array1[i] !== array2[i]) {
  18860. return false;
  18861. }
  18862. }
  18863. return true;
  18864. }
  18865. PDF20.prototype = {
  18866. hash: function PDF20_hash(password, concatBytes, userBytes) {
  18867. return calculatePDF20Hash(password, concatBytes, userBytes);
  18868. },
  18869. checkOwnerPassword: function PDF20_checkOwnerPassword(password,
  18870. ownerValidationSalt,
  18871. userBytes,
  18872. ownerPassword) {
  18873. var hashData = new Uint8Array(password.length + 56);
  18874. hashData.set(password, 0);
  18875. hashData.set(ownerValidationSalt, password.length);
  18876. hashData.set(userBytes, password.length + ownerValidationSalt.length);
  18877. var result = calculatePDF20Hash(password, hashData, userBytes);
  18878. return compareByteArrays(result, ownerPassword);
  18879. },
  18880. checkUserPassword: function PDF20_checkUserPassword(password,
  18881. userValidationSalt,
  18882. userPassword) {
  18883. var hashData = new Uint8Array(password.length + 8);
  18884. hashData.set(password, 0);
  18885. hashData.set(userValidationSalt, password.length);
  18886. var result = calculatePDF20Hash(password, hashData, []);
  18887. return compareByteArrays(result, userPassword);
  18888. },
  18889. getOwnerKey: function PDF20_getOwnerKey(password, ownerKeySalt, userBytes,
  18890. ownerEncryption) {
  18891. var hashData = new Uint8Array(password.length + 56);
  18892. hashData.set(password, 0);
  18893. hashData.set(ownerKeySalt, password.length);
  18894. hashData.set(userBytes, password.length + ownerKeySalt.length);
  18895. var key = calculatePDF20Hash(password, hashData, userBytes);
  18896. var cipher = new AES256Cipher(key);
  18897. return cipher.decryptBlock(ownerEncryption,
  18898. false,
  18899. new Uint8Array(16));
  18900. },
  18901. getUserKey: function PDF20_getUserKey(password, userKeySalt,
  18902. userEncryption) {
  18903. var hashData = new Uint8Array(password.length + 8);
  18904. hashData.set(password, 0);
  18905. hashData.set(userKeySalt, password.length);
  18906. //key is the decryption key for the UE string
  18907. var key = calculatePDF20Hash(password, hashData, []);
  18908. var cipher = new AES256Cipher(key);
  18909. return cipher.decryptBlock(userEncryption,
  18910. false,
  18911. new Uint8Array(16));
  18912. }
  18913. };
  18914. return PDF20;
  18915. })();
  18916. var CipherTransform = (function CipherTransformClosure() {
  18917. function CipherTransform(stringCipherConstructor, streamCipherConstructor) {
  18918. this.stringCipherConstructor = stringCipherConstructor;
  18919. this.streamCipherConstructor = streamCipherConstructor;
  18920. }
  18921. CipherTransform.prototype = {
  18922. createStream: function CipherTransform_createStream(stream, length) {
  18923. var cipher = new this.streamCipherConstructor();
  18924. return new DecryptStream(stream, length,
  18925. function cipherTransformDecryptStream(data, finalize) {
  18926. return cipher.decryptBlock(data, finalize);
  18927. }
  18928. );
  18929. },
  18930. decryptString: function CipherTransform_decryptString(s) {
  18931. var cipher = new this.stringCipherConstructor();
  18932. var data = stringToBytes(s);
  18933. data = cipher.decryptBlock(data, true);
  18934. return bytesToString(data);
  18935. }
  18936. };
  18937. return CipherTransform;
  18938. })();
  18939. var CipherTransformFactory = (function CipherTransformFactoryClosure() {
  18940. var defaultPasswordBytes = new Uint8Array([
  18941. 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
  18942. 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
  18943. 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80,
  18944. 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A]);
  18945. function createEncryptionKey20(revision, password, ownerPassword,
  18946. ownerValidationSalt, ownerKeySalt, uBytes,
  18947. userPassword, userValidationSalt, userKeySalt,
  18948. ownerEncryption, userEncryption, perms) {
  18949. if (password) {
  18950. var passwordLength = Math.min(127, password.length);
  18951. password = password.subarray(0, passwordLength);
  18952. } else {
  18953. password = [];
  18954. }
  18955. var pdfAlgorithm;
  18956. if (revision === 6) {
  18957. pdfAlgorithm = new PDF20();
  18958. } else {
  18959. pdfAlgorithm = new PDF17();
  18960. }
  18961. if (pdfAlgorithm) {
  18962. if (pdfAlgorithm.checkUserPassword(password, userValidationSalt,
  18963. userPassword)) {
  18964. return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption);
  18965. } else if (pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt,
  18966. uBytes,
  18967. ownerPassword)) {
  18968. return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes,
  18969. ownerEncryption);
  18970. }
  18971. }
  18972. return null;
  18973. }
  18974. function prepareKeyData(fileId, password, ownerPassword, userPassword,
  18975. flags, revision, keyLength, encryptMetadata) {
  18976. var hashDataSize = 40 + ownerPassword.length + fileId.length;
  18977. var hashData = new Uint8Array(hashDataSize), i = 0, j, n;
  18978. if (password) {
  18979. n = Math.min(32, password.length);
  18980. for (; i < n; ++i) {
  18981. hashData[i] = password[i];
  18982. }
  18983. }
  18984. j = 0;
  18985. while (i < 32) {
  18986. hashData[i++] = defaultPasswordBytes[j++];
  18987. }
  18988. // as now the padded password in the hashData[0..i]
  18989. for (j = 0, n = ownerPassword.length; j < n; ++j) {
  18990. hashData[i++] = ownerPassword[j];
  18991. }
  18992. hashData[i++] = flags & 0xFF;
  18993. hashData[i++] = (flags >> 8) & 0xFF;
  18994. hashData[i++] = (flags >> 16) & 0xFF;
  18995. hashData[i++] = (flags >>> 24) & 0xFF;
  18996. for (j = 0, n = fileId.length; j < n; ++j) {
  18997. hashData[i++] = fileId[j];
  18998. }
  18999. if (revision >= 4 && !encryptMetadata) {
  19000. hashData[i++] = 0xFF;
  19001. hashData[i++] = 0xFF;
  19002. hashData[i++] = 0xFF;
  19003. hashData[i++] = 0xFF;
  19004. }
  19005. var hash = calculateMD5(hashData, 0, i);
  19006. var keyLengthInBytes = keyLength >> 3;
  19007. if (revision >= 3) {
  19008. for (j = 0; j < 50; ++j) {
  19009. hash = calculateMD5(hash, 0, keyLengthInBytes);
  19010. }
  19011. }
  19012. var encryptionKey = hash.subarray(0, keyLengthInBytes);
  19013. var cipher, checkData;
  19014. if (revision >= 3) {
  19015. for (i = 0; i < 32; ++i) {
  19016. hashData[i] = defaultPasswordBytes[i];
  19017. }
  19018. for (j = 0, n = fileId.length; j < n; ++j) {
  19019. hashData[i++] = fileId[j];
  19020. }
  19021. cipher = new ARCFourCipher(encryptionKey);
  19022. checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i));
  19023. n = encryptionKey.length;
  19024. var derivedKey = new Uint8Array(n), k;
  19025. for (j = 1; j <= 19; ++j) {
  19026. for (k = 0; k < n; ++k) {
  19027. derivedKey[k] = encryptionKey[k] ^ j;
  19028. }
  19029. cipher = new ARCFourCipher(derivedKey);
  19030. checkData = cipher.encryptBlock(checkData);
  19031. }
  19032. for (j = 0, n = checkData.length; j < n; ++j) {
  19033. if (userPassword[j] !== checkData[j]) {
  19034. return null;
  19035. }
  19036. }
  19037. } else {
  19038. cipher = new ARCFourCipher(encryptionKey);
  19039. checkData = cipher.encryptBlock(defaultPasswordBytes);
  19040. for (j = 0, n = checkData.length; j < n; ++j) {
  19041. if (userPassword[j] !== checkData[j]) {
  19042. return null;
  19043. }
  19044. }
  19045. }
  19046. return encryptionKey;
  19047. }
  19048. function decodeUserPassword(password, ownerPassword, revision, keyLength) {
  19049. var hashData = new Uint8Array(32), i = 0, j, n;
  19050. n = Math.min(32, password.length);
  19051. for (; i < n; ++i) {
  19052. hashData[i] = password[i];
  19053. }
  19054. j = 0;
  19055. while (i < 32) {
  19056. hashData[i++] = defaultPasswordBytes[j++];
  19057. }
  19058. var hash = calculateMD5(hashData, 0, i);
  19059. var keyLengthInBytes = keyLength >> 3;
  19060. if (revision >= 3) {
  19061. for (j = 0; j < 50; ++j) {
  19062. hash = calculateMD5(hash, 0, hash.length);
  19063. }
  19064. }
  19065. var cipher, userPassword;
  19066. if (revision >= 3) {
  19067. userPassword = ownerPassword;
  19068. var derivedKey = new Uint8Array(keyLengthInBytes), k;
  19069. for (j = 19; j >= 0; j--) {
  19070. for (k = 0; k < keyLengthInBytes; ++k) {
  19071. derivedKey[k] = hash[k] ^ j;
  19072. }
  19073. cipher = new ARCFourCipher(derivedKey);
  19074. userPassword = cipher.encryptBlock(userPassword);
  19075. }
  19076. } else {
  19077. cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes));
  19078. userPassword = cipher.encryptBlock(ownerPassword);
  19079. }
  19080. return userPassword;
  19081. }
  19082. var identityName = Name.get('Identity');
  19083. function CipherTransformFactory(dict, fileId, password) {
  19084. var filter = dict.get('Filter');
  19085. if (!isName(filter) || filter.name !== 'Standard') {
  19086. error('unknown encryption method');
  19087. }
  19088. this.dict = dict;
  19089. var algorithm = dict.get('V');
  19090. if (!isInt(algorithm) ||
  19091. (algorithm !== 1 && algorithm !== 2 && algorithm !== 4 &&
  19092. algorithm !== 5)) {
  19093. error('unsupported encryption algorithm');
  19094. }
  19095. this.algorithm = algorithm;
  19096. var keyLength = dict.get('Length') || 40;
  19097. if (!isInt(keyLength) ||
  19098. keyLength < 40 || (keyLength % 8) !== 0) {
  19099. error('invalid key length');
  19100. }
  19101. // prepare keys
  19102. var ownerPassword = stringToBytes(dict.get('O')).subarray(0, 32);
  19103. var userPassword = stringToBytes(dict.get('U')).subarray(0, 32);
  19104. var flags = dict.get('P');
  19105. var revision = dict.get('R');
  19106. // meaningful when V is 4 or 5
  19107. var encryptMetadata = ((algorithm === 4 || algorithm === 5) &&
  19108. dict.get('EncryptMetadata') !== false);
  19109. this.encryptMetadata = encryptMetadata;
  19110. var fileIdBytes = stringToBytes(fileId);
  19111. var passwordBytes;
  19112. if (password) {
  19113. passwordBytes = stringToBytes(password);
  19114. }
  19115. var encryptionKey;
  19116. if (algorithm !== 5) {
  19117. encryptionKey = prepareKeyData(fileIdBytes, passwordBytes,
  19118. ownerPassword, userPassword, flags,
  19119. revision, keyLength, encryptMetadata);
  19120. }
  19121. else {
  19122. var ownerValidationSalt = stringToBytes(dict.get('O')).subarray(32, 40);
  19123. var ownerKeySalt = stringToBytes(dict.get('O')).subarray(40, 48);
  19124. var uBytes = stringToBytes(dict.get('U')).subarray(0, 48);
  19125. var userValidationSalt = stringToBytes(dict.get('U')).subarray(32, 40);
  19126. var userKeySalt = stringToBytes(dict.get('U')).subarray(40, 48);
  19127. var ownerEncryption = stringToBytes(dict.get('OE'));
  19128. var userEncryption = stringToBytes(dict.get('UE'));
  19129. var perms = stringToBytes(dict.get('Perms'));
  19130. encryptionKey =
  19131. createEncryptionKey20(revision, passwordBytes,
  19132. ownerPassword, ownerValidationSalt,
  19133. ownerKeySalt, uBytes,
  19134. userPassword, userValidationSalt,
  19135. userKeySalt, ownerEncryption,
  19136. userEncryption, perms);
  19137. }
  19138. if (!encryptionKey && !password) {
  19139. throw new PasswordException('No password given',
  19140. PasswordResponses.NEED_PASSWORD);
  19141. } else if (!encryptionKey && password) {
  19142. // Attempting use the password as an owner password
  19143. var decodedPassword = decodeUserPassword(passwordBytes, ownerPassword,
  19144. revision, keyLength);
  19145. encryptionKey = prepareKeyData(fileIdBytes, decodedPassword,
  19146. ownerPassword, userPassword, flags,
  19147. revision, keyLength, encryptMetadata);
  19148. }
  19149. if (!encryptionKey) {
  19150. throw new PasswordException('Incorrect Password',
  19151. PasswordResponses.INCORRECT_PASSWORD);
  19152. }
  19153. this.encryptionKey = encryptionKey;
  19154. if (algorithm >= 4) {
  19155. this.cf = dict.get('CF');
  19156. this.stmf = dict.get('StmF') || identityName;
  19157. this.strf = dict.get('StrF') || identityName;
  19158. this.eff = dict.get('EFF') || this.strf;
  19159. }
  19160. }
  19161. function buildObjectKey(num, gen, encryptionKey, isAes) {
  19162. var key = new Uint8Array(encryptionKey.length + 9), i, n;
  19163. for (i = 0, n = encryptionKey.length; i < n; ++i) {
  19164. key[i] = encryptionKey[i];
  19165. }
  19166. key[i++] = num & 0xFF;
  19167. key[i++] = (num >> 8) & 0xFF;
  19168. key[i++] = (num >> 16) & 0xFF;
  19169. key[i++] = gen & 0xFF;
  19170. key[i++] = (gen >> 8) & 0xFF;
  19171. if (isAes) {
  19172. key[i++] = 0x73;
  19173. key[i++] = 0x41;
  19174. key[i++] = 0x6C;
  19175. key[i++] = 0x54;
  19176. }
  19177. var hash = calculateMD5(key, 0, i);
  19178. return hash.subarray(0, Math.min(encryptionKey.length + 5, 16));
  19179. }
  19180. function buildCipherConstructor(cf, name, num, gen, key) {
  19181. var cryptFilter = cf.get(name.name);
  19182. var cfm;
  19183. if (cryptFilter !== null && cryptFilter !== undefined) {
  19184. cfm = cryptFilter.get('CFM');
  19185. }
  19186. if (!cfm || cfm.name === 'None') {
  19187. return function cipherTransformFactoryBuildCipherConstructorNone() {
  19188. return new NullCipher();
  19189. };
  19190. }
  19191. if ('V2' === cfm.name) {
  19192. return function cipherTransformFactoryBuildCipherConstructorV2() {
  19193. return new ARCFourCipher(buildObjectKey(num, gen, key, false));
  19194. };
  19195. }
  19196. if ('AESV2' === cfm.name) {
  19197. return function cipherTransformFactoryBuildCipherConstructorAESV2() {
  19198. return new AES128Cipher(buildObjectKey(num, gen, key, true));
  19199. };
  19200. }
  19201. if ('AESV3' === cfm.name) {
  19202. return function cipherTransformFactoryBuildCipherConstructorAESV3() {
  19203. return new AES256Cipher(key);
  19204. };
  19205. }
  19206. error('Unknown crypto method');
  19207. }
  19208. CipherTransformFactory.prototype = {
  19209. createCipherTransform:
  19210. function CipherTransformFactory_createCipherTransform(num, gen) {
  19211. if (this.algorithm === 4 || this.algorithm === 5) {
  19212. return new CipherTransform(
  19213. buildCipherConstructor(this.cf, this.stmf,
  19214. num, gen, this.encryptionKey),
  19215. buildCipherConstructor(this.cf, this.strf,
  19216. num, gen, this.encryptionKey));
  19217. }
  19218. // algorithms 1 and 2
  19219. var key = buildObjectKey(num, gen, this.encryptionKey, false);
  19220. var cipherConstructor = function buildCipherCipherConstructor() {
  19221. return new ARCFourCipher(key);
  19222. };
  19223. return new CipherTransform(cipherConstructor, cipherConstructor);
  19224. }
  19225. };
  19226. return CipherTransformFactory;
  19227. })();
  19228. var PatternType = {
  19229. FUNCTION_BASED: 1,
  19230. AXIAL: 2,
  19231. RADIAL: 3,
  19232. FREE_FORM_MESH: 4,
  19233. LATTICE_FORM_MESH: 5,
  19234. COONS_PATCH_MESH: 6,
  19235. TENSOR_PATCH_MESH: 7
  19236. };
  19237. var Pattern = (function PatternClosure() {
  19238. // Constructor should define this.getPattern
  19239. function Pattern() {
  19240. error('should not call Pattern constructor');
  19241. }
  19242. Pattern.prototype = {
  19243. // Input: current Canvas context
  19244. // Output: the appropriate fillStyle or strokeStyle
  19245. getPattern: function Pattern_getPattern(ctx) {
  19246. error('Should not call Pattern.getStyle: ' + ctx);
  19247. }
  19248. };
  19249. Pattern.parseShading = function Pattern_parseShading(shading, matrix, xref,
  19250. res) {
  19251. var dict = isStream(shading) ? shading.dict : shading;
  19252. var type = dict.get('ShadingType');
  19253. switch (type) {
  19254. case PatternType.AXIAL:
  19255. case PatternType.RADIAL:
  19256. // Both radial and axial shadings are handled by RadialAxial shading.
  19257. return new Shadings.RadialAxial(dict, matrix, xref, res);
  19258. case PatternType.FREE_FORM_MESH:
  19259. case PatternType.LATTICE_FORM_MESH:
  19260. case PatternType.COONS_PATCH_MESH:
  19261. case PatternType.TENSOR_PATCH_MESH:
  19262. return new Shadings.Mesh(shading, matrix, xref, res);
  19263. default:
  19264. UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern);
  19265. return new Shadings.Dummy();
  19266. }
  19267. };
  19268. return Pattern;
  19269. })();
  19270. var Shadings = {};
  19271. // A small number to offset the first/last color stops so we can insert ones to
  19272. // support extend. Number.MIN_VALUE appears to be too small and breaks the
  19273. // extend. 1e-7 works in FF but chrome seems to use an even smaller sized number
  19274. // internally so we have to go bigger.
  19275. Shadings.SMALL_NUMBER = 1e-2;
  19276. // Radial and axial shading have very similar implementations
  19277. // If needed, the implementations can be broken into two classes
  19278. Shadings.RadialAxial = (function RadialAxialClosure() {
  19279. function RadialAxial(dict, matrix, xref, res) {
  19280. this.matrix = matrix;
  19281. this.coordsArr = dict.get('Coords');
  19282. this.shadingType = dict.get('ShadingType');
  19283. this.type = 'Pattern';
  19284. var cs = dict.get('ColorSpace', 'CS');
  19285. cs = ColorSpace.parse(cs, xref, res);
  19286. this.cs = cs;
  19287. var t0 = 0.0, t1 = 1.0;
  19288. if (dict.has('Domain')) {
  19289. var domainArr = dict.get('Domain');
  19290. t0 = domainArr[0];
  19291. t1 = domainArr[1];
  19292. }
  19293. var extendStart = false, extendEnd = false;
  19294. if (dict.has('Extend')) {
  19295. var extendArr = dict.get('Extend');
  19296. extendStart = extendArr[0];
  19297. extendEnd = extendArr[1];
  19298. }
  19299. if (this.shadingType === PatternType.RADIAL &&
  19300. (!extendStart || !extendEnd)) {
  19301. // Radial gradient only currently works if either circle is fully within
  19302. // the other circle.
  19303. var x1 = this.coordsArr[0];
  19304. var y1 = this.coordsArr[1];
  19305. var r1 = this.coordsArr[2];
  19306. var x2 = this.coordsArr[3];
  19307. var y2 = this.coordsArr[4];
  19308. var r2 = this.coordsArr[5];
  19309. var distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  19310. if (r1 <= r2 + distance &&
  19311. r2 <= r1 + distance) {
  19312. warn('Unsupported radial gradient.');
  19313. }
  19314. }
  19315. this.extendStart = extendStart;
  19316. this.extendEnd = extendEnd;
  19317. var fnObj = dict.get('Function');
  19318. var fn;
  19319. if (isArray(fnObj)) {
  19320. var fnArray = [];
  19321. for (var j = 0, jj = fnObj.length; j < jj; j++) {
  19322. var obj = xref.fetchIfRef(fnObj[j]);
  19323. if (!isPDFFunction(obj)) {
  19324. error('Invalid function');
  19325. }
  19326. fnArray.push(PDFFunction.parse(xref, obj));
  19327. }
  19328. fn = function radialAxialColorFunction(arg) {
  19329. var out = [];
  19330. for (var i = 0, ii = fnArray.length; i < ii; i++) {
  19331. out.push(fnArray[i](arg)[0]);
  19332. }
  19333. return out;
  19334. };
  19335. } else {
  19336. if (!isPDFFunction(fnObj)) {
  19337. error('Invalid function');
  19338. }
  19339. fn = PDFFunction.parse(xref, fnObj);
  19340. }
  19341. // 10 samples seems good enough for now, but probably won't work
  19342. // if there are sharp color changes. Ideally, we would implement
  19343. // the spec faithfully and add lossless optimizations.
  19344. var diff = t1 - t0;
  19345. var step = diff / 10;
  19346. var colorStops = this.colorStops = [];
  19347. // Protect against bad domains so we don't end up in an infinte loop below.
  19348. if (t0 >= t1 || step <= 0) {
  19349. // Acrobat doesn't seem to handle these cases so we'll ignore for
  19350. // now.
  19351. info('Bad shading domain.');
  19352. return;
  19353. }
  19354. var rgbColor;
  19355. for (var i = t0; i <= t1; i += step) {
  19356. rgbColor = cs.getRgb(fn([i]), 0);
  19357. var cssColor = Util.makeCssRgb(rgbColor);
  19358. colorStops.push([(i - t0) / diff, cssColor]);
  19359. }
  19360. var background = 'transparent';
  19361. if (dict.has('Background')) {
  19362. rgbColor = cs.getRgb(dict.get('Background'), 0);
  19363. background = Util.makeCssRgb(rgbColor);
  19364. }
  19365. if (!extendStart) {
  19366. // Insert a color stop at the front and offset the first real color stop
  19367. // so it doesn't conflict with the one we insert.
  19368. colorStops.unshift([0, background]);
  19369. colorStops[1][0] += Shadings.SMALL_NUMBER;
  19370. }
  19371. if (!extendEnd) {
  19372. // Same idea as above in extendStart but for the end.
  19373. colorStops[colorStops.length - 1][0] -= Shadings.SMALL_NUMBER;
  19374. colorStops.push([1, background]);
  19375. }
  19376. this.colorStops = colorStops;
  19377. }
  19378. RadialAxial.prototype = {
  19379. getIR: function RadialAxial_getIR() {
  19380. var coordsArr = this.coordsArr;
  19381. var shadingType = this.shadingType;
  19382. var type, p0, p1, r0, r1;
  19383. if (shadingType == PatternType.AXIAL) {
  19384. p0 = [coordsArr[0], coordsArr[1]];
  19385. p1 = [coordsArr[2], coordsArr[3]];
  19386. r0 = null;
  19387. r1 = null;
  19388. type = 'axial';
  19389. } else if (shadingType == PatternType.RADIAL) {
  19390. p0 = [coordsArr[0], coordsArr[1]];
  19391. p1 = [coordsArr[3], coordsArr[4]];
  19392. r0 = coordsArr[2];
  19393. r1 = coordsArr[5];
  19394. type = 'radial';
  19395. } else {
  19396. error('getPattern type unknown: ' + shadingType);
  19397. }
  19398. var matrix = this.matrix;
  19399. if (matrix) {
  19400. p0 = Util.applyTransform(p0, matrix);
  19401. p1 = Util.applyTransform(p1, matrix);
  19402. }
  19403. return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];
  19404. }
  19405. };
  19406. return RadialAxial;
  19407. })();
  19408. // All mesh shading. For now, they will be presented as set of the triangles
  19409. // to be drawn on the canvas and rgb color for each vertex.
  19410. Shadings.Mesh = (function MeshClosure() {
  19411. function MeshStreamReader(stream, context) {
  19412. this.stream = stream;
  19413. this.context = context;
  19414. this.buffer = 0;
  19415. this.bufferLength = 0;
  19416. }
  19417. MeshStreamReader.prototype = {
  19418. get hasData() {
  19419. if (this.stream.end) {
  19420. return this.stream.pos < this.stream.end;
  19421. }
  19422. if (this.bufferLength > 0) {
  19423. return true;
  19424. }
  19425. var nextByte = this.stream.getByte();
  19426. if (nextByte < 0) {
  19427. return false;
  19428. }
  19429. this.buffer = nextByte;
  19430. this.bufferLength = 8;
  19431. return true;
  19432. },
  19433. readBits: function MeshStreamReader_readBits(n) {
  19434. var buffer = this.buffer;
  19435. var bufferLength = this.bufferLength;
  19436. if (n === 32) {
  19437. if (bufferLength === 0) {
  19438. return ((this.stream.getByte() << 24) |
  19439. (this.stream.getByte() << 16) | (this.stream.getByte() << 8) |
  19440. this.stream.getByte()) >>> 0;
  19441. }
  19442. buffer = (buffer << 24) | (this.stream.getByte() << 16) |
  19443. (this.stream.getByte() << 8) | this.stream.getByte();
  19444. var nextByte = this.stream.getByte();
  19445. this.buffer = nextByte & ((1 << bufferLength) - 1);
  19446. return ((buffer << (8 - bufferLength)) |
  19447. ((nextByte & 0xFF) >> bufferLength)) >>> 0;
  19448. }
  19449. if (n === 8 && bufferLength === 0) {
  19450. return this.stream.getByte();
  19451. }
  19452. while (bufferLength < n) {
  19453. buffer = (buffer << 8) | this.stream.getByte();
  19454. bufferLength += 8;
  19455. }
  19456. bufferLength -= n;
  19457. this.bufferLength = bufferLength;
  19458. this.buffer = buffer & ((1 << bufferLength) - 1);
  19459. return buffer >> bufferLength;
  19460. },
  19461. align: function MeshStreamReader_align() {
  19462. this.buffer = 0;
  19463. this.bufferLength = 0;
  19464. },
  19465. readFlag: function MeshStreamReader_readFlag() {
  19466. return this.readBits(this.context.bitsPerFlag);
  19467. },
  19468. readCoordinate: function MeshStreamReader_readCoordinate() {
  19469. var bitsPerCoordinate = this.context.bitsPerCoordinate;
  19470. var xi = this.readBits(bitsPerCoordinate);
  19471. var yi = this.readBits(bitsPerCoordinate);
  19472. var decode = this.context.decode;
  19473. var scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) :
  19474. 2.3283064365386963e-10; // 2 ^ -32
  19475. return [
  19476. xi * scale * (decode[1] - decode[0]) + decode[0],
  19477. yi * scale * (decode[3] - decode[2]) + decode[2]
  19478. ];
  19479. },
  19480. readComponents: function MeshStreamReader_readComponents() {
  19481. var numComps = this.context.numComps;
  19482. var bitsPerComponent = this.context.bitsPerComponent;
  19483. var scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) :
  19484. 2.3283064365386963e-10; // 2 ^ -32
  19485. var decode = this.context.decode;
  19486. var components = [];
  19487. for (var i = 0, j = 4; i < numComps; i++, j += 2) {
  19488. var ci = this.readBits(bitsPerComponent);
  19489. components.push(ci * scale * (decode[j + 1] - decode[j]) + decode[j]);
  19490. }
  19491. if (this.context.colorFn) {
  19492. components = this.context.colorFn(components);
  19493. }
  19494. return this.context.colorSpace.getRgb(components, 0);
  19495. }
  19496. };
  19497. function decodeType4Shading(mesh, reader) {
  19498. var coords = mesh.coords;
  19499. var colors = mesh.colors;
  19500. var operators = [];
  19501. var ps = []; // not maintaining cs since that will match ps
  19502. var verticesLeft = 0; // assuming we have all data to start a new triangle
  19503. while (reader.hasData) {
  19504. var f = reader.readFlag();
  19505. var coord = reader.readCoordinate();
  19506. var color = reader.readComponents();
  19507. if (verticesLeft === 0) { // ignoring flags if we started a triangle
  19508. assert(0 <= f && f <= 2, 'Unknown type4 flag');
  19509. switch (f) {
  19510. case 0:
  19511. verticesLeft = 3;
  19512. break;
  19513. case 1:
  19514. ps.push(ps[ps.length - 2], ps[ps.length - 1]);
  19515. verticesLeft = 1;
  19516. break;
  19517. case 2:
  19518. ps.push(ps[ps.length - 3], ps[ps.length - 1]);
  19519. verticesLeft = 1;
  19520. break;
  19521. }
  19522. operators.push(f);
  19523. }
  19524. ps.push(coords.length);
  19525. coords.push(coord);
  19526. colors.push(color);
  19527. verticesLeft--;
  19528. reader.align();
  19529. }
  19530. var psPacked = new Int32Array(ps);
  19531. mesh.figures.push({
  19532. type: 'triangles',
  19533. coords: psPacked,
  19534. colors: psPacked
  19535. });
  19536. }
  19537. function decodeType5Shading(mesh, reader, verticesPerRow) {
  19538. var coords = mesh.coords;
  19539. var colors = mesh.colors;
  19540. var ps = []; // not maintaining cs since that will match ps
  19541. while (reader.hasData) {
  19542. var coord = reader.readCoordinate();
  19543. var color = reader.readComponents();
  19544. ps.push(coords.length);
  19545. coords.push(coord);
  19546. colors.push(color);
  19547. }
  19548. var psPacked = new Int32Array(ps);
  19549. mesh.figures.push({
  19550. type: 'lattice',
  19551. coords: psPacked,
  19552. colors: psPacked,
  19553. verticesPerRow: verticesPerRow
  19554. });
  19555. }
  19556. var MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3;
  19557. var MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20;
  19558. var TRIANGLE_DENSITY = 20; // count of triangles per entire mesh bounds
  19559. var getB = (function getBClosure() {
  19560. function buildB(count) {
  19561. var lut = [];
  19562. for (var i = 0; i <= count; i++) {
  19563. var t = i / count, t_ = 1 - t;
  19564. lut.push(new Float32Array([t_ * t_ * t_, 3 * t * t_ * t_,
  19565. 3 * t * t * t_, t * t * t]));
  19566. }
  19567. return lut;
  19568. }
  19569. var cache = [];
  19570. return function getB(count) {
  19571. if (!cache[count]) {
  19572. cache[count] = buildB(count);
  19573. }
  19574. return cache[count];
  19575. };
  19576. })();
  19577. function buildFigureFromPatch(mesh, index) {
  19578. var figure = mesh.figures[index];
  19579. assert(figure.type === 'patch', 'Unexpected patch mesh figure');
  19580. var coords = mesh.coords, colors = mesh.colors;
  19581. var pi = figure.coords;
  19582. var ci = figure.colors;
  19583. var figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0],
  19584. coords[pi[12]][0], coords[pi[15]][0]);
  19585. var figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1],
  19586. coords[pi[12]][1], coords[pi[15]][1]);
  19587. var figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0],
  19588. coords[pi[12]][0], coords[pi[15]][0]);
  19589. var figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1],
  19590. coords[pi[12]][1], coords[pi[15]][1]);
  19591. var splitXBy = Math.ceil((figureMaxX - figureMinX) * TRIANGLE_DENSITY /
  19592. (mesh.bounds[2] - mesh.bounds[0]));
  19593. splitXBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
  19594. Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy));
  19595. var splitYBy = Math.ceil((figureMaxY - figureMinY) * TRIANGLE_DENSITY /
  19596. (mesh.bounds[3] - mesh.bounds[1]));
  19597. splitYBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
  19598. Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy));
  19599. var verticesPerRow = splitXBy + 1;
  19600. var figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow);
  19601. var figureColors = new Int32Array((splitYBy + 1) * verticesPerRow);
  19602. var k = 0;
  19603. var cl = new Uint8Array(3), cr = new Uint8Array(3);
  19604. var c0 = colors[ci[0]], c1 = colors[ci[1]],
  19605. c2 = colors[ci[2]], c3 = colors[ci[3]];
  19606. var bRow = getB(splitYBy), bCol = getB(splitXBy);
  19607. for (var row = 0; row <= splitYBy; row++) {
  19608. cl[0] = ((c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy) | 0;
  19609. cl[1] = ((c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy) | 0;
  19610. cl[2] = ((c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy) | 0;
  19611. cr[0] = ((c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy) | 0;
  19612. cr[1] = ((c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy) | 0;
  19613. cr[2] = ((c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy) | 0;
  19614. for (var col = 0; col <= splitXBy; col++, k++) {
  19615. if ((row === 0 || row === splitYBy) &&
  19616. (col === 0 || col === splitXBy)) {
  19617. continue;
  19618. }
  19619. var x = 0, y = 0;
  19620. var q = 0;
  19621. for (var i = 0; i <= 3; i++) {
  19622. for (var j = 0; j <= 3; j++, q++) {
  19623. var m = bRow[row][i] * bCol[col][j];
  19624. x += coords[pi[q]][0] * m;
  19625. y += coords[pi[q]][1] * m;
  19626. }
  19627. }
  19628. figureCoords[k] = coords.length;
  19629. coords.push([x, y]);
  19630. figureColors[k] = colors.length;
  19631. var newColor = new Uint8Array(3);
  19632. newColor[0] = ((cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy) | 0;
  19633. newColor[1] = ((cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy) | 0;
  19634. newColor[2] = ((cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy) | 0;
  19635. colors.push(newColor);
  19636. }
  19637. }
  19638. figureCoords[0] = pi[0];
  19639. figureColors[0] = ci[0];
  19640. figureCoords[splitXBy] = pi[3];
  19641. figureColors[splitXBy] = ci[1];
  19642. figureCoords[verticesPerRow * splitYBy] = pi[12];
  19643. figureColors[verticesPerRow * splitYBy] = ci[2];
  19644. figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15];
  19645. figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3];
  19646. mesh.figures[index] = {
  19647. type: 'lattice',
  19648. coords: figureCoords,
  19649. colors: figureColors,
  19650. verticesPerRow: verticesPerRow
  19651. };
  19652. }
  19653. function decodeType6Shading(mesh, reader) {
  19654. // A special case of Type 7. The p11, p12, p21, p22 automatically filled
  19655. var coords = mesh.coords;
  19656. var colors = mesh.colors;
  19657. var ps = new Int32Array(16); // p00, p10, ..., p30, p01, ..., p33
  19658. var cs = new Int32Array(4); // c00, c30, c03, c33
  19659. while (reader.hasData) {
  19660. var f = reader.readFlag();
  19661. assert(0 <= f && f <= 3, 'Unknown type6 flag');
  19662. var i, ii;
  19663. var pi = coords.length;
  19664. for (i = 0, ii = (f !== 0 ? 8 : 12); i < ii; i++) {
  19665. coords.push(reader.readCoordinate());
  19666. }
  19667. var ci = colors.length;
  19668. for (i = 0, ii = (f !== 0 ? 2 : 4); i < ii; i++) {
  19669. colors.push(reader.readComponents());
  19670. }
  19671. var tmp1, tmp2, tmp3, tmp4;
  19672. switch (f) {
  19673. case 0:
  19674. ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
  19675. ps[ 8] = pi + 2; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
  19676. ps[ 4] = pi + 1; /* calculated below */ ps[ 7] = pi + 8;
  19677. ps[ 0] = pi; ps[ 1] = pi + 11; ps[ 2] = pi + 10; ps[ 3] = pi + 9;
  19678. cs[2] = ci + 1; cs[3] = ci + 2;
  19679. cs[0] = ci; cs[1] = ci + 3;
  19680. break;
  19681. case 1:
  19682. tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
  19683. ps[12] = pi + 5; ps[13] = pi + 4; ps[14] = pi + 3; ps[15] = pi + 2;
  19684. ps[ 8] = pi + 6; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 1;
  19685. ps[ 4] = pi + 7; /* calculated below */ ps[ 7] = pi;
  19686. ps[ 0] = tmp1; ps[ 1] = tmp2; ps[ 2] = tmp3; ps[ 3] = tmp4;
  19687. tmp1 = cs[2]; tmp2 = cs[3];
  19688. cs[2] = ci + 1; cs[3] = ci;
  19689. cs[0] = tmp1; cs[1] = tmp2;
  19690. break;
  19691. case 2:
  19692. ps[12] = ps[15]; ps[13] = pi + 7; ps[14] = pi + 6; ps[15] = pi + 5;
  19693. ps[ 8] = ps[11]; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 4;
  19694. ps[ 4] = ps[7]; /* calculated below */ ps[ 7] = pi + 3;
  19695. ps[ 0] = ps[3]; ps[ 1] = pi; ps[ 2] = pi + 1; ps[ 3] = pi + 2;
  19696. cs[2] = cs[3]; cs[3] = ci + 1;
  19697. cs[0] = cs[1]; cs[1] = ci;
  19698. break;
  19699. case 3:
  19700. ps[12] = ps[0]; ps[13] = ps[1]; ps[14] = ps[2]; ps[15] = ps[3];
  19701. ps[ 8] = pi; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
  19702. ps[ 4] = pi + 1; /* calculated below */ ps[ 7] = pi + 6;
  19703. ps[ 0] = pi + 2; ps[ 1] = pi + 3; ps[ 2] = pi + 4; ps[ 3] = pi + 5;
  19704. cs[2] = cs[0]; cs[3] = cs[1];
  19705. cs[0] = ci; cs[1] = ci + 1;
  19706. break;
  19707. }
  19708. // set p11, p12, p21, p22
  19709. ps[5] = coords.length;
  19710. coords.push([
  19711. (-4 * coords[ps[0]][0] - coords[ps[15]][0] +
  19712. 6 * (coords[ps[4]][0] + coords[ps[1]][0]) -
  19713. 2 * (coords[ps[12]][0] + coords[ps[3]][0]) +
  19714. 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9,
  19715. (-4 * coords[ps[0]][1] - coords[ps[15]][1] +
  19716. 6 * (coords[ps[4]][1] + coords[ps[1]][1]) -
  19717. 2 * (coords[ps[12]][1] + coords[ps[3]][1]) +
  19718. 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9
  19719. ]);
  19720. ps[6] = coords.length;
  19721. coords.push([
  19722. (-4 * coords[ps[3]][0] - coords[ps[12]][0] +
  19723. 6 * (coords[ps[2]][0] + coords[ps[7]][0]) -
  19724. 2 * (coords[ps[0]][0] + coords[ps[15]][0]) +
  19725. 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9,
  19726. (-4 * coords[ps[3]][1] - coords[ps[12]][1] +
  19727. 6 * (coords[ps[2]][1] + coords[ps[7]][1]) -
  19728. 2 * (coords[ps[0]][1] + coords[ps[15]][1]) +
  19729. 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9
  19730. ]);
  19731. ps[9] = coords.length;
  19732. coords.push([
  19733. (-4 * coords[ps[12]][0] - coords[ps[3]][0] +
  19734. 6 * (coords[ps[8]][0] + coords[ps[13]][0]) -
  19735. 2 * (coords[ps[0]][0] + coords[ps[15]][0]) +
  19736. 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9,
  19737. (-4 * coords[ps[12]][1] - coords[ps[3]][1] +
  19738. 6 * (coords[ps[8]][1] + coords[ps[13]][1]) -
  19739. 2 * (coords[ps[0]][1] + coords[ps[15]][1]) +
  19740. 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9
  19741. ]);
  19742. ps[10] = coords.length;
  19743. coords.push([
  19744. (-4 * coords[ps[15]][0] - coords[ps[0]][0] +
  19745. 6 * (coords[ps[11]][0] + coords[ps[14]][0]) -
  19746. 2 * (coords[ps[12]][0] + coords[ps[3]][0]) +
  19747. 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9,
  19748. (-4 * coords[ps[15]][1] - coords[ps[0]][1] +
  19749. 6 * (coords[ps[11]][1] + coords[ps[14]][1]) -
  19750. 2 * (coords[ps[12]][1] + coords[ps[3]][1]) +
  19751. 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9
  19752. ]);
  19753. mesh.figures.push({
  19754. type: 'patch',
  19755. coords: new Int32Array(ps), // making copies of ps and cs
  19756. colors: new Int32Array(cs)
  19757. });
  19758. }
  19759. }
  19760. function decodeType7Shading(mesh, reader) {
  19761. var coords = mesh.coords;
  19762. var colors = mesh.colors;
  19763. var ps = new Int32Array(16); // p00, p10, ..., p30, p01, ..., p33
  19764. var cs = new Int32Array(4); // c00, c30, c03, c33
  19765. while (reader.hasData) {
  19766. var f = reader.readFlag();
  19767. assert(0 <= f && f <= 3, 'Unknown type7 flag');
  19768. var i, ii;
  19769. var pi = coords.length;
  19770. for (i = 0, ii = (f !== 0 ? 12 : 16); i < ii; i++) {
  19771. coords.push(reader.readCoordinate());
  19772. }
  19773. var ci = colors.length;
  19774. for (i = 0, ii = (f !== 0 ? 2 : 4); i < ii; i++) {
  19775. colors.push(reader.readComponents());
  19776. }
  19777. var tmp1, tmp2, tmp3, tmp4;
  19778. switch (f) {
  19779. case 0:
  19780. ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
  19781. ps[ 8] = pi + 2; ps[ 9] = pi + 13; ps[10] = pi + 14; ps[11] = pi + 7;
  19782. ps[ 4] = pi + 1; ps[ 5] = pi + 12; ps[ 6] = pi + 15; ps[ 7] = pi + 8;
  19783. ps[ 0] = pi; ps[ 1] = pi + 11; ps[ 2] = pi + 10; ps[ 3] = pi + 9;
  19784. cs[2] = ci + 1; cs[3] = ci + 2;
  19785. cs[0] = ci; cs[1] = ci + 3;
  19786. break;
  19787. case 1:
  19788. tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
  19789. ps[12] = pi + 5; ps[13] = pi + 4; ps[14] = pi + 3; ps[15] = pi + 2;
  19790. ps[ 8] = pi + 6; ps[ 9] = pi + 11; ps[10] = pi + 10; ps[11] = pi + 1;
  19791. ps[ 4] = pi + 7; ps[ 5] = pi + 8; ps[ 6] = pi + 9; ps[ 7] = pi;
  19792. ps[ 0] = tmp1; ps[ 1] = tmp2; ps[ 2] = tmp3; ps[ 3] = tmp4;
  19793. tmp1 = cs[2]; tmp2 = cs[3];
  19794. cs[2] = ci + 1; cs[3] = ci;
  19795. cs[0] = tmp1; cs[1] = tmp2;
  19796. break;
  19797. case 2:
  19798. ps[12] = ps[15]; ps[13] = pi + 7; ps[14] = pi + 6; ps[15] = pi + 5;
  19799. ps[ 8] = ps[11]; ps[ 9] = pi + 8; ps[10] = pi + 11; ps[11] = pi + 4;
  19800. ps[ 4] = ps[7]; ps[ 5] = pi + 9; ps[ 6] = pi + 10; ps[ 7] = pi + 3;
  19801. ps[ 0] = ps[3]; ps[ 1] = pi; ps[ 2] = pi + 1; ps[ 3] = pi + 2;
  19802. cs[2] = cs[3]; cs[3] = ci + 1;
  19803. cs[0] = cs[1]; cs[1] = ci;
  19804. break;
  19805. case 3:
  19806. ps[12] = ps[0]; ps[13] = ps[1]; ps[14] = ps[2]; ps[15] = ps[3];
  19807. ps[ 8] = pi; ps[ 9] = pi + 9; ps[10] = pi + 8; ps[11] = pi + 7;
  19808. ps[ 4] = pi + 1; ps[ 5] = pi + 10; ps[ 6] = pi + 11; ps[ 7] = pi + 6;
  19809. ps[ 0] = pi + 2; ps[ 1] = pi + 3; ps[ 2] = pi + 4; ps[ 3] = pi + 5;
  19810. cs[2] = cs[0]; cs[3] = cs[1];
  19811. cs[0] = ci; cs[1] = ci + 1;
  19812. break;
  19813. }
  19814. mesh.figures.push({
  19815. type: 'patch',
  19816. coords: new Int32Array(ps), // making copies of ps and cs
  19817. colors: new Int32Array(cs)
  19818. });
  19819. }
  19820. }
  19821. function updateBounds(mesh) {
  19822. var minX = mesh.coords[0][0], minY = mesh.coords[0][1],
  19823. maxX = minX, maxY = minY;
  19824. for (var i = 1, ii = mesh.coords.length; i < ii; i++) {
  19825. var x = mesh.coords[i][0], y = mesh.coords[i][1];
  19826. minX = minX > x ? x : minX;
  19827. minY = minY > y ? y : minY;
  19828. maxX = maxX < x ? x : maxX;
  19829. maxY = maxY < y ? y : maxY;
  19830. }
  19831. mesh.bounds = [minX, minY, maxX, maxY];
  19832. }
  19833. function packData(mesh) {
  19834. var i, ii, j, jj;
  19835. var coords = mesh.coords;
  19836. var coordsPacked = new Float32Array(coords.length * 2);
  19837. for (i = 0, j = 0, ii = coords.length; i < ii; i++) {
  19838. var xy = coords[i];
  19839. coordsPacked[j++] = xy[0];
  19840. coordsPacked[j++] = xy[1];
  19841. }
  19842. mesh.coords = coordsPacked;
  19843. var colors = mesh.colors;
  19844. var colorsPacked = new Uint8Array(colors.length * 3);
  19845. for (i = 0, j = 0, ii = colors.length; i < ii; i++) {
  19846. var c = colors[i];
  19847. colorsPacked[j++] = c[0];
  19848. colorsPacked[j++] = c[1];
  19849. colorsPacked[j++] = c[2];
  19850. }
  19851. mesh.colors = colorsPacked;
  19852. var figures = mesh.figures;
  19853. for (i = 0, ii = figures.length; i < ii; i++) {
  19854. var figure = figures[i], ps = figure.coords, cs = figure.colors;
  19855. for (j = 0, jj = ps.length; j < jj; j++) {
  19856. ps[j] *= 2;
  19857. cs[j] *= 3;
  19858. }
  19859. }
  19860. }
  19861. function Mesh(stream, matrix, xref, res) {
  19862. assert(isStream(stream), 'Mesh data is not a stream');
  19863. var dict = stream.dict;
  19864. this.matrix = matrix;
  19865. this.shadingType = dict.get('ShadingType');
  19866. this.type = 'Pattern';
  19867. this.bbox = dict.get('BBox');
  19868. var cs = dict.get('ColorSpace', 'CS');
  19869. cs = ColorSpace.parse(cs, xref, res);
  19870. this.cs = cs;
  19871. this.background = dict.has('Background') ?
  19872. cs.getRgb(dict.get('Background'), 0) : null;
  19873. var fnObj = dict.get('Function');
  19874. var fn;
  19875. if (!fnObj) {
  19876. fn = null;
  19877. } else if (isArray(fnObj)) {
  19878. var fnArray = [];
  19879. for (var j = 0, jj = fnObj.length; j < jj; j++) {
  19880. var obj = xref.fetchIfRef(fnObj[j]);
  19881. if (!isPDFFunction(obj)) {
  19882. error('Invalid function');
  19883. }
  19884. fnArray.push(PDFFunction.parse(xref, obj));
  19885. }
  19886. fn = function radialAxialColorFunction(arg) {
  19887. var out = [];
  19888. for (var i = 0, ii = fnArray.length; i < ii; i++) {
  19889. out.push(fnArray[i](arg)[0]);
  19890. }
  19891. return out;
  19892. };
  19893. } else {
  19894. if (!isPDFFunction(fnObj)) {
  19895. error('Invalid function');
  19896. }
  19897. fn = PDFFunction.parse(xref, fnObj);
  19898. }
  19899. this.coords = [];
  19900. this.colors = [];
  19901. this.figures = [];
  19902. var decodeContext = {
  19903. bitsPerCoordinate: dict.get('BitsPerCoordinate'),
  19904. bitsPerComponent: dict.get('BitsPerComponent'),
  19905. bitsPerFlag: dict.get('BitsPerFlag'),
  19906. decode: dict.get('Decode'),
  19907. colorFn: fn,
  19908. colorSpace: cs,
  19909. numComps: fn ? 1 : cs.numComps
  19910. };
  19911. var reader = new MeshStreamReader(stream, decodeContext);
  19912. var patchMesh = false;
  19913. switch (this.shadingType) {
  19914. case PatternType.FREE_FORM_MESH:
  19915. decodeType4Shading(this, reader);
  19916. break;
  19917. case PatternType.LATTICE_FORM_MESH:
  19918. var verticesPerRow = dict.get('VerticesPerRow') | 0;
  19919. assert(verticesPerRow >= 2, 'Invalid VerticesPerRow');
  19920. decodeType5Shading(this, reader, verticesPerRow);
  19921. break;
  19922. case PatternType.COONS_PATCH_MESH:
  19923. decodeType6Shading(this, reader);
  19924. patchMesh = true;
  19925. break;
  19926. case PatternType.TENSOR_PATCH_MESH:
  19927. decodeType7Shading(this, reader);
  19928. patchMesh = true;
  19929. break;
  19930. default:
  19931. error('Unsupported mesh type.');
  19932. break;
  19933. }
  19934. if (patchMesh) {
  19935. // dirty bounds calculation for determining, how dense shall be triangles
  19936. updateBounds(this);
  19937. for (var i = 0, ii = this.figures.length; i < ii; i++) {
  19938. buildFigureFromPatch(this, i);
  19939. }
  19940. }
  19941. // calculate bounds
  19942. updateBounds(this);
  19943. packData(this);
  19944. }
  19945. Mesh.prototype = {
  19946. getIR: function Mesh_getIR() {
  19947. return ['Mesh', this.shadingType, this.coords, this.colors, this.figures,
  19948. this.bounds, this.matrix, this.bbox, this.background];
  19949. }
  19950. };
  19951. return Mesh;
  19952. })();
  19953. Shadings.Dummy = (function DummyClosure() {
  19954. function Dummy() {
  19955. this.type = 'Pattern';
  19956. }
  19957. Dummy.prototype = {
  19958. getIR: function Dummy_getIR() {
  19959. return ['Dummy'];
  19960. }
  19961. };
  19962. return Dummy;
  19963. })();
  19964. function getTilingPatternIR(operatorList, dict, args) {
  19965. var matrix = dict.get('Matrix');
  19966. var bbox = dict.get('BBox');
  19967. var xstep = dict.get('XStep');
  19968. var ystep = dict.get('YStep');
  19969. var paintType = dict.get('PaintType');
  19970. var tilingType = dict.get('TilingType');
  19971. return [
  19972. 'TilingPattern', args, operatorList, matrix, bbox, xstep, ystep,
  19973. paintType, tilingType
  19974. ];
  19975. }
  19976. var PartialEvaluator = (function PartialEvaluatorClosure() {
  19977. function PartialEvaluator(pdfManager, xref, handler, pageIndex,
  19978. uniquePrefix, idCounters, fontCache) {
  19979. this.pdfManager = pdfManager;
  19980. this.xref = xref;
  19981. this.handler = handler;
  19982. this.pageIndex = pageIndex;
  19983. this.uniquePrefix = uniquePrefix;
  19984. this.idCounters = idCounters;
  19985. this.fontCache = fontCache;
  19986. }
  19987. // Trying to minimize Date.now() usage and check every 100 time
  19988. var TIME_SLOT_DURATION_MS = 20;
  19989. var CHECK_TIME_EVERY = 100;
  19990. function TimeSlotManager() {
  19991. this.reset();
  19992. }
  19993. TimeSlotManager.prototype = {
  19994. check: function TimeSlotManager_check() {
  19995. if (++this.checked < CHECK_TIME_EVERY) {
  19996. return false;
  19997. }
  19998. this.checked = 0;
  19999. return this.endTime <= Date.now();
  20000. },
  20001. reset: function TimeSlotManager_reset() {
  20002. this.endTime = Date.now() + TIME_SLOT_DURATION_MS;
  20003. this.checked = 0;
  20004. }
  20005. };
  20006. var deferred = Promise.resolve();
  20007. var TILING_PATTERN = 1, SHADING_PATTERN = 2;
  20008. PartialEvaluator.prototype = {
  20009. hasBlendModes: function PartialEvaluator_hasBlendModes(resources) {
  20010. if (!isDict(resources)) {
  20011. return false;
  20012. }
  20013. var processed = Object.create(null);
  20014. if (resources.objId) {
  20015. processed[resources.objId] = true;
  20016. }
  20017. var nodes = [resources];
  20018. while (nodes.length) {
  20019. var key;
  20020. var node = nodes.shift();
  20021. // First check the current resources for blend modes.
  20022. var graphicStates = node.get('ExtGState');
  20023. if (isDict(graphicStates)) {
  20024. graphicStates = graphicStates.getAll();
  20025. for (key in graphicStates) {
  20026. var graphicState = graphicStates[key];
  20027. var bm = graphicState['BM'];
  20028. if (isName(bm) && bm.name !== 'Normal') {
  20029. return true;
  20030. }
  20031. }
  20032. }
  20033. // Descend into the XObjects to look for more resources and blend modes.
  20034. var xObjects = node.get('XObject');
  20035. if (!isDict(xObjects)) {
  20036. continue;
  20037. }
  20038. xObjects = xObjects.getAll();
  20039. for (key in xObjects) {
  20040. var xObject = xObjects[key];
  20041. if (!isStream(xObject)) {
  20042. continue;
  20043. }
  20044. if (xObject.dict.objId) {
  20045. if (processed[xObject.dict.objId]) {
  20046. // stream has objId and is processed already
  20047. continue;
  20048. }
  20049. processed[xObject.dict.objId] = true;
  20050. }
  20051. var xResources = xObject.dict.get('Resources');
  20052. // Checking objId to detect an infinite loop.
  20053. if (isDict(xResources) &&
  20054. (!xResources.objId || !processed[xResources.objId])) {
  20055. nodes.push(xResources);
  20056. if (xResources.objId) {
  20057. processed[xResources.objId] = true;
  20058. }
  20059. }
  20060. }
  20061. }
  20062. return false;
  20063. },
  20064. buildFormXObject: function PartialEvaluator_buildFormXObject(resources,
  20065. xobj, smask,
  20066. operatorList,
  20067. initialState) {
  20068. var matrix = xobj.dict.get('Matrix');
  20069. var bbox = xobj.dict.get('BBox');
  20070. var group = xobj.dict.get('Group');
  20071. if (group) {
  20072. var groupOptions = {
  20073. matrix: matrix,
  20074. bbox: bbox,
  20075. smask: smask,
  20076. isolated: false,
  20077. knockout: false
  20078. };
  20079. var groupSubtype = group.get('S');
  20080. var colorSpace;
  20081. if (isName(groupSubtype) && groupSubtype.name === 'Transparency') {
  20082. groupOptions.isolated = (group.get('I') || false);
  20083. groupOptions.knockout = (group.get('K') || false);
  20084. colorSpace = (group.has('CS') ?
  20085. ColorSpace.parse(group.get('CS'), this.xref, resources) : null);
  20086. }
  20087. if (smask && smask.backdrop) {
  20088. colorSpace = colorSpace || ColorSpace.singletons.rgb;
  20089. smask.backdrop = colorSpace.getRgb(smask.backdrop, 0);
  20090. }
  20091. operatorList.addOp(OPS.beginGroup, [groupOptions]);
  20092. }
  20093. operatorList.addOp(OPS.paintFormXObjectBegin, [matrix, bbox]);
  20094. return this.getOperatorList(xobj,
  20095. (xobj.dict.get('Resources') || resources), operatorList, initialState).
  20096. then(function () {
  20097. operatorList.addOp(OPS.paintFormXObjectEnd, []);
  20098. if (group) {
  20099. operatorList.addOp(OPS.endGroup, [groupOptions]);
  20100. }
  20101. });
  20102. },
  20103. buildPaintImageXObject:
  20104. function PartialEvaluator_buildPaintImageXObject(resources, image,
  20105. inline, operatorList,
  20106. cacheKey, cache) {
  20107. var self = this;
  20108. var dict = image.dict;
  20109. var w = dict.get('Width', 'W');
  20110. var h = dict.get('Height', 'H');
  20111. if (!(w && isNum(w)) || !(h && isNum(h))) {
  20112. warn('Image dimensions are missing, or not numbers.');
  20113. return;
  20114. }
  20115. if (PDFJS.maxImageSize !== -1 && w * h > PDFJS.maxImageSize) {
  20116. warn('Image exceeded maximum allowed size and was removed.');
  20117. return;
  20118. }
  20119. var imageMask = (dict.get('ImageMask', 'IM') || false);
  20120. var imgData, args;
  20121. if (imageMask) {
  20122. // This depends on a tmpCanvas being filled with the
  20123. // current fillStyle, such that processing the pixel
  20124. // data can't be done here. Instead of creating a
  20125. // complete PDFImage, only read the information needed
  20126. // for later.
  20127. var width = dict.get('Width', 'W');
  20128. var height = dict.get('Height', 'H');
  20129. var bitStrideLength = (width + 7) >> 3;
  20130. var imgArray = image.getBytes(bitStrideLength * height);
  20131. var decode = dict.get('Decode', 'D');
  20132. var inverseDecode = (!!decode && decode[0] > 0);
  20133. imgData = PDFImage.createMask(imgArray, width, height,
  20134. image instanceof DecodeStream,
  20135. inverseDecode);
  20136. imgData.cached = true;
  20137. args = [imgData];
  20138. operatorList.addOp(OPS.paintImageMaskXObject, args);
  20139. if (cacheKey) {
  20140. cache.key = cacheKey;
  20141. cache.fn = OPS.paintImageMaskXObject;
  20142. cache.args = args;
  20143. }
  20144. return;
  20145. }
  20146. var softMask = (dict.get('SMask', 'SM') || false);
  20147. var mask = (dict.get('Mask') || false);
  20148. var SMALL_IMAGE_DIMENSIONS = 200;
  20149. // Inlining small images into the queue as RGB data
  20150. if (inline && !softMask && !mask && !(image instanceof JpegStream) &&
  20151. (w + h) < SMALL_IMAGE_DIMENSIONS) {
  20152. var imageObj = new PDFImage(this.xref, resources, image,
  20153. inline, null, null);
  20154. // We force the use of RGBA_32BPP images here, because we can't handle
  20155. // any other kind.
  20156. imgData = imageObj.createImageData(/* forceRGBA = */ true);
  20157. operatorList.addOp(OPS.paintInlineImageXObject, [imgData]);
  20158. return;
  20159. }
  20160. // If there is no imageMask, create the PDFImage and a lot
  20161. // of image processing can be done here.
  20162. var uniquePrefix = (this.uniquePrefix || '');
  20163. var objId = 'img_' + uniquePrefix + (++this.idCounters.obj);
  20164. operatorList.addDependency(objId);
  20165. args = [objId, w, h];
  20166. if (!softMask && !mask && image instanceof JpegStream &&
  20167. image.isNativelySupported(this.xref, resources)) {
  20168. // These JPEGs don't need any more processing so we can just send it.
  20169. operatorList.addOp(OPS.paintJpegXObject, args);
  20170. this.handler.send('obj',
  20171. [objId, this.pageIndex, 'JpegStream', image.getIR()]);
  20172. return;
  20173. }
  20174. PDFImage.buildImage(self.handler, self.xref, resources, image, inline).
  20175. then(function(imageObj) {
  20176. var imgData = imageObj.createImageData(/* forceRGBA = */ false);
  20177. self.handler.send('obj', [objId, self.pageIndex, 'Image', imgData],
  20178. [imgData.data.buffer]);
  20179. }).then(null, function (reason) {
  20180. warn('Unable to decode image: ' + reason);
  20181. self.handler.send('obj', [objId, self.pageIndex, 'Image', null]);
  20182. });
  20183. operatorList.addOp(OPS.paintImageXObject, args);
  20184. if (cacheKey) {
  20185. cache.key = cacheKey;
  20186. cache.fn = OPS.paintImageXObject;
  20187. cache.args = args;
  20188. }
  20189. },
  20190. handleSMask: function PartialEvaluator_handleSmask(smask, resources,
  20191. operatorList,
  20192. stateManager) {
  20193. var smaskContent = smask.get('G');
  20194. var smaskOptions = {
  20195. subtype: smask.get('S').name,
  20196. backdrop: smask.get('BC')
  20197. };
  20198. return this.buildFormXObject(resources, smaskContent, smaskOptions,
  20199. operatorList, stateManager.state.clone());
  20200. },
  20201. handleTilingType:
  20202. function PartialEvaluator_handleTilingType(fn, args, resources,
  20203. pattern, patternDict,
  20204. operatorList) {
  20205. // Create an IR of the pattern code.
  20206. var tilingOpList = new OperatorList();
  20207. return this.getOperatorList(pattern,
  20208. (patternDict.get('Resources') || resources), tilingOpList).
  20209. then(function () {
  20210. // Add the dependencies to the parent operator list so they are
  20211. // resolved before sub operator list is executed synchronously.
  20212. operatorList.addDependencies(tilingOpList.dependencies);
  20213. operatorList.addOp(fn, getTilingPatternIR({
  20214. fnArray: tilingOpList.fnArray,
  20215. argsArray: tilingOpList.argsArray
  20216. }, patternDict, args));
  20217. });
  20218. },
  20219. handleSetFont:
  20220. function PartialEvaluator_handleSetFont(resources, fontArgs, fontRef,
  20221. operatorList, state) {
  20222. // TODO(mack): Not needed?
  20223. var fontName;
  20224. if (fontArgs) {
  20225. fontArgs = fontArgs.slice();
  20226. fontName = fontArgs[0].name;
  20227. }
  20228. var self = this;
  20229. return this.loadFont(fontName, fontRef, this.xref, resources).then(
  20230. function (translated) {
  20231. if (!translated.font.isType3Font) {
  20232. return translated;
  20233. }
  20234. return translated.loadType3Data(self, resources, operatorList).then(
  20235. function () {
  20236. return translated;
  20237. });
  20238. }).then(function (translated) {
  20239. state.font = translated.font;
  20240. translated.send(self.handler);
  20241. return translated.loadedName;
  20242. });
  20243. },
  20244. handleText: function PartialEvaluator_handleText(chars, state) {
  20245. var font = state.font;
  20246. var glyphs = font.charsToGlyphs(chars);
  20247. var isAddToPathSet = !!(state.textRenderingMode &
  20248. TextRenderingMode.ADD_TO_PATH_FLAG);
  20249. if (font.data && (isAddToPathSet || PDFJS.disableFontFace)) {
  20250. var buildPath = function (fontChar) {
  20251. if (!font.renderer.hasBuiltPath(fontChar)) {
  20252. var path = font.renderer.getPathJs(fontChar);
  20253. this.handler.send('commonobj', [
  20254. font.loadedName + '_path_' + fontChar,
  20255. 'FontPath',
  20256. path
  20257. ]);
  20258. }
  20259. }.bind(this);
  20260. for (var i = 0, ii = glyphs.length; i < ii; i++) {
  20261. var glyph = glyphs[i];
  20262. if (glyph === null) {
  20263. continue;
  20264. }
  20265. buildPath(glyph.fontChar);
  20266. // If the glyph has an accent we need to build a path for its
  20267. // fontChar too, otherwise CanvasGraphics_paintChar will fail.
  20268. var accent = glyph.accent;
  20269. if (accent && accent.fontChar) {
  20270. buildPath(accent.fontChar);
  20271. }
  20272. }
  20273. }
  20274. return glyphs;
  20275. },
  20276. setGState: function PartialEvaluator_setGState(resources, gState,
  20277. operatorList, xref,
  20278. stateManager) {
  20279. // TODO(mack): This should be rewritten so that this function returns
  20280. // what should be added to the queue during each iteration
  20281. function setGStateForKey(gStateObj, key, value) {
  20282. switch (key) {
  20283. case 'Type':
  20284. break;
  20285. case 'LW':
  20286. case 'LC':
  20287. case 'LJ':
  20288. case 'ML':
  20289. case 'D':
  20290. case 'RI':
  20291. case 'FL':
  20292. case 'CA':
  20293. case 'ca':
  20294. gStateObj.push([key, value]);
  20295. break;
  20296. case 'Font':
  20297. promise = promise.then(function () {
  20298. return self.handleSetFont(resources, null, value[0],
  20299. operatorList, stateManager.state).
  20300. then(function (loadedName) {
  20301. operatorList.addDependency(loadedName);
  20302. gStateObj.push([key, [loadedName, value[1]]]);
  20303. });
  20304. });
  20305. break;
  20306. case 'BM':
  20307. gStateObj.push([key, value]);
  20308. break;
  20309. case 'SMask':
  20310. if (isName(value) && value.name === 'None') {
  20311. gStateObj.push([key, false]);
  20312. break;
  20313. }
  20314. var dict = xref.fetchIfRef(value);
  20315. if (isDict(dict)) {
  20316. promise = promise.then(function () {
  20317. return self.handleSMask(dict, resources, operatorList,
  20318. stateManager);
  20319. });
  20320. gStateObj.push([key, true]);
  20321. } else {
  20322. warn('Unsupported SMask type');
  20323. }
  20324. break;
  20325. // Only generate info log messages for the following since
  20326. // they are unlikey to have a big impact on the rendering.
  20327. case 'OP':
  20328. case 'op':
  20329. case 'OPM':
  20330. case 'BG':
  20331. case 'BG2':
  20332. case 'UCR':
  20333. case 'UCR2':
  20334. case 'TR':
  20335. case 'TR2':
  20336. case 'HT':
  20337. case 'SM':
  20338. case 'SA':
  20339. case 'AIS':
  20340. case 'TK':
  20341. // TODO implement these operators.
  20342. info('graphic state operator ' + key);
  20343. break;
  20344. default:
  20345. info('Unknown graphic state operator ' + key);
  20346. break;
  20347. }
  20348. }
  20349. // This array holds the converted/processed state data.
  20350. var gStateObj = [];
  20351. var gStateMap = gState.map;
  20352. var self = this;
  20353. var promise = Promise.resolve();
  20354. for (var key in gStateMap) {
  20355. var value = gStateMap[key];
  20356. setGStateForKey(gStateObj, key, value);
  20357. }
  20358. return promise.then(function () {
  20359. operatorList.addOp(OPS.setGState, [gStateObj]);
  20360. });
  20361. },
  20362. loadFont: function PartialEvaluator_loadFont(fontName, font, xref,
  20363. resources) {
  20364. function errorFont() {
  20365. return Promise.resolve(new TranslatedFont('g_font_error',
  20366. new ErrorFont('Font ' + fontName + ' is not available'), font));
  20367. }
  20368. var fontRef;
  20369. if (font) { // Loading by ref.
  20370. assert(isRef(font));
  20371. fontRef = font;
  20372. } else { // Loading by name.
  20373. var fontRes = resources.get('Font');
  20374. if (fontRes) {
  20375. fontRef = fontRes.getRaw(fontName);
  20376. } else {
  20377. warn('fontRes not available');
  20378. return errorFont();
  20379. }
  20380. }
  20381. if (!fontRef) {
  20382. warn('fontRef not available');
  20383. return errorFont();
  20384. }
  20385. if (this.fontCache.has(fontRef)) {
  20386. return this.fontCache.get(fontRef);
  20387. }
  20388. font = xref.fetchIfRef(fontRef);
  20389. if (!isDict(font)) {
  20390. return errorFont();
  20391. }
  20392. // We are holding font.translated references just for fontRef that are not
  20393. // dictionaries (Dict). See explanation below.
  20394. if (font.translated) {
  20395. return font.translated;
  20396. }
  20397. var fontCapability = createPromiseCapability();
  20398. var preEvaluatedFont = this.preEvaluateFont(font, xref);
  20399. var descriptor = preEvaluatedFont.descriptor;
  20400. var fontID = fontRef.num + '_' + fontRef.gen;
  20401. if (isDict(descriptor)) {
  20402. if (!descriptor.fontAliases) {
  20403. descriptor.fontAliases = Object.create(null);
  20404. }
  20405. var fontAliases = descriptor.fontAliases;
  20406. var hash = preEvaluatedFont.hash;
  20407. if (fontAliases[hash]) {
  20408. var aliasFontRef = fontAliases[hash].aliasRef;
  20409. if (aliasFontRef && this.fontCache.has(aliasFontRef)) {
  20410. this.fontCache.putAlias(fontRef, aliasFontRef);
  20411. return this.fontCache.get(fontRef);
  20412. }
  20413. }
  20414. if (!fontAliases[hash]) {
  20415. fontAliases[hash] = {
  20416. fontID: Font.getFontID()
  20417. };
  20418. }
  20419. fontAliases[hash].aliasRef = fontRef;
  20420. fontID = fontAliases[hash].fontID;
  20421. }
  20422. // Workaround for bad PDF generators that don't reference fonts
  20423. // properly, i.e. by not using an object identifier.
  20424. // Check if the fontRef is a Dict (as opposed to a standard object),
  20425. // in which case we don't cache the font and instead reference it by
  20426. // fontName in font.loadedName below.
  20427. var fontRefIsDict = isDict(fontRef);
  20428. if (!fontRefIsDict) {
  20429. this.fontCache.put(fontRef, fontCapability.promise);
  20430. }
  20431. // Keep track of each font we translated so the caller can
  20432. // load them asynchronously before calling display on a page.
  20433. font.loadedName = 'g_font_' + (fontRefIsDict ?
  20434. fontName.replace(/\W/g, '') : fontID);
  20435. font.translated = fontCapability.promise;
  20436. // TODO move promises into translate font
  20437. var translatedPromise;
  20438. try {
  20439. translatedPromise = Promise.resolve(
  20440. this.translateFont(preEvaluatedFont, xref));
  20441. } catch (e) {
  20442. translatedPromise = Promise.reject(e);
  20443. }
  20444. translatedPromise.then(function (translatedFont) {
  20445. if (translatedFont.fontType !== undefined) {
  20446. var xrefFontStats = xref.stats.fontTypes;
  20447. xrefFontStats[translatedFont.fontType] = true;
  20448. }
  20449. fontCapability.resolve(new TranslatedFont(font.loadedName,
  20450. translatedFont, font));
  20451. }, function (reason) {
  20452. // TODO fontCapability.reject?
  20453. UnsupportedManager.notify(UNSUPPORTED_FEATURES.font);
  20454. try {
  20455. // error, but it's still nice to have font type reported
  20456. var descriptor = preEvaluatedFont.descriptor;
  20457. var fontFile3 = descriptor && descriptor.get('FontFile3');
  20458. var subtype = fontFile3 && fontFile3.get('Subtype');
  20459. var fontType = getFontType(preEvaluatedFont.type,
  20460. subtype && subtype.name);
  20461. var xrefFontStats = xref.stats.fontTypes;
  20462. xrefFontStats[fontType] = true;
  20463. } catch (ex) { }
  20464. fontCapability.resolve(new TranslatedFont(font.loadedName,
  20465. new ErrorFont(reason instanceof Error ? reason.message : reason),
  20466. font));
  20467. });
  20468. return fontCapability.promise;
  20469. },
  20470. buildPath: function PartialEvaluator_buildPath(operatorList, fn, args) {
  20471. var lastIndex = operatorList.length - 1;
  20472. if (lastIndex < 0 ||
  20473. operatorList.fnArray[lastIndex] !== OPS.constructPath) {
  20474. operatorList.addOp(OPS.constructPath, [[fn], args]);
  20475. } else {
  20476. var opArgs = operatorList.argsArray[lastIndex];
  20477. opArgs[0].push(fn);
  20478. Array.prototype.push.apply(opArgs[1], args);
  20479. }
  20480. },
  20481. handleColorN: function PartialEvaluator_handleColorN(operatorList, fn, args,
  20482. cs, patterns, resources, xref) {
  20483. // compile tiling patterns
  20484. var patternName = args[args.length - 1];
  20485. // SCN/scn applies patterns along with normal colors
  20486. var pattern;
  20487. if (isName(patternName) &&
  20488. (pattern = patterns.get(patternName.name))) {
  20489. var dict = (isStream(pattern) ? pattern.dict : pattern);
  20490. var typeNum = dict.get('PatternType');
  20491. if (typeNum === TILING_PATTERN) {
  20492. var color = cs.base ? cs.base.getRgb(args, 0) : null;
  20493. return this.handleTilingType(fn, color, resources, pattern,
  20494. dict, operatorList);
  20495. } else if (typeNum === SHADING_PATTERN) {
  20496. var shading = dict.get('Shading');
  20497. var matrix = dict.get('Matrix');
  20498. pattern = Pattern.parseShading(shading, matrix, xref, resources);
  20499. operatorList.addOp(fn, pattern.getIR());
  20500. return Promise.resolve();
  20501. } else {
  20502. return Promise.reject('Unknown PatternType: ' + typeNum);
  20503. }
  20504. }
  20505. // TODO shall we fail here?
  20506. operatorList.addOp(fn, args);
  20507. return Promise.resolve();
  20508. },
  20509. getOperatorList: function PartialEvaluator_getOperatorList(stream,
  20510. resources,
  20511. operatorList,
  20512. initialState) {
  20513. var self = this;
  20514. var xref = this.xref;
  20515. var imageCache = {};
  20516. assert(operatorList);
  20517. resources = (resources || Dict.empty);
  20518. var xobjs = (resources.get('XObject') || Dict.empty);
  20519. var patterns = (resources.get('Pattern') || Dict.empty);
  20520. var stateManager = new StateManager(initialState || new EvalState());
  20521. var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager);
  20522. var timeSlotManager = new TimeSlotManager();
  20523. return new Promise(function next(resolve, reject) {
  20524. timeSlotManager.reset();
  20525. var stop, operation = {}, i, ii, cs;
  20526. while (!(stop = timeSlotManager.check()) &&
  20527. preprocessor.read(operation)) {
  20528. var args = operation.args;
  20529. var fn = operation.fn;
  20530. switch (fn | 0) {
  20531. case OPS.paintXObject:
  20532. if (args[0].code) {
  20533. break;
  20534. }
  20535. // eagerly compile XForm objects
  20536. var name = args[0].name;
  20537. if (imageCache.key === name) {
  20538. operatorList.addOp(imageCache.fn, imageCache.args);
  20539. args = null;
  20540. continue;
  20541. }
  20542. var xobj = xobjs.get(name);
  20543. if (xobj) {
  20544. assert(isStream(xobj), 'XObject should be a stream');
  20545. var type = xobj.dict.get('Subtype');
  20546. assert(isName(type),
  20547. 'XObject should have a Name subtype');
  20548. if (type.name === 'Form') {
  20549. stateManager.save();
  20550. return self.buildFormXObject(resources, xobj, null,
  20551. operatorList,
  20552. stateManager.state.clone()).
  20553. then(function () {
  20554. stateManager.restore();
  20555. next(resolve, reject);
  20556. }, reject);
  20557. } else if (type.name === 'Image') {
  20558. self.buildPaintImageXObject(resources, xobj, false,
  20559. operatorList, name, imageCache);
  20560. args = null;
  20561. continue;
  20562. } else if (type.name === 'PS') {
  20563. // PostScript XObjects are unused when viewing documents.
  20564. // See section 4.7.1 of Adobe's PDF reference.
  20565. info('Ignored XObject subtype PS');
  20566. continue;
  20567. } else {
  20568. error('Unhandled XObject subtype ' + type.name);
  20569. }
  20570. }
  20571. break;
  20572. case OPS.setFont:
  20573. var fontSize = args[1];
  20574. // eagerly collect all fonts
  20575. return self.handleSetFont(resources, args, null,
  20576. operatorList, stateManager.state).
  20577. then(function (loadedName) {
  20578. operatorList.addDependency(loadedName);
  20579. operatorList.addOp(OPS.setFont, [loadedName, fontSize]);
  20580. next(resolve, reject);
  20581. }, reject);
  20582. case OPS.endInlineImage:
  20583. var cacheKey = args[0].cacheKey;
  20584. if (cacheKey && imageCache.key === cacheKey) {
  20585. operatorList.addOp(imageCache.fn, imageCache.args);
  20586. args = null;
  20587. continue;
  20588. }
  20589. self.buildPaintImageXObject(resources, args[0], true,
  20590. operatorList, cacheKey, imageCache);
  20591. args = null;
  20592. continue;
  20593. case OPS.showText:
  20594. args[0] = self.handleText(args[0], stateManager.state);
  20595. break;
  20596. case OPS.showSpacedText:
  20597. var arr = args[0];
  20598. var combinedGlyphs = [];
  20599. var arrLength = arr.length;
  20600. for (i = 0; i < arrLength; ++i) {
  20601. var arrItem = arr[i];
  20602. if (isString(arrItem)) {
  20603. Array.prototype.push.apply(combinedGlyphs,
  20604. self.handleText(arrItem, stateManager.state));
  20605. } else if (isNum(arrItem)) {
  20606. combinedGlyphs.push(arrItem);
  20607. }
  20608. }
  20609. args[0] = combinedGlyphs;
  20610. fn = OPS.showText;
  20611. break;
  20612. case OPS.nextLineShowText:
  20613. operatorList.addOp(OPS.nextLine);
  20614. args[0] = self.handleText(args[0], stateManager.state);
  20615. fn = OPS.showText;
  20616. break;
  20617. case OPS.nextLineSetSpacingShowText:
  20618. operatorList.addOp(OPS.nextLine);
  20619. operatorList.addOp(OPS.setWordSpacing, [args.shift()]);
  20620. operatorList.addOp(OPS.setCharSpacing, [args.shift()]);
  20621. args[0] = self.handleText(args[0], stateManager.state);
  20622. fn = OPS.showText;
  20623. break;
  20624. case OPS.setTextRenderingMode:
  20625. stateManager.state.textRenderingMode = args[0];
  20626. break;
  20627. case OPS.setFillColorSpace:
  20628. stateManager.state.fillColorSpace =
  20629. ColorSpace.parse(args[0], xref, resources);
  20630. continue;
  20631. case OPS.setStrokeColorSpace:
  20632. stateManager.state.strokeColorSpace =
  20633. ColorSpace.parse(args[0], xref, resources);
  20634. continue;
  20635. case OPS.setFillColor:
  20636. cs = stateManager.state.fillColorSpace;
  20637. args = cs.getRgb(args, 0);
  20638. fn = OPS.setFillRGBColor;
  20639. break;
  20640. case OPS.setStrokeColor:
  20641. cs = stateManager.state.strokeColorSpace;
  20642. args = cs.getRgb(args, 0);
  20643. fn = OPS.setStrokeRGBColor;
  20644. break;
  20645. case OPS.setFillGray:
  20646. stateManager.state.fillColorSpace = ColorSpace.singletons.gray;
  20647. args = ColorSpace.singletons.gray.getRgb(args, 0);
  20648. fn = OPS.setFillRGBColor;
  20649. break;
  20650. case OPS.setStrokeGray:
  20651. stateManager.state.strokeColorSpace = ColorSpace.singletons.gray;
  20652. args = ColorSpace.singletons.gray.getRgb(args, 0);
  20653. fn = OPS.setStrokeRGBColor;
  20654. break;
  20655. case OPS.setFillCMYKColor:
  20656. stateManager.state.fillColorSpace = ColorSpace.singletons.cmyk;
  20657. args = ColorSpace.singletons.cmyk.getRgb(args, 0);
  20658. fn = OPS.setFillRGBColor;
  20659. break;
  20660. case OPS.setStrokeCMYKColor:
  20661. stateManager.state.strokeColorSpace = ColorSpace.singletons.cmyk;
  20662. args = ColorSpace.singletons.cmyk.getRgb(args, 0);
  20663. fn = OPS.setStrokeRGBColor;
  20664. break;
  20665. case OPS.setFillRGBColor:
  20666. stateManager.state.fillColorSpace = ColorSpace.singletons.rgb;
  20667. args = ColorSpace.singletons.rgb.getRgb(args, 0);
  20668. break;
  20669. case OPS.setStrokeRGBColor:
  20670. stateManager.state.strokeColorSpace = ColorSpace.singletons.rgb;
  20671. args = ColorSpace.singletons.rgb.getRgb(args, 0);
  20672. break;
  20673. case OPS.setFillColorN:
  20674. cs = stateManager.state.fillColorSpace;
  20675. if (cs.name === 'Pattern') {
  20676. return self.handleColorN(operatorList, OPS.setFillColorN,
  20677. args, cs, patterns, resources, xref).then(function() {
  20678. next(resolve, reject);
  20679. }, reject);
  20680. }
  20681. args = cs.getRgb(args, 0);
  20682. fn = OPS.setFillRGBColor;
  20683. break;
  20684. case OPS.setStrokeColorN:
  20685. cs = stateManager.state.strokeColorSpace;
  20686. if (cs.name === 'Pattern') {
  20687. return self.handleColorN(operatorList, OPS.setStrokeColorN,
  20688. args, cs, patterns, resources, xref).then(function() {
  20689. next(resolve, reject);
  20690. }, reject);
  20691. }
  20692. args = cs.getRgb(args, 0);
  20693. fn = OPS.setStrokeRGBColor;
  20694. break;
  20695. case OPS.shadingFill:
  20696. var shadingRes = resources.get('Shading');
  20697. if (!shadingRes) {
  20698. error('No shading resource found');
  20699. }
  20700. var shading = shadingRes.get(args[0].name);
  20701. if (!shading) {
  20702. error('No shading object found');
  20703. }
  20704. var shadingFill = Pattern.parseShading(shading, null, xref,
  20705. resources);
  20706. var patternIR = shadingFill.getIR();
  20707. args = [patternIR];
  20708. fn = OPS.shadingFill;
  20709. break;
  20710. case OPS.setGState:
  20711. var dictName = args[0];
  20712. var extGState = resources.get('ExtGState');
  20713. if (!isDict(extGState) || !extGState.has(dictName.name)) {
  20714. break;
  20715. }
  20716. var gState = extGState.get(dictName.name);
  20717. return self.setGState(resources, gState, operatorList, xref,
  20718. stateManager).then(function() {
  20719. next(resolve, reject);
  20720. }, reject);
  20721. case OPS.moveTo:
  20722. case OPS.lineTo:
  20723. case OPS.curveTo:
  20724. case OPS.curveTo2:
  20725. case OPS.curveTo3:
  20726. case OPS.closePath:
  20727. self.buildPath(operatorList, fn, args);
  20728. continue;
  20729. case OPS.rectangle:
  20730. self.buildPath(operatorList, fn, args);
  20731. continue;
  20732. }
  20733. operatorList.addOp(fn, args);
  20734. }
  20735. if (stop) {
  20736. deferred.then(function () {
  20737. next(resolve, reject);
  20738. });
  20739. return;
  20740. }
  20741. // Some PDFs don't close all restores inside object/form.
  20742. // Closing those for them.
  20743. for (i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) {
  20744. operatorList.addOp(OPS.restore, []);
  20745. }
  20746. resolve();
  20747. });
  20748. },
  20749. getTextContent: function PartialEvaluator_getTextContent(stream, resources,
  20750. stateManager) {
  20751. stateManager = (stateManager || new StateManager(new TextState()));
  20752. var textContent = {
  20753. items: [],
  20754. styles: Object.create(null)
  20755. };
  20756. var bidiTexts = textContent.items;
  20757. var SPACE_FACTOR = 0.35;
  20758. var MULTI_SPACE_FACTOR = 1.5;
  20759. var self = this;
  20760. var xref = this.xref;
  20761. resources = (xref.fetchIfRef(resources) || Dict.empty);
  20762. // The xobj is parsed iff it's needed, e.g. if there is a `DO` cmd.
  20763. var xobjs = null;
  20764. var xobjsCache = {};
  20765. var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager);
  20766. var textState;
  20767. function newTextChunk() {
  20768. var font = textState.font;
  20769. if (!(font.loadedName in textContent.styles)) {
  20770. textContent.styles[font.loadedName] = {
  20771. fontFamily: font.fallbackName,
  20772. ascent: font.ascent,
  20773. descent: font.descent,
  20774. vertical: font.vertical
  20775. };
  20776. }
  20777. return {
  20778. // |str| is initially an array which we push individual chars to, and
  20779. // then runBidi() overwrites it with the final string.
  20780. str: [],
  20781. dir: null,
  20782. width: 0,
  20783. height: 0,
  20784. transform: null,
  20785. fontName: font.loadedName
  20786. };
  20787. }
  20788. function runBidi(textChunk) {
  20789. var str = textChunk.str.join('');
  20790. var bidiResult = PDFJS.bidi(str, -1, textState.font.vertical);
  20791. textChunk.str = bidiResult.str;
  20792. textChunk.dir = bidiResult.dir;
  20793. return textChunk;
  20794. }
  20795. function handleSetFont(fontName, fontRef) {
  20796. return self.loadFont(fontName, fontRef, xref, resources).
  20797. then(function (translated) {
  20798. textState.font = translated.font;
  20799. textState.fontMatrix = translated.font.fontMatrix ||
  20800. FONT_IDENTITY_MATRIX;
  20801. });
  20802. }
  20803. function buildTextGeometry(chars, textChunk) {
  20804. var font = textState.font;
  20805. textChunk = textChunk || newTextChunk();
  20806. if (!textChunk.transform) {
  20807. // 9.4.4 Text Space Details
  20808. var tsm = [textState.fontSize * textState.textHScale, 0,
  20809. 0, textState.fontSize,
  20810. 0, textState.textRise];
  20811. var trm = textChunk.transform = Util.transform(textState.ctm,
  20812. Util.transform(textState.textMatrix, tsm));
  20813. if (!font.vertical) {
  20814. textChunk.height = Math.sqrt(trm[2] * trm[2] + trm[3] * trm[3]);
  20815. } else {
  20816. textChunk.width = Math.sqrt(trm[0] * trm[0] + trm[1] * trm[1]);
  20817. }
  20818. }
  20819. var width = 0;
  20820. var height = 0;
  20821. var glyphs = font.charsToGlyphs(chars);
  20822. var defaultVMetrics = font.defaultVMetrics;
  20823. for (var i = 0; i < glyphs.length; i++) {
  20824. var glyph = glyphs[i];
  20825. if (!glyph) { // Previous glyph was a space.
  20826. width += textState.wordSpacing * textState.textHScale;
  20827. continue;
  20828. }
  20829. var vMetricX = null;
  20830. var vMetricY = null;
  20831. var glyphWidth = null;
  20832. if (font.vertical) {
  20833. if (glyph.vmetric) {
  20834. glyphWidth = glyph.vmetric[0];
  20835. vMetricX = glyph.vmetric[1];
  20836. vMetricY = glyph.vmetric[2];
  20837. } else {
  20838. glyphWidth = glyph.width;
  20839. vMetricX = glyph.width * 0.5;
  20840. vMetricY = defaultVMetrics[2];
  20841. }
  20842. } else {
  20843. glyphWidth = glyph.width;
  20844. }
  20845. var glyphUnicode = glyph.unicode;
  20846. if (NormalizedUnicodes[glyphUnicode] !== undefined) {
  20847. glyphUnicode = NormalizedUnicodes[glyphUnicode];
  20848. }
  20849. glyphUnicode = reverseIfRtl(glyphUnicode);
  20850. // The following will calculate the x and y of the individual glyphs.
  20851. // if (font.vertical) {
  20852. // tsm[4] -= vMetricX * Math.abs(textState.fontSize) *
  20853. // textState.fontMatrix[0];
  20854. // tsm[5] -= vMetricY * textState.fontSize *
  20855. // textState.fontMatrix[0];
  20856. // }
  20857. // var trm = Util.transform(textState.textMatrix, tsm);
  20858. // var pt = Util.applyTransform([trm[4], trm[5]], textState.ctm);
  20859. // var x = pt[0];
  20860. // var y = pt[1];
  20861. var tx = 0;
  20862. var ty = 0;
  20863. if (!font.vertical) {
  20864. var w0 = glyphWidth * textState.fontMatrix[0];
  20865. tx = (w0 * textState.fontSize + textState.charSpacing) *
  20866. textState.textHScale;
  20867. width += tx;
  20868. } else {
  20869. var w1 = glyphWidth * textState.fontMatrix[0];
  20870. ty = w1 * textState.fontSize + textState.charSpacing;
  20871. height += ty;
  20872. }
  20873. textState.translateTextMatrix(tx, ty);
  20874. textChunk.str.push(glyphUnicode);
  20875. }
  20876. var a = textState.textLineMatrix[0];
  20877. var b = textState.textLineMatrix[1];
  20878. var scaleLineX = Math.sqrt(a * a + b * b);
  20879. a = textState.ctm[0];
  20880. b = textState.ctm[1];
  20881. var scaleCtmX = Math.sqrt(a * a + b * b);
  20882. if (!font.vertical) {
  20883. textChunk.width += width * scaleCtmX * scaleLineX;
  20884. } else {
  20885. textChunk.height += Math.abs(height * scaleCtmX * scaleLineX);
  20886. }
  20887. return textChunk;
  20888. }
  20889. var timeSlotManager = new TimeSlotManager();
  20890. return new Promise(function next(resolve, reject) {
  20891. timeSlotManager.reset();
  20892. var stop, operation = {};
  20893. while (!(stop = timeSlotManager.check()) &&
  20894. (preprocessor.read(operation))) {
  20895. textState = stateManager.state;
  20896. var fn = operation.fn;
  20897. var args = operation.args;
  20898. switch (fn | 0) {
  20899. case OPS.setFont:
  20900. textState.fontSize = args[1];
  20901. return handleSetFont(args[0].name).then(function() {
  20902. next(resolve, reject);
  20903. }, reject);
  20904. case OPS.setTextRise:
  20905. textState.textRise = args[0];
  20906. break;
  20907. case OPS.setHScale:
  20908. textState.textHScale = args[0] / 100;
  20909. break;
  20910. case OPS.setLeading:
  20911. textState.leading = args[0];
  20912. break;
  20913. case OPS.moveText:
  20914. textState.translateTextLineMatrix(args[0], args[1]);
  20915. textState.textMatrix = textState.textLineMatrix.slice();
  20916. break;
  20917. case OPS.setLeadingMoveText:
  20918. textState.leading = -args[1];
  20919. textState.translateTextLineMatrix(args[0], args[1]);
  20920. textState.textMatrix = textState.textLineMatrix.slice();
  20921. break;
  20922. case OPS.nextLine:
  20923. textState.carriageReturn();
  20924. break;
  20925. case OPS.setTextMatrix:
  20926. textState.setTextMatrix(args[0], args[1], args[2], args[3],
  20927. args[4], args[5]);
  20928. textState.setTextLineMatrix(args[0], args[1], args[2], args[3],
  20929. args[4], args[5]);
  20930. break;
  20931. case OPS.setCharSpacing:
  20932. textState.charSpacing = args[0];
  20933. break;
  20934. case OPS.setWordSpacing:
  20935. textState.wordSpacing = args[0];
  20936. break;
  20937. case OPS.beginText:
  20938. textState.textMatrix = IDENTITY_MATRIX.slice();
  20939. textState.textLineMatrix = IDENTITY_MATRIX.slice();
  20940. break;
  20941. case OPS.showSpacedText:
  20942. var items = args[0];
  20943. var textChunk = newTextChunk();
  20944. var offset;
  20945. for (var j = 0, jj = items.length; j < jj; j++) {
  20946. if (typeof items[j] === 'string') {
  20947. buildTextGeometry(items[j], textChunk);
  20948. } else {
  20949. var val = items[j] / 1000;
  20950. if (!textState.font.vertical) {
  20951. offset = -val * textState.fontSize * textState.textHScale *
  20952. textState.textMatrix[0];
  20953. textState.translateTextMatrix(offset, 0);
  20954. textChunk.width += offset;
  20955. } else {
  20956. offset = -val * textState.fontSize *
  20957. textState.textMatrix[3];
  20958. textState.translateTextMatrix(0, offset);
  20959. textChunk.height += offset;
  20960. }
  20961. if (items[j] < 0 && textState.font.spaceWidth > 0) {
  20962. var fakeSpaces = -items[j] / textState.font.spaceWidth;
  20963. if (fakeSpaces > MULTI_SPACE_FACTOR) {
  20964. fakeSpaces = Math.round(fakeSpaces);
  20965. while (fakeSpaces--) {
  20966. textChunk.str.push(' ');
  20967. }
  20968. } else if (fakeSpaces > SPACE_FACTOR) {
  20969. textChunk.str.push(' ');
  20970. }
  20971. }
  20972. }
  20973. }
  20974. bidiTexts.push(runBidi(textChunk));
  20975. break;
  20976. case OPS.showText:
  20977. bidiTexts.push(runBidi(buildTextGeometry(args[0])));
  20978. break;
  20979. case OPS.nextLineShowText:
  20980. textState.carriageReturn();
  20981. bidiTexts.push(runBidi(buildTextGeometry(args[0])));
  20982. break;
  20983. case OPS.nextLineSetSpacingShowText:
  20984. textState.wordSpacing = args[0];
  20985. textState.charSpacing = args[1];
  20986. textState.carriageReturn();
  20987. bidiTexts.push(runBidi(buildTextGeometry(args[2])));
  20988. break;
  20989. case OPS.paintXObject:
  20990. if (args[0].code) {
  20991. break;
  20992. }
  20993. if (!xobjs) {
  20994. xobjs = (resources.get('XObject') || Dict.empty);
  20995. }
  20996. var name = args[0].name;
  20997. if (xobjsCache.key === name) {
  20998. if (xobjsCache.texts) {
  20999. Util.appendToArray(bidiTexts, xobjsCache.texts.items);
  21000. Util.extendObj(textContent.styles, xobjsCache.texts.styles);
  21001. }
  21002. break;
  21003. }
  21004. var xobj = xobjs.get(name);
  21005. if (!xobj) {
  21006. break;
  21007. }
  21008. assert(isStream(xobj), 'XObject should be a stream');
  21009. var type = xobj.dict.get('Subtype');
  21010. assert(isName(type),
  21011. 'XObject should have a Name subtype');
  21012. if ('Form' !== type.name) {
  21013. xobjsCache.key = name;
  21014. xobjsCache.texts = null;
  21015. break;
  21016. }
  21017. stateManager.save();
  21018. var matrix = xobj.dict.get('Matrix');
  21019. if (isArray(matrix) && matrix.length === 6) {
  21020. stateManager.transform(matrix);
  21021. }
  21022. return self.getTextContent(xobj,
  21023. xobj.dict.get('Resources') || resources, stateManager).
  21024. then(function (formTextContent) {
  21025. Util.appendToArray(bidiTexts, formTextContent.items);
  21026. Util.extendObj(textContent.styles, formTextContent.styles);
  21027. stateManager.restore();
  21028. xobjsCache.key = name;
  21029. xobjsCache.texts = formTextContent;
  21030. next(resolve, reject);
  21031. }, reject);
  21032. case OPS.setGState:
  21033. var dictName = args[0];
  21034. var extGState = resources.get('ExtGState');
  21035. if (!isDict(extGState) || !extGState.has(dictName.name)) {
  21036. break;
  21037. }
  21038. var gsStateMap = extGState.get(dictName.name);
  21039. var gsStateFont = null;
  21040. for (var key in gsStateMap) {
  21041. if (key === 'Font') {
  21042. assert(!gsStateFont);
  21043. gsStateFont = gsStateMap[key];
  21044. }
  21045. }
  21046. if (gsStateFont) {
  21047. textState.fontSize = gsStateFont[1];
  21048. return handleSetFont(gsStateFont[0]).then(function() {
  21049. next(resolve, reject);
  21050. }, reject);
  21051. }
  21052. break;
  21053. } // switch
  21054. } // while
  21055. if (stop) {
  21056. deferred.then(function () {
  21057. next(resolve, reject);
  21058. });
  21059. return;
  21060. }
  21061. resolve(textContent);
  21062. });
  21063. },
  21064. extractDataStructures: function
  21065. partialEvaluatorExtractDataStructures(dict, baseDict,
  21066. xref, properties) {
  21067. // 9.10.2
  21068. var toUnicode = (dict.get('ToUnicode') || baseDict.get('ToUnicode'));
  21069. if (toUnicode) {
  21070. properties.toUnicode = this.readToUnicode(toUnicode, xref, properties);
  21071. }
  21072. if (properties.composite) {
  21073. // CIDSystemInfo helps to match CID to glyphs
  21074. var cidSystemInfo = dict.get('CIDSystemInfo');
  21075. if (isDict(cidSystemInfo)) {
  21076. properties.cidSystemInfo = {
  21077. registry: cidSystemInfo.get('Registry'),
  21078. ordering: cidSystemInfo.get('Ordering'),
  21079. supplement: cidSystemInfo.get('Supplement')
  21080. };
  21081. }
  21082. var cidToGidMap = dict.get('CIDToGIDMap');
  21083. if (isStream(cidToGidMap)) {
  21084. properties.cidToGidMap = this.readCidToGidMap(cidToGidMap);
  21085. }
  21086. }
  21087. // Based on 9.6.6 of the spec the encoding can come from multiple places
  21088. // and depends on the font type. The base encoding and differences are
  21089. // read here, but the encoding that is actually used is chosen during
  21090. // glyph mapping in the font.
  21091. // TODO: Loading the built in encoding in the font would allow the
  21092. // differences to be merged in here not require us to hold on to it.
  21093. var differences = [];
  21094. var baseEncodingName = null;
  21095. var encoding;
  21096. if (dict.has('Encoding')) {
  21097. encoding = dict.get('Encoding');
  21098. if (isDict(encoding)) {
  21099. baseEncodingName = encoding.get('BaseEncoding');
  21100. baseEncodingName = (isName(baseEncodingName) ?
  21101. baseEncodingName.name : null);
  21102. // Load the differences between the base and original
  21103. if (encoding.has('Differences')) {
  21104. var diffEncoding = encoding.get('Differences');
  21105. var index = 0;
  21106. for (var j = 0, jj = diffEncoding.length; j < jj; j++) {
  21107. var data = diffEncoding[j];
  21108. if (isNum(data)) {
  21109. index = data;
  21110. } else {
  21111. differences[index++] = data.name;
  21112. }
  21113. }
  21114. }
  21115. } else if (isName(encoding)) {
  21116. baseEncodingName = encoding.name;
  21117. } else {
  21118. error('Encoding is not a Name nor a Dict');
  21119. }
  21120. // According to table 114 if the encoding is a named encoding it must be
  21121. // one of these predefined encodings.
  21122. if ((baseEncodingName !== 'MacRomanEncoding' &&
  21123. baseEncodingName !== 'MacExpertEncoding' &&
  21124. baseEncodingName !== 'WinAnsiEncoding')) {
  21125. baseEncodingName = null;
  21126. }
  21127. }
  21128. if (baseEncodingName) {
  21129. properties.defaultEncoding = Encodings[baseEncodingName].slice();
  21130. } else {
  21131. encoding = (properties.type === 'TrueType' ?
  21132. Encodings.WinAnsiEncoding : Encodings.StandardEncoding);
  21133. // The Symbolic attribute can be misused for regular fonts
  21134. // Heuristic: we have to check if the font is a standard one also
  21135. if (!!(properties.flags & FontFlags.Symbolic)) {
  21136. encoding = (!properties.file && /Symbol/i.test(properties.name) ?
  21137. Encodings.SymbolSetEncoding :
  21138. Encodings.MacRomanEncoding);
  21139. }
  21140. properties.defaultEncoding = encoding;
  21141. }
  21142. properties.differences = differences;
  21143. properties.baseEncodingName = baseEncodingName;
  21144. properties.dict = dict;
  21145. },
  21146. readToUnicode: function PartialEvaluator_readToUnicode(toUnicode) {
  21147. var cmapObj = toUnicode;
  21148. if (isName(cmapObj)) {
  21149. return CMapFactory.create(cmapObj).map;
  21150. } else if (isStream(cmapObj)) {
  21151. var cmap = CMapFactory.create(cmapObj).map;
  21152. // Convert UTF-16BE
  21153. // NOTE: cmap can be a sparse array, so use forEach instead of for(;;)
  21154. // to iterate over all keys.
  21155. cmap.forEach(function(token, i) {
  21156. var str = [];
  21157. for (var k = 0; k < token.length; k += 2) {
  21158. var w1 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1);
  21159. if ((w1 & 0xF800) !== 0xD800) { // w1 < 0xD800 || w1 > 0xDFFF
  21160. str.push(w1);
  21161. continue;
  21162. }
  21163. k += 2;
  21164. var w2 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1);
  21165. str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000);
  21166. }
  21167. cmap[i] = String.fromCharCode.apply(String, str);
  21168. });
  21169. return cmap;
  21170. }
  21171. return null;
  21172. },
  21173. readCidToGidMap: function PartialEvaluator_readCidToGidMap(cidToGidStream) {
  21174. // Extract the encoding from the CIDToGIDMap
  21175. var glyphsData = cidToGidStream.getBytes();
  21176. // Set encoding 0 to later verify the font has an encoding
  21177. var result = [];
  21178. for (var j = 0, jj = glyphsData.length; j < jj; j++) {
  21179. var glyphID = (glyphsData[j++] << 8) | glyphsData[j];
  21180. if (glyphID === 0) {
  21181. continue;
  21182. }
  21183. var code = j >> 1;
  21184. result[code] = glyphID;
  21185. }
  21186. return result;
  21187. },
  21188. extractWidths: function PartialEvaluator_extractWidths(dict, xref,
  21189. descriptor,
  21190. properties) {
  21191. var glyphsWidths = [];
  21192. var defaultWidth = 0;
  21193. var glyphsVMetrics = [];
  21194. var defaultVMetrics;
  21195. var i, ii, j, jj, start, code, widths;
  21196. if (properties.composite) {
  21197. defaultWidth = dict.get('DW') || 1000;
  21198. widths = dict.get('W');
  21199. if (widths) {
  21200. for (i = 0, ii = widths.length; i < ii; i++) {
  21201. start = widths[i++];
  21202. code = xref.fetchIfRef(widths[i]);
  21203. if (isArray(code)) {
  21204. for (j = 0, jj = code.length; j < jj; j++) {
  21205. glyphsWidths[start++] = code[j];
  21206. }
  21207. } else {
  21208. var width = widths[++i];
  21209. for (j = start; j <= code; j++) {
  21210. glyphsWidths[j] = width;
  21211. }
  21212. }
  21213. }
  21214. }
  21215. if (properties.vertical) {
  21216. var vmetrics = (dict.get('DW2') || [880, -1000]);
  21217. defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]];
  21218. vmetrics = dict.get('W2');
  21219. if (vmetrics) {
  21220. for (i = 0, ii = vmetrics.length; i < ii; i++) {
  21221. start = vmetrics[i++];
  21222. code = xref.fetchIfRef(vmetrics[i]);
  21223. if (isArray(code)) {
  21224. for (j = 0, jj = code.length; j < jj; j++) {
  21225. glyphsVMetrics[start++] = [code[j++], code[j++], code[j]];
  21226. }
  21227. } else {
  21228. var vmetric = [vmetrics[++i], vmetrics[++i], vmetrics[++i]];
  21229. for (j = start; j <= code; j++) {
  21230. glyphsVMetrics[j] = vmetric;
  21231. }
  21232. }
  21233. }
  21234. }
  21235. }
  21236. } else {
  21237. var firstChar = properties.firstChar;
  21238. widths = dict.get('Widths');
  21239. if (widths) {
  21240. j = firstChar;
  21241. for (i = 0, ii = widths.length; i < ii; i++) {
  21242. glyphsWidths[j++] = widths[i];
  21243. }
  21244. defaultWidth = (parseFloat(descriptor.get('MissingWidth')) || 0);
  21245. } else {
  21246. // Trying get the BaseFont metrics (see comment above).
  21247. var baseFontName = dict.get('BaseFont');
  21248. if (isName(baseFontName)) {
  21249. var metrics = this.getBaseFontMetrics(baseFontName.name);
  21250. glyphsWidths = this.buildCharCodeToWidth(metrics.widths,
  21251. properties);
  21252. defaultWidth = metrics.defaultWidth;
  21253. }
  21254. }
  21255. }
  21256. // Heuristic: detection of monospace font by checking all non-zero widths
  21257. var isMonospace = true;
  21258. var firstWidth = defaultWidth;
  21259. for (var glyph in glyphsWidths) {
  21260. var glyphWidth = glyphsWidths[glyph];
  21261. if (!glyphWidth) {
  21262. continue;
  21263. }
  21264. if (!firstWidth) {
  21265. firstWidth = glyphWidth;
  21266. continue;
  21267. }
  21268. if (firstWidth != glyphWidth) {
  21269. isMonospace = false;
  21270. break;
  21271. }
  21272. }
  21273. if (isMonospace) {
  21274. properties.flags |= FontFlags.FixedPitch;
  21275. }
  21276. properties.defaultWidth = defaultWidth;
  21277. properties.widths = glyphsWidths;
  21278. properties.defaultVMetrics = defaultVMetrics;
  21279. properties.vmetrics = glyphsVMetrics;
  21280. },
  21281. isSerifFont: function PartialEvaluator_isSerifFont(baseFontName) {
  21282. // Simulating descriptor flags attribute
  21283. var fontNameWoStyle = baseFontName.split('-')[0];
  21284. return (fontNameWoStyle in serifFonts) ||
  21285. (fontNameWoStyle.search(/serif/gi) !== -1);
  21286. },
  21287. getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) {
  21288. var defaultWidth = 0;
  21289. var widths = [];
  21290. var monospace = false;
  21291. var lookupName = (stdFontMap[name] || name);
  21292. if (!(lookupName in Metrics)) {
  21293. // Use default fonts for looking up font metrics if the passed
  21294. // font is not a base font
  21295. if (this.isSerifFont(name)) {
  21296. lookupName = 'Times-Roman';
  21297. } else {
  21298. lookupName = 'Helvetica';
  21299. }
  21300. }
  21301. var glyphWidths = Metrics[lookupName];
  21302. if (isNum(glyphWidths)) {
  21303. defaultWidth = glyphWidths;
  21304. monospace = true;
  21305. } else {
  21306. widths = glyphWidths;
  21307. }
  21308. return {
  21309. defaultWidth: defaultWidth,
  21310. monospace: monospace,
  21311. widths: widths
  21312. };
  21313. },
  21314. buildCharCodeToWidth:
  21315. function PartialEvaluator_bulildCharCodeToWidth(widthsByGlyphName,
  21316. properties) {
  21317. var widths = Object.create(null);
  21318. var differences = properties.differences;
  21319. var encoding = properties.defaultEncoding;
  21320. for (var charCode = 0; charCode < 256; charCode++) {
  21321. if (charCode in differences &&
  21322. widthsByGlyphName[differences[charCode]]) {
  21323. widths[charCode] = widthsByGlyphName[differences[charCode]];
  21324. continue;
  21325. }
  21326. if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) {
  21327. widths[charCode] = widthsByGlyphName[encoding[charCode]];
  21328. continue;
  21329. }
  21330. }
  21331. return widths;
  21332. },
  21333. preEvaluateFont: function PartialEvaluator_preEvaluateFont(dict, xref) {
  21334. var baseDict = dict;
  21335. var type = dict.get('Subtype');
  21336. assert(isName(type), 'invalid font Subtype');
  21337. var composite = false;
  21338. var uint8array;
  21339. if (type.name === 'Type0') {
  21340. // If font is a composite
  21341. // - get the descendant font
  21342. // - set the type according to the descendant font
  21343. // - get the FontDescriptor from the descendant font
  21344. var df = dict.get('DescendantFonts');
  21345. if (!df) {
  21346. error('Descendant fonts are not specified');
  21347. }
  21348. dict = (isArray(df) ? xref.fetchIfRef(df[0]) : df);
  21349. type = dict.get('Subtype');
  21350. assert(isName(type), 'invalid font Subtype');
  21351. composite = true;
  21352. }
  21353. var descriptor = dict.get('FontDescriptor');
  21354. if (descriptor) {
  21355. var hash = new MurmurHash3_64();
  21356. var encoding = baseDict.getRaw('Encoding');
  21357. if (isName(encoding)) {
  21358. hash.update(encoding.name);
  21359. } else if (isRef(encoding)) {
  21360. hash.update(encoding.num + '_' + encoding.gen);
  21361. }
  21362. var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode');
  21363. if (isStream(toUnicode)) {
  21364. var stream = toUnicode.str || toUnicode;
  21365. uint8array = stream.buffer ?
  21366. new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) :
  21367. new Uint8Array(stream.bytes.buffer,
  21368. stream.start, stream.end - stream.start);
  21369. hash.update(uint8array);
  21370. } else if (isName(toUnicode)) {
  21371. hash.update(toUnicode.name);
  21372. }
  21373. var widths = dict.get('Widths') || baseDict.get('Widths');
  21374. if (widths) {
  21375. uint8array = new Uint8Array(new Uint32Array(widths).buffer);
  21376. hash.update(uint8array);
  21377. }
  21378. }
  21379. return {
  21380. descriptor: descriptor,
  21381. dict: dict,
  21382. baseDict: baseDict,
  21383. composite: composite,
  21384. type: type.name,
  21385. hash: hash ? hash.hexdigest() : ''
  21386. };
  21387. },
  21388. translateFont: function PartialEvaluator_translateFont(preEvaluatedFont,
  21389. xref) {
  21390. var baseDict = preEvaluatedFont.baseDict;
  21391. var dict = preEvaluatedFont.dict;
  21392. var composite = preEvaluatedFont.composite;
  21393. var descriptor = preEvaluatedFont.descriptor;
  21394. var type = preEvaluatedFont.type;
  21395. var maxCharIndex = (composite ? 0xFFFF : 0xFF);
  21396. var properties;
  21397. if (!descriptor) {
  21398. if (type === 'Type3') {
  21399. // FontDescriptor is only required for Type3 fonts when the document
  21400. // is a tagged pdf. Create a barbebones one to get by.
  21401. descriptor = new Dict(null);
  21402. descriptor.set('FontName', Name.get(type));
  21403. } else {
  21404. // Before PDF 1.5 if the font was one of the base 14 fonts, having a
  21405. // FontDescriptor was not required.
  21406. // This case is here for compatibility.
  21407. var baseFontName = dict.get('BaseFont');
  21408. if (!isName(baseFontName)) {
  21409. error('Base font is not specified');
  21410. }
  21411. // Using base font name as a font name.
  21412. baseFontName = baseFontName.name.replace(/[,_]/g, '-');
  21413. var metrics = this.getBaseFontMetrics(baseFontName);
  21414. // Simulating descriptor flags attribute
  21415. var fontNameWoStyle = baseFontName.split('-')[0];
  21416. var flags =
  21417. (this.isSerifFont(fontNameWoStyle) ? FontFlags.Serif : 0) |
  21418. (metrics.monospace ? FontFlags.FixedPitch : 0) |
  21419. (symbolsFonts[fontNameWoStyle] ? FontFlags.Symbolic :
  21420. FontFlags.Nonsymbolic);
  21421. properties = {
  21422. type: type,
  21423. name: baseFontName,
  21424. widths: metrics.widths,
  21425. defaultWidth: metrics.defaultWidth,
  21426. flags: flags,
  21427. firstChar: 0,
  21428. lastChar: maxCharIndex
  21429. };
  21430. this.extractDataStructures(dict, dict, xref, properties);
  21431. properties.widths = this.buildCharCodeToWidth(metrics.widths,
  21432. properties);
  21433. return new Font(baseFontName, null, properties);
  21434. }
  21435. }
  21436. // According to the spec if 'FontDescriptor' is declared, 'FirstChar',
  21437. // 'LastChar' and 'Widths' should exist too, but some PDF encoders seem
  21438. // to ignore this rule when a variant of a standart font is used.
  21439. // TODO Fill the width array depending on which of the base font this is
  21440. // a variant.
  21441. var firstChar = (dict.get('FirstChar') || 0);
  21442. var lastChar = (dict.get('LastChar') || maxCharIndex);
  21443. var fontName = descriptor.get('FontName');
  21444. var baseFont = dict.get('BaseFont');
  21445. // Some bad PDFs have a string as the font name.
  21446. if (isString(fontName)) {
  21447. fontName = Name.get(fontName);
  21448. }
  21449. if (isString(baseFont)) {
  21450. baseFont = Name.get(baseFont);
  21451. }
  21452. if (type !== 'Type3') {
  21453. var fontNameStr = fontName && fontName.name;
  21454. var baseFontStr = baseFont && baseFont.name;
  21455. if (fontNameStr !== baseFontStr) {
  21456. info('The FontDescriptor\'s FontName is "' + fontNameStr +
  21457. '" but should be the same as the Font\'s BaseFont "' +
  21458. baseFontStr + '"');
  21459. // Workaround for cases where e.g. fontNameStr = 'Arial' and
  21460. // baseFontStr = 'Arial,Bold' (needed when no font file is embedded).
  21461. if (fontNameStr && baseFontStr &&
  21462. baseFontStr.indexOf(fontNameStr) === 0) {
  21463. fontName = baseFont;
  21464. }
  21465. }
  21466. }
  21467. fontName = (fontName || baseFont);
  21468. assert(isName(fontName), 'invalid font name');
  21469. var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3');
  21470. if (fontFile) {
  21471. if (fontFile.dict) {
  21472. var subtype = fontFile.dict.get('Subtype');
  21473. if (subtype) {
  21474. subtype = subtype.name;
  21475. }
  21476. var length1 = fontFile.dict.get('Length1');
  21477. var length2 = fontFile.dict.get('Length2');
  21478. }
  21479. }
  21480. properties = {
  21481. type: type,
  21482. name: fontName.name,
  21483. subtype: subtype,
  21484. file: fontFile,
  21485. length1: length1,
  21486. length2: length2,
  21487. loadedName: baseDict.loadedName,
  21488. composite: composite,
  21489. wideChars: composite,
  21490. fixedPitch: false,
  21491. fontMatrix: (dict.get('FontMatrix') || FONT_IDENTITY_MATRIX),
  21492. firstChar: firstChar || 0,
  21493. lastChar: (lastChar || maxCharIndex),
  21494. bbox: descriptor.get('FontBBox'),
  21495. ascent: descriptor.get('Ascent'),
  21496. descent: descriptor.get('Descent'),
  21497. xHeight: descriptor.get('XHeight'),
  21498. capHeight: descriptor.get('CapHeight'),
  21499. flags: descriptor.get('Flags'),
  21500. italicAngle: descriptor.get('ItalicAngle'),
  21501. coded: false
  21502. };
  21503. if (composite) {
  21504. var cidEncoding = baseDict.get('Encoding');
  21505. if (isName(cidEncoding)) {
  21506. properties.cidEncoding = cidEncoding.name;
  21507. }
  21508. properties.cMap = CMapFactory.create(cidEncoding,
  21509. { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null);
  21510. properties.vertical = properties.cMap.vertical;
  21511. }
  21512. this.extractDataStructures(dict, baseDict, xref, properties);
  21513. this.extractWidths(dict, xref, descriptor, properties);
  21514. if (type === 'Type3') {
  21515. properties.isType3Font = true;
  21516. }
  21517. return new Font(fontName.name, fontFile, properties);
  21518. }
  21519. };
  21520. return PartialEvaluator;
  21521. })();
  21522. var TranslatedFont = (function TranslatedFontClosure() {
  21523. function TranslatedFont(loadedName, font, dict) {
  21524. this.loadedName = loadedName;
  21525. this.font = font;
  21526. this.dict = dict;
  21527. this.type3Loaded = null;
  21528. this.sent = false;
  21529. }
  21530. TranslatedFont.prototype = {
  21531. send: function (handler) {
  21532. if (this.sent) {
  21533. return;
  21534. }
  21535. var fontData = this.font.exportData();
  21536. handler.send('commonobj', [
  21537. this.loadedName,
  21538. 'Font',
  21539. fontData
  21540. ]);
  21541. this.sent = true;
  21542. },
  21543. loadType3Data: function (evaluator, resources, parentOperatorList) {
  21544. assert(this.font.isType3Font);
  21545. if (this.type3Loaded) {
  21546. return this.type3Loaded;
  21547. }
  21548. var translatedFont = this.font;
  21549. var loadCharProcsPromise = Promise.resolve();
  21550. var charProcs = this.dict.get('CharProcs').getAll();
  21551. var fontResources = this.dict.get('Resources') || resources;
  21552. var charProcKeys = Object.keys(charProcs);
  21553. var charProcOperatorList = {};
  21554. for (var i = 0, n = charProcKeys.length; i < n; ++i) {
  21555. loadCharProcsPromise = loadCharProcsPromise.then(function (key) {
  21556. var glyphStream = charProcs[key];
  21557. var operatorList = new OperatorList();
  21558. return evaluator.getOperatorList(glyphStream, fontResources,
  21559. operatorList).
  21560. then(function () {
  21561. charProcOperatorList[key] = operatorList.getIR();
  21562. // Add the dependencies to the parent operator list so they are
  21563. // resolved before sub operator list is executed synchronously.
  21564. parentOperatorList.addDependencies(operatorList.dependencies);
  21565. });
  21566. }.bind(this, charProcKeys[i]));
  21567. }
  21568. this.type3Loaded = loadCharProcsPromise.then(function () {
  21569. translatedFont.charProcOperatorList = charProcOperatorList;
  21570. });
  21571. return this.type3Loaded;
  21572. }
  21573. };
  21574. return TranslatedFont;
  21575. })();
  21576. var OperatorList = (function OperatorListClosure() {
  21577. var CHUNK_SIZE = 1000;
  21578. var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; // close to chunk size
  21579. function getTransfers(queue) {
  21580. var transfers = [];
  21581. var fnArray = queue.fnArray, argsArray = queue.argsArray;
  21582. for (var i = 0, ii = queue.length; i < ii; i++) {
  21583. switch (fnArray[i]) {
  21584. case OPS.paintInlineImageXObject:
  21585. case OPS.paintInlineImageXObjectGroup:
  21586. case OPS.paintImageMaskXObject:
  21587. var arg = argsArray[i][0]; // first param in imgData
  21588. if (!arg.cached) {
  21589. transfers.push(arg.data.buffer);
  21590. }
  21591. break;
  21592. }
  21593. }
  21594. return transfers;
  21595. }
  21596. function OperatorList(intent, messageHandler, pageIndex) {
  21597. this.messageHandler = messageHandler;
  21598. this.fnArray = [];
  21599. this.argsArray = [];
  21600. this.dependencies = {};
  21601. this.pageIndex = pageIndex;
  21602. this.intent = intent;
  21603. }
  21604. OperatorList.prototype = {
  21605. get length() {
  21606. return this.argsArray.length;
  21607. },
  21608. addOp: function(fn, args) {
  21609. this.fnArray.push(fn);
  21610. this.argsArray.push(args);
  21611. if (this.messageHandler) {
  21612. if (this.fnArray.length >= CHUNK_SIZE) {
  21613. this.flush();
  21614. } else if (this.fnArray.length >= CHUNK_SIZE_ABOUT &&
  21615. (fn === OPS.restore || fn === OPS.endText)) {
  21616. // heuristic to flush on boundary of restore or endText
  21617. this.flush();
  21618. }
  21619. }
  21620. },
  21621. addDependency: function(dependency) {
  21622. if (dependency in this.dependencies) {
  21623. return;
  21624. }
  21625. this.dependencies[dependency] = true;
  21626. this.addOp(OPS.dependency, [dependency]);
  21627. },
  21628. addDependencies: function(dependencies) {
  21629. for (var key in dependencies) {
  21630. this.addDependency(key);
  21631. }
  21632. },
  21633. addOpList: function(opList) {
  21634. Util.extendObj(this.dependencies, opList.dependencies);
  21635. for (var i = 0, ii = opList.length; i < ii; i++) {
  21636. this.addOp(opList.fnArray[i], opList.argsArray[i]);
  21637. }
  21638. },
  21639. getIR: function() {
  21640. return {
  21641. fnArray: this.fnArray,
  21642. argsArray: this.argsArray,
  21643. length: this.length
  21644. };
  21645. },
  21646. flush: function(lastChunk) {
  21647. new QueueOptimizer().optimize(this);
  21648. var transfers = getTransfers(this);
  21649. this.messageHandler.send('RenderPageChunk', {
  21650. operatorList: {
  21651. fnArray: this.fnArray,
  21652. argsArray: this.argsArray,
  21653. lastChunk: lastChunk,
  21654. length: this.length
  21655. },
  21656. pageIndex: this.pageIndex,
  21657. intent: this.intent
  21658. }, transfers);
  21659. this.dependencies = {};
  21660. this.fnArray.length = 0;
  21661. this.argsArray.length = 0;
  21662. }
  21663. };
  21664. return OperatorList;
  21665. })();
  21666. var StateManager = (function StateManagerClosure() {
  21667. function StateManager(initialState) {
  21668. this.state = initialState;
  21669. this.stateStack = [];
  21670. }
  21671. StateManager.prototype = {
  21672. save: function () {
  21673. var old = this.state;
  21674. this.stateStack.push(this.state);
  21675. this.state = old.clone();
  21676. },
  21677. restore: function () {
  21678. var prev = this.stateStack.pop();
  21679. if (prev) {
  21680. this.state = prev;
  21681. }
  21682. },
  21683. transform: function (args) {
  21684. this.state.ctm = Util.transform(this.state.ctm, args);
  21685. }
  21686. };
  21687. return StateManager;
  21688. })();
  21689. var TextState = (function TextStateClosure() {
  21690. function TextState() {
  21691. this.ctm = new Float32Array(IDENTITY_MATRIX);
  21692. this.fontSize = 0;
  21693. this.font = null;
  21694. this.fontMatrix = FONT_IDENTITY_MATRIX;
  21695. this.textMatrix = IDENTITY_MATRIX.slice();
  21696. this.textLineMatrix = IDENTITY_MATRIX.slice();
  21697. this.charSpacing = 0;
  21698. this.wordSpacing = 0;
  21699. this.leading = 0;
  21700. this.textHScale = 1;
  21701. this.textRise = 0;
  21702. }
  21703. TextState.prototype = {
  21704. setTextMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) {
  21705. var m = this.textMatrix;
  21706. m[0] = a; m[1] = b; m[2] = c; m[3] = d; m[4] = e; m[5] = f;
  21707. },
  21708. setTextLineMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) {
  21709. var m = this.textLineMatrix;
  21710. m[0] = a; m[1] = b; m[2] = c; m[3] = d; m[4] = e; m[5] = f;
  21711. },
  21712. translateTextMatrix: function TextState_translateTextMatrix(x, y) {
  21713. var m = this.textMatrix;
  21714. m[4] = m[0] * x + m[2] * y + m[4];
  21715. m[5] = m[1] * x + m[3] * y + m[5];
  21716. },
  21717. translateTextLineMatrix: function TextState_translateTextMatrix(x, y) {
  21718. var m = this.textLineMatrix;
  21719. m[4] = m[0] * x + m[2] * y + m[4];
  21720. m[5] = m[1] * x + m[3] * y + m[5];
  21721. },
  21722. calcRenderMatrix: function TextState_calcRendeMatrix(ctm) {
  21723. // 9.4.4 Text Space Details
  21724. var tsm = [this.fontSize * this.textHScale, 0,
  21725. 0, this.fontSize,
  21726. 0, this.textRise];
  21727. return Util.transform(ctm, Util.transform(this.textMatrix, tsm));
  21728. },
  21729. carriageReturn: function TextState_carriageReturn() {
  21730. this.translateTextLineMatrix(0, -this.leading);
  21731. this.textMatrix = this.textLineMatrix.slice();
  21732. },
  21733. clone: function TextState_clone() {
  21734. var clone = Object.create(this);
  21735. clone.textMatrix = this.textMatrix.slice();
  21736. clone.textLineMatrix = this.textLineMatrix.slice();
  21737. clone.fontMatrix = this.fontMatrix.slice();
  21738. return clone;
  21739. }
  21740. };
  21741. return TextState;
  21742. })();
  21743. var EvalState = (function EvalStateClosure() {
  21744. function EvalState() {
  21745. this.ctm = new Float32Array(IDENTITY_MATRIX);
  21746. this.font = null;
  21747. this.textRenderingMode = TextRenderingMode.FILL;
  21748. this.fillColorSpace = ColorSpace.singletons.gray;
  21749. this.strokeColorSpace = ColorSpace.singletons.gray;
  21750. }
  21751. EvalState.prototype = {
  21752. clone: function CanvasExtraState_clone() {
  21753. return Object.create(this);
  21754. },
  21755. };
  21756. return EvalState;
  21757. })();
  21758. var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
  21759. // Specifies properties for each command
  21760. //
  21761. // If variableArgs === true: [0, `numArgs`] expected
  21762. // If variableArgs === false: exactly `numArgs` expected
  21763. var OP_MAP = {
  21764. // Graphic state
  21765. w: { id: OPS.setLineWidth, numArgs: 1, variableArgs: false },
  21766. J: { id: OPS.setLineCap, numArgs: 1, variableArgs: false },
  21767. j: { id: OPS.setLineJoin, numArgs: 1, variableArgs: false },
  21768. M: { id: OPS.setMiterLimit, numArgs: 1, variableArgs: false },
  21769. d: { id: OPS.setDash, numArgs: 2, variableArgs: false },
  21770. ri: { id: OPS.setRenderingIntent, numArgs: 1, variableArgs: false },
  21771. i: { id: OPS.setFlatness, numArgs: 1, variableArgs: false },
  21772. gs: { id: OPS.setGState, numArgs: 1, variableArgs: false },
  21773. q: { id: OPS.save, numArgs: 0, variableArgs: false },
  21774. Q: { id: OPS.restore, numArgs: 0, variableArgs: false },
  21775. cm: { id: OPS.transform, numArgs: 6, variableArgs: false },
  21776. // Path
  21777. m: { id: OPS.moveTo, numArgs: 2, variableArgs: false },
  21778. l: { id: OPS.lineTo, numArgs: 2, variableArgs: false },
  21779. c: { id: OPS.curveTo, numArgs: 6, variableArgs: false },
  21780. v: { id: OPS.curveTo2, numArgs: 4, variableArgs: false },
  21781. y: { id: OPS.curveTo3, numArgs: 4, variableArgs: false },
  21782. h: { id: OPS.closePath, numArgs: 0, variableArgs: false },
  21783. re: { id: OPS.rectangle, numArgs: 4, variableArgs: false },
  21784. S: { id: OPS.stroke, numArgs: 0, variableArgs: false },
  21785. s: { id: OPS.closeStroke, numArgs: 0, variableArgs: false },
  21786. f: { id: OPS.fill, numArgs: 0, variableArgs: false },
  21787. F: { id: OPS.fill, numArgs: 0, variableArgs: false },
  21788. 'f*': { id: OPS.eoFill, numArgs: 0, variableArgs: false },
  21789. B: { id: OPS.fillStroke, numArgs: 0, variableArgs: false },
  21790. 'B*': { id: OPS.eoFillStroke, numArgs: 0, variableArgs: false },
  21791. b: { id: OPS.closeFillStroke, numArgs: 0, variableArgs: false },
  21792. 'b*': { id: OPS.closeEOFillStroke, numArgs: 0, variableArgs: false },
  21793. n: { id: OPS.endPath, numArgs: 0, variableArgs: false },
  21794. // Clipping
  21795. W: { id: OPS.clip, numArgs: 0, variableArgs: false },
  21796. 'W*': { id: OPS.eoClip, numArgs: 0, variableArgs: false },
  21797. // Text
  21798. BT: { id: OPS.beginText, numArgs: 0, variableArgs: false },
  21799. ET: { id: OPS.endText, numArgs: 0, variableArgs: false },
  21800. Tc: { id: OPS.setCharSpacing, numArgs: 1, variableArgs: false },
  21801. Tw: { id: OPS.setWordSpacing, numArgs: 1, variableArgs: false },
  21802. Tz: { id: OPS.setHScale, numArgs: 1, variableArgs: false },
  21803. TL: { id: OPS.setLeading, numArgs: 1, variableArgs: false },
  21804. Tf: { id: OPS.setFont, numArgs: 2, variableArgs: false },
  21805. Tr: { id: OPS.setTextRenderingMode, numArgs: 1, variableArgs: false },
  21806. Ts: { id: OPS.setTextRise, numArgs: 1, variableArgs: false },
  21807. Td: { id: OPS.moveText, numArgs: 2, variableArgs: false },
  21808. TD: { id: OPS.setLeadingMoveText, numArgs: 2, variableArgs: false },
  21809. Tm: { id: OPS.setTextMatrix, numArgs: 6, variableArgs: false },
  21810. 'T*': { id: OPS.nextLine, numArgs: 0, variableArgs: false },
  21811. Tj: { id: OPS.showText, numArgs: 1, variableArgs: false },
  21812. TJ: { id: OPS.showSpacedText, numArgs: 1, variableArgs: false },
  21813. '\'': { id: OPS.nextLineShowText, numArgs: 1, variableArgs: false },
  21814. '"': { id: OPS.nextLineSetSpacingShowText, numArgs: 3,
  21815. variableArgs: false },
  21816. // Type3 fonts
  21817. d0: { id: OPS.setCharWidth, numArgs: 2, variableArgs: false },
  21818. d1: { id: OPS.setCharWidthAndBounds, numArgs: 6, variableArgs: false },
  21819. // Color
  21820. CS: { id: OPS.setStrokeColorSpace, numArgs: 1, variableArgs: false },
  21821. cs: { id: OPS.setFillColorSpace, numArgs: 1, variableArgs: false },
  21822. SC: { id: OPS.setStrokeColor, numArgs: 4, variableArgs: true },
  21823. SCN: { id: OPS.setStrokeColorN, numArgs: 33, variableArgs: true },
  21824. sc: { id: OPS.setFillColor, numArgs: 4, variableArgs: true },
  21825. scn: { id: OPS.setFillColorN, numArgs: 33, variableArgs: true },
  21826. G: { id: OPS.setStrokeGray, numArgs: 1, variableArgs: false },
  21827. g: { id: OPS.setFillGray, numArgs: 1, variableArgs: false },
  21828. RG: { id: OPS.setStrokeRGBColor, numArgs: 3, variableArgs: false },
  21829. rg: { id: OPS.setFillRGBColor, numArgs: 3, variableArgs: false },
  21830. K: { id: OPS.setStrokeCMYKColor, numArgs: 4, variableArgs: false },
  21831. k: { id: OPS.setFillCMYKColor, numArgs: 4, variableArgs: false },
  21832. // Shading
  21833. sh: { id: OPS.shadingFill, numArgs: 1, variableArgs: false },
  21834. // Images
  21835. BI: { id: OPS.beginInlineImage, numArgs: 0, variableArgs: false },
  21836. ID: { id: OPS.beginImageData, numArgs: 0, variableArgs: false },
  21837. EI: { id: OPS.endInlineImage, numArgs: 1, variableArgs: false },
  21838. // XObjects
  21839. Do: { id: OPS.paintXObject, numArgs: 1, variableArgs: false },
  21840. MP: { id: OPS.markPoint, numArgs: 1, variableArgs: false },
  21841. DP: { id: OPS.markPointProps, numArgs: 2, variableArgs: false },
  21842. BMC: { id: OPS.beginMarkedContent, numArgs: 1, variableArgs: false },
  21843. BDC: { id: OPS.beginMarkedContentProps, numArgs: 2,
  21844. variableArgs: false },
  21845. EMC: { id: OPS.endMarkedContent, numArgs: 0, variableArgs: false },
  21846. // Compatibility
  21847. BX: { id: OPS.beginCompat, numArgs: 0, variableArgs: false },
  21848. EX: { id: OPS.endCompat, numArgs: 0, variableArgs: false },
  21849. // (reserved partial commands for the lexer)
  21850. BM: null,
  21851. BD: null,
  21852. 'true': null,
  21853. fa: null,
  21854. fal: null,
  21855. fals: null,
  21856. 'false': null,
  21857. nu: null,
  21858. nul: null,
  21859. 'null': null
  21860. };
  21861. function EvaluatorPreprocessor(stream, xref, stateManager) {
  21862. // TODO(mduan): pass array of knownCommands rather than OP_MAP
  21863. // dictionary
  21864. this.parser = new Parser(new Lexer(stream, OP_MAP), false, xref);
  21865. this.stateManager = stateManager;
  21866. this.nonProcessedArgs = [];
  21867. }
  21868. EvaluatorPreprocessor.prototype = {
  21869. get savedStatesDepth() {
  21870. return this.stateManager.stateStack.length;
  21871. },
  21872. read: function EvaluatorPreprocessor_read(operation) {
  21873. // We use an array to represent args, except we use |null| to represent
  21874. // no args because it's more compact than an empty array.
  21875. var args = null;
  21876. while (true) {
  21877. var obj = this.parser.getObj();
  21878. if (isCmd(obj)) {
  21879. var cmd = obj.cmd;
  21880. // Check that the command is valid
  21881. var opSpec = OP_MAP[cmd];
  21882. if (!opSpec) {
  21883. warn('Unknown command "' + cmd + '"');
  21884. continue;
  21885. }
  21886. var fn = opSpec.id;
  21887. var numArgs = opSpec.numArgs;
  21888. if (!opSpec.variableArgs) {
  21889. // Postscript commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf
  21890. var argsLength = args !== null ? args.length : 0;
  21891. if (argsLength !== numArgs) {
  21892. var nonProcessedArgs = this.nonProcessedArgs;
  21893. while (argsLength > numArgs) {
  21894. nonProcessedArgs.push(args.shift());
  21895. argsLength--;
  21896. }
  21897. while (argsLength < numArgs && nonProcessedArgs.length !== 0) {
  21898. if (!args) {
  21899. args = [];
  21900. }
  21901. args.unshift(nonProcessedArgs.pop());
  21902. argsLength++;
  21903. }
  21904. }
  21905. if (argsLength < numArgs) {
  21906. // If we receive too few args, it's not possible to possible
  21907. // to execute the command, so skip the command
  21908. info('Command ' + fn + ': because expected ' +
  21909. numArgs + ' args, but received ' + argsLength +
  21910. ' args; skipping');
  21911. args = null;
  21912. continue;
  21913. }
  21914. } else if (argsLength > numArgs) {
  21915. info('Command ' + fn + ': expected [0,' + numArgs +
  21916. '] args, but received ' + argsLength + ' args');
  21917. }
  21918. // TODO figure out how to type-check vararg functions
  21919. this.preprocessCommand(fn, args);
  21920. operation.fn = fn;
  21921. operation.args = args;
  21922. return true;
  21923. } else {
  21924. if (isEOF(obj)) {
  21925. return false; // no more commands
  21926. }
  21927. // argument
  21928. if (obj !== null) {
  21929. if (!args) {
  21930. args = [];
  21931. }
  21932. args.push((obj instanceof Dict ? obj.getAll() : obj));
  21933. assert(args.length <= 33, 'Too many arguments');
  21934. }
  21935. }
  21936. }
  21937. },
  21938. preprocessCommand:
  21939. function EvaluatorPreprocessor_preprocessCommand(fn, args) {
  21940. switch (fn | 0) {
  21941. case OPS.save:
  21942. this.stateManager.save();
  21943. break;
  21944. case OPS.restore:
  21945. this.stateManager.restore();
  21946. break;
  21947. case OPS.transform:
  21948. this.stateManager.transform(args);
  21949. break;
  21950. }
  21951. }
  21952. };
  21953. return EvaluatorPreprocessor;
  21954. })();
  21955. var QueueOptimizer = (function QueueOptimizerClosure() {
  21956. function addState(parentState, pattern, fn) {
  21957. var state = parentState;
  21958. for (var i = 0, ii = pattern.length - 1; i < ii; i++) {
  21959. var item = pattern[i];
  21960. state = (state[item] || (state[item] = []));
  21961. }
  21962. state[pattern[pattern.length - 1]] = fn;
  21963. }
  21964. function handlePaintSolidColorImageMask(index, count, fnArray, argsArray) {
  21965. // Handles special case of mainly LaTeX documents which
  21966. // use image masks to draw lines with the current fill style.
  21967. // 'count' groups of (save, transform, paintImageMaskXObject, restore)+
  21968. // have been found at index.
  21969. for (var i = 0; i < count; i++) {
  21970. var arg = argsArray[index + 4 * i + 2];
  21971. var imageMask = arg.length === 1 && arg[0];
  21972. if (imageMask && imageMask.width === 1 && imageMask.height === 1 &&
  21973. (!imageMask.data.length || (imageMask.data.length === 1 &&
  21974. imageMask.data[0] === 0))) {
  21975. fnArray[index + 4 * i + 2] = OPS.paintSolidColorImageMask;
  21976. continue;
  21977. }
  21978. break;
  21979. }
  21980. return count - i;
  21981. }
  21982. var InitialState = [];
  21983. addState(InitialState,
  21984. [OPS.save, OPS.transform, OPS.paintInlineImageXObject, OPS.restore],
  21985. function foundInlineImageGroup(context) {
  21986. // grouping paintInlineImageXObject's into paintInlineImageXObjectGroup
  21987. // searching for (save, transform, paintInlineImageXObject, restore)+
  21988. var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10;
  21989. var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200;
  21990. var MAX_WIDTH = 1000;
  21991. var IMAGE_PADDING = 1;
  21992. var fnArray = context.fnArray, argsArray = context.argsArray;
  21993. var j = context.currentOperation - 3, i = j + 4;
  21994. var ii = fnArray.length;
  21995. for (; i < ii && fnArray[i - 4] === fnArray[i]; i++) {}
  21996. var count = Math.min((i - j) >> 2, MAX_IMAGES_IN_INLINE_IMAGES_BLOCK);
  21997. if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) {
  21998. context.currentOperation = i - 1;
  21999. return;
  22000. }
  22001. // assuming that heights of those image is too small (~1 pixel)
  22002. // packing as much as possible by lines
  22003. var maxX = 0;
  22004. var map = [], maxLineHeight = 0;
  22005. var currentX = IMAGE_PADDING, currentY = IMAGE_PADDING;
  22006. var q;
  22007. for (q = 0; q < count; q++) {
  22008. var transform = argsArray[j + (q << 2) + 1];
  22009. var img = argsArray[j + (q << 2) + 2][0];
  22010. if (currentX + img.width > MAX_WIDTH) {
  22011. // starting new line
  22012. maxX = Math.max(maxX, currentX);
  22013. currentY += maxLineHeight + 2 * IMAGE_PADDING;
  22014. currentX = 0;
  22015. maxLineHeight = 0;
  22016. }
  22017. map.push({
  22018. transform: transform,
  22019. x: currentX, y: currentY,
  22020. w: img.width, h: img.height
  22021. });
  22022. currentX += img.width + 2 * IMAGE_PADDING;
  22023. maxLineHeight = Math.max(maxLineHeight, img.height);
  22024. }
  22025. var imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING;
  22026. var imgHeight = currentY + maxLineHeight + IMAGE_PADDING;
  22027. var imgData = new Uint8Array(imgWidth * imgHeight * 4);
  22028. var imgRowSize = imgWidth << 2;
  22029. for (q = 0; q < count; q++) {
  22030. var data = argsArray[j + (q << 2) + 2][0].data;
  22031. // copy image by lines and extends pixels into padding
  22032. var rowSize = map[q].w << 2;
  22033. var dataOffset = 0;
  22034. var offset = (map[q].x + map[q].y * imgWidth) << 2;
  22035. imgData.set(data.subarray(0, rowSize), offset - imgRowSize);
  22036. for (var k = 0, kk = map[q].h; k < kk; k++) {
  22037. imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset);
  22038. dataOffset += rowSize;
  22039. offset += imgRowSize;
  22040. }
  22041. imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset);
  22042. while (offset >= 0) {
  22043. data[offset - 4] = data[offset];
  22044. data[offset - 3] = data[offset + 1];
  22045. data[offset - 2] = data[offset + 2];
  22046. data[offset - 1] = data[offset + 3];
  22047. data[offset + rowSize] = data[offset + rowSize - 4];
  22048. data[offset + rowSize + 1] = data[offset + rowSize - 3];
  22049. data[offset + rowSize + 2] = data[offset + rowSize - 2];
  22050. data[offset + rowSize + 3] = data[offset + rowSize - 1];
  22051. offset -= imgRowSize;
  22052. }
  22053. }
  22054. // replacing queue items
  22055. fnArray.splice(j, count * 4, OPS.paintInlineImageXObjectGroup);
  22056. argsArray.splice(j, count * 4,
  22057. [{ width: imgWidth, height: imgHeight, kind: ImageKind.RGBA_32BPP,
  22058. data: imgData }, map]);
  22059. context.currentOperation = j;
  22060. });
  22061. addState(InitialState,
  22062. [OPS.save, OPS.transform, OPS.paintImageMaskXObject, OPS.restore],
  22063. function foundImageMaskGroup(context) {
  22064. // grouping paintImageMaskXObject's into paintImageMaskXObjectGroup
  22065. // searching for (save, transform, paintImageMaskXObject, restore)+
  22066. var MIN_IMAGES_IN_MASKS_BLOCK = 10;
  22067. var MAX_IMAGES_IN_MASKS_BLOCK = 100;
  22068. var MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000;
  22069. var fnArray = context.fnArray, argsArray = context.argsArray;
  22070. var j = context.currentOperation - 3, i = j + 4;
  22071. var ii = fnArray.length, q;
  22072. for (; i < ii && fnArray[i - 4] === fnArray[i]; i++) {}
  22073. var count = (i - j) >> 2;
  22074. count = handlePaintSolidColorImageMask(j, count, fnArray, argsArray);
  22075. if (count < MIN_IMAGES_IN_MASKS_BLOCK) {
  22076. context.currentOperation = i - 1;
  22077. return;
  22078. }
  22079. var isSameImage = false;
  22080. var transformArgs;
  22081. if (argsArray[j + 1][1] === 0 && argsArray[j + 1][2] === 0) {
  22082. i = j + 4;
  22083. isSameImage = true;
  22084. for (q = 1; q < count; q++, i += 4) {
  22085. var prevTransformArgs = argsArray[i - 3];
  22086. transformArgs = argsArray[i + 1];
  22087. if (argsArray[i - 2][0] !== argsArray[i + 2][0] ||
  22088. prevTransformArgs[0] !== transformArgs[0] ||
  22089. prevTransformArgs[1] !== transformArgs[1] ||
  22090. prevTransformArgs[2] !== transformArgs[2] ||
  22091. prevTransformArgs[3] !== transformArgs[3]) {
  22092. if (q < MIN_IMAGES_IN_MASKS_BLOCK) {
  22093. isSameImage = false;
  22094. } else {
  22095. count = q;
  22096. }
  22097. break; // different image or transform
  22098. }
  22099. }
  22100. }
  22101. if (isSameImage) {
  22102. count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK);
  22103. var positions = new Float32Array(count * 2);
  22104. i = j + 1;
  22105. for (q = 0; q < count; q++) {
  22106. transformArgs = argsArray[i];
  22107. positions[(q << 1)] = transformArgs[4];
  22108. positions[(q << 1) + 1] = transformArgs[5];
  22109. i += 4;
  22110. }
  22111. // replacing queue items
  22112. fnArray.splice(j, count * 4, OPS.paintImageMaskXObjectRepeat);
  22113. argsArray.splice(j, count * 4, [argsArray[j + 2][0],
  22114. argsArray[j + 1][0], argsArray[j + 1][3], positions]);
  22115. context.currentOperation = j;
  22116. } else {
  22117. count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK);
  22118. var images = [];
  22119. for (q = 0; q < count; q++) {
  22120. transformArgs = argsArray[j + (q << 2) + 1];
  22121. var maskParams = argsArray[j + (q << 2) + 2][0];
  22122. images.push({ data: maskParams.data, width: maskParams.width,
  22123. height: maskParams.height,
  22124. transform: transformArgs });
  22125. }
  22126. // replacing queue items
  22127. fnArray.splice(j, count * 4, OPS.paintImageMaskXObjectGroup);
  22128. argsArray.splice(j, count * 4, [images]);
  22129. context.currentOperation = j;
  22130. }
  22131. });
  22132. addState(InitialState,
  22133. [OPS.save, OPS.transform, OPS.paintImageXObject, OPS.restore],
  22134. function (context) {
  22135. var MIN_IMAGES_IN_BLOCK = 3;
  22136. var MAX_IMAGES_IN_BLOCK = 1000;
  22137. var fnArray = context.fnArray, argsArray = context.argsArray;
  22138. var j = context.currentOperation - 3, i = j + 4;
  22139. if (argsArray[j + 1][1] !== 0 || argsArray[j + 1][2] !== 0) {
  22140. return;
  22141. }
  22142. var ii = fnArray.length;
  22143. var transformArgs;
  22144. for (; i + 3 < ii && fnArray[i - 4] === fnArray[i]; i += 4) {
  22145. if (fnArray[i - 3] !== fnArray[i + 1] ||
  22146. fnArray[i - 2] !== fnArray[i + 2] ||
  22147. fnArray[i - 1] !== fnArray[i + 3]) {
  22148. break;
  22149. }
  22150. if (argsArray[i - 2][0] !== argsArray[i + 2][0]) {
  22151. break; // different image
  22152. }
  22153. var prevTransformArgs = argsArray[i - 3];
  22154. transformArgs = argsArray[i + 1];
  22155. if (prevTransformArgs[0] !== transformArgs[0] ||
  22156. prevTransformArgs[1] !== transformArgs[1] ||
  22157. prevTransformArgs[2] !== transformArgs[2] ||
  22158. prevTransformArgs[3] !== transformArgs[3]) {
  22159. break; // different transform
  22160. }
  22161. }
  22162. var count = Math.min((i - j) >> 2, MAX_IMAGES_IN_BLOCK);
  22163. if (count < MIN_IMAGES_IN_BLOCK) {
  22164. context.currentOperation = i - 1;
  22165. return;
  22166. }
  22167. var positions = new Float32Array(count * 2);
  22168. i = j + 1;
  22169. for (var q = 0; q < count; q++) {
  22170. transformArgs = argsArray[i];
  22171. positions[(q << 1)] = transformArgs[4];
  22172. positions[(q << 1) + 1] = transformArgs[5];
  22173. i += 4;
  22174. }
  22175. var args = [argsArray[j + 2][0], argsArray[j + 1][0],
  22176. argsArray[j + 1][3], positions];
  22177. // replacing queue items
  22178. fnArray.splice(j, count * 4, OPS.paintImageXObjectRepeat);
  22179. argsArray.splice(j, count * 4, args);
  22180. context.currentOperation = j;
  22181. });
  22182. addState(InitialState,
  22183. [OPS.beginText, OPS.setFont, OPS.setTextMatrix, OPS.showText, OPS.endText],
  22184. function (context) {
  22185. // moving single chars with same font into beginText/endText groups
  22186. // searching for (beginText, setFont, setTextMatrix, showText, endText)+
  22187. var MIN_CHARS_IN_BLOCK = 3;
  22188. var MAX_CHARS_IN_BLOCK = 1000;
  22189. var fnArray = context.fnArray, argsArray = context.argsArray;
  22190. var j = context.currentOperation - 4, i = j + 5;
  22191. var ii = fnArray.length;
  22192. for (; i < ii && fnArray[i - 5] === fnArray[i]; i++) {
  22193. if (fnArray[i] === OPS.setFont) {
  22194. if (argsArray[i - 5][0] !== argsArray[i][0] ||
  22195. argsArray[i - 5][1] !== argsArray[i][1]) {
  22196. break;
  22197. }
  22198. }
  22199. }
  22200. var count = Math.min(((i - j) / 5) | 0, MAX_CHARS_IN_BLOCK);
  22201. if (count < MIN_CHARS_IN_BLOCK) {
  22202. context.currentOperation = i - 1;
  22203. return;
  22204. }
  22205. if (j >= 4 && fnArray[j - 4] === fnArray[j + 1] &&
  22206. fnArray[j - 3] === fnArray[j + 2] &&
  22207. fnArray[j - 2] === fnArray[j + 3] &&
  22208. fnArray[j - 1] === fnArray[j + 4] &&
  22209. argsArray[j - 4][0] === argsArray[j + 1][0] &&
  22210. argsArray[j - 4][1] === argsArray[j + 1][1]) {
  22211. // extending one block ahead (very first block might have 'dependency')
  22212. count++;
  22213. j -= 5;
  22214. }
  22215. var k = j + 7;
  22216. i = j + 4;
  22217. for (var q = 1; q < count; q++) {
  22218. fnArray[i] = fnArray[k];
  22219. argsArray[i] = argsArray[k];
  22220. fnArray[i + 1] = fnArray[k + 1];
  22221. argsArray[i + 1] = argsArray[k + 1];
  22222. i += 2;
  22223. k += 5;
  22224. }
  22225. var removed = (count - 1) * 3;
  22226. fnArray.splice(i, removed);
  22227. argsArray.splice(i, removed);
  22228. context.currentOperation = i;
  22229. });
  22230. function QueueOptimizer() {}
  22231. QueueOptimizer.prototype = {
  22232. optimize: function QueueOptimizer_optimize(queue) {
  22233. var fnArray = queue.fnArray, argsArray = queue.argsArray;
  22234. var context = {
  22235. currentOperation: 0,
  22236. fnArray: fnArray,
  22237. argsArray: argsArray
  22238. };
  22239. var i, ii = argsArray.length;
  22240. var state;
  22241. for (i = 0; i < ii; i++) {
  22242. state = (state || InitialState)[fnArray[i]];
  22243. if (typeof state === 'function') { // we found some handler
  22244. context.currentOperation = i;
  22245. state = state(context);
  22246. i = context.currentOperation;
  22247. ii = context.fnArray.length;
  22248. }
  22249. }
  22250. }
  22251. };
  22252. return QueueOptimizer;
  22253. })();
  22254. var BUILT_IN_CMAPS = [
  22255. // << Start unicode maps.
  22256. 'Adobe-GB1-UCS2',
  22257. 'Adobe-CNS1-UCS2',
  22258. 'Adobe-Japan1-UCS2',
  22259. 'Adobe-Korea1-UCS2',
  22260. // >> End unicode maps.
  22261. '78-EUC-H',
  22262. '78-EUC-V',
  22263. '78-H',
  22264. '78-RKSJ-H',
  22265. '78-RKSJ-V',
  22266. '78-V',
  22267. '78ms-RKSJ-H',
  22268. '78ms-RKSJ-V',
  22269. '83pv-RKSJ-H',
  22270. '90ms-RKSJ-H',
  22271. '90ms-RKSJ-V',
  22272. '90msp-RKSJ-H',
  22273. '90msp-RKSJ-V',
  22274. '90pv-RKSJ-H',
  22275. '90pv-RKSJ-V',
  22276. 'Add-H',
  22277. 'Add-RKSJ-H',
  22278. 'Add-RKSJ-V',
  22279. 'Add-V',
  22280. 'Adobe-CNS1-0',
  22281. 'Adobe-CNS1-1',
  22282. 'Adobe-CNS1-2',
  22283. 'Adobe-CNS1-3',
  22284. 'Adobe-CNS1-4',
  22285. 'Adobe-CNS1-5',
  22286. 'Adobe-CNS1-6',
  22287. 'Adobe-GB1-0',
  22288. 'Adobe-GB1-1',
  22289. 'Adobe-GB1-2',
  22290. 'Adobe-GB1-3',
  22291. 'Adobe-GB1-4',
  22292. 'Adobe-GB1-5',
  22293. 'Adobe-Japan1-0',
  22294. 'Adobe-Japan1-1',
  22295. 'Adobe-Japan1-2',
  22296. 'Adobe-Japan1-3',
  22297. 'Adobe-Japan1-4',
  22298. 'Adobe-Japan1-5',
  22299. 'Adobe-Japan1-6',
  22300. 'Adobe-Korea1-0',
  22301. 'Adobe-Korea1-1',
  22302. 'Adobe-Korea1-2',
  22303. 'B5-H',
  22304. 'B5-V',
  22305. 'B5pc-H',
  22306. 'B5pc-V',
  22307. 'CNS-EUC-H',
  22308. 'CNS-EUC-V',
  22309. 'CNS1-H',
  22310. 'CNS1-V',
  22311. 'CNS2-H',
  22312. 'CNS2-V',
  22313. 'ETHK-B5-H',
  22314. 'ETHK-B5-V',
  22315. 'ETen-B5-H',
  22316. 'ETen-B5-V',
  22317. 'ETenms-B5-H',
  22318. 'ETenms-B5-V',
  22319. 'EUC-H',
  22320. 'EUC-V',
  22321. 'Ext-H',
  22322. 'Ext-RKSJ-H',
  22323. 'Ext-RKSJ-V',
  22324. 'Ext-V',
  22325. 'GB-EUC-H',
  22326. 'GB-EUC-V',
  22327. 'GB-H',
  22328. 'GB-V',
  22329. 'GBK-EUC-H',
  22330. 'GBK-EUC-V',
  22331. 'GBK2K-H',
  22332. 'GBK2K-V',
  22333. 'GBKp-EUC-H',
  22334. 'GBKp-EUC-V',
  22335. 'GBT-EUC-H',
  22336. 'GBT-EUC-V',
  22337. 'GBT-H',
  22338. 'GBT-V',
  22339. 'GBTpc-EUC-H',
  22340. 'GBTpc-EUC-V',
  22341. 'GBpc-EUC-H',
  22342. 'GBpc-EUC-V',
  22343. 'H',
  22344. 'HKdla-B5-H',
  22345. 'HKdla-B5-V',
  22346. 'HKdlb-B5-H',
  22347. 'HKdlb-B5-V',
  22348. 'HKgccs-B5-H',
  22349. 'HKgccs-B5-V',
  22350. 'HKm314-B5-H',
  22351. 'HKm314-B5-V',
  22352. 'HKm471-B5-H',
  22353. 'HKm471-B5-V',
  22354. 'HKscs-B5-H',
  22355. 'HKscs-B5-V',
  22356. 'Hankaku',
  22357. 'Hiragana',
  22358. 'KSC-EUC-H',
  22359. 'KSC-EUC-V',
  22360. 'KSC-H',
  22361. 'KSC-Johab-H',
  22362. 'KSC-Johab-V',
  22363. 'KSC-V',
  22364. 'KSCms-UHC-H',
  22365. 'KSCms-UHC-HW-H',
  22366. 'KSCms-UHC-HW-V',
  22367. 'KSCms-UHC-V',
  22368. 'KSCpc-EUC-H',
  22369. 'KSCpc-EUC-V',
  22370. 'Katakana',
  22371. 'NWP-H',
  22372. 'NWP-V',
  22373. 'RKSJ-H',
  22374. 'RKSJ-V',
  22375. 'Roman',
  22376. 'UniCNS-UCS2-H',
  22377. 'UniCNS-UCS2-V',
  22378. 'UniCNS-UTF16-H',
  22379. 'UniCNS-UTF16-V',
  22380. 'UniCNS-UTF32-H',
  22381. 'UniCNS-UTF32-V',
  22382. 'UniCNS-UTF8-H',
  22383. 'UniCNS-UTF8-V',
  22384. 'UniGB-UCS2-H',
  22385. 'UniGB-UCS2-V',
  22386. 'UniGB-UTF16-H',
  22387. 'UniGB-UTF16-V',
  22388. 'UniGB-UTF32-H',
  22389. 'UniGB-UTF32-V',
  22390. 'UniGB-UTF8-H',
  22391. 'UniGB-UTF8-V',
  22392. 'UniJIS-UCS2-H',
  22393. 'UniJIS-UCS2-HW-H',
  22394. 'UniJIS-UCS2-HW-V',
  22395. 'UniJIS-UCS2-V',
  22396. 'UniJIS-UTF16-H',
  22397. 'UniJIS-UTF16-V',
  22398. 'UniJIS-UTF32-H',
  22399. 'UniJIS-UTF32-V',
  22400. 'UniJIS-UTF8-H',
  22401. 'UniJIS-UTF8-V',
  22402. 'UniJIS2004-UTF16-H',
  22403. 'UniJIS2004-UTF16-V',
  22404. 'UniJIS2004-UTF32-H',
  22405. 'UniJIS2004-UTF32-V',
  22406. 'UniJIS2004-UTF8-H',
  22407. 'UniJIS2004-UTF8-V',
  22408. 'UniJISPro-UCS2-HW-V',
  22409. 'UniJISPro-UCS2-V',
  22410. 'UniJISPro-UTF8-V',
  22411. 'UniJISX0213-UTF32-H',
  22412. 'UniJISX0213-UTF32-V',
  22413. 'UniJISX02132004-UTF32-H',
  22414. 'UniJISX02132004-UTF32-V',
  22415. 'UniKS-UCS2-H',
  22416. 'UniKS-UCS2-V',
  22417. 'UniKS-UTF16-H',
  22418. 'UniKS-UTF16-V',
  22419. 'UniKS-UTF32-H',
  22420. 'UniKS-UTF32-V',
  22421. 'UniKS-UTF8-H',
  22422. 'UniKS-UTF8-V',
  22423. 'V',
  22424. 'WP-Symbol'];
  22425. // CMap, not to be confused with TrueType's cmap.
  22426. var CMap = (function CMapClosure() {
  22427. function CMap(builtInCMap) {
  22428. // Codespace ranges are stored as follows:
  22429. // [[1BytePairs], [2BytePairs], [3BytePairs], [4BytePairs]]
  22430. // where nBytePairs are ranges e.g. [low1, high1, low2, high2, ...]
  22431. this.codespaceRanges = [[], [], [], []];
  22432. this.numCodespaceRanges = 0;
  22433. this.map = [];
  22434. this.vertical = false;
  22435. this.useCMap = null;
  22436. this.builtInCMap = builtInCMap;
  22437. }
  22438. CMap.prototype = {
  22439. addCodespaceRange: function(n, low, high) {
  22440. this.codespaceRanges[n - 1].push(low, high);
  22441. this.numCodespaceRanges++;
  22442. },
  22443. mapRange: function(low, high, dstLow) {
  22444. var lastByte = dstLow.length - 1;
  22445. while (low <= high) {
  22446. this.map[low] = dstLow;
  22447. // Only the last byte has to be incremented.
  22448. dstLow = dstLow.substr(0, lastByte) +
  22449. String.fromCharCode(dstLow.charCodeAt(lastByte) + 1);
  22450. ++low;
  22451. }
  22452. },
  22453. mapRangeToArray: function(low, high, array) {
  22454. var i = 0, ii = array.length;
  22455. while (low <= high && i < ii) {
  22456. this.map[low] = array[i++];
  22457. ++low;
  22458. }
  22459. },
  22460. mapOne: function(src, dst) {
  22461. this.map[src] = dst;
  22462. },
  22463. lookup: function(code) {
  22464. return this.map[code];
  22465. },
  22466. readCharCode: function(str, offset) {
  22467. var c = 0;
  22468. var codespaceRanges = this.codespaceRanges;
  22469. var codespaceRangesLen = this.codespaceRanges.length;
  22470. // 9.7.6.2 CMap Mapping
  22471. // The code length is at most 4.
  22472. for (var n = 0; n < codespaceRangesLen; n++) {
  22473. c = ((c << 8) | str.charCodeAt(offset + n)) >>> 0;
  22474. // Check each codespace range to see if it falls within.
  22475. var codespaceRange = codespaceRanges[n];
  22476. for (var k = 0, kk = codespaceRange.length; k < kk;) {
  22477. var low = codespaceRange[k++];
  22478. var high = codespaceRange[k++];
  22479. if (c >= low && c <= high) {
  22480. return [c, n + 1];
  22481. }
  22482. }
  22483. }
  22484. return [0, 1];
  22485. }
  22486. };
  22487. return CMap;
  22488. })();
  22489. var IdentityCMap = (function IdentityCMapClosure() {
  22490. function IdentityCMap(vertical, n) {
  22491. CMap.call(this);
  22492. this.vertical = vertical;
  22493. this.addCodespaceRange(n, 0, 0xffff);
  22494. this.mapRange(0, 0xffff, '\u0000');
  22495. }
  22496. Util.inherit(IdentityCMap, CMap, {});
  22497. return IdentityCMap;
  22498. })();
  22499. var BinaryCMapReader = (function BinaryCMapReaderClosure() {
  22500. function fetchBinaryData(url) {
  22501. var nonBinaryRequest = PDFJS.disableWorker;
  22502. var request = new XMLHttpRequest();
  22503. request.open('GET', url, false);
  22504. if (!nonBinaryRequest) {
  22505. try {
  22506. request.responseType = 'arraybuffer';
  22507. nonBinaryRequest = request.responseType !== 'arraybuffer';
  22508. } catch (e) {
  22509. nonBinaryRequest = true;
  22510. }
  22511. }
  22512. if (nonBinaryRequest && request.overrideMimeType) {
  22513. request.overrideMimeType('text/plain; charset=x-user-defined');
  22514. }
  22515. request.send(null);
  22516. if (request.status === 0 && /^https?:/i.test(url)) {
  22517. error('Unable to get binary cMap at: ' + url);
  22518. }
  22519. if (nonBinaryRequest) {
  22520. var data = Array.prototype.map.call(request.responseText, function (ch) {
  22521. return ch.charCodeAt(0) & 255;
  22522. });
  22523. return new Uint8Array(data);
  22524. }
  22525. return new Uint8Array(request.response);
  22526. }
  22527. function hexToInt(a, size) {
  22528. var n = 0;
  22529. for (var i = 0; i <= size; i++) {
  22530. n = (n << 8) | a[i];
  22531. }
  22532. return n >>> 0;
  22533. }
  22534. function hexToStr(a, size) {
  22535. return String.fromCharCode.apply(null, a.subarray(0, size + 1));
  22536. }
  22537. function addHex(a, b, size) {
  22538. var c = 0;
  22539. for (var i = size; i >= 0; i--) {
  22540. c += a[i] + b[i];
  22541. a[i] = c & 255;
  22542. c >>= 8;
  22543. }
  22544. }
  22545. function incHex(a, size) {
  22546. var c = 1;
  22547. for (var i = size; i >= 0 && c > 0; i--) {
  22548. c += a[i];
  22549. a[i] = c & 255;
  22550. c >>= 8;
  22551. }
  22552. }
  22553. var MAX_NUM_SIZE = 16;
  22554. var MAX_ENCODED_NUM_SIZE = 19; // ceil(MAX_NUM_SIZE * 7 / 8)
  22555. function BinaryCMapStream(data) {
  22556. this.buffer = data;
  22557. this.pos = 0;
  22558. this.end = data.length;
  22559. this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE);
  22560. }
  22561. BinaryCMapStream.prototype = {
  22562. readByte: function () {
  22563. if (this.pos >= this.end) {
  22564. return -1;
  22565. }
  22566. return this.buffer[this.pos++];
  22567. },
  22568. readNumber: function () {
  22569. var n = 0;
  22570. var last;
  22571. do {
  22572. var b = this.readByte();
  22573. if (b < 0) {
  22574. error('unexpected EOF in bcmap');
  22575. }
  22576. last = !(b & 0x80);
  22577. n = (n << 7) | (b & 0x7F);
  22578. } while (!last);
  22579. return n;
  22580. },
  22581. readSigned: function () {
  22582. var n = this.readNumber();
  22583. return (n & 1) ? ~(n >>> 1) : n >>> 1;
  22584. },
  22585. readHex: function (num, size) {
  22586. num.set(this.buffer.subarray(this.pos,
  22587. this.pos + size + 1));
  22588. this.pos += size + 1;
  22589. },
  22590. readHexNumber: function (num, size) {
  22591. var last;
  22592. var stack = this.tmpBuf, sp = 0;
  22593. do {
  22594. var b = this.readByte();
  22595. if (b < 0) {
  22596. error('unexpected EOF in bcmap');
  22597. }
  22598. last = !(b & 0x80);
  22599. stack[sp++] = b & 0x7F;
  22600. } while (!last);
  22601. var i = size, buffer = 0, bufferSize = 0;
  22602. while (i >= 0) {
  22603. while (bufferSize < 8 && stack.length > 0) {
  22604. buffer = (stack[--sp] << bufferSize) | buffer;
  22605. bufferSize += 7;
  22606. }
  22607. num[i] = buffer & 255;
  22608. i--;
  22609. buffer >>= 8;
  22610. bufferSize -= 8;
  22611. }
  22612. },
  22613. readHexSigned: function (num, size) {
  22614. this.readHexNumber(num, size);
  22615. var sign = num[size] & 1 ? 255 : 0;
  22616. var c = 0;
  22617. for (var i = 0; i <= size; i++) {
  22618. c = ((c & 1) << 8) | num[i];
  22619. num[i] = (c >> 1) ^ sign;
  22620. }
  22621. },
  22622. readString: function () {
  22623. var len = this.readNumber();
  22624. var s = '';
  22625. for (var i = 0; i < len; i++) {
  22626. s += String.fromCharCode(this.readNumber());
  22627. }
  22628. return s;
  22629. }
  22630. };
  22631. function processBinaryCMap(url, cMap, extend) {
  22632. var data = fetchBinaryData(url);
  22633. var stream = new BinaryCMapStream(data);
  22634. var header = stream.readByte();
  22635. cMap.vertical = !!(header & 1);
  22636. var useCMap = null;
  22637. var start = new Uint8Array(MAX_NUM_SIZE);
  22638. var end = new Uint8Array(MAX_NUM_SIZE);
  22639. var char = new Uint8Array(MAX_NUM_SIZE);
  22640. var charCode = new Uint8Array(MAX_NUM_SIZE);
  22641. var tmp = new Uint8Array(MAX_NUM_SIZE);
  22642. var code;
  22643. var b;
  22644. while ((b = stream.readByte()) >= 0) {
  22645. var type = b >> 5;
  22646. if (type === 7) { // metadata, e.g. comment or usecmap
  22647. switch (b & 0x1F) {
  22648. case 0:
  22649. stream.readString(); // skipping comment
  22650. break;
  22651. case 1:
  22652. useCMap = stream.readString();
  22653. break;
  22654. }
  22655. continue;
  22656. }
  22657. var sequence = !!(b & 0x10);
  22658. var dataSize = b & 15;
  22659. assert(dataSize + 1 <= MAX_NUM_SIZE);
  22660. var ucs2DataSize = 1;
  22661. var subitemsCount = stream.readNumber();
  22662. var i;
  22663. switch (type) {
  22664. case 0: // codespacerange
  22665. stream.readHex(start, dataSize);
  22666. stream.readHexNumber(end, dataSize);
  22667. addHex(end, start, dataSize);
  22668. cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize),
  22669. hexToInt(end, dataSize));
  22670. for (i = 1; i < subitemsCount; i++) {
  22671. incHex(end, dataSize);
  22672. stream.readHexNumber(start, dataSize);
  22673. addHex(start, end, dataSize);
  22674. stream.readHexNumber(end, dataSize);
  22675. addHex(end, start, dataSize);
  22676. cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize),
  22677. hexToInt(end, dataSize));
  22678. }
  22679. break;
  22680. case 1: // notdefrange
  22681. stream.readHex(start, dataSize);
  22682. stream.readHexNumber(end, dataSize);
  22683. addHex(end, start, dataSize);
  22684. code = stream.readNumber();
  22685. // undefined range, skipping
  22686. for (i = 1; i < subitemsCount; i++) {
  22687. incHex(end, dataSize);
  22688. stream.readHexNumber(start, dataSize);
  22689. addHex(start, end, dataSize);
  22690. stream.readHexNumber(end, dataSize);
  22691. addHex(end, start, dataSize);
  22692. code = stream.readNumber();
  22693. // nop
  22694. }
  22695. break;
  22696. case 2: // cidchar
  22697. stream.readHex(char, dataSize);
  22698. code = stream.readNumber();
  22699. cMap.mapOne(hexToInt(char, dataSize), String.fromCharCode(code));
  22700. for (i = 1; i < subitemsCount; i++) {
  22701. incHex(char, dataSize);
  22702. if (!sequence) {
  22703. stream.readHexNumber(tmp, dataSize);
  22704. addHex(char, tmp, dataSize);
  22705. }
  22706. code = stream.readSigned() + (code + 1);
  22707. cMap.mapOne(hexToInt(char, dataSize), String.fromCharCode(code));
  22708. }
  22709. break;
  22710. case 3: // cidrange
  22711. stream.readHex(start, dataSize);
  22712. stream.readHexNumber(end, dataSize);
  22713. addHex(end, start, dataSize);
  22714. code = stream.readNumber();
  22715. cMap.mapRange(hexToInt(start, dataSize), hexToInt(end, dataSize),
  22716. String.fromCharCode(code));
  22717. for (i = 1; i < subitemsCount; i++) {
  22718. incHex(end, dataSize);
  22719. if (!sequence) {
  22720. stream.readHexNumber(start, dataSize);
  22721. addHex(start, end, dataSize);
  22722. } else {
  22723. start.set(end);
  22724. }
  22725. stream.readHexNumber(end, dataSize);
  22726. addHex(end, start, dataSize);
  22727. code = stream.readNumber();
  22728. cMap.mapRange(hexToInt(start, dataSize), hexToInt(end, dataSize),
  22729. String.fromCharCode(code));
  22730. }
  22731. break;
  22732. case 4: // bfchar
  22733. stream.readHex(char, ucs2DataSize);
  22734. stream.readHex(charCode, dataSize);
  22735. cMap.mapOne(hexToInt(char, ucs2DataSize),
  22736. hexToStr(charCode, dataSize));
  22737. for (i = 1; i < subitemsCount; i++) {
  22738. incHex(char, ucs2DataSize);
  22739. if (!sequence) {
  22740. stream.readHexNumber(tmp, ucs2DataSize);
  22741. addHex(char, tmp, ucs2DataSize);
  22742. }
  22743. incHex(charCode, dataSize);
  22744. stream.readHexSigned(tmp, dataSize);
  22745. addHex(charCode, tmp, dataSize);
  22746. cMap.mapOne(hexToInt(char, ucs2DataSize),
  22747. hexToStr(charCode, dataSize));
  22748. }
  22749. break;
  22750. case 5: // bfrange
  22751. stream.readHex(start, ucs2DataSize);
  22752. stream.readHexNumber(end, ucs2DataSize);
  22753. addHex(end, start, ucs2DataSize);
  22754. stream.readHex(charCode, dataSize);
  22755. cMap.mapRange(hexToInt(start, ucs2DataSize),
  22756. hexToInt(end, ucs2DataSize),
  22757. hexToStr(charCode, dataSize));
  22758. for (i = 1; i < subitemsCount; i++) {
  22759. incHex(end, ucs2DataSize);
  22760. if (!sequence) {
  22761. stream.readHexNumber(start, ucs2DataSize);
  22762. addHex(start, end, ucs2DataSize);
  22763. } else {
  22764. start.set(end);
  22765. }
  22766. stream.readHexNumber(end, ucs2DataSize);
  22767. addHex(end, start, ucs2DataSize);
  22768. stream.readHex(charCode, dataSize);
  22769. cMap.mapRange(hexToInt(start, ucs2DataSize),
  22770. hexToInt(end, ucs2DataSize),
  22771. hexToStr(charCode, dataSize));
  22772. }
  22773. break;
  22774. default:
  22775. error('Unknown type: ' + type);
  22776. break;
  22777. }
  22778. }
  22779. if (useCMap) {
  22780. extend(useCMap);
  22781. }
  22782. return cMap;
  22783. }
  22784. function BinaryCMapReader() {}
  22785. BinaryCMapReader.prototype = {
  22786. read: processBinaryCMap
  22787. };
  22788. return BinaryCMapReader;
  22789. })();
  22790. var CMapFactory = (function CMapFactoryClosure() {
  22791. function strToInt(str) {
  22792. var a = 0;
  22793. for (var i = 0; i < str.length; i++) {
  22794. a = (a << 8) | str.charCodeAt(i);
  22795. }
  22796. return a >>> 0;
  22797. }
  22798. function expectString(obj) {
  22799. if (!isString(obj)) {
  22800. error('Malformed CMap: expected string.');
  22801. }
  22802. }
  22803. function expectInt(obj) {
  22804. if (!isInt(obj)) {
  22805. error('Malformed CMap: expected int.');
  22806. }
  22807. }
  22808. function parseBfChar(cMap, lexer) {
  22809. while (true) {
  22810. var obj = lexer.getObj();
  22811. if (isEOF(obj)) {
  22812. break;
  22813. }
  22814. if (isCmd(obj, 'endbfchar')) {
  22815. return;
  22816. }
  22817. expectString(obj);
  22818. var src = strToInt(obj);
  22819. obj = lexer.getObj();
  22820. // TODO are /dstName used?
  22821. expectString(obj);
  22822. var dst = obj;
  22823. cMap.mapOne(src, dst);
  22824. }
  22825. }
  22826. function parseBfRange(cMap, lexer) {
  22827. while (true) {
  22828. var obj = lexer.getObj();
  22829. if (isEOF(obj)) {
  22830. break;
  22831. }
  22832. if (isCmd(obj, 'endbfrange')) {
  22833. return;
  22834. }
  22835. expectString(obj);
  22836. var low = strToInt(obj);
  22837. obj = lexer.getObj();
  22838. expectString(obj);
  22839. var high = strToInt(obj);
  22840. obj = lexer.getObj();
  22841. if (isInt(obj) || isString(obj)) {
  22842. var dstLow = isInt(obj) ? String.fromCharCode(obj) : obj;
  22843. cMap.mapRange(low, high, dstLow);
  22844. } else if (isCmd(obj, '[')) {
  22845. obj = lexer.getObj();
  22846. var array = [];
  22847. while (!isCmd(obj, ']') && !isEOF(obj)) {
  22848. array.push(obj);
  22849. obj = lexer.getObj();
  22850. }
  22851. cMap.mapRangeToArray(low, high, array);
  22852. } else {
  22853. break;
  22854. }
  22855. }
  22856. error('Invalid bf range.');
  22857. }
  22858. function parseCidChar(cMap, lexer) {
  22859. while (true) {
  22860. var obj = lexer.getObj();
  22861. if (isEOF(obj)) {
  22862. break;
  22863. }
  22864. if (isCmd(obj, 'endcidchar')) {
  22865. return;
  22866. }
  22867. expectString(obj);
  22868. var src = strToInt(obj);
  22869. obj = lexer.getObj();
  22870. expectInt(obj);
  22871. var dst = String.fromCharCode(obj);
  22872. cMap.mapOne(src, dst);
  22873. }
  22874. }
  22875. function parseCidRange(cMap, lexer) {
  22876. while (true) {
  22877. var obj = lexer.getObj();
  22878. if (isEOF(obj)) {
  22879. break;
  22880. }
  22881. if (isCmd(obj, 'endcidrange')) {
  22882. return;
  22883. }
  22884. expectString(obj);
  22885. var low = strToInt(obj);
  22886. obj = lexer.getObj();
  22887. expectString(obj);
  22888. var high = strToInt(obj);
  22889. obj = lexer.getObj();
  22890. expectInt(obj);
  22891. var dstLow = String.fromCharCode(obj);
  22892. cMap.mapRange(low, high, dstLow);
  22893. }
  22894. }
  22895. function parseCodespaceRange(cMap, lexer) {
  22896. while (true) {
  22897. var obj = lexer.getObj();
  22898. if (isEOF(obj)) {
  22899. break;
  22900. }
  22901. if (isCmd(obj, 'endcodespacerange')) {
  22902. return;
  22903. }
  22904. if (!isString(obj)) {
  22905. break;
  22906. }
  22907. var low = strToInt(obj);
  22908. obj = lexer.getObj();
  22909. if (!isString(obj)) {
  22910. break;
  22911. }
  22912. var high = strToInt(obj);
  22913. cMap.addCodespaceRange(obj.length, low, high);
  22914. }
  22915. error('Invalid codespace range.');
  22916. }
  22917. function parseWMode(cMap, lexer) {
  22918. var obj = lexer.getObj();
  22919. if (isInt(obj)) {
  22920. cMap.vertical = !!obj;
  22921. }
  22922. }
  22923. function parseCMap(cMap, lexer, builtInCMapParams, useCMap) {
  22924. var previous;
  22925. var embededUseCMap;
  22926. objLoop: while (true) {
  22927. var obj = lexer.getObj();
  22928. if (isEOF(obj)) {
  22929. break;
  22930. } else if (isName(obj)) {
  22931. if (obj.name === 'WMode') {
  22932. parseWMode(cMap, lexer);
  22933. }
  22934. previous = obj;
  22935. } else if (isCmd(obj)) {
  22936. switch (obj.cmd) {
  22937. case 'endcmap':
  22938. break objLoop;
  22939. case 'usecmap':
  22940. if (isName(previous)) {
  22941. embededUseCMap = previous.name;
  22942. }
  22943. break;
  22944. case 'begincodespacerange':
  22945. parseCodespaceRange(cMap, lexer);
  22946. break;
  22947. case 'beginbfchar':
  22948. parseBfChar(cMap, lexer);
  22949. break;
  22950. case 'begincidchar':
  22951. parseCidChar(cMap, lexer);
  22952. break;
  22953. case 'beginbfrange':
  22954. parseBfRange(cMap, lexer);
  22955. break;
  22956. case 'begincidrange':
  22957. parseCidRange(cMap, lexer);
  22958. break;
  22959. }
  22960. }
  22961. }
  22962. if (!useCMap && embededUseCMap) {
  22963. // Load the usecmap definition from the file only if there wasn't one
  22964. // specified.
  22965. useCMap = embededUseCMap;
  22966. }
  22967. if (useCMap) {
  22968. extendCMap(cMap, builtInCMapParams, useCMap);
  22969. }
  22970. }
  22971. function extendCMap(cMap, builtInCMapParams, useCMap) {
  22972. cMap.useCMap = createBuiltInCMap(useCMap, builtInCMapParams);
  22973. // If there aren't any code space ranges defined clone all the parent ones
  22974. // into this cMap.
  22975. if (cMap.numCodespaceRanges === 0) {
  22976. var useCodespaceRanges = cMap.useCMap.codespaceRanges;
  22977. for (var i = 0; i < useCodespaceRanges.length; i++) {
  22978. cMap.codespaceRanges[i] = useCodespaceRanges[i].slice();
  22979. }
  22980. cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges;
  22981. }
  22982. // Merge the map into the current one, making sure not to override
  22983. // any previously defined entries.
  22984. for (var key in cMap.useCMap.map) {
  22985. if (key in cMap.map) {
  22986. continue;
  22987. }
  22988. cMap.map[key] = cMap.useCMap.map[key];
  22989. }
  22990. }
  22991. function parseBinaryCMap(name, builtInCMapParams) {
  22992. var url = builtInCMapParams.url + name + '.bcmap';
  22993. var cMap = new CMap(true);
  22994. new BinaryCMapReader().read(url, cMap, function (useCMap) {
  22995. extendCMap(cMap, builtInCMapParams, useCMap);
  22996. });
  22997. return cMap;
  22998. }
  22999. function createBuiltInCMap(name, builtInCMapParams) {
  23000. if (name === 'Identity-H') {
  23001. return new IdentityCMap(false, 2);
  23002. } else if (name === 'Identity-V') {
  23003. return new IdentityCMap(true, 2);
  23004. }
  23005. if (BUILT_IN_CMAPS.indexOf(name) === -1) {
  23006. error('Unknown cMap name: ' + name);
  23007. }
  23008. assert (builtInCMapParams, 'buildin cmap parameters are not provided');
  23009. if (builtInCMapParams.packed) {
  23010. return parseBinaryCMap(name, builtInCMapParams);
  23011. }
  23012. var request = new XMLHttpRequest();
  23013. var url = builtInCMapParams.url + name;
  23014. request.open('GET', url, false);
  23015. request.send(null);
  23016. if (request.status === 0 && /^https?:/i.test(url)) {
  23017. error('Unable to get cMap at: ' + url);
  23018. }
  23019. var cMap = new CMap(true);
  23020. var lexer = new Lexer(new StringStream(request.responseText));
  23021. parseCMap(cMap, lexer, builtInCMapParams, null);
  23022. return cMap;
  23023. }
  23024. return {
  23025. create: function (encoding, builtInCMapParams, useCMap) {
  23026. if (isName(encoding)) {
  23027. return createBuiltInCMap(encoding.name, builtInCMapParams);
  23028. } else if (isStream(encoding)) {
  23029. var cMap = new CMap();
  23030. var lexer = new Lexer(encoding);
  23031. try {
  23032. parseCMap(cMap, lexer, builtInCMapParams, useCMap);
  23033. } catch (e) {
  23034. warn('Invalid CMap data. ' + e);
  23035. }
  23036. return cMap;
  23037. }
  23038. error('Encoding required.');
  23039. }
  23040. };
  23041. })();
  23042. // Unicode Private Use Area
  23043. var PRIVATE_USE_OFFSET_START = 0xE000;
  23044. var PRIVATE_USE_OFFSET_END = 0xF8FF;
  23045. var SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = false;
  23046. // PDF Glyph Space Units are one Thousandth of a TextSpace Unit
  23047. // except for Type 3 fonts
  23048. var PDF_GLYPH_SPACE_UNITS = 1000;
  23049. // Hinting is currently disabled due to unknown problems on windows
  23050. // in tracemonkey and various other pdfs with type1 fonts.
  23051. var HINTING_ENABLED = false;
  23052. // Accented charactars are not displayed properly on windows, using this flag
  23053. // to control analysis of seac charstrings.
  23054. var SEAC_ANALYSIS_ENABLED = false;
  23055. var FontFlags = {
  23056. FixedPitch: 1,
  23057. Serif: 2,
  23058. Symbolic: 4,
  23059. Script: 8,
  23060. Nonsymbolic: 32,
  23061. Italic: 64,
  23062. AllCap: 65536,
  23063. SmallCap: 131072,
  23064. ForceBold: 262144
  23065. };
  23066. var Encodings = {
  23067. ExpertEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23068. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23069. 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle',
  23070. 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
  23071. 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',
  23072. 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',
  23073. 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',
  23074. 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',
  23075. 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior',
  23076. 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior',
  23077. 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',
  23078. 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior',
  23079. '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '',
  23080. 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
  23081. 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
  23082. 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
  23083. 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
  23084. 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
  23085. 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '',
  23086. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23087. '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall',
  23088. '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall',
  23089. 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '',
  23090. 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall',
  23091. 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',
  23092. 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
  23093. 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior',
  23094. 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior',
  23095. 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior',
  23096. 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',
  23097. 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior',
  23098. 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior',
  23099. 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',
  23100. 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall',
  23101. 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
  23102. 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
  23103. 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
  23104. 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
  23105. 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
  23106. 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
  23107. 'Ydieresissmall'],
  23108. MacExpertEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23109. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23110. 'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle',
  23111. 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall',
  23112. 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  23113. 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle',
  23114. 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle',
  23115. 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle',
  23116. 'nineoldstyle', 'colon', 'semicolon', '', 'threequartersemdash', '',
  23117. 'questionsmall', '', '', '', '', 'Ethsmall', '', '', 'onequarter',
  23118. 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',
  23119. 'seveneighths', 'onethird', 'twothirds', '', '', '', '', '', '', 'ff',
  23120. 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior',
  23121. 'Circumflexsmall', 'hypheninferior', 'Gravesmall', 'Asmall', 'Bsmall',
  23122. 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall',
  23123. 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall',
  23124. 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',
  23125. 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah',
  23126. 'Tildesmall', '', '', 'asuperior', 'centsuperior', '', '', '', '',
  23127. 'Aacutesmall', 'Agravesmall', 'Acircumflexsmall', 'Adieresissmall',
  23128. 'Atildesmall', 'Aringsmall', 'Ccedillasmall', 'Eacutesmall', 'Egravesmall',
  23129. 'Ecircumflexsmall', 'Edieresissmall', 'Iacutesmall', 'Igravesmall',
  23130. 'Icircumflexsmall', 'Idieresissmall', 'Ntildesmall', 'Oacutesmall',
  23131. 'Ogravesmall', 'Ocircumflexsmall', 'Odieresissmall', 'Otildesmall',
  23132. 'Uacutesmall', 'Ugravesmall', 'Ucircumflexsmall', 'Udieresissmall', '',
  23133. 'eightsuperior', 'fourinferior', 'threeinferior', 'sixinferior',
  23134. 'eightinferior', 'seveninferior', 'Scaronsmall', '', 'centinferior',
  23135. 'twoinferior', '', 'Dieresissmall', '', 'Caronsmall', 'osuperior',
  23136. 'fiveinferior', '', 'commainferior', 'periodinferior', 'Yacutesmall', '',
  23137. 'dollarinferior', '', 'Thornsmall', '', 'nineinferior', 'zeroinferior',
  23138. 'Zcaronsmall', 'AEsmall', 'Oslashsmall', 'questiondownsmall',
  23139. 'oneinferior', 'Lslashsmall', '', '', '', '', '', '', 'Cedillasmall', '',
  23140. '', '', '', '', 'OEsmall', 'figuredash', 'hyphensuperior', '', '', '', '',
  23141. 'exclamdownsmall', '', 'Ydieresissmall', '', 'onesuperior', 'twosuperior',
  23142. 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior',
  23143. 'sevensuperior', 'ninesuperior', 'zerosuperior', '', 'esuperior',
  23144. 'rsuperior', 'tsuperior', '', '', 'isuperior', 'ssuperior', 'dsuperior',
  23145. '', '', '', '', '', 'lsuperior', 'Ogoneksmall', 'Brevesmall',
  23146. 'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
  23147. 'periodsuperior', 'Dotaccentsmall', 'Ringsmall'],
  23148. MacRomanEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23149. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23150. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  23151. 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus',
  23152. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  23153. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  23154. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  23155. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  23156. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  23157. 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
  23158. 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
  23159. 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '',
  23160. 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis',
  23161. 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde',
  23162. 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',
  23163. 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute',
  23164. 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave',
  23165. 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling',
  23166. 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright',
  23167. 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity',
  23168. 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff',
  23169. 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine',
  23170. 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot',
  23171. 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft',
  23172. 'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE',
  23173. 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft',
  23174. 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',
  23175. 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl',
  23176. 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand',
  23177. 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',
  23178. 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple',
  23179. 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex',
  23180. 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
  23181. 'ogonek', 'caron'],
  23182. StandardEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23183. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23184. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  23185. 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
  23186. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  23187. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  23188. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  23189. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  23190. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  23191. 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f',
  23192. 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
  23193. 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',
  23194. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23195. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown',
  23196. 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  23197. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  23198. 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl',
  23199. 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase',
  23200. 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',
  23201. 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex',
  23202. 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla',
  23203. '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '',
  23204. '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '',
  23205. '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae',
  23206. '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'],
  23207. WinAnsiEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23208. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23209. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  23210. 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus',
  23211. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  23212. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  23213. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  23214. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  23215. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  23216. 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
  23217. 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
  23218. 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',
  23219. 'bullet', 'Euro', 'bullet', 'quotesinglbase', 'florin', 'quotedblbase',
  23220. 'ellipsis', 'dagger', 'daggerdbl', 'circumflex', 'perthousand', 'Scaron',
  23221. 'guilsinglleft', 'OE', 'bullet', 'Zcaron', 'bullet', 'bullet', 'quoteleft',
  23222. 'quoteright', 'quotedblleft', 'quotedblright', 'bullet', 'endash',
  23223. 'emdash', 'tilde', 'trademark', 'scaron', 'guilsinglright', 'oe', 'bullet',
  23224. 'zcaron', 'Ydieresis', 'space', 'exclamdown', 'cent', 'sterling',
  23225. 'currency', 'yen', 'brokenbar', 'section', 'dieresis', 'copyright',
  23226. 'ordfeminine', 'guillemotleft', 'logicalnot', 'hyphen', 'registered',
  23227. 'macron', 'degree', 'plusminus', 'twosuperior', 'threesuperior', 'acute',
  23228. 'mu', 'paragraph', 'periodcentered', 'cedilla', 'onesuperior',
  23229. 'ordmasculine', 'guillemotright', 'onequarter', 'onehalf', 'threequarters',
  23230. 'questiondown', 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', 'Adieresis',
  23231. 'Aring', 'AE', 'Ccedilla', 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis',
  23232. 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Eth', 'Ntilde', 'Ograve',
  23233. 'Oacute', 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', 'Oslash',
  23234. 'Ugrave', 'Uacute', 'Ucircumflex', 'Udieresis', 'Yacute', 'Thorn',
  23235. 'germandbls', 'agrave', 'aacute', 'acircumflex', 'atilde', 'adieresis',
  23236. 'aring', 'ae', 'ccedilla', 'egrave', 'eacute', 'ecircumflex', 'edieresis',
  23237. 'igrave', 'iacute', 'icircumflex', 'idieresis', 'eth', 'ntilde', 'ograve',
  23238. 'oacute', 'ocircumflex', 'otilde', 'odieresis', 'divide', 'oslash',
  23239. 'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
  23240. 'ydieresis'],
  23241. SymbolSetEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23242. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23243. 'space', 'exclam', 'universal', 'numbersign', 'existential', 'percent',
  23244. 'ampersand', 'suchthat', 'parenleft', 'parenright', 'asteriskmath', 'plus',
  23245. 'comma', 'minus', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four',
  23246. 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',
  23247. 'equal', 'greater', 'question', 'congruent', 'Alpha', 'Beta', 'Chi',
  23248. 'Delta', 'Epsilon', 'Phi', 'Gamma', 'Eta', 'Iota', 'theta1', 'Kappa',
  23249. 'Lambda', 'Mu', 'Nu', 'Omicron', 'Pi', 'Theta', 'Rho', 'Sigma', 'Tau',
  23250. 'Upsilon', 'sigma1', 'Omega', 'Xi', 'Psi', 'Zeta', 'bracketleft',
  23251. 'therefore', 'bracketright', 'perpendicular', 'underscore', 'radicalex',
  23252. 'alpha', 'beta', 'chi', 'delta', 'epsilon', 'phi', 'gamma', 'eta', 'iota',
  23253. 'phi1', 'kappa', 'lambda', 'mu', 'nu', 'omicron', 'pi', 'theta', 'rho',
  23254. 'sigma', 'tau', 'upsilon', 'omega1', 'omega', 'xi', 'psi', 'zeta',
  23255. 'braceleft', 'bar', 'braceright', 'similar', '', '', '', '', '', '', '',
  23256. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23257. '', '', '', '', '', '', '', 'Euro', 'Upsilon1', 'minute', 'lessequal',
  23258. 'fraction', 'infinity', 'florin', 'club', 'diamond', 'heart', 'spade',
  23259. 'arrowboth', 'arrowleft', 'arrowup', 'arrowright', 'arrowdown', 'degree',
  23260. 'plusminus', 'second', 'greaterequal', 'multiply', 'proportional',
  23261. 'partialdiff', 'bullet', 'divide', 'notequal', 'equivalence',
  23262. 'approxequal', 'ellipsis', 'arrowvertex', 'arrowhorizex', 'carriagereturn',
  23263. 'aleph', 'Ifraktur', 'Rfraktur', 'weierstrass', 'circlemultiply',
  23264. 'circleplus', 'emptyset', 'intersection', 'union', 'propersuperset',
  23265. 'reflexsuperset', 'notsubset', 'propersubset', 'reflexsubset', 'element',
  23266. 'notelement', 'angle', 'gradient', 'registerserif', 'copyrightserif',
  23267. 'trademarkserif', 'product', 'radical', 'dotmath', 'logicalnot',
  23268. 'logicaland', 'logicalor', 'arrowdblboth', 'arrowdblleft', 'arrowdblup',
  23269. 'arrowdblright', 'arrowdbldown', 'lozenge', 'angleleft', 'registersans',
  23270. 'copyrightsans', 'trademarksans', 'summation', 'parenlefttp',
  23271. 'parenleftex', 'parenleftbt', 'bracketlefttp', 'bracketleftex',
  23272. 'bracketleftbt', 'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex',
  23273. '', 'angleright', 'integral', 'integraltp', 'integralex', 'integralbt',
  23274. 'parenrighttp', 'parenrightex', 'parenrightbt', 'bracketrighttp',
  23275. 'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
  23276. 'bracerightbt'],
  23277. zapfDingbatsEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23278. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23279. 'space', 'a1', 'a2', 'a202', 'a3', 'a4', 'a5', 'a119', 'a118', 'a117',
  23280. 'a11', 'a12', 'a13', 'a14', 'a15', 'a16', 'a105', 'a17', 'a18', 'a19',
  23281. 'a20', 'a21', 'a22', 'a23', 'a24', 'a25', 'a26', 'a27', 'a28', 'a6', 'a7',
  23282. 'a8', 'a9', 'a10', 'a29', 'a30', 'a31', 'a32', 'a33', 'a34', 'a35', 'a36',
  23283. 'a37', 'a38', 'a39', 'a40', 'a41', 'a42', 'a43', 'a44', 'a45', 'a46',
  23284. 'a47', 'a48', 'a49', 'a50', 'a51', 'a52', 'a53', 'a54', 'a55', 'a56',
  23285. 'a57', 'a58', 'a59', 'a60', 'a61', 'a62', 'a63', 'a64', 'a65', 'a66',
  23286. 'a67', 'a68', 'a69', 'a70', 'a71', 'a72', 'a73', 'a74', 'a203', 'a75',
  23287. 'a204', 'a76', 'a77', 'a78', 'a79', 'a81', 'a82', 'a83', 'a84', 'a97',
  23288. 'a98', 'a99', 'a100', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23289. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  23290. '', '', 'a101', 'a102', 'a103', 'a104', 'a106', 'a107', 'a108', 'a112',
  23291. 'a111', 'a110', 'a109', 'a120', 'a121', 'a122', 'a123', 'a124', 'a125',
  23292. 'a126', 'a127', 'a128', 'a129', 'a130', 'a131', 'a132', 'a133', 'a134',
  23293. 'a135', 'a136', 'a137', 'a138', 'a139', 'a140', 'a141', 'a142', 'a143',
  23294. 'a144', 'a145', 'a146', 'a147', 'a148', 'a149', 'a150', 'a151', 'a152',
  23295. 'a153', 'a154', 'a155', 'a156', 'a157', 'a158', 'a159', 'a160', 'a161',
  23296. 'a163', 'a164', 'a196', 'a165', 'a192', 'a166', 'a167', 'a168', 'a169',
  23297. 'a170', 'a171', 'a172', 'a173', 'a162', 'a174', 'a175', 'a176', 'a177',
  23298. 'a178', 'a179', 'a193', 'a180', 'a199', 'a181', 'a200', 'a182', '', 'a201',
  23299. 'a183', 'a184', 'a197', 'a185', 'a194', 'a198', 'a186', 'a195', 'a187',
  23300. 'a188', 'a189', 'a190', 'a191']
  23301. };
  23302. /**
  23303. * Hold a map of decoded fonts and of the standard fourteen Type1
  23304. * fonts and their acronyms.
  23305. */
  23306. var stdFontMap = {
  23307. 'ArialNarrow': 'Helvetica',
  23308. 'ArialNarrow-Bold': 'Helvetica-Bold',
  23309. 'ArialNarrow-BoldItalic': 'Helvetica-BoldOblique',
  23310. 'ArialNarrow-Italic': 'Helvetica-Oblique',
  23311. 'ArialBlack': 'Helvetica',
  23312. 'ArialBlack-Bold': 'Helvetica-Bold',
  23313. 'ArialBlack-BoldItalic': 'Helvetica-BoldOblique',
  23314. 'ArialBlack-Italic': 'Helvetica-Oblique',
  23315. 'Arial': 'Helvetica',
  23316. 'Arial-Bold': 'Helvetica-Bold',
  23317. 'Arial-BoldItalic': 'Helvetica-BoldOblique',
  23318. 'Arial-Italic': 'Helvetica-Oblique',
  23319. 'Arial-BoldItalicMT': 'Helvetica-BoldOblique',
  23320. 'Arial-BoldMT': 'Helvetica-Bold',
  23321. 'Arial-ItalicMT': 'Helvetica-Oblique',
  23322. 'ArialMT': 'Helvetica',
  23323. 'Courier-Bold': 'Courier-Bold',
  23324. 'Courier-BoldItalic': 'Courier-BoldOblique',
  23325. 'Courier-Italic': 'Courier-Oblique',
  23326. 'CourierNew': 'Courier',
  23327. 'CourierNew-Bold': 'Courier-Bold',
  23328. 'CourierNew-BoldItalic': 'Courier-BoldOblique',
  23329. 'CourierNew-Italic': 'Courier-Oblique',
  23330. 'CourierNewPS-BoldItalicMT': 'Courier-BoldOblique',
  23331. 'CourierNewPS-BoldMT': 'Courier-Bold',
  23332. 'CourierNewPS-ItalicMT': 'Courier-Oblique',
  23333. 'CourierNewPSMT': 'Courier',
  23334. 'Helvetica-Bold': 'Helvetica-Bold',
  23335. 'Helvetica-BoldItalic': 'Helvetica-BoldOblique',
  23336. 'Helvetica-Italic': 'Helvetica-Oblique',
  23337. 'Symbol-Bold': 'Symbol',
  23338. 'Symbol-BoldItalic': 'Symbol',
  23339. 'Symbol-Italic': 'Symbol',
  23340. 'TimesNewRoman': 'Times-Roman',
  23341. 'TimesNewRoman-Bold': 'Times-Bold',
  23342. 'TimesNewRoman-BoldItalic': 'Times-BoldItalic',
  23343. 'TimesNewRoman-Italic': 'Times-Italic',
  23344. 'TimesNewRomanPS': 'Times-Roman',
  23345. 'TimesNewRomanPS-Bold': 'Times-Bold',
  23346. 'TimesNewRomanPS-BoldItalic': 'Times-BoldItalic',
  23347. 'TimesNewRomanPS-BoldItalicMT': 'Times-BoldItalic',
  23348. 'TimesNewRomanPS-BoldMT': 'Times-Bold',
  23349. 'TimesNewRomanPS-Italic': 'Times-Italic',
  23350. 'TimesNewRomanPS-ItalicMT': 'Times-Italic',
  23351. 'TimesNewRomanPSMT': 'Times-Roman',
  23352. 'TimesNewRomanPSMT-Bold': 'Times-Bold',
  23353. 'TimesNewRomanPSMT-BoldItalic': 'Times-BoldItalic',
  23354. 'TimesNewRomanPSMT-Italic': 'Times-Italic'
  23355. };
  23356. /**
  23357. * Holds the map of the non-standard fonts that might be included as a standard
  23358. * fonts without glyph data.
  23359. */
  23360. var nonStdFontMap = {
  23361. 'ComicSansMS': 'Comic Sans MS',
  23362. 'ComicSansMS-Bold': 'Comic Sans MS-Bold',
  23363. 'ComicSansMS-BoldItalic': 'Comic Sans MS-BoldItalic',
  23364. 'ComicSansMS-Italic': 'Comic Sans MS-Italic',
  23365. 'LucidaConsole': 'Courier',
  23366. 'LucidaConsole-Bold': 'Courier-Bold',
  23367. 'LucidaConsole-BoldItalic': 'Courier-BoldOblique',
  23368. 'LucidaConsole-Italic': 'Courier-Oblique',
  23369. 'MS-Gothic': 'MS Gothic',
  23370. 'MS-Gothic-Bold': 'MS Gothic-Bold',
  23371. 'MS-Gothic-BoldItalic': 'MS Gothic-BoldItalic',
  23372. 'MS-Gothic-Italic': 'MS Gothic-Italic',
  23373. 'MS-Mincho': 'MS Mincho',
  23374. 'MS-Mincho-Bold': 'MS Mincho-Bold',
  23375. 'MS-Mincho-BoldItalic': 'MS Mincho-BoldItalic',
  23376. 'MS-Mincho-Italic': 'MS Mincho-Italic',
  23377. 'MS-PGothic': 'MS PGothic',
  23378. 'MS-PGothic-Bold': 'MS PGothic-Bold',
  23379. 'MS-PGothic-BoldItalic': 'MS PGothic-BoldItalic',
  23380. 'MS-PGothic-Italic': 'MS PGothic-Italic',
  23381. 'MS-PMincho': 'MS PMincho',
  23382. 'MS-PMincho-Bold': 'MS PMincho-Bold',
  23383. 'MS-PMincho-BoldItalic': 'MS PMincho-BoldItalic',
  23384. 'MS-PMincho-Italic': 'MS PMincho-Italic'
  23385. };
  23386. var serifFonts = {
  23387. 'Adobe Jenson': true, 'Adobe Text': true, 'Albertus': true,
  23388. 'Aldus': true, 'Alexandria': true, 'Algerian': true,
  23389. 'American Typewriter': true, 'Antiqua': true, 'Apex': true,
  23390. 'Arno': true, 'Aster': true, 'Aurora': true,
  23391. 'Baskerville': true, 'Bell': true, 'Bembo': true,
  23392. 'Bembo Schoolbook': true, 'Benguiat': true, 'Berkeley Old Style': true,
  23393. 'Bernhard Modern': true, 'Berthold City': true, 'Bodoni': true,
  23394. 'Bauer Bodoni': true, 'Book Antiqua': true, 'Bookman': true,
  23395. 'Bordeaux Roman': true, 'Californian FB': true, 'Calisto': true,
  23396. 'Calvert': true, 'Capitals': true, 'Cambria': true,
  23397. 'Cartier': true, 'Caslon': true, 'Catull': true,
  23398. 'Centaur': true, 'Century Old Style': true, 'Century Schoolbook': true,
  23399. 'Chaparral': true, 'Charis SIL': true, 'Cheltenham': true,
  23400. 'Cholla Slab': true, 'Clarendon': true, 'Clearface': true,
  23401. 'Cochin': true, 'Colonna': true, 'Computer Modern': true,
  23402. 'Concrete Roman': true, 'Constantia': true, 'Cooper Black': true,
  23403. 'Corona': true, 'Ecotype': true, 'Egyptienne': true,
  23404. 'Elephant': true, 'Excelsior': true, 'Fairfield': true,
  23405. 'FF Scala': true, 'Folkard': true, 'Footlight': true,
  23406. 'FreeSerif': true, 'Friz Quadrata': true, 'Garamond': true,
  23407. 'Gentium': true, 'Georgia': true, 'Gloucester': true,
  23408. 'Goudy Old Style': true, 'Goudy Schoolbook': true, 'Goudy Pro Font': true,
  23409. 'Granjon': true, 'Guardian Egyptian': true, 'Heather': true,
  23410. 'Hercules': true, 'High Tower Text': true, 'Hiroshige': true,
  23411. 'Hoefler Text': true, 'Humana Serif': true, 'Imprint': true,
  23412. 'Ionic No. 5': true, 'Janson': true, 'Joanna': true,
  23413. 'Korinna': true, 'Lexicon': true, 'Liberation Serif': true,
  23414. 'Linux Libertine': true, 'Literaturnaya': true, 'Lucida': true,
  23415. 'Lucida Bright': true, 'Melior': true, 'Memphis': true,
  23416. 'Miller': true, 'Minion': true, 'Modern': true,
  23417. 'Mona Lisa': true, 'Mrs Eaves': true, 'MS Serif': true,
  23418. 'Museo Slab': true, 'New York': true, 'Nimbus Roman': true,
  23419. 'NPS Rawlinson Roadway': true, 'Palatino': true, 'Perpetua': true,
  23420. 'Plantin': true, 'Plantin Schoolbook': true, 'Playbill': true,
  23421. 'Poor Richard': true, 'Rawlinson Roadway': true, 'Renault': true,
  23422. 'Requiem': true, 'Rockwell': true, 'Roman': true,
  23423. 'Rotis Serif': true, 'Sabon': true, 'Scala': true,
  23424. 'Seagull': true, 'Sistina': true, 'Souvenir': true,
  23425. 'STIX': true, 'Stone Informal': true, 'Stone Serif': true,
  23426. 'Sylfaen': true, 'Times': true, 'Trajan': true,
  23427. 'Trinité': true, 'Trump Mediaeval': true, 'Utopia': true,
  23428. 'Vale Type': true, 'Bitstream Vera': true, 'Vera Serif': true,
  23429. 'Versailles': true, 'Wanted': true, 'Weiss': true,
  23430. 'Wide Latin': true, 'Windsor': true, 'XITS': true
  23431. };
  23432. var symbolsFonts = {
  23433. 'Dingbats': true, 'Symbol': true, 'ZapfDingbats': true
  23434. };
  23435. // Glyph map for well-known standard fonts. Sometimes Ghostscript uses CID fonts
  23436. // but does not embed the CID to GID mapping. The mapping is incomplete for all
  23437. // glyphs, but common for some set of the standard fonts.
  23438. var GlyphMapForStandardFonts = {
  23439. '2': 10, '3': 32, '4': 33, '5': 34, '6': 35, '7': 36, '8': 37, '9': 38,
  23440. '10': 39, '11': 40, '12': 41, '13': 42, '14': 43, '15': 44, '16': 45,
  23441. '17': 46, '18': 47, '19': 48, '20': 49, '21': 50, '22': 51, '23': 52,
  23442. '24': 53, '25': 54, '26': 55, '27': 56, '28': 57, '29': 58, '30': 894,
  23443. '31': 60, '32': 61, '33': 62, '34': 63, '35': 64, '36': 65, '37': 66,
  23444. '38': 67, '39': 68, '40': 69, '41': 70, '42': 71, '43': 72, '44': 73,
  23445. '45': 74, '46': 75, '47': 76, '48': 77, '49': 78, '50': 79, '51': 80,
  23446. '52': 81, '53': 82, '54': 83, '55': 84, '56': 85, '57': 86, '58': 87,
  23447. '59': 88, '60': 89, '61': 90, '62': 91, '63': 92, '64': 93, '65': 94,
  23448. '66': 95, '67': 96, '68': 97, '69': 98, '70': 99, '71': 100, '72': 101,
  23449. '73': 102, '74': 103, '75': 104, '76': 105, '77': 106, '78': 107, '79': 108,
  23450. '80': 109, '81': 110, '82': 111, '83': 112, '84': 113, '85': 114, '86': 115,
  23451. '87': 116, '88': 117, '89': 118, '90': 119, '91': 120, '92': 121, '93': 122,
  23452. '94': 123, '95': 124, '96': 125, '97': 126, '98': 196, '99': 197, '100': 199,
  23453. '101': 201, '102': 209, '103': 214, '104': 220, '105': 225, '106': 224,
  23454. '107': 226, '108': 228, '109': 227, '110': 229, '111': 231, '112': 233,
  23455. '113': 232, '114': 234, '115': 235, '116': 237, '117': 236, '118': 238,
  23456. '119': 239, '120': 241, '121': 243, '122': 242, '123': 244, '124': 246,
  23457. '125': 245, '126': 250, '127': 249, '128': 251, '129': 252, '130': 8224,
  23458. '131': 176, '132': 162, '133': 163, '134': 167, '135': 8226, '136': 182,
  23459. '137': 223, '138': 174, '139': 169, '140': 8482, '141': 180, '142': 168,
  23460. '143': 8800, '144': 198, '145': 216, '146': 8734, '147': 177, '148': 8804,
  23461. '149': 8805, '150': 165, '151': 181, '152': 8706, '153': 8721, '154': 8719,
  23462. '156': 8747, '157': 170, '158': 186, '159': 8486, '160': 230, '161': 248,
  23463. '162': 191, '163': 161, '164': 172, '165': 8730, '166': 402, '167': 8776,
  23464. '168': 8710, '169': 171, '170': 187, '171': 8230, '210': 218, '223': 711,
  23465. '227': 353, '229': 382, '234': 253, '253': 268, '254': 269, '258': 258,
  23466. '268': 283, '269': 313, '278': 328, '284': 345, '292': 367, '305': 963,
  23467. '306': 964, '307': 966, '308': 8215, '309': 8252, '310': 8319, '311': 8359,
  23468. '312': 8592, '313': 8593, '337': 9552, '493': 1039, '494': 1040, '705': 1524,
  23469. '706': 8362, '710': 64288, '711': 64298, '759': 1617, '761': 1776,
  23470. '763': 1778, '775': 1652, '777': 1764, '778': 1780, '779': 1781, '780': 1782,
  23471. '782': 771, '783': 64726, '786': 8363, '788': 8532, '790': 768, '791': 769,
  23472. '792': 768, '795': 803, '797': 64336, '798': 64337, '799': 64342,
  23473. '800': 64343, '801': 64344, '802': 64345, '803': 64362, '804': 64363,
  23474. '805': 64364, '2424': 7821, '2425': 7822, '2426': 7823, '2427': 7824,
  23475. '2428': 7825, '2429': 7826, '2430': 7827, '2433': 7682, '2678': 8045,
  23476. '2679': 8046, '2830': 1552, '2838': 686, '2840': 751, '2842': 753,
  23477. '2843': 754, '2844': 755, '2846': 757, '2856': 767, '2857': 848, '2858': 849,
  23478. '2862': 853, '2863': 854, '2864': 855, '2865': 861, '2866': 862, '2906': 7460,
  23479. '2908': 7462, '2909': 7463, '2910': 7464, '2912': 7466, '2913': 7467,
  23480. '2914': 7468, '2916': 7470, '2917': 7471, '2918': 7472, '2920': 7474,
  23481. '2921': 7475, '2922': 7476, '2924': 7478, '2925': 7479, '2926': 7480,
  23482. '2928': 7482, '2929': 7483, '2930': 7484, '2932': 7486, '2933': 7487,
  23483. '2934': 7488, '2936': 7490, '2937': 7491, '2938': 7492, '2940': 7494,
  23484. '2941': 7495, '2942': 7496, '2944': 7498, '2946': 7500, '2948': 7502,
  23485. '2950': 7504, '2951': 7505, '2952': 7506, '2954': 7508, '2955': 7509,
  23486. '2956': 7510, '2958': 7512, '2959': 7513, '2960': 7514, '2962': 7516,
  23487. '2963': 7517, '2964': 7518, '2966': 7520, '2967': 7521, '2968': 7522,
  23488. '2970': 7524, '2971': 7525, '2972': 7526, '2974': 7528, '2975': 7529,
  23489. '2976': 7530, '2978': 1537, '2979': 1538, '2980': 1539, '2982': 1549,
  23490. '2983': 1551, '2984': 1552, '2986': 1554, '2987': 1555, '2988': 1556,
  23491. '2990': 1623, '2991': 1624, '2995': 1775, '2999': 1791, '3002': 64290,
  23492. '3003': 64291, '3004': 64292, '3006': 64294, '3007': 64295, '3008': 64296,
  23493. '3011': 1900, '3014': 8223, '3015': 8244, '3017': 7532, '3018': 7533,
  23494. '3019': 7534, '3075': 7590, '3076': 7591, '3079': 7594, '3080': 7595,
  23495. '3083': 7598, '3084': 7599, '3087': 7602, '3088': 7603, '3091': 7606,
  23496. '3092': 7607, '3095': 7610, '3096': 7611, '3099': 7614, '3100': 7615,
  23497. '3103': 7618, '3104': 7619, '3107': 8337, '3108': 8338, '3116': 1884,
  23498. '3119': 1885, '3120': 1885, '3123': 1886, '3124': 1886, '3127': 1887,
  23499. '3128': 1887, '3131': 1888, '3132': 1888, '3135': 1889, '3136': 1889,
  23500. '3139': 1890, '3140': 1890, '3143': 1891, '3144': 1891, '3147': 1892,
  23501. '3148': 1892, '3153': 580, '3154': 581, '3157': 584, '3158': 585, '3161': 588,
  23502. '3162': 589, '3165': 891, '3166': 892, '3169': 1274, '3170': 1275,
  23503. '3173': 1278, '3174': 1279, '3181': 7622, '3182': 7623, '3282': 11799,
  23504. '3316': 578, '3379': 42785, '3393': 1159, '3416': 8377
  23505. };
  23506. // Some characters, e.g. copyrightserif, mapped to the private use area and
  23507. // might not be displayed using standard fonts. Mapping/hacking well-known chars
  23508. // to the similar equivalents in the normal characters range.
  23509. function mapSpecialUnicodeValues(code) {
  23510. if (code >= 0xFFF0 && code <= 0xFFFF) { // Specials unicode block.
  23511. return 0;
  23512. }
  23513. switch (code) {
  23514. case 0xF8E9: // copyrightsans
  23515. case 0xF6D9: // copyrightserif
  23516. return 0x00A9; // copyright
  23517. case 0xF8E8: // registersans
  23518. case 0xF6DA: // registerserif
  23519. return 0x00AE; // registered
  23520. case 0xF8EA: // trademarksans
  23521. case 0xF6DB: // trademarkserif
  23522. return 0x2122; // trademark
  23523. default:
  23524. return code;
  23525. }
  23526. }
  23527. var UnicodeRanges = [
  23528. { 'begin': 0x0000, 'end': 0x007F }, // Basic Latin
  23529. { 'begin': 0x0080, 'end': 0x00FF }, // Latin-1 Supplement
  23530. { 'begin': 0x0100, 'end': 0x017F }, // Latin Extended-A
  23531. { 'begin': 0x0180, 'end': 0x024F }, // Latin Extended-B
  23532. { 'begin': 0x0250, 'end': 0x02AF }, // IPA Extensions
  23533. { 'begin': 0x02B0, 'end': 0x02FF }, // Spacing Modifier Letters
  23534. { 'begin': 0x0300, 'end': 0x036F }, // Combining Diacritical Marks
  23535. { 'begin': 0x0370, 'end': 0x03FF }, // Greek and Coptic
  23536. { 'begin': 0x2C80, 'end': 0x2CFF }, // Coptic
  23537. { 'begin': 0x0400, 'end': 0x04FF }, // Cyrillic
  23538. { 'begin': 0x0530, 'end': 0x058F }, // Armenian
  23539. { 'begin': 0x0590, 'end': 0x05FF }, // Hebrew
  23540. { 'begin': 0xA500, 'end': 0xA63F }, // Vai
  23541. { 'begin': 0x0600, 'end': 0x06FF }, // Arabic
  23542. { 'begin': 0x07C0, 'end': 0x07FF }, // NKo
  23543. { 'begin': 0x0900, 'end': 0x097F }, // Devanagari
  23544. { 'begin': 0x0980, 'end': 0x09FF }, // Bengali
  23545. { 'begin': 0x0A00, 'end': 0x0A7F }, // Gurmukhi
  23546. { 'begin': 0x0A80, 'end': 0x0AFF }, // Gujarati
  23547. { 'begin': 0x0B00, 'end': 0x0B7F }, // Oriya
  23548. { 'begin': 0x0B80, 'end': 0x0BFF }, // Tamil
  23549. { 'begin': 0x0C00, 'end': 0x0C7F }, // Telugu
  23550. { 'begin': 0x0C80, 'end': 0x0CFF }, // Kannada
  23551. { 'begin': 0x0D00, 'end': 0x0D7F }, // Malayalam
  23552. { 'begin': 0x0E00, 'end': 0x0E7F }, // Thai
  23553. { 'begin': 0x0E80, 'end': 0x0EFF }, // Lao
  23554. { 'begin': 0x10A0, 'end': 0x10FF }, // Georgian
  23555. { 'begin': 0x1B00, 'end': 0x1B7F }, // Balinese
  23556. { 'begin': 0x1100, 'end': 0x11FF }, // Hangul Jamo
  23557. { 'begin': 0x1E00, 'end': 0x1EFF }, // Latin Extended Additional
  23558. { 'begin': 0x1F00, 'end': 0x1FFF }, // Greek Extended
  23559. { 'begin': 0x2000, 'end': 0x206F }, // General Punctuation
  23560. { 'begin': 0x2070, 'end': 0x209F }, // Superscripts And Subscripts
  23561. { 'begin': 0x20A0, 'end': 0x20CF }, // Currency Symbol
  23562. { 'begin': 0x20D0, 'end': 0x20FF }, // Combining Diacritical Marks For Symbols
  23563. { 'begin': 0x2100, 'end': 0x214F }, // Letterlike Symbols
  23564. { 'begin': 0x2150, 'end': 0x218F }, // Number Forms
  23565. { 'begin': 0x2190, 'end': 0x21FF }, // Arrows
  23566. { 'begin': 0x2200, 'end': 0x22FF }, // Mathematical Operators
  23567. { 'begin': 0x2300, 'end': 0x23FF }, // Miscellaneous Technical
  23568. { 'begin': 0x2400, 'end': 0x243F }, // Control Pictures
  23569. { 'begin': 0x2440, 'end': 0x245F }, // Optical Character Recognition
  23570. { 'begin': 0x2460, 'end': 0x24FF }, // Enclosed Alphanumerics
  23571. { 'begin': 0x2500, 'end': 0x257F }, // Box Drawing
  23572. { 'begin': 0x2580, 'end': 0x259F }, // Block Elements
  23573. { 'begin': 0x25A0, 'end': 0x25FF }, // Geometric Shapes
  23574. { 'begin': 0x2600, 'end': 0x26FF }, // Miscellaneous Symbols
  23575. { 'begin': 0x2700, 'end': 0x27BF }, // Dingbats
  23576. { 'begin': 0x3000, 'end': 0x303F }, // CJK Symbols And Punctuation
  23577. { 'begin': 0x3040, 'end': 0x309F }, // Hiragana
  23578. { 'begin': 0x30A0, 'end': 0x30FF }, // Katakana
  23579. { 'begin': 0x3100, 'end': 0x312F }, // Bopomofo
  23580. { 'begin': 0x3130, 'end': 0x318F }, // Hangul Compatibility Jamo
  23581. { 'begin': 0xA840, 'end': 0xA87F }, // Phags-pa
  23582. { 'begin': 0x3200, 'end': 0x32FF }, // Enclosed CJK Letters And Months
  23583. { 'begin': 0x3300, 'end': 0x33FF }, // CJK Compatibility
  23584. { 'begin': 0xAC00, 'end': 0xD7AF }, // Hangul Syllables
  23585. { 'begin': 0xD800, 'end': 0xDFFF }, // Non-Plane 0 *
  23586. { 'begin': 0x10900, 'end': 0x1091F }, // Phoenicia
  23587. { 'begin': 0x4E00, 'end': 0x9FFF }, // CJK Unified Ideographs
  23588. { 'begin': 0xE000, 'end': 0xF8FF }, // Private Use Area (plane 0)
  23589. { 'begin': 0x31C0, 'end': 0x31EF }, // CJK Strokes
  23590. { 'begin': 0xFB00, 'end': 0xFB4F }, // Alphabetic Presentation Forms
  23591. { 'begin': 0xFB50, 'end': 0xFDFF }, // Arabic Presentation Forms-A
  23592. { 'begin': 0xFE20, 'end': 0xFE2F }, // Combining Half Marks
  23593. { 'begin': 0xFE10, 'end': 0xFE1F }, // Vertical Forms
  23594. { 'begin': 0xFE50, 'end': 0xFE6F }, // Small Form Variants
  23595. { 'begin': 0xFE70, 'end': 0xFEFF }, // Arabic Presentation Forms-B
  23596. { 'begin': 0xFF00, 'end': 0xFFEF }, // Halfwidth And Fullwidth Forms
  23597. { 'begin': 0xFFF0, 'end': 0xFFFF }, // Specials
  23598. { 'begin': 0x0F00, 'end': 0x0FFF }, // Tibetan
  23599. { 'begin': 0x0700, 'end': 0x074F }, // Syriac
  23600. { 'begin': 0x0780, 'end': 0x07BF }, // Thaana
  23601. { 'begin': 0x0D80, 'end': 0x0DFF }, // Sinhala
  23602. { 'begin': 0x1000, 'end': 0x109F }, // Myanmar
  23603. { 'begin': 0x1200, 'end': 0x137F }, // Ethiopic
  23604. { 'begin': 0x13A0, 'end': 0x13FF }, // Cherokee
  23605. { 'begin': 0x1400, 'end': 0x167F }, // Unified Canadian Aboriginal Syllabics
  23606. { 'begin': 0x1680, 'end': 0x169F }, // Ogham
  23607. { 'begin': 0x16A0, 'end': 0x16FF }, // Runic
  23608. { 'begin': 0x1780, 'end': 0x17FF }, // Khmer
  23609. { 'begin': 0x1800, 'end': 0x18AF }, // Mongolian
  23610. { 'begin': 0x2800, 'end': 0x28FF }, // Braille Patterns
  23611. { 'begin': 0xA000, 'end': 0xA48F }, // Yi Syllables
  23612. { 'begin': 0x1700, 'end': 0x171F }, // Tagalog
  23613. { 'begin': 0x10300, 'end': 0x1032F }, // Old Italic
  23614. { 'begin': 0x10330, 'end': 0x1034F }, // Gothic
  23615. { 'begin': 0x10400, 'end': 0x1044F }, // Deseret
  23616. { 'begin': 0x1D000, 'end': 0x1D0FF }, // Byzantine Musical Symbols
  23617. { 'begin': 0x1D400, 'end': 0x1D7FF }, // Mathematical Alphanumeric Symbols
  23618. { 'begin': 0xFF000, 'end': 0xFFFFD }, // Private Use (plane 15)
  23619. { 'begin': 0xFE00, 'end': 0xFE0F }, // Variation Selectors
  23620. { 'begin': 0xE0000, 'end': 0xE007F }, // Tags
  23621. { 'begin': 0x1900, 'end': 0x194F }, // Limbu
  23622. { 'begin': 0x1950, 'end': 0x197F }, // Tai Le
  23623. { 'begin': 0x1980, 'end': 0x19DF }, // New Tai Lue
  23624. { 'begin': 0x1A00, 'end': 0x1A1F }, // Buginese
  23625. { 'begin': 0x2C00, 'end': 0x2C5F }, // Glagolitic
  23626. { 'begin': 0x2D30, 'end': 0x2D7F }, // Tifinagh
  23627. { 'begin': 0x4DC0, 'end': 0x4DFF }, // Yijing Hexagram Symbols
  23628. { 'begin': 0xA800, 'end': 0xA82F }, // Syloti Nagri
  23629. { 'begin': 0x10000, 'end': 0x1007F }, // Linear B Syllabary
  23630. { 'begin': 0x10140, 'end': 0x1018F }, // Ancient Greek Numbers
  23631. { 'begin': 0x10380, 'end': 0x1039F }, // Ugaritic
  23632. { 'begin': 0x103A0, 'end': 0x103DF }, // Old Persian
  23633. { 'begin': 0x10450, 'end': 0x1047F }, // Shavian
  23634. { 'begin': 0x10480, 'end': 0x104AF }, // Osmanya
  23635. { 'begin': 0x10800, 'end': 0x1083F }, // Cypriot Syllabary
  23636. { 'begin': 0x10A00, 'end': 0x10A5F }, // Kharoshthi
  23637. { 'begin': 0x1D300, 'end': 0x1D35F }, // Tai Xuan Jing Symbols
  23638. { 'begin': 0x12000, 'end': 0x123FF }, // Cuneiform
  23639. { 'begin': 0x1D360, 'end': 0x1D37F }, // Counting Rod Numerals
  23640. { 'begin': 0x1B80, 'end': 0x1BBF }, // Sundanese
  23641. { 'begin': 0x1C00, 'end': 0x1C4F }, // Lepcha
  23642. { 'begin': 0x1C50, 'end': 0x1C7F }, // Ol Chiki
  23643. { 'begin': 0xA880, 'end': 0xA8DF }, // Saurashtra
  23644. { 'begin': 0xA900, 'end': 0xA92F }, // Kayah Li
  23645. { 'begin': 0xA930, 'end': 0xA95F }, // Rejang
  23646. { 'begin': 0xAA00, 'end': 0xAA5F }, // Cham
  23647. { 'begin': 0x10190, 'end': 0x101CF }, // Ancient Symbols
  23648. { 'begin': 0x101D0, 'end': 0x101FF }, // Phaistos Disc
  23649. { 'begin': 0x102A0, 'end': 0x102DF }, // Carian
  23650. { 'begin': 0x1F030, 'end': 0x1F09F } // Domino Tiles
  23651. ];
  23652. var MacStandardGlyphOrdering = [
  23653. '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl',
  23654. 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft',
  23655. 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',
  23656. 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
  23657. 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at',
  23658. 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
  23659. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft',
  23660. 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b',
  23661. 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
  23662. 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright',
  23663. 'asciitilde', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde',
  23664. 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis',
  23665. 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',
  23666. 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve',
  23667. 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex',
  23668. 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet',
  23669. 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute',
  23670. 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal',
  23671. 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi',
  23672. 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash',
  23673. 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin',
  23674. 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis',
  23675. 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash',
  23676. 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright',
  23677. 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency',
  23678. 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered',
  23679. 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex',
  23680. 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex',
  23681. 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute',
  23682. 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron',
  23683. 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron',
  23684. 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar',
  23685. 'Eth', 'eth', 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply',
  23686. 'onesuperior', 'twosuperior', 'threesuperior', 'onehalf', 'onequarter',
  23687. 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla',
  23688. 'scedilla', 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'];
  23689. function getUnicodeRangeFor(value) {
  23690. for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) {
  23691. var range = UnicodeRanges[i];
  23692. if (value >= range.begin && value < range.end) {
  23693. return i;
  23694. }
  23695. }
  23696. return -1;
  23697. }
  23698. function isRTLRangeFor(value) {
  23699. var range = UnicodeRanges[13];
  23700. if (value >= range.begin && value < range.end) {
  23701. return true;
  23702. }
  23703. range = UnicodeRanges[11];
  23704. if (value >= range.begin && value < range.end) {
  23705. return true;
  23706. }
  23707. return false;
  23708. }
  23709. // The normalization table is obtained by filtering the Unicode characters
  23710. // database with <compat> entries.
  23711. var NormalizedUnicodes = {
  23712. '\u00A8': '\u0020\u0308',
  23713. '\u00AF': '\u0020\u0304',
  23714. '\u00B4': '\u0020\u0301',
  23715. '\u00B5': '\u03BC',
  23716. '\u00B8': '\u0020\u0327',
  23717. '\u0132': '\u0049\u004A',
  23718. '\u0133': '\u0069\u006A',
  23719. '\u013F': '\u004C\u00B7',
  23720. '\u0140': '\u006C\u00B7',
  23721. '\u0149': '\u02BC\u006E',
  23722. '\u017F': '\u0073',
  23723. '\u01C4': '\u0044\u017D',
  23724. '\u01C5': '\u0044\u017E',
  23725. '\u01C6': '\u0064\u017E',
  23726. '\u01C7': '\u004C\u004A',
  23727. '\u01C8': '\u004C\u006A',
  23728. '\u01C9': '\u006C\u006A',
  23729. '\u01CA': '\u004E\u004A',
  23730. '\u01CB': '\u004E\u006A',
  23731. '\u01CC': '\u006E\u006A',
  23732. '\u01F1': '\u0044\u005A',
  23733. '\u01F2': '\u0044\u007A',
  23734. '\u01F3': '\u0064\u007A',
  23735. '\u02D8': '\u0020\u0306',
  23736. '\u02D9': '\u0020\u0307',
  23737. '\u02DA': '\u0020\u030A',
  23738. '\u02DB': '\u0020\u0328',
  23739. '\u02DC': '\u0020\u0303',
  23740. '\u02DD': '\u0020\u030B',
  23741. '\u037A': '\u0020\u0345',
  23742. '\u0384': '\u0020\u0301',
  23743. '\u03D0': '\u03B2',
  23744. '\u03D1': '\u03B8',
  23745. '\u03D2': '\u03A5',
  23746. '\u03D5': '\u03C6',
  23747. '\u03D6': '\u03C0',
  23748. '\u03F0': '\u03BA',
  23749. '\u03F1': '\u03C1',
  23750. '\u03F2': '\u03C2',
  23751. '\u03F4': '\u0398',
  23752. '\u03F5': '\u03B5',
  23753. '\u03F9': '\u03A3',
  23754. '\u0587': '\u0565\u0582',
  23755. '\u0675': '\u0627\u0674',
  23756. '\u0676': '\u0648\u0674',
  23757. '\u0677': '\u06C7\u0674',
  23758. '\u0678': '\u064A\u0674',
  23759. '\u0E33': '\u0E4D\u0E32',
  23760. '\u0EB3': '\u0ECD\u0EB2',
  23761. '\u0EDC': '\u0EAB\u0E99',
  23762. '\u0EDD': '\u0EAB\u0EA1',
  23763. '\u0F77': '\u0FB2\u0F81',
  23764. '\u0F79': '\u0FB3\u0F81',
  23765. '\u1E9A': '\u0061\u02BE',
  23766. '\u1FBD': '\u0020\u0313',
  23767. '\u1FBF': '\u0020\u0313',
  23768. '\u1FC0': '\u0020\u0342',
  23769. '\u1FFE': '\u0020\u0314',
  23770. '\u2002': '\u0020',
  23771. '\u2003': '\u0020',
  23772. '\u2004': '\u0020',
  23773. '\u2005': '\u0020',
  23774. '\u2006': '\u0020',
  23775. '\u2008': '\u0020',
  23776. '\u2009': '\u0020',
  23777. '\u200A': '\u0020',
  23778. '\u2017': '\u0020\u0333',
  23779. '\u2024': '\u002E',
  23780. '\u2025': '\u002E\u002E',
  23781. '\u2026': '\u002E\u002E\u002E',
  23782. '\u2033': '\u2032\u2032',
  23783. '\u2034': '\u2032\u2032\u2032',
  23784. '\u2036': '\u2035\u2035',
  23785. '\u2037': '\u2035\u2035\u2035',
  23786. '\u203C': '\u0021\u0021',
  23787. '\u203E': '\u0020\u0305',
  23788. '\u2047': '\u003F\u003F',
  23789. '\u2048': '\u003F\u0021',
  23790. '\u2049': '\u0021\u003F',
  23791. '\u2057': '\u2032\u2032\u2032\u2032',
  23792. '\u205F': '\u0020',
  23793. '\u20A8': '\u0052\u0073',
  23794. '\u2100': '\u0061\u002F\u0063',
  23795. '\u2101': '\u0061\u002F\u0073',
  23796. '\u2103': '\u00B0\u0043',
  23797. '\u2105': '\u0063\u002F\u006F',
  23798. '\u2106': '\u0063\u002F\u0075',
  23799. '\u2107': '\u0190',
  23800. '\u2109': '\u00B0\u0046',
  23801. '\u2116': '\u004E\u006F',
  23802. '\u2121': '\u0054\u0045\u004C',
  23803. '\u2135': '\u05D0',
  23804. '\u2136': '\u05D1',
  23805. '\u2137': '\u05D2',
  23806. '\u2138': '\u05D3',
  23807. '\u213B': '\u0046\u0041\u0058',
  23808. '\u2160': '\u0049',
  23809. '\u2161': '\u0049\u0049',
  23810. '\u2162': '\u0049\u0049\u0049',
  23811. '\u2163': '\u0049\u0056',
  23812. '\u2164': '\u0056',
  23813. '\u2165': '\u0056\u0049',
  23814. '\u2166': '\u0056\u0049\u0049',
  23815. '\u2167': '\u0056\u0049\u0049\u0049',
  23816. '\u2168': '\u0049\u0058',
  23817. '\u2169': '\u0058',
  23818. '\u216A': '\u0058\u0049',
  23819. '\u216B': '\u0058\u0049\u0049',
  23820. '\u216C': '\u004C',
  23821. '\u216D': '\u0043',
  23822. '\u216E': '\u0044',
  23823. '\u216F': '\u004D',
  23824. '\u2170': '\u0069',
  23825. '\u2171': '\u0069\u0069',
  23826. '\u2172': '\u0069\u0069\u0069',
  23827. '\u2173': '\u0069\u0076',
  23828. '\u2174': '\u0076',
  23829. '\u2175': '\u0076\u0069',
  23830. '\u2176': '\u0076\u0069\u0069',
  23831. '\u2177': '\u0076\u0069\u0069\u0069',
  23832. '\u2178': '\u0069\u0078',
  23833. '\u2179': '\u0078',
  23834. '\u217A': '\u0078\u0069',
  23835. '\u217B': '\u0078\u0069\u0069',
  23836. '\u217C': '\u006C',
  23837. '\u217D': '\u0063',
  23838. '\u217E': '\u0064',
  23839. '\u217F': '\u006D',
  23840. '\u222C': '\u222B\u222B',
  23841. '\u222D': '\u222B\u222B\u222B',
  23842. '\u222F': '\u222E\u222E',
  23843. '\u2230': '\u222E\u222E\u222E',
  23844. '\u2474': '\u0028\u0031\u0029',
  23845. '\u2475': '\u0028\u0032\u0029',
  23846. '\u2476': '\u0028\u0033\u0029',
  23847. '\u2477': '\u0028\u0034\u0029',
  23848. '\u2478': '\u0028\u0035\u0029',
  23849. '\u2479': '\u0028\u0036\u0029',
  23850. '\u247A': '\u0028\u0037\u0029',
  23851. '\u247B': '\u0028\u0038\u0029',
  23852. '\u247C': '\u0028\u0039\u0029',
  23853. '\u247D': '\u0028\u0031\u0030\u0029',
  23854. '\u247E': '\u0028\u0031\u0031\u0029',
  23855. '\u247F': '\u0028\u0031\u0032\u0029',
  23856. '\u2480': '\u0028\u0031\u0033\u0029',
  23857. '\u2481': '\u0028\u0031\u0034\u0029',
  23858. '\u2482': '\u0028\u0031\u0035\u0029',
  23859. '\u2483': '\u0028\u0031\u0036\u0029',
  23860. '\u2484': '\u0028\u0031\u0037\u0029',
  23861. '\u2485': '\u0028\u0031\u0038\u0029',
  23862. '\u2486': '\u0028\u0031\u0039\u0029',
  23863. '\u2487': '\u0028\u0032\u0030\u0029',
  23864. '\u2488': '\u0031\u002E',
  23865. '\u2489': '\u0032\u002E',
  23866. '\u248A': '\u0033\u002E',
  23867. '\u248B': '\u0034\u002E',
  23868. '\u248C': '\u0035\u002E',
  23869. '\u248D': '\u0036\u002E',
  23870. '\u248E': '\u0037\u002E',
  23871. '\u248F': '\u0038\u002E',
  23872. '\u2490': '\u0039\u002E',
  23873. '\u2491': '\u0031\u0030\u002E',
  23874. '\u2492': '\u0031\u0031\u002E',
  23875. '\u2493': '\u0031\u0032\u002E',
  23876. '\u2494': '\u0031\u0033\u002E',
  23877. '\u2495': '\u0031\u0034\u002E',
  23878. '\u2496': '\u0031\u0035\u002E',
  23879. '\u2497': '\u0031\u0036\u002E',
  23880. '\u2498': '\u0031\u0037\u002E',
  23881. '\u2499': '\u0031\u0038\u002E',
  23882. '\u249A': '\u0031\u0039\u002E',
  23883. '\u249B': '\u0032\u0030\u002E',
  23884. '\u249C': '\u0028\u0061\u0029',
  23885. '\u249D': '\u0028\u0062\u0029',
  23886. '\u249E': '\u0028\u0063\u0029',
  23887. '\u249F': '\u0028\u0064\u0029',
  23888. '\u24A0': '\u0028\u0065\u0029',
  23889. '\u24A1': '\u0028\u0066\u0029',
  23890. '\u24A2': '\u0028\u0067\u0029',
  23891. '\u24A3': '\u0028\u0068\u0029',
  23892. '\u24A4': '\u0028\u0069\u0029',
  23893. '\u24A5': '\u0028\u006A\u0029',
  23894. '\u24A6': '\u0028\u006B\u0029',
  23895. '\u24A7': '\u0028\u006C\u0029',
  23896. '\u24A8': '\u0028\u006D\u0029',
  23897. '\u24A9': '\u0028\u006E\u0029',
  23898. '\u24AA': '\u0028\u006F\u0029',
  23899. '\u24AB': '\u0028\u0070\u0029',
  23900. '\u24AC': '\u0028\u0071\u0029',
  23901. '\u24AD': '\u0028\u0072\u0029',
  23902. '\u24AE': '\u0028\u0073\u0029',
  23903. '\u24AF': '\u0028\u0074\u0029',
  23904. '\u24B0': '\u0028\u0075\u0029',
  23905. '\u24B1': '\u0028\u0076\u0029',
  23906. '\u24B2': '\u0028\u0077\u0029',
  23907. '\u24B3': '\u0028\u0078\u0029',
  23908. '\u24B4': '\u0028\u0079\u0029',
  23909. '\u24B5': '\u0028\u007A\u0029',
  23910. '\u2A0C': '\u222B\u222B\u222B\u222B',
  23911. '\u2A74': '\u003A\u003A\u003D',
  23912. '\u2A75': '\u003D\u003D',
  23913. '\u2A76': '\u003D\u003D\u003D',
  23914. '\u2E9F': '\u6BCD',
  23915. '\u2EF3': '\u9F9F',
  23916. '\u2F00': '\u4E00',
  23917. '\u2F01': '\u4E28',
  23918. '\u2F02': '\u4E36',
  23919. '\u2F03': '\u4E3F',
  23920. '\u2F04': '\u4E59',
  23921. '\u2F05': '\u4E85',
  23922. '\u2F06': '\u4E8C',
  23923. '\u2F07': '\u4EA0',
  23924. '\u2F08': '\u4EBA',
  23925. '\u2F09': '\u513F',
  23926. '\u2F0A': '\u5165',
  23927. '\u2F0B': '\u516B',
  23928. '\u2F0C': '\u5182',
  23929. '\u2F0D': '\u5196',
  23930. '\u2F0E': '\u51AB',
  23931. '\u2F0F': '\u51E0',
  23932. '\u2F10': '\u51F5',
  23933. '\u2F11': '\u5200',
  23934. '\u2F12': '\u529B',
  23935. '\u2F13': '\u52F9',
  23936. '\u2F14': '\u5315',
  23937. '\u2F15': '\u531A',
  23938. '\u2F16': '\u5338',
  23939. '\u2F17': '\u5341',
  23940. '\u2F18': '\u535C',
  23941. '\u2F19': '\u5369',
  23942. '\u2F1A': '\u5382',
  23943. '\u2F1B': '\u53B6',
  23944. '\u2F1C': '\u53C8',
  23945. '\u2F1D': '\u53E3',
  23946. '\u2F1E': '\u56D7',
  23947. '\u2F1F': '\u571F',
  23948. '\u2F20': '\u58EB',
  23949. '\u2F21': '\u5902',
  23950. '\u2F22': '\u590A',
  23951. '\u2F23': '\u5915',
  23952. '\u2F24': '\u5927',
  23953. '\u2F25': '\u5973',
  23954. '\u2F26': '\u5B50',
  23955. '\u2F27': '\u5B80',
  23956. '\u2F28': '\u5BF8',
  23957. '\u2F29': '\u5C0F',
  23958. '\u2F2A': '\u5C22',
  23959. '\u2F2B': '\u5C38',
  23960. '\u2F2C': '\u5C6E',
  23961. '\u2F2D': '\u5C71',
  23962. '\u2F2E': '\u5DDB',
  23963. '\u2F2F': '\u5DE5',
  23964. '\u2F30': '\u5DF1',
  23965. '\u2F31': '\u5DFE',
  23966. '\u2F32': '\u5E72',
  23967. '\u2F33': '\u5E7A',
  23968. '\u2F34': '\u5E7F',
  23969. '\u2F35': '\u5EF4',
  23970. '\u2F36': '\u5EFE',
  23971. '\u2F37': '\u5F0B',
  23972. '\u2F38': '\u5F13',
  23973. '\u2F39': '\u5F50',
  23974. '\u2F3A': '\u5F61',
  23975. '\u2F3B': '\u5F73',
  23976. '\u2F3C': '\u5FC3',
  23977. '\u2F3D': '\u6208',
  23978. '\u2F3E': '\u6236',
  23979. '\u2F3F': '\u624B',
  23980. '\u2F40': '\u652F',
  23981. '\u2F41': '\u6534',
  23982. '\u2F42': '\u6587',
  23983. '\u2F43': '\u6597',
  23984. '\u2F44': '\u65A4',
  23985. '\u2F45': '\u65B9',
  23986. '\u2F46': '\u65E0',
  23987. '\u2F47': '\u65E5',
  23988. '\u2F48': '\u66F0',
  23989. '\u2F49': '\u6708',
  23990. '\u2F4A': '\u6728',
  23991. '\u2F4B': '\u6B20',
  23992. '\u2F4C': '\u6B62',
  23993. '\u2F4D': '\u6B79',
  23994. '\u2F4E': '\u6BB3',
  23995. '\u2F4F': '\u6BCB',
  23996. '\u2F50': '\u6BD4',
  23997. '\u2F51': '\u6BDB',
  23998. '\u2F52': '\u6C0F',
  23999. '\u2F53': '\u6C14',
  24000. '\u2F54': '\u6C34',
  24001. '\u2F55': '\u706B',
  24002. '\u2F56': '\u722A',
  24003. '\u2F57': '\u7236',
  24004. '\u2F58': '\u723B',
  24005. '\u2F59': '\u723F',
  24006. '\u2F5A': '\u7247',
  24007. '\u2F5B': '\u7259',
  24008. '\u2F5C': '\u725B',
  24009. '\u2F5D': '\u72AC',
  24010. '\u2F5E': '\u7384',
  24011. '\u2F5F': '\u7389',
  24012. '\u2F60': '\u74DC',
  24013. '\u2F61': '\u74E6',
  24014. '\u2F62': '\u7518',
  24015. '\u2F63': '\u751F',
  24016. '\u2F64': '\u7528',
  24017. '\u2F65': '\u7530',
  24018. '\u2F66': '\u758B',
  24019. '\u2F67': '\u7592',
  24020. '\u2F68': '\u7676',
  24021. '\u2F69': '\u767D',
  24022. '\u2F6A': '\u76AE',
  24023. '\u2F6B': '\u76BF',
  24024. '\u2F6C': '\u76EE',
  24025. '\u2F6D': '\u77DB',
  24026. '\u2F6E': '\u77E2',
  24027. '\u2F6F': '\u77F3',
  24028. '\u2F70': '\u793A',
  24029. '\u2F71': '\u79B8',
  24030. '\u2F72': '\u79BE',
  24031. '\u2F73': '\u7A74',
  24032. '\u2F74': '\u7ACB',
  24033. '\u2F75': '\u7AF9',
  24034. '\u2F76': '\u7C73',
  24035. '\u2F77': '\u7CF8',
  24036. '\u2F78': '\u7F36',
  24037. '\u2F79': '\u7F51',
  24038. '\u2F7A': '\u7F8A',
  24039. '\u2F7B': '\u7FBD',
  24040. '\u2F7C': '\u8001',
  24041. '\u2F7D': '\u800C',
  24042. '\u2F7E': '\u8012',
  24043. '\u2F7F': '\u8033',
  24044. '\u2F80': '\u807F',
  24045. '\u2F81': '\u8089',
  24046. '\u2F82': '\u81E3',
  24047. '\u2F83': '\u81EA',
  24048. '\u2F84': '\u81F3',
  24049. '\u2F85': '\u81FC',
  24050. '\u2F86': '\u820C',
  24051. '\u2F87': '\u821B',
  24052. '\u2F88': '\u821F',
  24053. '\u2F89': '\u826E',
  24054. '\u2F8A': '\u8272',
  24055. '\u2F8B': '\u8278',
  24056. '\u2F8C': '\u864D',
  24057. '\u2F8D': '\u866B',
  24058. '\u2F8E': '\u8840',
  24059. '\u2F8F': '\u884C',
  24060. '\u2F90': '\u8863',
  24061. '\u2F91': '\u897E',
  24062. '\u2F92': '\u898B',
  24063. '\u2F93': '\u89D2',
  24064. '\u2F94': '\u8A00',
  24065. '\u2F95': '\u8C37',
  24066. '\u2F96': '\u8C46',
  24067. '\u2F97': '\u8C55',
  24068. '\u2F98': '\u8C78',
  24069. '\u2F99': '\u8C9D',
  24070. '\u2F9A': '\u8D64',
  24071. '\u2F9B': '\u8D70',
  24072. '\u2F9C': '\u8DB3',
  24073. '\u2F9D': '\u8EAB',
  24074. '\u2F9E': '\u8ECA',
  24075. '\u2F9F': '\u8F9B',
  24076. '\u2FA0': '\u8FB0',
  24077. '\u2FA1': '\u8FB5',
  24078. '\u2FA2': '\u9091',
  24079. '\u2FA3': '\u9149',
  24080. '\u2FA4': '\u91C6',
  24081. '\u2FA5': '\u91CC',
  24082. '\u2FA6': '\u91D1',
  24083. '\u2FA7': '\u9577',
  24084. '\u2FA8': '\u9580',
  24085. '\u2FA9': '\u961C',
  24086. '\u2FAA': '\u96B6',
  24087. '\u2FAB': '\u96B9',
  24088. '\u2FAC': '\u96E8',
  24089. '\u2FAD': '\u9751',
  24090. '\u2FAE': '\u975E',
  24091. '\u2FAF': '\u9762',
  24092. '\u2FB0': '\u9769',
  24093. '\u2FB1': '\u97CB',
  24094. '\u2FB2': '\u97ED',
  24095. '\u2FB3': '\u97F3',
  24096. '\u2FB4': '\u9801',
  24097. '\u2FB5': '\u98A8',
  24098. '\u2FB6': '\u98DB',
  24099. '\u2FB7': '\u98DF',
  24100. '\u2FB8': '\u9996',
  24101. '\u2FB9': '\u9999',
  24102. '\u2FBA': '\u99AC',
  24103. '\u2FBB': '\u9AA8',
  24104. '\u2FBC': '\u9AD8',
  24105. '\u2FBD': '\u9ADF',
  24106. '\u2FBE': '\u9B25',
  24107. '\u2FBF': '\u9B2F',
  24108. '\u2FC0': '\u9B32',
  24109. '\u2FC1': '\u9B3C',
  24110. '\u2FC2': '\u9B5A',
  24111. '\u2FC3': '\u9CE5',
  24112. '\u2FC4': '\u9E75',
  24113. '\u2FC5': '\u9E7F',
  24114. '\u2FC6': '\u9EA5',
  24115. '\u2FC7': '\u9EBB',
  24116. '\u2FC8': '\u9EC3',
  24117. '\u2FC9': '\u9ECD',
  24118. '\u2FCA': '\u9ED1',
  24119. '\u2FCB': '\u9EF9',
  24120. '\u2FCC': '\u9EFD',
  24121. '\u2FCD': '\u9F0E',
  24122. '\u2FCE': '\u9F13',
  24123. '\u2FCF': '\u9F20',
  24124. '\u2FD0': '\u9F3B',
  24125. '\u2FD1': '\u9F4A',
  24126. '\u2FD2': '\u9F52',
  24127. '\u2FD3': '\u9F8D',
  24128. '\u2FD4': '\u9F9C',
  24129. '\u2FD5': '\u9FA0',
  24130. '\u3036': '\u3012',
  24131. '\u3038': '\u5341',
  24132. '\u3039': '\u5344',
  24133. '\u303A': '\u5345',
  24134. '\u309B': '\u0020\u3099',
  24135. '\u309C': '\u0020\u309A',
  24136. '\u3131': '\u1100',
  24137. '\u3132': '\u1101',
  24138. '\u3133': '\u11AA',
  24139. '\u3134': '\u1102',
  24140. '\u3135': '\u11AC',
  24141. '\u3136': '\u11AD',
  24142. '\u3137': '\u1103',
  24143. '\u3138': '\u1104',
  24144. '\u3139': '\u1105',
  24145. '\u313A': '\u11B0',
  24146. '\u313B': '\u11B1',
  24147. '\u313C': '\u11B2',
  24148. '\u313D': '\u11B3',
  24149. '\u313E': '\u11B4',
  24150. '\u313F': '\u11B5',
  24151. '\u3140': '\u111A',
  24152. '\u3141': '\u1106',
  24153. '\u3142': '\u1107',
  24154. '\u3143': '\u1108',
  24155. '\u3144': '\u1121',
  24156. '\u3145': '\u1109',
  24157. '\u3146': '\u110A',
  24158. '\u3147': '\u110B',
  24159. '\u3148': '\u110C',
  24160. '\u3149': '\u110D',
  24161. '\u314A': '\u110E',
  24162. '\u314B': '\u110F',
  24163. '\u314C': '\u1110',
  24164. '\u314D': '\u1111',
  24165. '\u314E': '\u1112',
  24166. '\u314F': '\u1161',
  24167. '\u3150': '\u1162',
  24168. '\u3151': '\u1163',
  24169. '\u3152': '\u1164',
  24170. '\u3153': '\u1165',
  24171. '\u3154': '\u1166',
  24172. '\u3155': '\u1167',
  24173. '\u3156': '\u1168',
  24174. '\u3157': '\u1169',
  24175. '\u3158': '\u116A',
  24176. '\u3159': '\u116B',
  24177. '\u315A': '\u116C',
  24178. '\u315B': '\u116D',
  24179. '\u315C': '\u116E',
  24180. '\u315D': '\u116F',
  24181. '\u315E': '\u1170',
  24182. '\u315F': '\u1171',
  24183. '\u3160': '\u1172',
  24184. '\u3161': '\u1173',
  24185. '\u3162': '\u1174',
  24186. '\u3163': '\u1175',
  24187. '\u3164': '\u1160',
  24188. '\u3165': '\u1114',
  24189. '\u3166': '\u1115',
  24190. '\u3167': '\u11C7',
  24191. '\u3168': '\u11C8',
  24192. '\u3169': '\u11CC',
  24193. '\u316A': '\u11CE',
  24194. '\u316B': '\u11D3',
  24195. '\u316C': '\u11D7',
  24196. '\u316D': '\u11D9',
  24197. '\u316E': '\u111C',
  24198. '\u316F': '\u11DD',
  24199. '\u3170': '\u11DF',
  24200. '\u3171': '\u111D',
  24201. '\u3172': '\u111E',
  24202. '\u3173': '\u1120',
  24203. '\u3174': '\u1122',
  24204. '\u3175': '\u1123',
  24205. '\u3176': '\u1127',
  24206. '\u3177': '\u1129',
  24207. '\u3178': '\u112B',
  24208. '\u3179': '\u112C',
  24209. '\u317A': '\u112D',
  24210. '\u317B': '\u112E',
  24211. '\u317C': '\u112F',
  24212. '\u317D': '\u1132',
  24213. '\u317E': '\u1136',
  24214. '\u317F': '\u1140',
  24215. '\u3180': '\u1147',
  24216. '\u3181': '\u114C',
  24217. '\u3182': '\u11F1',
  24218. '\u3183': '\u11F2',
  24219. '\u3184': '\u1157',
  24220. '\u3185': '\u1158',
  24221. '\u3186': '\u1159',
  24222. '\u3187': '\u1184',
  24223. '\u3188': '\u1185',
  24224. '\u3189': '\u1188',
  24225. '\u318A': '\u1191',
  24226. '\u318B': '\u1192',
  24227. '\u318C': '\u1194',
  24228. '\u318D': '\u119E',
  24229. '\u318E': '\u11A1',
  24230. '\u3200': '\u0028\u1100\u0029',
  24231. '\u3201': '\u0028\u1102\u0029',
  24232. '\u3202': '\u0028\u1103\u0029',
  24233. '\u3203': '\u0028\u1105\u0029',
  24234. '\u3204': '\u0028\u1106\u0029',
  24235. '\u3205': '\u0028\u1107\u0029',
  24236. '\u3206': '\u0028\u1109\u0029',
  24237. '\u3207': '\u0028\u110B\u0029',
  24238. '\u3208': '\u0028\u110C\u0029',
  24239. '\u3209': '\u0028\u110E\u0029',
  24240. '\u320A': '\u0028\u110F\u0029',
  24241. '\u320B': '\u0028\u1110\u0029',
  24242. '\u320C': '\u0028\u1111\u0029',
  24243. '\u320D': '\u0028\u1112\u0029',
  24244. '\u320E': '\u0028\u1100\u1161\u0029',
  24245. '\u320F': '\u0028\u1102\u1161\u0029',
  24246. '\u3210': '\u0028\u1103\u1161\u0029',
  24247. '\u3211': '\u0028\u1105\u1161\u0029',
  24248. '\u3212': '\u0028\u1106\u1161\u0029',
  24249. '\u3213': '\u0028\u1107\u1161\u0029',
  24250. '\u3214': '\u0028\u1109\u1161\u0029',
  24251. '\u3215': '\u0028\u110B\u1161\u0029',
  24252. '\u3216': '\u0028\u110C\u1161\u0029',
  24253. '\u3217': '\u0028\u110E\u1161\u0029',
  24254. '\u3218': '\u0028\u110F\u1161\u0029',
  24255. '\u3219': '\u0028\u1110\u1161\u0029',
  24256. '\u321A': '\u0028\u1111\u1161\u0029',
  24257. '\u321B': '\u0028\u1112\u1161\u0029',
  24258. '\u321C': '\u0028\u110C\u116E\u0029',
  24259. '\u321D': '\u0028\u110B\u1169\u110C\u1165\u11AB\u0029',
  24260. '\u321E': '\u0028\u110B\u1169\u1112\u116E\u0029',
  24261. '\u3220': '\u0028\u4E00\u0029',
  24262. '\u3221': '\u0028\u4E8C\u0029',
  24263. '\u3222': '\u0028\u4E09\u0029',
  24264. '\u3223': '\u0028\u56DB\u0029',
  24265. '\u3224': '\u0028\u4E94\u0029',
  24266. '\u3225': '\u0028\u516D\u0029',
  24267. '\u3226': '\u0028\u4E03\u0029',
  24268. '\u3227': '\u0028\u516B\u0029',
  24269. '\u3228': '\u0028\u4E5D\u0029',
  24270. '\u3229': '\u0028\u5341\u0029',
  24271. '\u322A': '\u0028\u6708\u0029',
  24272. '\u322B': '\u0028\u706B\u0029',
  24273. '\u322C': '\u0028\u6C34\u0029',
  24274. '\u322D': '\u0028\u6728\u0029',
  24275. '\u322E': '\u0028\u91D1\u0029',
  24276. '\u322F': '\u0028\u571F\u0029',
  24277. '\u3230': '\u0028\u65E5\u0029',
  24278. '\u3231': '\u0028\u682A\u0029',
  24279. '\u3232': '\u0028\u6709\u0029',
  24280. '\u3233': '\u0028\u793E\u0029',
  24281. '\u3234': '\u0028\u540D\u0029',
  24282. '\u3235': '\u0028\u7279\u0029',
  24283. '\u3236': '\u0028\u8CA1\u0029',
  24284. '\u3237': '\u0028\u795D\u0029',
  24285. '\u3238': '\u0028\u52B4\u0029',
  24286. '\u3239': '\u0028\u4EE3\u0029',
  24287. '\u323A': '\u0028\u547C\u0029',
  24288. '\u323B': '\u0028\u5B66\u0029',
  24289. '\u323C': '\u0028\u76E3\u0029',
  24290. '\u323D': '\u0028\u4F01\u0029',
  24291. '\u323E': '\u0028\u8CC7\u0029',
  24292. '\u323F': '\u0028\u5354\u0029',
  24293. '\u3240': '\u0028\u796D\u0029',
  24294. '\u3241': '\u0028\u4F11\u0029',
  24295. '\u3242': '\u0028\u81EA\u0029',
  24296. '\u3243': '\u0028\u81F3\u0029',
  24297. '\u32C0': '\u0031\u6708',
  24298. '\u32C1': '\u0032\u6708',
  24299. '\u32C2': '\u0033\u6708',
  24300. '\u32C3': '\u0034\u6708',
  24301. '\u32C4': '\u0035\u6708',
  24302. '\u32C5': '\u0036\u6708',
  24303. '\u32C6': '\u0037\u6708',
  24304. '\u32C7': '\u0038\u6708',
  24305. '\u32C8': '\u0039\u6708',
  24306. '\u32C9': '\u0031\u0030\u6708',
  24307. '\u32CA': '\u0031\u0031\u6708',
  24308. '\u32CB': '\u0031\u0032\u6708',
  24309. '\u3358': '\u0030\u70B9',
  24310. '\u3359': '\u0031\u70B9',
  24311. '\u335A': '\u0032\u70B9',
  24312. '\u335B': '\u0033\u70B9',
  24313. '\u335C': '\u0034\u70B9',
  24314. '\u335D': '\u0035\u70B9',
  24315. '\u335E': '\u0036\u70B9',
  24316. '\u335F': '\u0037\u70B9',
  24317. '\u3360': '\u0038\u70B9',
  24318. '\u3361': '\u0039\u70B9',
  24319. '\u3362': '\u0031\u0030\u70B9',
  24320. '\u3363': '\u0031\u0031\u70B9',
  24321. '\u3364': '\u0031\u0032\u70B9',
  24322. '\u3365': '\u0031\u0033\u70B9',
  24323. '\u3366': '\u0031\u0034\u70B9',
  24324. '\u3367': '\u0031\u0035\u70B9',
  24325. '\u3368': '\u0031\u0036\u70B9',
  24326. '\u3369': '\u0031\u0037\u70B9',
  24327. '\u336A': '\u0031\u0038\u70B9',
  24328. '\u336B': '\u0031\u0039\u70B9',
  24329. '\u336C': '\u0032\u0030\u70B9',
  24330. '\u336D': '\u0032\u0031\u70B9',
  24331. '\u336E': '\u0032\u0032\u70B9',
  24332. '\u336F': '\u0032\u0033\u70B9',
  24333. '\u3370': '\u0032\u0034\u70B9',
  24334. '\u33E0': '\u0031\u65E5',
  24335. '\u33E1': '\u0032\u65E5',
  24336. '\u33E2': '\u0033\u65E5',
  24337. '\u33E3': '\u0034\u65E5',
  24338. '\u33E4': '\u0035\u65E5',
  24339. '\u33E5': '\u0036\u65E5',
  24340. '\u33E6': '\u0037\u65E5',
  24341. '\u33E7': '\u0038\u65E5',
  24342. '\u33E8': '\u0039\u65E5',
  24343. '\u33E9': '\u0031\u0030\u65E5',
  24344. '\u33EA': '\u0031\u0031\u65E5',
  24345. '\u33EB': '\u0031\u0032\u65E5',
  24346. '\u33EC': '\u0031\u0033\u65E5',
  24347. '\u33ED': '\u0031\u0034\u65E5',
  24348. '\u33EE': '\u0031\u0035\u65E5',
  24349. '\u33EF': '\u0031\u0036\u65E5',
  24350. '\u33F0': '\u0031\u0037\u65E5',
  24351. '\u33F1': '\u0031\u0038\u65E5',
  24352. '\u33F2': '\u0031\u0039\u65E5',
  24353. '\u33F3': '\u0032\u0030\u65E5',
  24354. '\u33F4': '\u0032\u0031\u65E5',
  24355. '\u33F5': '\u0032\u0032\u65E5',
  24356. '\u33F6': '\u0032\u0033\u65E5',
  24357. '\u33F7': '\u0032\u0034\u65E5',
  24358. '\u33F8': '\u0032\u0035\u65E5',
  24359. '\u33F9': '\u0032\u0036\u65E5',
  24360. '\u33FA': '\u0032\u0037\u65E5',
  24361. '\u33FB': '\u0032\u0038\u65E5',
  24362. '\u33FC': '\u0032\u0039\u65E5',
  24363. '\u33FD': '\u0033\u0030\u65E5',
  24364. '\u33FE': '\u0033\u0031\u65E5',
  24365. '\uFB00': '\u0066\u0066',
  24366. '\uFB01': '\u0066\u0069',
  24367. '\uFB02': '\u0066\u006C',
  24368. '\uFB03': '\u0066\u0066\u0069',
  24369. '\uFB04': '\u0066\u0066\u006C',
  24370. '\uFB05': '\u017F\u0074',
  24371. '\uFB06': '\u0073\u0074',
  24372. '\uFB13': '\u0574\u0576',
  24373. '\uFB14': '\u0574\u0565',
  24374. '\uFB15': '\u0574\u056B',
  24375. '\uFB16': '\u057E\u0576',
  24376. '\uFB17': '\u0574\u056D',
  24377. '\uFB4F': '\u05D0\u05DC',
  24378. '\uFB50': '\u0671',
  24379. '\uFB51': '\u0671',
  24380. '\uFB52': '\u067B',
  24381. '\uFB53': '\u067B',
  24382. '\uFB54': '\u067B',
  24383. '\uFB55': '\u067B',
  24384. '\uFB56': '\u067E',
  24385. '\uFB57': '\u067E',
  24386. '\uFB58': '\u067E',
  24387. '\uFB59': '\u067E',
  24388. '\uFB5A': '\u0680',
  24389. '\uFB5B': '\u0680',
  24390. '\uFB5C': '\u0680',
  24391. '\uFB5D': '\u0680',
  24392. '\uFB5E': '\u067A',
  24393. '\uFB5F': '\u067A',
  24394. '\uFB60': '\u067A',
  24395. '\uFB61': '\u067A',
  24396. '\uFB62': '\u067F',
  24397. '\uFB63': '\u067F',
  24398. '\uFB64': '\u067F',
  24399. '\uFB65': '\u067F',
  24400. '\uFB66': '\u0679',
  24401. '\uFB67': '\u0679',
  24402. '\uFB68': '\u0679',
  24403. '\uFB69': '\u0679',
  24404. '\uFB6A': '\u06A4',
  24405. '\uFB6B': '\u06A4',
  24406. '\uFB6C': '\u06A4',
  24407. '\uFB6D': '\u06A4',
  24408. '\uFB6E': '\u06A6',
  24409. '\uFB6F': '\u06A6',
  24410. '\uFB70': '\u06A6',
  24411. '\uFB71': '\u06A6',
  24412. '\uFB72': '\u0684',
  24413. '\uFB73': '\u0684',
  24414. '\uFB74': '\u0684',
  24415. '\uFB75': '\u0684',
  24416. '\uFB76': '\u0683',
  24417. '\uFB77': '\u0683',
  24418. '\uFB78': '\u0683',
  24419. '\uFB79': '\u0683',
  24420. '\uFB7A': '\u0686',
  24421. '\uFB7B': '\u0686',
  24422. '\uFB7C': '\u0686',
  24423. '\uFB7D': '\u0686',
  24424. '\uFB7E': '\u0687',
  24425. '\uFB7F': '\u0687',
  24426. '\uFB80': '\u0687',
  24427. '\uFB81': '\u0687',
  24428. '\uFB82': '\u068D',
  24429. '\uFB83': '\u068D',
  24430. '\uFB84': '\u068C',
  24431. '\uFB85': '\u068C',
  24432. '\uFB86': '\u068E',
  24433. '\uFB87': '\u068E',
  24434. '\uFB88': '\u0688',
  24435. '\uFB89': '\u0688',
  24436. '\uFB8A': '\u0698',
  24437. '\uFB8B': '\u0698',
  24438. '\uFB8C': '\u0691',
  24439. '\uFB8D': '\u0691',
  24440. '\uFB8E': '\u06A9',
  24441. '\uFB8F': '\u06A9',
  24442. '\uFB90': '\u06A9',
  24443. '\uFB91': '\u06A9',
  24444. '\uFB92': '\u06AF',
  24445. '\uFB93': '\u06AF',
  24446. '\uFB94': '\u06AF',
  24447. '\uFB95': '\u06AF',
  24448. '\uFB96': '\u06B3',
  24449. '\uFB97': '\u06B3',
  24450. '\uFB98': '\u06B3',
  24451. '\uFB99': '\u06B3',
  24452. '\uFB9A': '\u06B1',
  24453. '\uFB9B': '\u06B1',
  24454. '\uFB9C': '\u06B1',
  24455. '\uFB9D': '\u06B1',
  24456. '\uFB9E': '\u06BA',
  24457. '\uFB9F': '\u06BA',
  24458. '\uFBA0': '\u06BB',
  24459. '\uFBA1': '\u06BB',
  24460. '\uFBA2': '\u06BB',
  24461. '\uFBA3': '\u06BB',
  24462. '\uFBA4': '\u06C0',
  24463. '\uFBA5': '\u06C0',
  24464. '\uFBA6': '\u06C1',
  24465. '\uFBA7': '\u06C1',
  24466. '\uFBA8': '\u06C1',
  24467. '\uFBA9': '\u06C1',
  24468. '\uFBAA': '\u06BE',
  24469. '\uFBAB': '\u06BE',
  24470. '\uFBAC': '\u06BE',
  24471. '\uFBAD': '\u06BE',
  24472. '\uFBAE': '\u06D2',
  24473. '\uFBAF': '\u06D2',
  24474. '\uFBB0': '\u06D3',
  24475. '\uFBB1': '\u06D3',
  24476. '\uFBD3': '\u06AD',
  24477. '\uFBD4': '\u06AD',
  24478. '\uFBD5': '\u06AD',
  24479. '\uFBD6': '\u06AD',
  24480. '\uFBD7': '\u06C7',
  24481. '\uFBD8': '\u06C7',
  24482. '\uFBD9': '\u06C6',
  24483. '\uFBDA': '\u06C6',
  24484. '\uFBDB': '\u06C8',
  24485. '\uFBDC': '\u06C8',
  24486. '\uFBDD': '\u0677',
  24487. '\uFBDE': '\u06CB',
  24488. '\uFBDF': '\u06CB',
  24489. '\uFBE0': '\u06C5',
  24490. '\uFBE1': '\u06C5',
  24491. '\uFBE2': '\u06C9',
  24492. '\uFBE3': '\u06C9',
  24493. '\uFBE4': '\u06D0',
  24494. '\uFBE5': '\u06D0',
  24495. '\uFBE6': '\u06D0',
  24496. '\uFBE7': '\u06D0',
  24497. '\uFBE8': '\u0649',
  24498. '\uFBE9': '\u0649',
  24499. '\uFBEA': '\u0626\u0627',
  24500. '\uFBEB': '\u0626\u0627',
  24501. '\uFBEC': '\u0626\u06D5',
  24502. '\uFBED': '\u0626\u06D5',
  24503. '\uFBEE': '\u0626\u0648',
  24504. '\uFBEF': '\u0626\u0648',
  24505. '\uFBF0': '\u0626\u06C7',
  24506. '\uFBF1': '\u0626\u06C7',
  24507. '\uFBF2': '\u0626\u06C6',
  24508. '\uFBF3': '\u0626\u06C6',
  24509. '\uFBF4': '\u0626\u06C8',
  24510. '\uFBF5': '\u0626\u06C8',
  24511. '\uFBF6': '\u0626\u06D0',
  24512. '\uFBF7': '\u0626\u06D0',
  24513. '\uFBF8': '\u0626\u06D0',
  24514. '\uFBF9': '\u0626\u0649',
  24515. '\uFBFA': '\u0626\u0649',
  24516. '\uFBFB': '\u0626\u0649',
  24517. '\uFBFC': '\u06CC',
  24518. '\uFBFD': '\u06CC',
  24519. '\uFBFE': '\u06CC',
  24520. '\uFBFF': '\u06CC',
  24521. '\uFC00': '\u0626\u062C',
  24522. '\uFC01': '\u0626\u062D',
  24523. '\uFC02': '\u0626\u0645',
  24524. '\uFC03': '\u0626\u0649',
  24525. '\uFC04': '\u0626\u064A',
  24526. '\uFC05': '\u0628\u062C',
  24527. '\uFC06': '\u0628\u062D',
  24528. '\uFC07': '\u0628\u062E',
  24529. '\uFC08': '\u0628\u0645',
  24530. '\uFC09': '\u0628\u0649',
  24531. '\uFC0A': '\u0628\u064A',
  24532. '\uFC0B': '\u062A\u062C',
  24533. '\uFC0C': '\u062A\u062D',
  24534. '\uFC0D': '\u062A\u062E',
  24535. '\uFC0E': '\u062A\u0645',
  24536. '\uFC0F': '\u062A\u0649',
  24537. '\uFC10': '\u062A\u064A',
  24538. '\uFC11': '\u062B\u062C',
  24539. '\uFC12': '\u062B\u0645',
  24540. '\uFC13': '\u062B\u0649',
  24541. '\uFC14': '\u062B\u064A',
  24542. '\uFC15': '\u062C\u062D',
  24543. '\uFC16': '\u062C\u0645',
  24544. '\uFC17': '\u062D\u062C',
  24545. '\uFC18': '\u062D\u0645',
  24546. '\uFC19': '\u062E\u062C',
  24547. '\uFC1A': '\u062E\u062D',
  24548. '\uFC1B': '\u062E\u0645',
  24549. '\uFC1C': '\u0633\u062C',
  24550. '\uFC1D': '\u0633\u062D',
  24551. '\uFC1E': '\u0633\u062E',
  24552. '\uFC1F': '\u0633\u0645',
  24553. '\uFC20': '\u0635\u062D',
  24554. '\uFC21': '\u0635\u0645',
  24555. '\uFC22': '\u0636\u062C',
  24556. '\uFC23': '\u0636\u062D',
  24557. '\uFC24': '\u0636\u062E',
  24558. '\uFC25': '\u0636\u0645',
  24559. '\uFC26': '\u0637\u062D',
  24560. '\uFC27': '\u0637\u0645',
  24561. '\uFC28': '\u0638\u0645',
  24562. '\uFC29': '\u0639\u062C',
  24563. '\uFC2A': '\u0639\u0645',
  24564. '\uFC2B': '\u063A\u062C',
  24565. '\uFC2C': '\u063A\u0645',
  24566. '\uFC2D': '\u0641\u062C',
  24567. '\uFC2E': '\u0641\u062D',
  24568. '\uFC2F': '\u0641\u062E',
  24569. '\uFC30': '\u0641\u0645',
  24570. '\uFC31': '\u0641\u0649',
  24571. '\uFC32': '\u0641\u064A',
  24572. '\uFC33': '\u0642\u062D',
  24573. '\uFC34': '\u0642\u0645',
  24574. '\uFC35': '\u0642\u0649',
  24575. '\uFC36': '\u0642\u064A',
  24576. '\uFC37': '\u0643\u0627',
  24577. '\uFC38': '\u0643\u062C',
  24578. '\uFC39': '\u0643\u062D',
  24579. '\uFC3A': '\u0643\u062E',
  24580. '\uFC3B': '\u0643\u0644',
  24581. '\uFC3C': '\u0643\u0645',
  24582. '\uFC3D': '\u0643\u0649',
  24583. '\uFC3E': '\u0643\u064A',
  24584. '\uFC3F': '\u0644\u062C',
  24585. '\uFC40': '\u0644\u062D',
  24586. '\uFC41': '\u0644\u062E',
  24587. '\uFC42': '\u0644\u0645',
  24588. '\uFC43': '\u0644\u0649',
  24589. '\uFC44': '\u0644\u064A',
  24590. '\uFC45': '\u0645\u062C',
  24591. '\uFC46': '\u0645\u062D',
  24592. '\uFC47': '\u0645\u062E',
  24593. '\uFC48': '\u0645\u0645',
  24594. '\uFC49': '\u0645\u0649',
  24595. '\uFC4A': '\u0645\u064A',
  24596. '\uFC4B': '\u0646\u062C',
  24597. '\uFC4C': '\u0646\u062D',
  24598. '\uFC4D': '\u0646\u062E',
  24599. '\uFC4E': '\u0646\u0645',
  24600. '\uFC4F': '\u0646\u0649',
  24601. '\uFC50': '\u0646\u064A',
  24602. '\uFC51': '\u0647\u062C',
  24603. '\uFC52': '\u0647\u0645',
  24604. '\uFC53': '\u0647\u0649',
  24605. '\uFC54': '\u0647\u064A',
  24606. '\uFC55': '\u064A\u062C',
  24607. '\uFC56': '\u064A\u062D',
  24608. '\uFC57': '\u064A\u062E',
  24609. '\uFC58': '\u064A\u0645',
  24610. '\uFC59': '\u064A\u0649',
  24611. '\uFC5A': '\u064A\u064A',
  24612. '\uFC5B': '\u0630\u0670',
  24613. '\uFC5C': '\u0631\u0670',
  24614. '\uFC5D': '\u0649\u0670',
  24615. '\uFC5E': '\u0020\u064C\u0651',
  24616. '\uFC5F': '\u0020\u064D\u0651',
  24617. '\uFC60': '\u0020\u064E\u0651',
  24618. '\uFC61': '\u0020\u064F\u0651',
  24619. '\uFC62': '\u0020\u0650\u0651',
  24620. '\uFC63': '\u0020\u0651\u0670',
  24621. '\uFC64': '\u0626\u0631',
  24622. '\uFC65': '\u0626\u0632',
  24623. '\uFC66': '\u0626\u0645',
  24624. '\uFC67': '\u0626\u0646',
  24625. '\uFC68': '\u0626\u0649',
  24626. '\uFC69': '\u0626\u064A',
  24627. '\uFC6A': '\u0628\u0631',
  24628. '\uFC6B': '\u0628\u0632',
  24629. '\uFC6C': '\u0628\u0645',
  24630. '\uFC6D': '\u0628\u0646',
  24631. '\uFC6E': '\u0628\u0649',
  24632. '\uFC6F': '\u0628\u064A',
  24633. '\uFC70': '\u062A\u0631',
  24634. '\uFC71': '\u062A\u0632',
  24635. '\uFC72': '\u062A\u0645',
  24636. '\uFC73': '\u062A\u0646',
  24637. '\uFC74': '\u062A\u0649',
  24638. '\uFC75': '\u062A\u064A',
  24639. '\uFC76': '\u062B\u0631',
  24640. '\uFC77': '\u062B\u0632',
  24641. '\uFC78': '\u062B\u0645',
  24642. '\uFC79': '\u062B\u0646',
  24643. '\uFC7A': '\u062B\u0649',
  24644. '\uFC7B': '\u062B\u064A',
  24645. '\uFC7C': '\u0641\u0649',
  24646. '\uFC7D': '\u0641\u064A',
  24647. '\uFC7E': '\u0642\u0649',
  24648. '\uFC7F': '\u0642\u064A',
  24649. '\uFC80': '\u0643\u0627',
  24650. '\uFC81': '\u0643\u0644',
  24651. '\uFC82': '\u0643\u0645',
  24652. '\uFC83': '\u0643\u0649',
  24653. '\uFC84': '\u0643\u064A',
  24654. '\uFC85': '\u0644\u0645',
  24655. '\uFC86': '\u0644\u0649',
  24656. '\uFC87': '\u0644\u064A',
  24657. '\uFC88': '\u0645\u0627',
  24658. '\uFC89': '\u0645\u0645',
  24659. '\uFC8A': '\u0646\u0631',
  24660. '\uFC8B': '\u0646\u0632',
  24661. '\uFC8C': '\u0646\u0645',
  24662. '\uFC8D': '\u0646\u0646',
  24663. '\uFC8E': '\u0646\u0649',
  24664. '\uFC8F': '\u0646\u064A',
  24665. '\uFC90': '\u0649\u0670',
  24666. '\uFC91': '\u064A\u0631',
  24667. '\uFC92': '\u064A\u0632',
  24668. '\uFC93': '\u064A\u0645',
  24669. '\uFC94': '\u064A\u0646',
  24670. '\uFC95': '\u064A\u0649',
  24671. '\uFC96': '\u064A\u064A',
  24672. '\uFC97': '\u0626\u062C',
  24673. '\uFC98': '\u0626\u062D',
  24674. '\uFC99': '\u0626\u062E',
  24675. '\uFC9A': '\u0626\u0645',
  24676. '\uFC9B': '\u0626\u0647',
  24677. '\uFC9C': '\u0628\u062C',
  24678. '\uFC9D': '\u0628\u062D',
  24679. '\uFC9E': '\u0628\u062E',
  24680. '\uFC9F': '\u0628\u0645',
  24681. '\uFCA0': '\u0628\u0647',
  24682. '\uFCA1': '\u062A\u062C',
  24683. '\uFCA2': '\u062A\u062D',
  24684. '\uFCA3': '\u062A\u062E',
  24685. '\uFCA4': '\u062A\u0645',
  24686. '\uFCA5': '\u062A\u0647',
  24687. '\uFCA6': '\u062B\u0645',
  24688. '\uFCA7': '\u062C\u062D',
  24689. '\uFCA8': '\u062C\u0645',
  24690. '\uFCA9': '\u062D\u062C',
  24691. '\uFCAA': '\u062D\u0645',
  24692. '\uFCAB': '\u062E\u062C',
  24693. '\uFCAC': '\u062E\u0645',
  24694. '\uFCAD': '\u0633\u062C',
  24695. '\uFCAE': '\u0633\u062D',
  24696. '\uFCAF': '\u0633\u062E',
  24697. '\uFCB0': '\u0633\u0645',
  24698. '\uFCB1': '\u0635\u062D',
  24699. '\uFCB2': '\u0635\u062E',
  24700. '\uFCB3': '\u0635\u0645',
  24701. '\uFCB4': '\u0636\u062C',
  24702. '\uFCB5': '\u0636\u062D',
  24703. '\uFCB6': '\u0636\u062E',
  24704. '\uFCB7': '\u0636\u0645',
  24705. '\uFCB8': '\u0637\u062D',
  24706. '\uFCB9': '\u0638\u0645',
  24707. '\uFCBA': '\u0639\u062C',
  24708. '\uFCBB': '\u0639\u0645',
  24709. '\uFCBC': '\u063A\u062C',
  24710. '\uFCBD': '\u063A\u0645',
  24711. '\uFCBE': '\u0641\u062C',
  24712. '\uFCBF': '\u0641\u062D',
  24713. '\uFCC0': '\u0641\u062E',
  24714. '\uFCC1': '\u0641\u0645',
  24715. '\uFCC2': '\u0642\u062D',
  24716. '\uFCC3': '\u0642\u0645',
  24717. '\uFCC4': '\u0643\u062C',
  24718. '\uFCC5': '\u0643\u062D',
  24719. '\uFCC6': '\u0643\u062E',
  24720. '\uFCC7': '\u0643\u0644',
  24721. '\uFCC8': '\u0643\u0645',
  24722. '\uFCC9': '\u0644\u062C',
  24723. '\uFCCA': '\u0644\u062D',
  24724. '\uFCCB': '\u0644\u062E',
  24725. '\uFCCC': '\u0644\u0645',
  24726. '\uFCCD': '\u0644\u0647',
  24727. '\uFCCE': '\u0645\u062C',
  24728. '\uFCCF': '\u0645\u062D',
  24729. '\uFCD0': '\u0645\u062E',
  24730. '\uFCD1': '\u0645\u0645',
  24731. '\uFCD2': '\u0646\u062C',
  24732. '\uFCD3': '\u0646\u062D',
  24733. '\uFCD4': '\u0646\u062E',
  24734. '\uFCD5': '\u0646\u0645',
  24735. '\uFCD6': '\u0646\u0647',
  24736. '\uFCD7': '\u0647\u062C',
  24737. '\uFCD8': '\u0647\u0645',
  24738. '\uFCD9': '\u0647\u0670',
  24739. '\uFCDA': '\u064A\u062C',
  24740. '\uFCDB': '\u064A\u062D',
  24741. '\uFCDC': '\u064A\u062E',
  24742. '\uFCDD': '\u064A\u0645',
  24743. '\uFCDE': '\u064A\u0647',
  24744. '\uFCDF': '\u0626\u0645',
  24745. '\uFCE0': '\u0626\u0647',
  24746. '\uFCE1': '\u0628\u0645',
  24747. '\uFCE2': '\u0628\u0647',
  24748. '\uFCE3': '\u062A\u0645',
  24749. '\uFCE4': '\u062A\u0647',
  24750. '\uFCE5': '\u062B\u0645',
  24751. '\uFCE6': '\u062B\u0647',
  24752. '\uFCE7': '\u0633\u0645',
  24753. '\uFCE8': '\u0633\u0647',
  24754. '\uFCE9': '\u0634\u0645',
  24755. '\uFCEA': '\u0634\u0647',
  24756. '\uFCEB': '\u0643\u0644',
  24757. '\uFCEC': '\u0643\u0645',
  24758. '\uFCED': '\u0644\u0645',
  24759. '\uFCEE': '\u0646\u0645',
  24760. '\uFCEF': '\u0646\u0647',
  24761. '\uFCF0': '\u064A\u0645',
  24762. '\uFCF1': '\u064A\u0647',
  24763. '\uFCF2': '\u0640\u064E\u0651',
  24764. '\uFCF3': '\u0640\u064F\u0651',
  24765. '\uFCF4': '\u0640\u0650\u0651',
  24766. '\uFCF5': '\u0637\u0649',
  24767. '\uFCF6': '\u0637\u064A',
  24768. '\uFCF7': '\u0639\u0649',
  24769. '\uFCF8': '\u0639\u064A',
  24770. '\uFCF9': '\u063A\u0649',
  24771. '\uFCFA': '\u063A\u064A',
  24772. '\uFCFB': '\u0633\u0649',
  24773. '\uFCFC': '\u0633\u064A',
  24774. '\uFCFD': '\u0634\u0649',
  24775. '\uFCFE': '\u0634\u064A',
  24776. '\uFCFF': '\u062D\u0649',
  24777. '\uFD00': '\u062D\u064A',
  24778. '\uFD01': '\u062C\u0649',
  24779. '\uFD02': '\u062C\u064A',
  24780. '\uFD03': '\u062E\u0649',
  24781. '\uFD04': '\u062E\u064A',
  24782. '\uFD05': '\u0635\u0649',
  24783. '\uFD06': '\u0635\u064A',
  24784. '\uFD07': '\u0636\u0649',
  24785. '\uFD08': '\u0636\u064A',
  24786. '\uFD09': '\u0634\u062C',
  24787. '\uFD0A': '\u0634\u062D',
  24788. '\uFD0B': '\u0634\u062E',
  24789. '\uFD0C': '\u0634\u0645',
  24790. '\uFD0D': '\u0634\u0631',
  24791. '\uFD0E': '\u0633\u0631',
  24792. '\uFD0F': '\u0635\u0631',
  24793. '\uFD10': '\u0636\u0631',
  24794. '\uFD11': '\u0637\u0649',
  24795. '\uFD12': '\u0637\u064A',
  24796. '\uFD13': '\u0639\u0649',
  24797. '\uFD14': '\u0639\u064A',
  24798. '\uFD15': '\u063A\u0649',
  24799. '\uFD16': '\u063A\u064A',
  24800. '\uFD17': '\u0633\u0649',
  24801. '\uFD18': '\u0633\u064A',
  24802. '\uFD19': '\u0634\u0649',
  24803. '\uFD1A': '\u0634\u064A',
  24804. '\uFD1B': '\u062D\u0649',
  24805. '\uFD1C': '\u062D\u064A',
  24806. '\uFD1D': '\u062C\u0649',
  24807. '\uFD1E': '\u062C\u064A',
  24808. '\uFD1F': '\u062E\u0649',
  24809. '\uFD20': '\u062E\u064A',
  24810. '\uFD21': '\u0635\u0649',
  24811. '\uFD22': '\u0635\u064A',
  24812. '\uFD23': '\u0636\u0649',
  24813. '\uFD24': '\u0636\u064A',
  24814. '\uFD25': '\u0634\u062C',
  24815. '\uFD26': '\u0634\u062D',
  24816. '\uFD27': '\u0634\u062E',
  24817. '\uFD28': '\u0634\u0645',
  24818. '\uFD29': '\u0634\u0631',
  24819. '\uFD2A': '\u0633\u0631',
  24820. '\uFD2B': '\u0635\u0631',
  24821. '\uFD2C': '\u0636\u0631',
  24822. '\uFD2D': '\u0634\u062C',
  24823. '\uFD2E': '\u0634\u062D',
  24824. '\uFD2F': '\u0634\u062E',
  24825. '\uFD30': '\u0634\u0645',
  24826. '\uFD31': '\u0633\u0647',
  24827. '\uFD32': '\u0634\u0647',
  24828. '\uFD33': '\u0637\u0645',
  24829. '\uFD34': '\u0633\u062C',
  24830. '\uFD35': '\u0633\u062D',
  24831. '\uFD36': '\u0633\u062E',
  24832. '\uFD37': '\u0634\u062C',
  24833. '\uFD38': '\u0634\u062D',
  24834. '\uFD39': '\u0634\u062E',
  24835. '\uFD3A': '\u0637\u0645',
  24836. '\uFD3B': '\u0638\u0645',
  24837. '\uFD3C': '\u0627\u064B',
  24838. '\uFD3D': '\u0627\u064B',
  24839. '\uFD50': '\u062A\u062C\u0645',
  24840. '\uFD51': '\u062A\u062D\u062C',
  24841. '\uFD52': '\u062A\u062D\u062C',
  24842. '\uFD53': '\u062A\u062D\u0645',
  24843. '\uFD54': '\u062A\u062E\u0645',
  24844. '\uFD55': '\u062A\u0645\u062C',
  24845. '\uFD56': '\u062A\u0645\u062D',
  24846. '\uFD57': '\u062A\u0645\u062E',
  24847. '\uFD58': '\u062C\u0645\u062D',
  24848. '\uFD59': '\u062C\u0645\u062D',
  24849. '\uFD5A': '\u062D\u0645\u064A',
  24850. '\uFD5B': '\u062D\u0645\u0649',
  24851. '\uFD5C': '\u0633\u062D\u062C',
  24852. '\uFD5D': '\u0633\u062C\u062D',
  24853. '\uFD5E': '\u0633\u062C\u0649',
  24854. '\uFD5F': '\u0633\u0645\u062D',
  24855. '\uFD60': '\u0633\u0645\u062D',
  24856. '\uFD61': '\u0633\u0645\u062C',
  24857. '\uFD62': '\u0633\u0645\u0645',
  24858. '\uFD63': '\u0633\u0645\u0645',
  24859. '\uFD64': '\u0635\u062D\u062D',
  24860. '\uFD65': '\u0635\u062D\u062D',
  24861. '\uFD66': '\u0635\u0645\u0645',
  24862. '\uFD67': '\u0634\u062D\u0645',
  24863. '\uFD68': '\u0634\u062D\u0645',
  24864. '\uFD69': '\u0634\u062C\u064A',
  24865. '\uFD6A': '\u0634\u0645\u062E',
  24866. '\uFD6B': '\u0634\u0645\u062E',
  24867. '\uFD6C': '\u0634\u0645\u0645',
  24868. '\uFD6D': '\u0634\u0645\u0645',
  24869. '\uFD6E': '\u0636\u062D\u0649',
  24870. '\uFD6F': '\u0636\u062E\u0645',
  24871. '\uFD70': '\u0636\u062E\u0645',
  24872. '\uFD71': '\u0637\u0645\u062D',
  24873. '\uFD72': '\u0637\u0645\u062D',
  24874. '\uFD73': '\u0637\u0645\u0645',
  24875. '\uFD74': '\u0637\u0645\u064A',
  24876. '\uFD75': '\u0639\u062C\u0645',
  24877. '\uFD76': '\u0639\u0645\u0645',
  24878. '\uFD77': '\u0639\u0645\u0645',
  24879. '\uFD78': '\u0639\u0645\u0649',
  24880. '\uFD79': '\u063A\u0645\u0645',
  24881. '\uFD7A': '\u063A\u0645\u064A',
  24882. '\uFD7B': '\u063A\u0645\u0649',
  24883. '\uFD7C': '\u0641\u062E\u0645',
  24884. '\uFD7D': '\u0641\u062E\u0645',
  24885. '\uFD7E': '\u0642\u0645\u062D',
  24886. '\uFD7F': '\u0642\u0645\u0645',
  24887. '\uFD80': '\u0644\u062D\u0645',
  24888. '\uFD81': '\u0644\u062D\u064A',
  24889. '\uFD82': '\u0644\u062D\u0649',
  24890. '\uFD83': '\u0644\u062C\u062C',
  24891. '\uFD84': '\u0644\u062C\u062C',
  24892. '\uFD85': '\u0644\u062E\u0645',
  24893. '\uFD86': '\u0644\u062E\u0645',
  24894. '\uFD87': '\u0644\u0645\u062D',
  24895. '\uFD88': '\u0644\u0645\u062D',
  24896. '\uFD89': '\u0645\u062D\u062C',
  24897. '\uFD8A': '\u0645\u062D\u0645',
  24898. '\uFD8B': '\u0645\u062D\u064A',
  24899. '\uFD8C': '\u0645\u062C\u062D',
  24900. '\uFD8D': '\u0645\u062C\u0645',
  24901. '\uFD8E': '\u0645\u062E\u062C',
  24902. '\uFD8F': '\u0645\u062E\u0645',
  24903. '\uFD92': '\u0645\u062C\u062E',
  24904. '\uFD93': '\u0647\u0645\u062C',
  24905. '\uFD94': '\u0647\u0645\u0645',
  24906. '\uFD95': '\u0646\u062D\u0645',
  24907. '\uFD96': '\u0646\u062D\u0649',
  24908. '\uFD97': '\u0646\u062C\u0645',
  24909. '\uFD98': '\u0646\u062C\u0645',
  24910. '\uFD99': '\u0646\u062C\u0649',
  24911. '\uFD9A': '\u0646\u0645\u064A',
  24912. '\uFD9B': '\u0646\u0645\u0649',
  24913. '\uFD9C': '\u064A\u0645\u0645',
  24914. '\uFD9D': '\u064A\u0645\u0645',
  24915. '\uFD9E': '\u0628\u062E\u064A',
  24916. '\uFD9F': '\u062A\u062C\u064A',
  24917. '\uFDA0': '\u062A\u062C\u0649',
  24918. '\uFDA1': '\u062A\u062E\u064A',
  24919. '\uFDA2': '\u062A\u062E\u0649',
  24920. '\uFDA3': '\u062A\u0645\u064A',
  24921. '\uFDA4': '\u062A\u0645\u0649',
  24922. '\uFDA5': '\u062C\u0645\u064A',
  24923. '\uFDA6': '\u062C\u062D\u0649',
  24924. '\uFDA7': '\u062C\u0645\u0649',
  24925. '\uFDA8': '\u0633\u062E\u0649',
  24926. '\uFDA9': '\u0635\u062D\u064A',
  24927. '\uFDAA': '\u0634\u062D\u064A',
  24928. '\uFDAB': '\u0636\u062D\u064A',
  24929. '\uFDAC': '\u0644\u062C\u064A',
  24930. '\uFDAD': '\u0644\u0645\u064A',
  24931. '\uFDAE': '\u064A\u062D\u064A',
  24932. '\uFDAF': '\u064A\u062C\u064A',
  24933. '\uFDB0': '\u064A\u0645\u064A',
  24934. '\uFDB1': '\u0645\u0645\u064A',
  24935. '\uFDB2': '\u0642\u0645\u064A',
  24936. '\uFDB3': '\u0646\u062D\u064A',
  24937. '\uFDB4': '\u0642\u0645\u062D',
  24938. '\uFDB5': '\u0644\u062D\u0645',
  24939. '\uFDB6': '\u0639\u0645\u064A',
  24940. '\uFDB7': '\u0643\u0645\u064A',
  24941. '\uFDB8': '\u0646\u062C\u062D',
  24942. '\uFDB9': '\u0645\u062E\u064A',
  24943. '\uFDBA': '\u0644\u062C\u0645',
  24944. '\uFDBB': '\u0643\u0645\u0645',
  24945. '\uFDBC': '\u0644\u062C\u0645',
  24946. '\uFDBD': '\u0646\u062C\u062D',
  24947. '\uFDBE': '\u062C\u062D\u064A',
  24948. '\uFDBF': '\u062D\u062C\u064A',
  24949. '\uFDC0': '\u0645\u062C\u064A',
  24950. '\uFDC1': '\u0641\u0645\u064A',
  24951. '\uFDC2': '\u0628\u062D\u064A',
  24952. '\uFDC3': '\u0643\u0645\u0645',
  24953. '\uFDC4': '\u0639\u062C\u0645',
  24954. '\uFDC5': '\u0635\u0645\u0645',
  24955. '\uFDC6': '\u0633\u062E\u064A',
  24956. '\uFDC7': '\u0646\u062C\u064A',
  24957. '\uFE49': '\u203E',
  24958. '\uFE4A': '\u203E',
  24959. '\uFE4B': '\u203E',
  24960. '\uFE4C': '\u203E',
  24961. '\uFE4D': '\u005F',
  24962. '\uFE4E': '\u005F',
  24963. '\uFE4F': '\u005F',
  24964. '\uFE80': '\u0621',
  24965. '\uFE81': '\u0622',
  24966. '\uFE82': '\u0622',
  24967. '\uFE83': '\u0623',
  24968. '\uFE84': '\u0623',
  24969. '\uFE85': '\u0624',
  24970. '\uFE86': '\u0624',
  24971. '\uFE87': '\u0625',
  24972. '\uFE88': '\u0625',
  24973. '\uFE89': '\u0626',
  24974. '\uFE8A': '\u0626',
  24975. '\uFE8B': '\u0626',
  24976. '\uFE8C': '\u0626',
  24977. '\uFE8D': '\u0627',
  24978. '\uFE8E': '\u0627',
  24979. '\uFE8F': '\u0628',
  24980. '\uFE90': '\u0628',
  24981. '\uFE91': '\u0628',
  24982. '\uFE92': '\u0628',
  24983. '\uFE93': '\u0629',
  24984. '\uFE94': '\u0629',
  24985. '\uFE95': '\u062A',
  24986. '\uFE96': '\u062A',
  24987. '\uFE97': '\u062A',
  24988. '\uFE98': '\u062A',
  24989. '\uFE99': '\u062B',
  24990. '\uFE9A': '\u062B',
  24991. '\uFE9B': '\u062B',
  24992. '\uFE9C': '\u062B',
  24993. '\uFE9D': '\u062C',
  24994. '\uFE9E': '\u062C',
  24995. '\uFE9F': '\u062C',
  24996. '\uFEA0': '\u062C',
  24997. '\uFEA1': '\u062D',
  24998. '\uFEA2': '\u062D',
  24999. '\uFEA3': '\u062D',
  25000. '\uFEA4': '\u062D',
  25001. '\uFEA5': '\u062E',
  25002. '\uFEA6': '\u062E',
  25003. '\uFEA7': '\u062E',
  25004. '\uFEA8': '\u062E',
  25005. '\uFEA9': '\u062F',
  25006. '\uFEAA': '\u062F',
  25007. '\uFEAB': '\u0630',
  25008. '\uFEAC': '\u0630',
  25009. '\uFEAD': '\u0631',
  25010. '\uFEAE': '\u0631',
  25011. '\uFEAF': '\u0632',
  25012. '\uFEB0': '\u0632',
  25013. '\uFEB1': '\u0633',
  25014. '\uFEB2': '\u0633',
  25015. '\uFEB3': '\u0633',
  25016. '\uFEB4': '\u0633',
  25017. '\uFEB5': '\u0634',
  25018. '\uFEB6': '\u0634',
  25019. '\uFEB7': '\u0634',
  25020. '\uFEB8': '\u0634',
  25021. '\uFEB9': '\u0635',
  25022. '\uFEBA': '\u0635',
  25023. '\uFEBB': '\u0635',
  25024. '\uFEBC': '\u0635',
  25025. '\uFEBD': '\u0636',
  25026. '\uFEBE': '\u0636',
  25027. '\uFEBF': '\u0636',
  25028. '\uFEC0': '\u0636',
  25029. '\uFEC1': '\u0637',
  25030. '\uFEC2': '\u0637',
  25031. '\uFEC3': '\u0637',
  25032. '\uFEC4': '\u0637',
  25033. '\uFEC5': '\u0638',
  25034. '\uFEC6': '\u0638',
  25035. '\uFEC7': '\u0638',
  25036. '\uFEC8': '\u0638',
  25037. '\uFEC9': '\u0639',
  25038. '\uFECA': '\u0639',
  25039. '\uFECB': '\u0639',
  25040. '\uFECC': '\u0639',
  25041. '\uFECD': '\u063A',
  25042. '\uFECE': '\u063A',
  25043. '\uFECF': '\u063A',
  25044. '\uFED0': '\u063A',
  25045. '\uFED1': '\u0641',
  25046. '\uFED2': '\u0641',
  25047. '\uFED3': '\u0641',
  25048. '\uFED4': '\u0641',
  25049. '\uFED5': '\u0642',
  25050. '\uFED6': '\u0642',
  25051. '\uFED7': '\u0642',
  25052. '\uFED8': '\u0642',
  25053. '\uFED9': '\u0643',
  25054. '\uFEDA': '\u0643',
  25055. '\uFEDB': '\u0643',
  25056. '\uFEDC': '\u0643',
  25057. '\uFEDD': '\u0644',
  25058. '\uFEDE': '\u0644',
  25059. '\uFEDF': '\u0644',
  25060. '\uFEE0': '\u0644',
  25061. '\uFEE1': '\u0645',
  25062. '\uFEE2': '\u0645',
  25063. '\uFEE3': '\u0645',
  25064. '\uFEE4': '\u0645',
  25065. '\uFEE5': '\u0646',
  25066. '\uFEE6': '\u0646',
  25067. '\uFEE7': '\u0646',
  25068. '\uFEE8': '\u0646',
  25069. '\uFEE9': '\u0647',
  25070. '\uFEEA': '\u0647',
  25071. '\uFEEB': '\u0647',
  25072. '\uFEEC': '\u0647',
  25073. '\uFEED': '\u0648',
  25074. '\uFEEE': '\u0648',
  25075. '\uFEEF': '\u0649',
  25076. '\uFEF0': '\u0649',
  25077. '\uFEF1': '\u064A',
  25078. '\uFEF2': '\u064A',
  25079. '\uFEF3': '\u064A',
  25080. '\uFEF4': '\u064A',
  25081. '\uFEF5': '\u0644\u0622',
  25082. '\uFEF6': '\u0644\u0622',
  25083. '\uFEF7': '\u0644\u0623',
  25084. '\uFEF8': '\u0644\u0623',
  25085. '\uFEF9': '\u0644\u0625',
  25086. '\uFEFA': '\u0644\u0625',
  25087. '\uFEFB': '\u0644\u0627',
  25088. '\uFEFC': '\u0644\u0627'
  25089. };
  25090. function reverseIfRtl(chars) {
  25091. var charsLength = chars.length;
  25092. //reverse an arabic ligature
  25093. if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) {
  25094. return chars;
  25095. }
  25096. var s = '';
  25097. for (var ii = charsLength - 1; ii >= 0; ii--) {
  25098. s += chars[ii];
  25099. }
  25100. return s;
  25101. }
  25102. function adjustWidths(properties) {
  25103. if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) {
  25104. return;
  25105. }
  25106. // adjusting width to fontMatrix scale
  25107. var scale = 0.001 / properties.fontMatrix[0];
  25108. var glyphsWidths = properties.widths;
  25109. for (var glyph in glyphsWidths) {
  25110. glyphsWidths[glyph] *= scale;
  25111. }
  25112. properties.defaultWidth *= scale;
  25113. }
  25114. function getFontType(type, subtype) {
  25115. switch (type) {
  25116. case 'Type1':
  25117. return subtype === 'Type1C' ? FontType.TYPE1C : FontType.TYPE1;
  25118. case 'CIDFontType0':
  25119. return subtype === 'CIDFontType0C' ? FontType.CIDFONTTYPE0C :
  25120. FontType.CIDFONTTYPE0;
  25121. case 'OpenType':
  25122. return FontType.OPENTYPE;
  25123. case 'TrueType':
  25124. return FontType.TRUETYPE;
  25125. case 'CIDFontType2':
  25126. return FontType.CIDFONTTYPE2;
  25127. case 'MMType1':
  25128. return FontType.MMTYPE1;
  25129. case 'Type0':
  25130. return FontType.TYPE0;
  25131. default:
  25132. return FontType.UNKNOWN;
  25133. }
  25134. }
  25135. var Glyph = (function GlyphClosure() {
  25136. function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId) {
  25137. this.fontChar = fontChar;
  25138. this.unicode = unicode;
  25139. this.accent = accent;
  25140. this.width = width;
  25141. this.vmetric = vmetric;
  25142. this.operatorListId = operatorListId;
  25143. }
  25144. Glyph.prototype.matchesForCache =
  25145. function(fontChar, unicode, accent, width, vmetric, operatorListId) {
  25146. return this.fontChar === fontChar &&
  25147. this.unicode === unicode &&
  25148. this.accent === accent &&
  25149. this.width === width &&
  25150. this.vmetric === vmetric &&
  25151. this.operatorListId === operatorListId;
  25152. };
  25153. return Glyph;
  25154. })();
  25155. /**
  25156. * 'Font' is the class the outside world should use, it encapsulate all the font
  25157. * decoding logics whatever type it is (assuming the font type is supported).
  25158. *
  25159. * For example to read a Type1 font and to attach it to the document:
  25160. * var type1Font = new Font("MyFontName", binaryFile, propertiesObject);
  25161. * type1Font.bind();
  25162. */
  25163. var Font = (function FontClosure() {
  25164. function Font(name, file, properties) {
  25165. var charCode, glyphName;
  25166. this.name = name;
  25167. this.loadedName = properties.loadedName;
  25168. this.isType3Font = properties.isType3Font;
  25169. this.sizes = [];
  25170. this.glyphCache = {};
  25171. var names = name.split('+');
  25172. names = names.length > 1 ? names[1] : names[0];
  25173. names = names.split(/[-,_]/g)[0];
  25174. this.isSerifFont = !!(properties.flags & FontFlags.Serif);
  25175. this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
  25176. this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
  25177. var type = properties.type;
  25178. var subtype = properties.subtype;
  25179. this.type = type;
  25180. this.fallbackName = (this.isMonospace ? 'monospace' :
  25181. (this.isSerifFont ? 'serif' : 'sans-serif'));
  25182. this.differences = properties.differences;
  25183. this.widths = properties.widths;
  25184. this.defaultWidth = properties.defaultWidth;
  25185. this.composite = properties.composite;
  25186. this.wideChars = properties.wideChars;
  25187. this.cMap = properties.cMap;
  25188. this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS;
  25189. this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS;
  25190. this.fontMatrix = properties.fontMatrix;
  25191. var unicode = this.buildToUnicode(properties);
  25192. this.toUnicode = properties.toUnicode = unicode.toUnicode;
  25193. this.isIdentityUnicode = properties.isIdentityUnicode = unicode.isIdentity;
  25194. this.toFontChar = [];
  25195. if (properties.type == 'Type3') {
  25196. for (charCode = 0; charCode < 256; charCode++) {
  25197. this.toFontChar[charCode] = (this.differences[charCode] ||
  25198. properties.defaultEncoding[charCode]);
  25199. }
  25200. this.fontType = FontType.TYPE3;
  25201. return;
  25202. }
  25203. this.cidEncoding = properties.cidEncoding;
  25204. this.vertical = properties.vertical;
  25205. if (this.vertical) {
  25206. this.vmetrics = properties.vmetrics;
  25207. this.defaultVMetrics = properties.defaultVMetrics;
  25208. }
  25209. if (!file || file.isEmpty) {
  25210. if (file) {
  25211. // Some bad PDF generators will include empty font files,
  25212. // attempting to recover by assuming that no file exists.
  25213. warn('Font file is empty in "' + name + '" (' + this.loadedName + ')');
  25214. }
  25215. this.missingFile = true;
  25216. // The file data is not specified. Trying to fix the font name
  25217. // to be used with the canvas.font.
  25218. var fontName = name.replace(/[,_]/g, '-');
  25219. var isStandardFont = fontName in stdFontMap;
  25220. fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName;
  25221. this.bold = (fontName.search(/bold/gi) != -1);
  25222. this.italic = ((fontName.search(/oblique/gi) != -1) ||
  25223. (fontName.search(/italic/gi) != -1));
  25224. // Use 'name' instead of 'fontName' here because the original
  25225. // name ArialBlack for example will be replaced by Helvetica.
  25226. this.black = (name.search(/Black/g) != -1);
  25227. // if at least one width is present, remeasure all chars when exists
  25228. this.remeasure = Object.keys(this.widths).length > 0;
  25229. if (isStandardFont && type === 'CIDFontType2' &&
  25230. properties.cidEncoding.indexOf('Identity-') === 0) {
  25231. // Standard fonts might be embedded as CID font without glyph mapping.
  25232. // Building one based on GlyphMapForStandardFonts.
  25233. var map = [];
  25234. for (var code in GlyphMapForStandardFonts) {
  25235. map[+code] = GlyphMapForStandardFonts[code];
  25236. }
  25237. this.toFontChar = map;
  25238. this.toUnicode = map;
  25239. } else if (/Symbol/i.test(fontName)) {
  25240. var symbols = Encodings.SymbolSetEncoding;
  25241. for (charCode in symbols) {
  25242. var fontChar = GlyphsUnicode[symbols[charCode]];
  25243. if (!fontChar) {
  25244. continue;
  25245. }
  25246. this.toFontChar[charCode] = fontChar;
  25247. }
  25248. } else if (isStandardFont) {
  25249. this.toFontChar = [];
  25250. for (charCode in properties.defaultEncoding) {
  25251. glyphName = (properties.differences[charCode] ||
  25252. properties.defaultEncoding[charCode]);
  25253. this.toFontChar[charCode] = GlyphsUnicode[glyphName];
  25254. }
  25255. } else {
  25256. var unicodeCharCode, notCidFont = (type.indexOf('CIDFontType') === -1);
  25257. for (charCode in this.toUnicode) {
  25258. unicodeCharCode = this.toUnicode[charCode].charCodeAt(0);
  25259. if (notCidFont) {
  25260. glyphName = (properties.differences[charCode] ||
  25261. properties.defaultEncoding[charCode]);
  25262. unicodeCharCode = (GlyphsUnicode[glyphName] || unicodeCharCode);
  25263. }
  25264. this.toFontChar[charCode] = unicodeCharCode;
  25265. }
  25266. }
  25267. this.loadedName = fontName.split('-')[0];
  25268. this.loading = false;
  25269. this.fontType = getFontType(type, subtype);
  25270. return;
  25271. }
  25272. // Some fonts might use wrong font types for Type1C or CIDFontType0C
  25273. if (subtype == 'Type1C' && (type != 'Type1' && type != 'MMType1')) {
  25274. // Some TrueType fonts by mistake claim Type1C
  25275. if (isTrueTypeFile(file)) {
  25276. subtype = 'TrueType';
  25277. } else {
  25278. type = 'Type1';
  25279. }
  25280. }
  25281. if (subtype == 'CIDFontType0C' && type != 'CIDFontType0') {
  25282. type = 'CIDFontType0';
  25283. }
  25284. // XXX: Temporarily change the type for open type so we trigger a warning.
  25285. // This should be removed when we add support for open type.
  25286. if (subtype === 'OpenType') {
  25287. type = 'OpenType';
  25288. }
  25289. var data;
  25290. switch (type) {
  25291. case 'Type1':
  25292. case 'CIDFontType0':
  25293. this.mimetype = 'font/opentype';
  25294. var cff = (subtype === 'Type1C' || subtype === 'CIDFontType0C') ?
  25295. new CFFFont(file, properties) : new Type1Font(name, file, properties);
  25296. adjustWidths(properties);
  25297. // Wrap the CFF data inside an OTF font file
  25298. data = this.convert(name, cff, properties);
  25299. break;
  25300. case 'OpenType':
  25301. case 'TrueType':
  25302. case 'CIDFontType2':
  25303. this.mimetype = 'font/opentype';
  25304. // Repair the TrueType file. It is can be damaged in the point of
  25305. // view of the sanitizer
  25306. data = this.checkAndRepair(name, file, properties);
  25307. if (this.isOpenType) {
  25308. type = 'OpenType';
  25309. }
  25310. break;
  25311. default:
  25312. error('Font ' + type + ' is not supported');
  25313. break;
  25314. }
  25315. this.data = data;
  25316. this.fontType = getFontType(type, subtype);
  25317. // Transfer some properties again that could change during font conversion
  25318. this.fontMatrix = properties.fontMatrix;
  25319. this.widths = properties.widths;
  25320. this.defaultWidth = properties.defaultWidth;
  25321. this.encoding = properties.baseEncoding;
  25322. this.seacMap = properties.seacMap;
  25323. this.loading = true;
  25324. }
  25325. Font.getFontID = (function () {
  25326. var ID = 1;
  25327. return function Font_getFontID() {
  25328. return String(ID++);
  25329. };
  25330. })();
  25331. function int16(b0, b1) {
  25332. return (b0 << 8) + b1;
  25333. }
  25334. function int32(b0, b1, b2, b3) {
  25335. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  25336. }
  25337. function getMaxPower2(number) {
  25338. var maxPower = 0;
  25339. var value = number;
  25340. while (value >= 2) {
  25341. value /= 2;
  25342. maxPower++;
  25343. }
  25344. value = 2;
  25345. for (var i = 1; i < maxPower; i++) {
  25346. value *= 2;
  25347. }
  25348. return value;
  25349. }
  25350. function string16(value) {
  25351. return String.fromCharCode((value >> 8) & 0xff, value & 0xff);
  25352. }
  25353. function safeString16(value) {
  25354. // clamp value to the 16-bit int range
  25355. value = (value > 0x7FFF ? 0x7FFF : (value < -0x8000 ? -0x8000 : value));
  25356. return String.fromCharCode((value >> 8) & 0xff, value & 0xff);
  25357. }
  25358. function createOpenTypeHeader(sfnt, file, numTables) {
  25359. // Windows hates the Mac TrueType sfnt version number
  25360. if (sfnt == 'true') {
  25361. sfnt = string32(0x00010000);
  25362. }
  25363. // sfnt version (4 bytes)
  25364. var header = sfnt;
  25365. // numTables (2 bytes)
  25366. header += string16(numTables);
  25367. // searchRange (2 bytes)
  25368. var tablesMaxPower2 = getMaxPower2(numTables);
  25369. var searchRange = tablesMaxPower2 * 16;
  25370. header += string16(searchRange);
  25371. // entrySelector (2 bytes)
  25372. header += string16(Math.log(tablesMaxPower2) / Math.log(2));
  25373. // rangeShift (2 bytes)
  25374. header += string16(numTables * 16 - searchRange);
  25375. file.file += header;
  25376. file.virtualOffset += header.length;
  25377. }
  25378. function createTableEntry(file, tag, data) {
  25379. // offset
  25380. var offset = file.virtualOffset;
  25381. // length
  25382. var length = data.length;
  25383. // Per spec tables must be 4-bytes align so add padding as needed
  25384. while (data.length & 3) {
  25385. data.push(0x00);
  25386. }
  25387. while (file.virtualOffset & 3) {
  25388. file.virtualOffset++;
  25389. }
  25390. // checksum
  25391. var checksum = 0, n = data.length;
  25392. for (var i = 0; i < n; i += 4) {
  25393. checksum = (checksum + int32(data[i], data[i + 1], data[i + 2],
  25394. data[i + 3])) | 0;
  25395. }
  25396. var tableEntry = (tag + string32(checksum) +
  25397. string32(offset) + string32(length));
  25398. file.file += tableEntry;
  25399. file.virtualOffset += data.length;
  25400. }
  25401. function isTrueTypeFile(file) {
  25402. var header = file.peekBytes(4);
  25403. return readUint32(header, 0) === 0x00010000;
  25404. }
  25405. /**
  25406. * Rebuilds the char code to glyph ID map by trying to replace the char codes
  25407. * with their unicode value. It also moves char codes that are in known
  25408. * problematic locations.
  25409. * @return {Object} Two properties:
  25410. * 'toFontChar' - maps original char codes(the value that will be read
  25411. * from commands such as show text) to the char codes that will be used in the
  25412. * font that we build
  25413. * 'charCodeToGlyphId' - maps the new font char codes to glyph ids
  25414. */
  25415. function adjustMapping(charCodeToGlyphId, properties) {
  25416. var toUnicode = properties.toUnicode;
  25417. var isSymbolic = !!(properties.flags & FontFlags.Symbolic);
  25418. var isIdentityUnicode = properties.isIdentityUnicode;
  25419. var newMap = Object.create(null);
  25420. var toFontChar = [];
  25421. var usedFontCharCodes = [];
  25422. var nextAvailableFontCharCode = PRIVATE_USE_OFFSET_START;
  25423. for (var originalCharCode in charCodeToGlyphId) {
  25424. originalCharCode |= 0;
  25425. var glyphId = charCodeToGlyphId[originalCharCode];
  25426. var fontCharCode = originalCharCode;
  25427. // First try to map the value to a unicode position if a non identity map
  25428. // was created.
  25429. if (!isIdentityUnicode && originalCharCode in toUnicode) {
  25430. var unicode = toUnicode[fontCharCode];
  25431. // TODO: Try to map ligatures to the correct spot.
  25432. if (unicode.length === 1) {
  25433. fontCharCode = unicode.charCodeAt(0);
  25434. }
  25435. }
  25436. // Try to move control characters, special characters and already mapped
  25437. // characters to the private use area since they will not be drawn by
  25438. // canvas if left in their current position. Also, move characters if the
  25439. // font was symbolic and there is only an identity unicode map since the
  25440. // characters probably aren't in the correct position (fixes an issue
  25441. // with firefox and thuluthfont).
  25442. if ((fontCharCode in usedFontCharCodes ||
  25443. fontCharCode <= 0x1f || // Control chars
  25444. fontCharCode === 0x7F || // Control char
  25445. fontCharCode === 0xAD || // Soft hyphen
  25446. (fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
  25447. // Prevent drawing characters in the specials unicode block.
  25448. (fontCharCode >= 0xFFF0 && fontCharCode <= 0xFFFF) ||
  25449. (isSymbolic && isIdentityUnicode)) &&
  25450. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { // Room left.
  25451. // Loop to try and find a free spot in the private use area.
  25452. do {
  25453. fontCharCode = nextAvailableFontCharCode++;
  25454. if (SKIP_PRIVATE_USE_RANGE_F000_TO_F01F && fontCharCode === 0xF000) {
  25455. fontCharCode = 0xF020;
  25456. nextAvailableFontCharCode = fontCharCode + 1;
  25457. }
  25458. } while (fontCharCode in usedFontCharCodes &&
  25459. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END);
  25460. }
  25461. newMap[fontCharCode] = glyphId;
  25462. toFontChar[originalCharCode] = fontCharCode;
  25463. usedFontCharCodes[fontCharCode] = true;
  25464. }
  25465. return {
  25466. toFontChar: toFontChar,
  25467. charCodeToGlyphId: newMap,
  25468. nextAvailableFontCharCode: nextAvailableFontCharCode
  25469. };
  25470. }
  25471. function getRanges(glyphs) {
  25472. // Array.sort() sorts by characters, not numerically, so convert to an
  25473. // array of characters.
  25474. var codes = [];
  25475. for (var charCode in glyphs) {
  25476. codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] });
  25477. }
  25478. codes.sort(function fontGetRangesSort(a, b) {
  25479. return a.fontCharCode - b.fontCharCode;
  25480. });
  25481. // Split the sorted codes into ranges.
  25482. var ranges = [];
  25483. var length = codes.length;
  25484. for (var n = 0; n < length; ) {
  25485. var start = codes[n].fontCharCode;
  25486. var codeIndices = [codes[n].glyphId];
  25487. ++n;
  25488. var end = start;
  25489. while (n < length && end + 1 == codes[n].fontCharCode) {
  25490. codeIndices.push(codes[n].glyphId);
  25491. ++end;
  25492. ++n;
  25493. if (end === 0xFFFF) {
  25494. break;
  25495. }
  25496. }
  25497. ranges.push([start, end, codeIndices]);
  25498. }
  25499. return ranges;
  25500. }
  25501. function createCmapTable(glyphs) {
  25502. var ranges = getRanges(glyphs);
  25503. var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1;
  25504. var cmap = '\x00\x00' + // version
  25505. string16(numTables) + // numTables
  25506. '\x00\x03' + // platformID
  25507. '\x00\x01' + // encodingID
  25508. string32(4 + numTables * 8); // start of the table record
  25509. var i, ii, j, jj;
  25510. for (i = ranges.length - 1; i >= 0; --i) {
  25511. if (ranges[i][0] <= 0xFFFF) { break; }
  25512. }
  25513. var bmpLength = i + 1;
  25514. if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) {
  25515. ranges[i][1] = 0xFFFE;
  25516. }
  25517. var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
  25518. var segCount = bmpLength + trailingRangesCount;
  25519. var segCount2 = segCount * 2;
  25520. var searchRange = getMaxPower2(segCount) * 2;
  25521. var searchEntry = Math.log(segCount) / Math.log(2);
  25522. var rangeShift = 2 * segCount - searchRange;
  25523. // Fill up the 4 parallel arrays describing the segments.
  25524. var startCount = '';
  25525. var endCount = '';
  25526. var idDeltas = '';
  25527. var idRangeOffsets = '';
  25528. var glyphsIds = '';
  25529. var bias = 0;
  25530. var range, start, end, codes;
  25531. for (i = 0, ii = bmpLength; i < ii; i++) {
  25532. range = ranges[i];
  25533. start = range[0];
  25534. end = range[1];
  25535. startCount += string16(start);
  25536. endCount += string16(end);
  25537. codes = range[2];
  25538. var contiguous = true;
  25539. for (j = 1, jj = codes.length; j < jj; ++j) {
  25540. if (codes[j] !== codes[j - 1] + 1) {
  25541. contiguous = false;
  25542. break;
  25543. }
  25544. }
  25545. if (!contiguous) {
  25546. var offset = (segCount - i) * 2 + bias * 2;
  25547. bias += (end - start + 1);
  25548. idDeltas += string16(0);
  25549. idRangeOffsets += string16(offset);
  25550. for (j = 0, jj = codes.length; j < jj; ++j) {
  25551. glyphsIds += string16(codes[j]);
  25552. }
  25553. } else {
  25554. var startCode = codes[0];
  25555. idDeltas += string16((startCode - start) & 0xFFFF);
  25556. idRangeOffsets += string16(0);
  25557. }
  25558. }
  25559. if (trailingRangesCount > 0) {
  25560. endCount += '\xFF\xFF';
  25561. startCount += '\xFF\xFF';
  25562. idDeltas += '\x00\x01';
  25563. idRangeOffsets += '\x00\x00';
  25564. }
  25565. var format314 = '\x00\x00' + // language
  25566. string16(segCount2) +
  25567. string16(searchRange) +
  25568. string16(searchEntry) +
  25569. string16(rangeShift) +
  25570. endCount + '\x00\x00' + startCount +
  25571. idDeltas + idRangeOffsets + glyphsIds;
  25572. var format31012 = '';
  25573. var header31012 = '';
  25574. if (numTables > 1) {
  25575. cmap += '\x00\x03' + // platformID
  25576. '\x00\x0A' + // encodingID
  25577. string32(4 + numTables * 8 +
  25578. 4 + format314.length); // start of the table record
  25579. format31012 = '';
  25580. for (i = 0, ii = ranges.length; i < ii; i++) {
  25581. range = ranges[i];
  25582. start = range[0];
  25583. codes = range[2];
  25584. var code = codes[0];
  25585. for (j = 1, jj = codes.length; j < jj; ++j) {
  25586. if (codes[j] !== codes[j - 1] + 1) {
  25587. end = range[0] + j - 1;
  25588. format31012 += string32(start) + // startCharCode
  25589. string32(end) + // endCharCode
  25590. string32(code); // startGlyphID
  25591. start = end + 1;
  25592. code = codes[j];
  25593. }
  25594. }
  25595. format31012 += string32(start) + // startCharCode
  25596. string32(range[1]) + // endCharCode
  25597. string32(code); // startGlyphID
  25598. }
  25599. header31012 = '\x00\x0C' + // format
  25600. '\x00\x00' + // reserved
  25601. string32(format31012.length + 16) + // length
  25602. '\x00\x00\x00\x00' + // language
  25603. string32(format31012.length / 12); // nGroups
  25604. }
  25605. return stringToArray(cmap +
  25606. '\x00\x04' + // format
  25607. string16(format314.length + 4) + // length
  25608. format314 + header31012 + format31012);
  25609. }
  25610. function validateOS2Table(os2) {
  25611. var stream = new Stream(os2.data);
  25612. var version = stream.getUint16();
  25613. // TODO verify all OS/2 tables fields, but currently we validate only those
  25614. // that give us issues
  25615. stream.getBytes(60); // skipping type, misc sizes, panose, unicode ranges
  25616. var selection = stream.getUint16();
  25617. if (version < 4 && (selection & 0x0300)) {
  25618. return false;
  25619. }
  25620. var firstChar = stream.getUint16();
  25621. var lastChar = stream.getUint16();
  25622. if (firstChar > lastChar) {
  25623. return false;
  25624. }
  25625. stream.getBytes(6); // skipping sTypoAscender/Descender/LineGap
  25626. var usWinAscent = stream.getUint16();
  25627. if (usWinAscent === 0) { // makes font unreadable by windows
  25628. return false;
  25629. }
  25630. // OS/2 appears to be valid, resetting some fields
  25631. os2.data[8] = os2.data[9] = 0; // IE rejects fonts if fsType != 0
  25632. return true;
  25633. }
  25634. function createOS2Table(properties, charstrings, override) {
  25635. override = override || {
  25636. unitsPerEm: 0,
  25637. yMax: 0,
  25638. yMin: 0,
  25639. ascent: 0,
  25640. descent: 0
  25641. };
  25642. var ulUnicodeRange1 = 0;
  25643. var ulUnicodeRange2 = 0;
  25644. var ulUnicodeRange3 = 0;
  25645. var ulUnicodeRange4 = 0;
  25646. var firstCharIndex = null;
  25647. var lastCharIndex = 0;
  25648. if (charstrings) {
  25649. for (var code in charstrings) {
  25650. code |= 0;
  25651. if (firstCharIndex > code || !firstCharIndex) {
  25652. firstCharIndex = code;
  25653. }
  25654. if (lastCharIndex < code) {
  25655. lastCharIndex = code;
  25656. }
  25657. var position = getUnicodeRangeFor(code);
  25658. if (position < 32) {
  25659. ulUnicodeRange1 |= 1 << position;
  25660. } else if (position < 64) {
  25661. ulUnicodeRange2 |= 1 << position - 32;
  25662. } else if (position < 96) {
  25663. ulUnicodeRange3 |= 1 << position - 64;
  25664. } else if (position < 123) {
  25665. ulUnicodeRange4 |= 1 << position - 96;
  25666. } else {
  25667. error('Unicode ranges Bits > 123 are reserved for internal usage');
  25668. }
  25669. }
  25670. } else {
  25671. // TODO
  25672. firstCharIndex = 0;
  25673. lastCharIndex = 255;
  25674. }
  25675. var bbox = properties.bbox || [0, 0, 0, 0];
  25676. var unitsPerEm = (override.unitsPerEm ||
  25677. 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0]);
  25678. // if the font units differ to the PDF glyph space units
  25679. // then scale up the values
  25680. var scale = (properties.ascentScaled ? 1.0 :
  25681. unitsPerEm / PDF_GLYPH_SPACE_UNITS);
  25682. var typoAscent = (override.ascent ||
  25683. Math.round(scale * (properties.ascent || bbox[3])));
  25684. var typoDescent = (override.descent ||
  25685. Math.round(scale * (properties.descent || bbox[1])));
  25686. if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) {
  25687. typoDescent = -typoDescent; // fixing incorrect descent
  25688. }
  25689. var winAscent = override.yMax || typoAscent;
  25690. var winDescent = -override.yMin || -typoDescent;
  25691. return '\x00\x03' + // version
  25692. '\x02\x24' + // xAvgCharWidth
  25693. '\x01\xF4' + // usWeightClass
  25694. '\x00\x05' + // usWidthClass
  25695. '\x00\x00' + // fstype (0 to let the font loads via font-face on IE)
  25696. '\x02\x8A' + // ySubscriptXSize
  25697. '\x02\xBB' + // ySubscriptYSize
  25698. '\x00\x00' + // ySubscriptXOffset
  25699. '\x00\x8C' + // ySubscriptYOffset
  25700. '\x02\x8A' + // ySuperScriptXSize
  25701. '\x02\xBB' + // ySuperScriptYSize
  25702. '\x00\x00' + // ySuperScriptXOffset
  25703. '\x01\xDF' + // ySuperScriptYOffset
  25704. '\x00\x31' + // yStrikeOutSize
  25705. '\x01\x02' + // yStrikeOutPosition
  25706. '\x00\x00' + // sFamilyClass
  25707. '\x00\x00\x06' +
  25708. String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) +
  25709. '\x00\x00\x00\x00\x00\x00' + // Panose
  25710. string32(ulUnicodeRange1) + // ulUnicodeRange1 (Bits 0-31)
  25711. string32(ulUnicodeRange2) + // ulUnicodeRange2 (Bits 32-63)
  25712. string32(ulUnicodeRange3) + // ulUnicodeRange3 (Bits 64-95)
  25713. string32(ulUnicodeRange4) + // ulUnicodeRange4 (Bits 96-127)
  25714. '\x2A\x32\x31\x2A' + // achVendID
  25715. string16(properties.italicAngle ? 1 : 0) + // fsSelection
  25716. string16(firstCharIndex ||
  25717. properties.firstChar) + // usFirstCharIndex
  25718. string16(lastCharIndex || properties.lastChar) + // usLastCharIndex
  25719. string16(typoAscent) + // sTypoAscender
  25720. string16(typoDescent) + // sTypoDescender
  25721. '\x00\x64' + // sTypoLineGap (7%-10% of the unitsPerEM value)
  25722. string16(winAscent) + // usWinAscent
  25723. string16(winDescent) + // usWinDescent
  25724. '\x00\x00\x00\x00' + // ulCodePageRange1 (Bits 0-31)
  25725. '\x00\x00\x00\x00' + // ulCodePageRange2 (Bits 32-63)
  25726. string16(properties.xHeight) + // sxHeight
  25727. string16(properties.capHeight) + // sCapHeight
  25728. string16(0) + // usDefaultChar
  25729. string16(firstCharIndex || properties.firstChar) + // usBreakChar
  25730. '\x00\x03'; // usMaxContext
  25731. }
  25732. function createPostTable(properties) {
  25733. var angle = Math.floor(properties.italicAngle * (Math.pow(2, 16)));
  25734. return ('\x00\x03\x00\x00' + // Version number
  25735. string32(angle) + // italicAngle
  25736. '\x00\x00' + // underlinePosition
  25737. '\x00\x00' + // underlineThickness
  25738. string32(properties.fixedPitch) + // isFixedPitch
  25739. '\x00\x00\x00\x00' + // minMemType42
  25740. '\x00\x00\x00\x00' + // maxMemType42
  25741. '\x00\x00\x00\x00' + // minMemType1
  25742. '\x00\x00\x00\x00'); // maxMemType1
  25743. }
  25744. function createNameTable(name, proto) {
  25745. if (!proto) {
  25746. proto = [[], []]; // no strings and unicode strings
  25747. }
  25748. var strings = [
  25749. proto[0][0] || 'Original licence', // 0.Copyright
  25750. proto[0][1] || name, // 1.Font family
  25751. proto[0][2] || 'Unknown', // 2.Font subfamily (font weight)
  25752. proto[0][3] || 'uniqueID', // 3.Unique ID
  25753. proto[0][4] || name, // 4.Full font name
  25754. proto[0][5] || 'Version 0.11', // 5.Version
  25755. proto[0][6] || '', // 6.Postscript name
  25756. proto[0][7] || 'Unknown', // 7.Trademark
  25757. proto[0][8] || 'Unknown', // 8.Manufacturer
  25758. proto[0][9] || 'Unknown' // 9.Designer
  25759. ];
  25760. // Mac want 1-byte per character strings while Windows want
  25761. // 2-bytes per character, so duplicate the names table
  25762. var stringsUnicode = [];
  25763. var i, ii, j, jj, str;
  25764. for (i = 0, ii = strings.length; i < ii; i++) {
  25765. str = proto[1][i] || strings[i];
  25766. var strBufUnicode = [];
  25767. for (j = 0, jj = str.length; j < jj; j++) {
  25768. strBufUnicode.push(string16(str.charCodeAt(j)));
  25769. }
  25770. stringsUnicode.push(strBufUnicode.join(''));
  25771. }
  25772. var names = [strings, stringsUnicode];
  25773. var platforms = ['\x00\x01', '\x00\x03'];
  25774. var encodings = ['\x00\x00', '\x00\x01'];
  25775. var languages = ['\x00\x00', '\x04\x09'];
  25776. var namesRecordCount = strings.length * platforms.length;
  25777. var nameTable =
  25778. '\x00\x00' + // format
  25779. string16(namesRecordCount) + // Number of names Record
  25780. string16(namesRecordCount * 12 + 6); // Storage
  25781. // Build the name records field
  25782. var strOffset = 0;
  25783. for (i = 0, ii = platforms.length; i < ii; i++) {
  25784. var strs = names[i];
  25785. for (j = 0, jj = strs.length; j < jj; j++) {
  25786. str = strs[j];
  25787. var nameRecord =
  25788. platforms[i] + // platform ID
  25789. encodings[i] + // encoding ID
  25790. languages[i] + // language ID
  25791. string16(j) + // name ID
  25792. string16(str.length) +
  25793. string16(strOffset);
  25794. nameTable += nameRecord;
  25795. strOffset += str.length;
  25796. }
  25797. }
  25798. nameTable += strings.join('') + stringsUnicode.join('');
  25799. return nameTable;
  25800. }
  25801. Font.prototype = {
  25802. name: null,
  25803. font: null,
  25804. mimetype: null,
  25805. encoding: null,
  25806. get renderer() {
  25807. var renderer = FontRendererFactory.create(this);
  25808. return shadow(this, 'renderer', renderer);
  25809. },
  25810. exportData: function Font_exportData() {
  25811. var data = {};
  25812. for (var i in this) {
  25813. if (this.hasOwnProperty(i)) {
  25814. data[i] = this[i];
  25815. }
  25816. }
  25817. return data;
  25818. },
  25819. checkAndRepair: function Font_checkAndRepair(name, font, properties) {
  25820. function readTableEntry(file) {
  25821. var tag = bytesToString(file.getBytes(4));
  25822. var checksum = file.getInt32();
  25823. var offset = file.getInt32() >>> 0;
  25824. var length = file.getInt32() >>> 0;
  25825. // Read the table associated data
  25826. var previousPosition = file.pos;
  25827. file.pos = file.start ? file.start : 0;
  25828. file.skip(offset);
  25829. var data = file.getBytes(length);
  25830. file.pos = previousPosition;
  25831. if (tag == 'head') {
  25832. // clearing checksum adjustment
  25833. data[8] = data[9] = data[10] = data[11] = 0;
  25834. data[17] |= 0x20; //Set font optimized for cleartype flag
  25835. }
  25836. return {
  25837. tag: tag,
  25838. checksum: checksum,
  25839. length: length,
  25840. offset: offset,
  25841. data: data
  25842. };
  25843. }
  25844. function readOpenTypeHeader(ttf) {
  25845. return {
  25846. version: bytesToString(ttf.getBytes(4)),
  25847. numTables: ttf.getUint16(),
  25848. searchRange: ttf.getUint16(),
  25849. entrySelector: ttf.getUint16(),
  25850. rangeShift: ttf.getUint16()
  25851. };
  25852. }
  25853. /**
  25854. * Read the appropriate subtable from the cmap according to 9.6.6.4 from
  25855. * PDF spec
  25856. */
  25857. function readCmapTable(cmap, font, isSymbolicFont) {
  25858. var segment;
  25859. var start = (font.start ? font.start : 0) + cmap.offset;
  25860. font.pos = start;
  25861. var version = font.getUint16();
  25862. var numTables = font.getUint16();
  25863. var potentialTable;
  25864. var canBreak = false;
  25865. // There's an order of preference in terms of which cmap subtable to
  25866. // use:
  25867. // - non-symbolic fonts the preference is a 3,1 table then a 1,0 table
  25868. // - symbolic fonts the preference is a 3,0 table then a 1,0 table
  25869. // The following takes advantage of the fact that the tables are sorted
  25870. // to work.
  25871. for (var i = 0; i < numTables; i++) {
  25872. var platformId = font.getUint16();
  25873. var encodingId = font.getUint16();
  25874. var offset = font.getInt32() >>> 0;
  25875. var useTable = false;
  25876. if (platformId == 1 && encodingId === 0) {
  25877. useTable = true;
  25878. // Continue the loop since there still may be a higher priority
  25879. // table.
  25880. } else if (!isSymbolicFont && platformId === 3 && encodingId === 1) {
  25881. useTable = true;
  25882. canBreak = true;
  25883. } else if (isSymbolicFont && platformId === 3 && encodingId === 0) {
  25884. useTable = true;
  25885. canBreak = true;
  25886. }
  25887. if (useTable) {
  25888. potentialTable = {
  25889. platformId: platformId,
  25890. encodingId: encodingId,
  25891. offset: offset
  25892. };
  25893. }
  25894. if (canBreak) {
  25895. break;
  25896. }
  25897. }
  25898. if (!potentialTable) {
  25899. warn('Could not find a preferred cmap table.');
  25900. return {
  25901. platformId: -1,
  25902. encodingId: -1,
  25903. mappings: [],
  25904. hasShortCmap: false
  25905. };
  25906. }
  25907. font.pos = start + potentialTable.offset;
  25908. var format = font.getUint16();
  25909. var length = font.getUint16();
  25910. var language = font.getUint16();
  25911. var hasShortCmap = false;
  25912. var mappings = [];
  25913. var j, glyphId;
  25914. // TODO(mack): refactor this cmap subtable reading logic out
  25915. if (format === 0) {
  25916. for (j = 0; j < 256; j++) {
  25917. var index = font.getByte();
  25918. if (!index) {
  25919. continue;
  25920. }
  25921. mappings.push({
  25922. charCode: j,
  25923. glyphId: index
  25924. });
  25925. }
  25926. hasShortCmap = true;
  25927. } else if (format === 4) {
  25928. // re-creating the table in format 4 since the encoding
  25929. // might be changed
  25930. var segCount = (font.getUint16() >> 1);
  25931. font.getBytes(6); // skipping range fields
  25932. var segIndex, segments = [];
  25933. for (segIndex = 0; segIndex < segCount; segIndex++) {
  25934. segments.push({ end: font.getUint16() });
  25935. }
  25936. font.getUint16();
  25937. for (segIndex = 0; segIndex < segCount; segIndex++) {
  25938. segments[segIndex].start = font.getUint16();
  25939. }
  25940. for (segIndex = 0; segIndex < segCount; segIndex++) {
  25941. segments[segIndex].delta = font.getUint16();
  25942. }
  25943. var offsetsCount = 0;
  25944. for (segIndex = 0; segIndex < segCount; segIndex++) {
  25945. segment = segments[segIndex];
  25946. var rangeOffset = font.getUint16();
  25947. if (!rangeOffset) {
  25948. segment.offsetIndex = -1;
  25949. continue;
  25950. }
  25951. var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex);
  25952. segment.offsetIndex = offsetIndex;
  25953. offsetsCount = Math.max(offsetsCount, offsetIndex +
  25954. segment.end - segment.start + 1);
  25955. }
  25956. var offsets = [];
  25957. for (j = 0; j < offsetsCount; j++) {
  25958. offsets.push(font.getUint16());
  25959. }
  25960. for (segIndex = 0; segIndex < segCount; segIndex++) {
  25961. segment = segments[segIndex];
  25962. start = segment.start;
  25963. var end = segment.end;
  25964. var delta = segment.delta;
  25965. offsetIndex = segment.offsetIndex;
  25966. for (j = start; j <= end; j++) {
  25967. if (j == 0xFFFF) {
  25968. continue;
  25969. }
  25970. glyphId = (offsetIndex < 0 ?
  25971. j : offsets[offsetIndex + j - start]);
  25972. glyphId = (glyphId + delta) & 0xFFFF;
  25973. if (glyphId === 0) {
  25974. continue;
  25975. }
  25976. mappings.push({
  25977. charCode: j,
  25978. glyphId: glyphId
  25979. });
  25980. }
  25981. }
  25982. } else if (format == 6) {
  25983. // Format 6 is a 2-bytes dense mapping, which means the font data
  25984. // lives glue together even if they are pretty far in the unicode
  25985. // table. (This looks weird, so I can have missed something), this
  25986. // works on Linux but seems to fails on Mac so let's rewrite the
  25987. // cmap table to a 3-1-4 style
  25988. var firstCode = font.getUint16();
  25989. var entryCount = font.getUint16();
  25990. for (j = 0; j < entryCount; j++) {
  25991. glyphId = font.getUint16();
  25992. var charCode = firstCode + j;
  25993. mappings.push({
  25994. charCode: charCode,
  25995. glyphId: glyphId
  25996. });
  25997. }
  25998. } else {
  25999. error('cmap table has unsupported format: ' + format);
  26000. }
  26001. // removing duplicate entries
  26002. mappings.sort(function (a, b) {
  26003. return a.charCode - b.charCode;
  26004. });
  26005. for (i = 1; i < mappings.length; i++) {
  26006. if (mappings[i - 1].charCode === mappings[i].charCode) {
  26007. mappings.splice(i, 1);
  26008. i--;
  26009. }
  26010. }
  26011. return {
  26012. platformId: potentialTable.platformId,
  26013. encodingId: potentialTable.encodingId,
  26014. mappings: mappings,
  26015. hasShortCmap: hasShortCmap
  26016. };
  26017. }
  26018. function sanitizeMetrics(font, header, metrics, numGlyphs) {
  26019. if (!header) {
  26020. if (metrics) {
  26021. metrics.data = null;
  26022. }
  26023. return;
  26024. }
  26025. font.pos = (font.start ? font.start : 0) + header.offset;
  26026. font.pos += header.length - 2;
  26027. var numOfMetrics = font.getUint16();
  26028. if (numOfMetrics > numGlyphs) {
  26029. info('The numOfMetrics (' + numOfMetrics + ') should not be ' +
  26030. 'greater than the numGlyphs (' + numGlyphs + ')');
  26031. // Reduce numOfMetrics if it is greater than numGlyphs
  26032. numOfMetrics = numGlyphs;
  26033. header.data[34] = (numOfMetrics & 0xff00) >> 8;
  26034. header.data[35] = numOfMetrics & 0x00ff;
  26035. }
  26036. var numOfSidebearings = numGlyphs - numOfMetrics;
  26037. var numMissing = numOfSidebearings -
  26038. ((metrics.length - numOfMetrics * 4) >> 1);
  26039. var i, ii;
  26040. if (numMissing > 0) {
  26041. font.pos = (font.start ? font.start : 0) + metrics.offset;
  26042. var entries = '';
  26043. for (i = 0, ii = metrics.length; i < ii; i++) {
  26044. entries += String.fromCharCode(font.getByte());
  26045. }
  26046. for (i = 0; i < numMissing; i++) {
  26047. entries += '\x00\x00';
  26048. }
  26049. metrics.data = stringToArray(entries);
  26050. }
  26051. }
  26052. function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart,
  26053. hintsValid) {
  26054. if (sourceEnd - sourceStart <= 12) {
  26055. // glyph with data less than 12 is invalid one
  26056. return 0;
  26057. }
  26058. var glyf = source.subarray(sourceStart, sourceEnd);
  26059. var contoursCount = (glyf[0] << 8) | glyf[1];
  26060. if (contoursCount & 0x8000) {
  26061. // complex glyph, writing as is
  26062. dest.set(glyf, destStart);
  26063. return glyf.length;
  26064. }
  26065. var i, j = 10, flagsCount = 0;
  26066. for (i = 0; i < contoursCount; i++) {
  26067. var endPoint = (glyf[j] << 8) | glyf[j + 1];
  26068. flagsCount = endPoint + 1;
  26069. j += 2;
  26070. }
  26071. // skipping instructions
  26072. var instructionsStart = j;
  26073. var instructionsLength = (glyf[j] << 8) | glyf[j + 1];
  26074. j += 2 + instructionsLength;
  26075. var instructionsEnd = j;
  26076. // validating flags
  26077. var coordinatesLength = 0;
  26078. for (i = 0; i < flagsCount; i++) {
  26079. var flag = glyf[j++];
  26080. if (flag & 0xC0) {
  26081. // reserved flags must be zero, cleaning up
  26082. glyf[j - 1] = flag & 0x3F;
  26083. }
  26084. var xyLength = ((flag & 2) ? 1 : (flag & 16) ? 0 : 2) +
  26085. ((flag & 4) ? 1 : (flag & 32) ? 0 : 2);
  26086. coordinatesLength += xyLength;
  26087. if (flag & 8) {
  26088. var repeat = glyf[j++];
  26089. i += repeat;
  26090. coordinatesLength += repeat * xyLength;
  26091. }
  26092. }
  26093. // glyph without coordinates will be rejected
  26094. if (coordinatesLength === 0) {
  26095. return 0;
  26096. }
  26097. var glyphDataLength = j + coordinatesLength;
  26098. if (glyphDataLength > glyf.length) {
  26099. // not enough data for coordinates
  26100. return 0;
  26101. }
  26102. if (!hintsValid && instructionsLength > 0) {
  26103. dest.set(glyf.subarray(0, instructionsStart), destStart);
  26104. dest.set([0, 0], destStart + instructionsStart);
  26105. dest.set(glyf.subarray(instructionsEnd, glyphDataLength),
  26106. destStart + instructionsStart + 2);
  26107. glyphDataLength -= instructionsLength;
  26108. if (glyf.length - glyphDataLength > 3) {
  26109. glyphDataLength = (glyphDataLength + 3) & ~3;
  26110. }
  26111. return glyphDataLength;
  26112. }
  26113. if (glyf.length - glyphDataLength > 3) {
  26114. // truncating and aligning to 4 bytes the long glyph data
  26115. glyphDataLength = (glyphDataLength + 3) & ~3;
  26116. dest.set(glyf.subarray(0, glyphDataLength), destStart);
  26117. return glyphDataLength;
  26118. }
  26119. // glyph data is fine
  26120. dest.set(glyf, destStart);
  26121. return glyf.length;
  26122. }
  26123. function sanitizeHead(head, numGlyphs, locaLength) {
  26124. var data = head.data;
  26125. // Validate version:
  26126. // Should always be 0x00010000
  26127. var version = int32(data[0], data[1], data[2], data[3]);
  26128. if (version >> 16 !== 1) {
  26129. info('Attempting to fix invalid version in head table: ' + version);
  26130. data[0] = 0;
  26131. data[1] = 1;
  26132. data[2] = 0;
  26133. data[3] = 0;
  26134. }
  26135. var indexToLocFormat = int16(data[50], data[51]);
  26136. if (indexToLocFormat < 0 || indexToLocFormat > 1) {
  26137. info('Attempting to fix invalid indexToLocFormat in head table: ' +
  26138. indexToLocFormat);
  26139. // The value of indexToLocFormat should be 0 if the loca table
  26140. // consists of short offsets, and should be 1 if the loca table
  26141. // consists of long offsets.
  26142. //
  26143. // The number of entries in the loca table should be numGlyphs + 1.
  26144. //
  26145. // Using this information, we can work backwards to deduce if the
  26146. // size of each offset in the loca table, and thus figure out the
  26147. // appropriate value for indexToLocFormat.
  26148. var numGlyphsPlusOne = numGlyphs + 1;
  26149. if (locaLength === numGlyphsPlusOne << 1) {
  26150. // 0x0000 indicates the loca table consists of short offsets
  26151. data[50] = 0;
  26152. data[51] = 0;
  26153. } else if (locaLength === numGlyphsPlusOne << 2) {
  26154. // 0x0001 indicates the loca table consists of long offsets
  26155. data[50] = 0;
  26156. data[51] = 1;
  26157. } else {
  26158. warn('Could not fix indexToLocFormat: ' + indexToLocFormat);
  26159. }
  26160. }
  26161. }
  26162. function sanitizeGlyphLocations(loca, glyf, numGlyphs,
  26163. isGlyphLocationsLong, hintsValid,
  26164. dupFirstEntry) {
  26165. var itemSize, itemDecode, itemEncode;
  26166. if (isGlyphLocationsLong) {
  26167. itemSize = 4;
  26168. itemDecode = function fontItemDecodeLong(data, offset) {
  26169. return (data[offset] << 24) | (data[offset + 1] << 16) |
  26170. (data[offset + 2] << 8) | data[offset + 3];
  26171. };
  26172. itemEncode = function fontItemEncodeLong(data, offset, value) {
  26173. data[offset] = (value >>> 24) & 0xFF;
  26174. data[offset + 1] = (value >> 16) & 0xFF;
  26175. data[offset + 2] = (value >> 8) & 0xFF;
  26176. data[offset + 3] = value & 0xFF;
  26177. };
  26178. } else {
  26179. itemSize = 2;
  26180. itemDecode = function fontItemDecode(data, offset) {
  26181. return (data[offset] << 9) | (data[offset + 1] << 1);
  26182. };
  26183. itemEncode = function fontItemEncode(data, offset, value) {
  26184. data[offset] = (value >> 9) & 0xFF;
  26185. data[offset + 1] = (value >> 1) & 0xFF;
  26186. };
  26187. }
  26188. var locaData = loca.data;
  26189. var locaDataSize = itemSize * (1 + numGlyphs);
  26190. // is loca.data too short or long?
  26191. if (locaData.length !== locaDataSize) {
  26192. locaData = new Uint8Array(locaDataSize);
  26193. locaData.set(loca.data.subarray(0, locaDataSize));
  26194. loca.data = locaData;
  26195. }
  26196. // removing the invalid glyphs
  26197. var oldGlyfData = glyf.data;
  26198. var oldGlyfDataLength = oldGlyfData.length;
  26199. var newGlyfData = new Uint8Array(oldGlyfDataLength);
  26200. var startOffset = itemDecode(locaData, 0);
  26201. var writeOffset = 0;
  26202. itemEncode(locaData, 0, writeOffset);
  26203. var i, j;
  26204. for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
  26205. var endOffset = itemDecode(locaData, j);
  26206. if (endOffset > oldGlyfDataLength &&
  26207. ((oldGlyfDataLength + 3) & ~3) === endOffset) {
  26208. // Aspose breaks fonts by aligning the glyphs to the qword, but not
  26209. // the glyf table size, which makes last glyph out of range.
  26210. endOffset = oldGlyfDataLength;
  26211. }
  26212. if (endOffset > oldGlyfDataLength) {
  26213. // glyph end offset points outside glyf data, rejecting the glyph
  26214. itemEncode(locaData, j, writeOffset);
  26215. startOffset = endOffset;
  26216. continue;
  26217. }
  26218. var newLength = sanitizeGlyph(oldGlyfData, startOffset, endOffset,
  26219. newGlyfData, writeOffset, hintsValid);
  26220. writeOffset += newLength;
  26221. itemEncode(locaData, j, writeOffset);
  26222. startOffset = endOffset;
  26223. }
  26224. if (writeOffset === 0) {
  26225. // glyf table cannot be empty -- redoing the glyf and loca tables
  26226. // to have single glyph with one point
  26227. var simpleGlyph = new Uint8Array(
  26228. [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]);
  26229. for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
  26230. itemEncode(locaData, j, simpleGlyph.length);
  26231. }
  26232. glyf.data = simpleGlyph;
  26233. return;
  26234. }
  26235. if (dupFirstEntry) {
  26236. var firstEntryLength = itemDecode(locaData, itemSize);
  26237. if (newGlyfData.length > firstEntryLength + writeOffset) {
  26238. glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset);
  26239. } else {
  26240. glyf.data = new Uint8Array(firstEntryLength + writeOffset);
  26241. glyf.data.set(newGlyfData.subarray(0, writeOffset));
  26242. }
  26243. glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset);
  26244. itemEncode(loca.data, locaData.length - itemSize,
  26245. writeOffset + firstEntryLength);
  26246. } else {
  26247. glyf.data = newGlyfData.subarray(0, writeOffset);
  26248. }
  26249. }
  26250. function readPostScriptTable(post, properties, maxpNumGlyphs) {
  26251. var start = (font.start ? font.start : 0) + post.offset;
  26252. font.pos = start;
  26253. var length = post.length, end = start + length;
  26254. var version = font.getInt32();
  26255. // skip rest to the tables
  26256. font.getBytes(28);
  26257. var glyphNames;
  26258. var valid = true;
  26259. var i;
  26260. switch (version) {
  26261. case 0x00010000:
  26262. glyphNames = MacStandardGlyphOrdering;
  26263. break;
  26264. case 0x00020000:
  26265. var numGlyphs = font.getUint16();
  26266. if (numGlyphs != maxpNumGlyphs) {
  26267. valid = false;
  26268. break;
  26269. }
  26270. var glyphNameIndexes = [];
  26271. for (i = 0; i < numGlyphs; ++i) {
  26272. var index = font.getUint16();
  26273. if (index >= 32768) {
  26274. valid = false;
  26275. break;
  26276. }
  26277. glyphNameIndexes.push(index);
  26278. }
  26279. if (!valid) {
  26280. break;
  26281. }
  26282. var customNames = [];
  26283. while (font.pos < end) {
  26284. var stringLength = font.getByte();
  26285. var string = '';
  26286. for (i = 0; i < stringLength; ++i) {
  26287. string += String.fromCharCode(font.getByte());
  26288. }
  26289. customNames.push(string);
  26290. }
  26291. glyphNames = [];
  26292. for (i = 0; i < numGlyphs; ++i) {
  26293. var j = glyphNameIndexes[i];
  26294. if (j < 258) {
  26295. glyphNames.push(MacStandardGlyphOrdering[j]);
  26296. continue;
  26297. }
  26298. glyphNames.push(customNames[j - 258]);
  26299. }
  26300. break;
  26301. case 0x00030000:
  26302. break;
  26303. default:
  26304. warn('Unknown/unsupported post table version ' + version);
  26305. valid = false;
  26306. break;
  26307. }
  26308. properties.glyphNames = glyphNames;
  26309. return valid;
  26310. }
  26311. function readNameTable(nameTable) {
  26312. var start = (font.start ? font.start : 0) + nameTable.offset;
  26313. font.pos = start;
  26314. var names = [[], []];
  26315. var length = nameTable.length, end = start + length;
  26316. var format = font.getUint16();
  26317. var FORMAT_0_HEADER_LENGTH = 6;
  26318. if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) {
  26319. // unsupported name table format or table "too" small
  26320. return names;
  26321. }
  26322. var numRecords = font.getUint16();
  26323. var stringsStart = font.getUint16();
  26324. var records = [];
  26325. var NAME_RECORD_LENGTH = 12;
  26326. var i, ii;
  26327. for (i = 0; i < numRecords &&
  26328. font.pos + NAME_RECORD_LENGTH <= end; i++) {
  26329. var r = {
  26330. platform: font.getUint16(),
  26331. encoding: font.getUint16(),
  26332. language: font.getUint16(),
  26333. name: font.getUint16(),
  26334. length: font.getUint16(),
  26335. offset: font.getUint16()
  26336. };
  26337. // using only Macintosh and Windows platform/encoding names
  26338. if ((r.platform == 1 && r.encoding === 0 && r.language === 0) ||
  26339. (r.platform == 3 && r.encoding == 1 && r.language == 0x409)) {
  26340. records.push(r);
  26341. }
  26342. }
  26343. for (i = 0, ii = records.length; i < ii; i++) {
  26344. var record = records[i];
  26345. var pos = start + stringsStart + record.offset;
  26346. if (pos + record.length > end) {
  26347. continue; // outside of name table, ignoring
  26348. }
  26349. font.pos = pos;
  26350. var nameIndex = record.name;
  26351. if (record.encoding) {
  26352. // unicode
  26353. var str = '';
  26354. for (var j = 0, jj = record.length; j < jj; j += 2) {
  26355. str += String.fromCharCode(font.getUint16());
  26356. }
  26357. names[1][nameIndex] = str;
  26358. } else {
  26359. names[0][nameIndex] = bytesToString(font.getBytes(record.length));
  26360. }
  26361. }
  26362. return names;
  26363. }
  26364. var TTOpsStackDeltas = [
  26365. 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5,
  26366. -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1,
  26367. 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1,
  26368. 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2,
  26369. 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1,
  26370. -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1,
  26371. -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  26372. -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1,
  26373. -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2];
  26374. // 0xC0-DF == -1 and 0xE0-FF == -2
  26375. function sanitizeTTProgram(table, ttContext) {
  26376. var data = table.data;
  26377. var i = 0, j, n, b, funcId, pc, lastEndf = 0, lastDeff = 0;
  26378. var stack = [];
  26379. var callstack = [];
  26380. var functionsCalled = [];
  26381. var tooComplexToFollowFunctions =
  26382. ttContext.tooComplexToFollowFunctions;
  26383. var inFDEF = false, ifLevel = 0, inELSE = 0;
  26384. for (var ii = data.length; i < ii;) {
  26385. var op = data[i++];
  26386. // The TrueType instruction set docs can be found at
  26387. // https://developer.apple.com/fonts/TTRefMan/RM05/Chap5.html
  26388. if (op === 0x40) { // NPUSHB - pushes n bytes
  26389. n = data[i++];
  26390. if (inFDEF || inELSE) {
  26391. i += n;
  26392. } else {
  26393. for (j = 0; j < n; j++) {
  26394. stack.push(data[i++]);
  26395. }
  26396. }
  26397. } else if (op === 0x41) { // NPUSHW - pushes n words
  26398. n = data[i++];
  26399. if (inFDEF || inELSE) {
  26400. i += n * 2;
  26401. } else {
  26402. for (j = 0; j < n; j++) {
  26403. b = data[i++];
  26404. stack.push((b << 8) | data[i++]);
  26405. }
  26406. }
  26407. } else if ((op & 0xF8) === 0xB0) { // PUSHB - pushes bytes
  26408. n = op - 0xB0 + 1;
  26409. if (inFDEF || inELSE) {
  26410. i += n;
  26411. } else {
  26412. for (j = 0; j < n; j++) {
  26413. stack.push(data[i++]);
  26414. }
  26415. }
  26416. } else if ((op & 0xF8) === 0xB8) { // PUSHW - pushes words
  26417. n = op - 0xB8 + 1;
  26418. if (inFDEF || inELSE) {
  26419. i += n * 2;
  26420. } else {
  26421. for (j = 0; j < n; j++) {
  26422. b = data[i++];
  26423. stack.push((b << 8) | data[i++]);
  26424. }
  26425. }
  26426. } else if (op === 0x2B && !tooComplexToFollowFunctions) { // CALL
  26427. if (!inFDEF && !inELSE) {
  26428. // collecting inforamtion about which functions are used
  26429. funcId = stack[stack.length - 1];
  26430. ttContext.functionsUsed[funcId] = true;
  26431. if (funcId in ttContext.functionsStackDeltas) {
  26432. stack.length += ttContext.functionsStackDeltas[funcId];
  26433. } else if (funcId in ttContext.functionsDefined &&
  26434. functionsCalled.indexOf(funcId) < 0) {
  26435. callstack.push({data: data, i: i, stackTop: stack.length - 1});
  26436. functionsCalled.push(funcId);
  26437. pc = ttContext.functionsDefined[funcId];
  26438. if (!pc) {
  26439. warn('TT: CALL non-existent function');
  26440. ttContext.hintsValid = false;
  26441. return;
  26442. }
  26443. data = pc.data;
  26444. i = pc.i;
  26445. }
  26446. }
  26447. } else if (op === 0x2C && !tooComplexToFollowFunctions) { // FDEF
  26448. if (inFDEF || inELSE) {
  26449. warn('TT: nested FDEFs not allowed');
  26450. tooComplexToFollowFunctions = true;
  26451. }
  26452. inFDEF = true;
  26453. // collecting inforamtion about which functions are defined
  26454. lastDeff = i;
  26455. funcId = stack.pop();
  26456. ttContext.functionsDefined[funcId] = {data: data, i: i};
  26457. } else if (op === 0x2D) { // ENDF - end of function
  26458. if (inFDEF) {
  26459. inFDEF = false;
  26460. lastEndf = i;
  26461. } else {
  26462. pc = callstack.pop();
  26463. if (!pc) {
  26464. warn('TT: ENDF bad stack');
  26465. ttContext.hintsValid = false;
  26466. return;
  26467. }
  26468. funcId = functionsCalled.pop();
  26469. data = pc.data;
  26470. i = pc.i;
  26471. ttContext.functionsStackDeltas[funcId] =
  26472. stack.length - pc.stackTop;
  26473. }
  26474. } else if (op === 0x89) { // IDEF - instruction definition
  26475. if (inFDEF || inELSE) {
  26476. warn('TT: nested IDEFs not allowed');
  26477. tooComplexToFollowFunctions = true;
  26478. }
  26479. inFDEF = true;
  26480. // recording it as a function to track ENDF
  26481. lastDeff = i;
  26482. } else if (op === 0x58) { // IF
  26483. ++ifLevel;
  26484. } else if (op === 0x1B) { // ELSE
  26485. inELSE = ifLevel;
  26486. } else if (op === 0x59) { // EIF
  26487. if (inELSE === ifLevel) {
  26488. inELSE = 0;
  26489. }
  26490. --ifLevel;
  26491. } else if (op === 0x1C) { // JMPR
  26492. if (!inFDEF && !inELSE) {
  26493. var offset = stack[stack.length - 1];
  26494. // only jumping forward to prevent infinite loop
  26495. if (offset > 0) {
  26496. i += offset - 1;
  26497. }
  26498. }
  26499. }
  26500. // Adjusting stack not extactly, but just enough to get function id
  26501. if (!inFDEF && !inELSE) {
  26502. var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] :
  26503. op >= 0xC0 && op <= 0xDF ? -1 : op >= 0xE0 ? -2 : 0;
  26504. if (op >= 0x71 && op <= 0x75) {
  26505. n = stack.pop();
  26506. if (n === n) {
  26507. stackDelta = -n * 2;
  26508. }
  26509. }
  26510. while (stackDelta < 0 && stack.length > 0) {
  26511. stack.pop();
  26512. stackDelta++;
  26513. }
  26514. while (stackDelta > 0) {
  26515. stack.push(NaN); // pushing any number into stack
  26516. stackDelta--;
  26517. }
  26518. }
  26519. }
  26520. ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions;
  26521. var content = [data];
  26522. if (i > data.length) {
  26523. content.push(new Uint8Array(i - data.length));
  26524. }
  26525. if (lastDeff > lastEndf) {
  26526. warn('TT: complementing a missing function tail');
  26527. // new function definition started, but not finished
  26528. // complete function by [CLEAR, ENDF]
  26529. content.push(new Uint8Array([0x22, 0x2D]));
  26530. }
  26531. foldTTTable(table, content);
  26532. }
  26533. function checkInvalidFunctions(ttContext, maxFunctionDefs) {
  26534. if (ttContext.tooComplexToFollowFunctions) {
  26535. return;
  26536. }
  26537. if (ttContext.functionsDefined.length > maxFunctionDefs) {
  26538. warn('TT: more functions defined than expected');
  26539. ttContext.hintsValid = false;
  26540. return;
  26541. }
  26542. for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) {
  26543. if (j > maxFunctionDefs) {
  26544. warn('TT: invalid function id: ' + j);
  26545. ttContext.hintsValid = false;
  26546. return;
  26547. }
  26548. if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) {
  26549. warn('TT: undefined function: ' + j);
  26550. ttContext.hintsValid = false;
  26551. return;
  26552. }
  26553. }
  26554. }
  26555. function foldTTTable(table, content) {
  26556. if (content.length > 1) {
  26557. // concatenating the content items
  26558. var newLength = 0;
  26559. var j, jj;
  26560. for (j = 0, jj = content.length; j < jj; j++) {
  26561. newLength += content[j].length;
  26562. }
  26563. newLength = (newLength + 3) & ~3;
  26564. var result = new Uint8Array(newLength);
  26565. var pos = 0;
  26566. for (j = 0, jj = content.length; j < jj; j++) {
  26567. result.set(content[j], pos);
  26568. pos += content[j].length;
  26569. }
  26570. table.data = result;
  26571. table.length = newLength;
  26572. }
  26573. }
  26574. function sanitizeTTPrograms(fpgm, prep, cvt) {
  26575. var ttContext = {
  26576. functionsDefined: [],
  26577. functionsUsed: [],
  26578. functionsStackDeltas: [],
  26579. tooComplexToFollowFunctions: false,
  26580. hintsValid: true
  26581. };
  26582. if (fpgm) {
  26583. sanitizeTTProgram(fpgm, ttContext);
  26584. }
  26585. if (prep) {
  26586. sanitizeTTProgram(prep, ttContext);
  26587. }
  26588. if (fpgm) {
  26589. checkInvalidFunctions(ttContext, maxFunctionDefs);
  26590. }
  26591. if (cvt && (cvt.length & 1)) {
  26592. var cvtData = new Uint8Array(cvt.length + 1);
  26593. cvtData.set(cvt.data);
  26594. cvt.data = cvtData;
  26595. }
  26596. return ttContext.hintsValid;
  26597. }
  26598. // The following steps modify the original font data, making copy
  26599. font = new Stream(new Uint8Array(font.getBytes()));
  26600. var VALID_TABLES = ['OS/2', 'cmap', 'head', 'hhea', 'hmtx', 'maxp',
  26601. 'name', 'post', 'loca', 'glyf', 'fpgm', 'prep', 'cvt ', 'CFF '];
  26602. var header = readOpenTypeHeader(font);
  26603. var numTables = header.numTables;
  26604. var cff, cffFile;
  26605. var tables = { 'OS/2': null, cmap: null, head: null, hhea: null,
  26606. hmtx: null, maxp: null, name: null, post: null };
  26607. var table, tableData;
  26608. for (var i = 0; i < numTables; i++) {
  26609. table = readTableEntry(font);
  26610. if (VALID_TABLES.indexOf(table.tag) < 0) {
  26611. continue; // skipping table if it's not a required or optional table
  26612. }
  26613. if (table.length === 0) {
  26614. continue; // skipping empty tables
  26615. }
  26616. tables[table.tag] = table;
  26617. }
  26618. var isTrueType = !tables['CFF '];
  26619. if (!isTrueType) {
  26620. // OpenType font
  26621. if (!tables.head || !tables.hhea || !tables.maxp || !tables.post) {
  26622. // no major tables: throwing everything at CFFFont
  26623. cffFile = new Stream(tables['CFF '].data);
  26624. cff = new CFFFont(cffFile, properties);
  26625. return this.convert(name, cff, properties);
  26626. }
  26627. delete tables.glyf;
  26628. delete tables.loca;
  26629. delete tables.fpgm;
  26630. delete tables.prep;
  26631. delete tables['cvt '];
  26632. this.isOpenType = true;
  26633. } else {
  26634. if (!tables.glyf || !tables.loca) {
  26635. error('Required "glyf" or "loca" tables are not found');
  26636. }
  26637. this.isOpenType = false;
  26638. }
  26639. if (!tables.maxp) {
  26640. error('Required "maxp" table is not found');
  26641. }
  26642. font.pos = (font.start || 0) + tables.maxp.offset;
  26643. var version = font.getInt32();
  26644. var numGlyphs = font.getUint16();
  26645. var maxFunctionDefs = 0;
  26646. if (version >= 0x00010000 && tables.maxp.length >= 22) {
  26647. // maxZones can be invalid
  26648. font.pos += 8;
  26649. var maxZones = font.getUint16();
  26650. if (maxZones > 2) { // reset to 2 if font has invalid maxZones
  26651. tables.maxp.data[14] = 0;
  26652. tables.maxp.data[15] = 2;
  26653. }
  26654. font.pos += 4;
  26655. maxFunctionDefs = font.getUint16();
  26656. }
  26657. var dupFirstEntry = false;
  26658. if (properties.type == 'CIDFontType2' && properties.toUnicode &&
  26659. properties.toUnicode[0] > '\u0000') {
  26660. // oracle's defect (see 3427), duplicating first entry
  26661. dupFirstEntry = true;
  26662. numGlyphs++;
  26663. tables.maxp.data[4] = numGlyphs >> 8;
  26664. tables.maxp.data[5] = numGlyphs & 255;
  26665. }
  26666. var hintsValid = sanitizeTTPrograms(tables.fpgm, tables.prep,
  26667. tables['cvt '], maxFunctionDefs);
  26668. if (!hintsValid) {
  26669. delete tables.fpgm;
  26670. delete tables.prep;
  26671. delete tables['cvt '];
  26672. }
  26673. // Tables needs to be written by ascendant alphabetic order
  26674. var tablesNames = Object.keys(tables);
  26675. tablesNames.sort();
  26676. numTables = tablesNames.length;
  26677. // header and new offsets. Table entry information is appended to the
  26678. // end of file. The virtualOffset represents where to put the actual
  26679. // data of a particular table;
  26680. var ttf = {
  26681. file: '',
  26682. virtualOffset: numTables * (4 * 4)
  26683. };
  26684. // The new numbers of tables will be the last one plus the num
  26685. // of missing tables
  26686. createOpenTypeHeader(header.version, ttf, numTables);
  26687. // Ensure the hmtx table contains the advance width and
  26688. // sidebearings information for numGlyphs in the maxp table
  26689. sanitizeMetrics(font, tables.hhea, tables.hmtx, numGlyphs);
  26690. if (!tables.head) {
  26691. error('Required "head" table is not found');
  26692. }
  26693. sanitizeHead(tables.head, numGlyphs, isTrueType ? tables.loca.length : 0);
  26694. if (isTrueType) {
  26695. var isGlyphLocationsLong = int16(tables.head.data[50],
  26696. tables.head.data[51]);
  26697. sanitizeGlyphLocations(tables.loca, tables.glyf, numGlyphs,
  26698. isGlyphLocationsLong, hintsValid, dupFirstEntry);
  26699. }
  26700. if (!tables.hhea) {
  26701. error('Required "hhea" table is not found');
  26702. }
  26703. // Sanitizer reduces the glyph advanceWidth to the maxAdvanceWidth
  26704. // Sometimes it's 0. That needs to be fixed
  26705. if (tables.hhea.data[10] === 0 && tables.hhea.data[11] === 0) {
  26706. tables.hhea.data[10] = 0xFF;
  26707. tables.hhea.data[11] = 0xFF;
  26708. }
  26709. // The 'post' table has glyphs names.
  26710. if (tables.post) {
  26711. var valid = readPostScriptTable(tables.post, properties, numGlyphs);
  26712. if (!valid) {
  26713. tables.post = null;
  26714. }
  26715. }
  26716. var charCodeToGlyphId = [], charCode;
  26717. if (properties.type == 'CIDFontType2') {
  26718. var cidToGidMap = properties.cidToGidMap || [];
  26719. var cMap = properties.cMap.map;
  26720. for (charCode in cMap) {
  26721. charCode |= 0;
  26722. var cid = cMap[charCode];
  26723. assert(cid.length === 1, 'Max size of CID is 65,535');
  26724. cid = cid.charCodeAt(0);
  26725. var glyphId = -1;
  26726. if (cidToGidMap.length === 0) {
  26727. glyphId = charCode;
  26728. } else if (cid in cidToGidMap) {
  26729. glyphId = cidToGidMap[cid];
  26730. }
  26731. if (glyphId >= 0 && glyphId < numGlyphs) {
  26732. charCodeToGlyphId[charCode] = glyphId;
  26733. }
  26734. }
  26735. if (dupFirstEntry) {
  26736. charCodeToGlyphId[0] = numGlyphs - 1;
  26737. }
  26738. } else {
  26739. // Most of the following logic in this code branch is based on the
  26740. // 9.6.6.4 of the PDF spec.
  26741. var cmapTable = readCmapTable(tables.cmap, font, this.isSymbolicFont);
  26742. var cmapPlatformId = cmapTable.platformId;
  26743. var cmapEncodingId = cmapTable.encodingId;
  26744. var cmapMappings = cmapTable.mappings;
  26745. var cmapMappingsLength = cmapMappings.length;
  26746. var hasEncoding = properties.differences.length ||
  26747. !!properties.baseEncodingName;
  26748. // The spec seems to imply that if the font is symbolic the encoding
  26749. // should be ignored, this doesn't appear to work for 'preistabelle.pdf'
  26750. // where the the font is symbolic and it has an encoding.
  26751. if (hasEncoding &&
  26752. (cmapPlatformId === 3 && cmapEncodingId === 1 ||
  26753. cmapPlatformId === 1 && cmapEncodingId === 0)) {
  26754. var baseEncoding = [];
  26755. if (properties.baseEncodingName === 'MacRomanEncoding' ||
  26756. properties.baseEncodingName === 'WinAnsiEncoding') {
  26757. baseEncoding = Encodings[properties.baseEncodingName];
  26758. }
  26759. for (charCode = 0; charCode < 256; charCode++) {
  26760. var glyphName;
  26761. if (this.differences && charCode in this.differences) {
  26762. glyphName = this.differences[charCode];
  26763. } else if (charCode in baseEncoding &&
  26764. baseEncoding[charCode] !== '') {
  26765. glyphName = baseEncoding[charCode];
  26766. } else {
  26767. glyphName = Encodings.StandardEncoding[charCode];
  26768. }
  26769. if (!glyphName) {
  26770. continue;
  26771. }
  26772. var unicodeOrCharCode;
  26773. if (cmapPlatformId === 3 && cmapEncodingId === 1) {
  26774. unicodeOrCharCode = GlyphsUnicode[glyphName];
  26775. } else if (cmapPlatformId === 1 && cmapEncodingId === 0) {
  26776. // TODO: the encoding needs to be updated with mac os table.
  26777. unicodeOrCharCode = Encodings.MacRomanEncoding.indexOf(glyphName);
  26778. }
  26779. var found = false;
  26780. for (i = 0; i < cmapMappingsLength; ++i) {
  26781. if (cmapMappings[i].charCode === unicodeOrCharCode) {
  26782. charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
  26783. found = true;
  26784. break;
  26785. }
  26786. }
  26787. if (!found && properties.glyphNames) {
  26788. // Try to map using the post table. There are currently no known
  26789. // pdfs that this fixes.
  26790. glyphId = properties.glyphNames.indexOf(glyphName);
  26791. if (glyphId > 0) {
  26792. charCodeToGlyphId[charCode] = glyphId;
  26793. }
  26794. }
  26795. }
  26796. } else {
  26797. // For (3, 0) cmap tables:
  26798. // The charcode key being stored in charCodeToGlyphId is the lower
  26799. // byte of the two-byte charcodes of the cmap table since according to
  26800. // the spec: 'each byte from the string shall be prepended with the
  26801. // high byte of the range [of charcodes in the cmap table], to form
  26802. // a two-byte character, which shall be used to select the
  26803. // associated glyph description from the subtable'.
  26804. //
  26805. // For (1, 0) cmap tables:
  26806. // 'single bytes from the string shall be used to look up the
  26807. // associated glyph descriptions from the subtable'. This means
  26808. // charcodes in the cmap will be single bytes, so no-op since
  26809. // glyph.charCode & 0xFF === glyph.charCode
  26810. for (i = 0; i < cmapMappingsLength; ++i) {
  26811. charCode = cmapMappings[i].charCode & 0xFF;
  26812. charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
  26813. }
  26814. }
  26815. }
  26816. if (charCodeToGlyphId.length === 0) {
  26817. // defines at least one glyph
  26818. charCodeToGlyphId[0] = 0;
  26819. }
  26820. // Converting glyphs and ids into font's cmap table
  26821. var newMapping = adjustMapping(charCodeToGlyphId, properties);
  26822. this.toFontChar = newMapping.toFontChar;
  26823. tables.cmap = {
  26824. tag: 'cmap',
  26825. data: createCmapTable(newMapping.charCodeToGlyphId)
  26826. };
  26827. if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
  26828. // extract some more font properties from the OpenType head and
  26829. // hhea tables; yMin and descent value are always negative
  26830. var override = {
  26831. unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
  26832. yMax: int16(tables.head.data[42], tables.head.data[43]),
  26833. yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
  26834. ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
  26835. descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
  26836. };
  26837. tables['OS/2'] = {
  26838. tag: 'OS/2',
  26839. data: stringToArray(createOS2Table(properties,
  26840. newMapping.charCodeToGlyphId,
  26841. override))
  26842. };
  26843. }
  26844. // Rewrite the 'post' table if needed
  26845. if (!tables.post) {
  26846. tables.post = {
  26847. tag: 'post',
  26848. data: stringToArray(createPostTable(properties))
  26849. };
  26850. }
  26851. if (!isTrueType) {
  26852. try {
  26853. // Trying to repair CFF file
  26854. cffFile = new Stream(tables['CFF '].data);
  26855. var parser = new CFFParser(cffFile, properties);
  26856. cff = parser.parse();
  26857. var compiler = new CFFCompiler(cff);
  26858. tables['CFF '].data = compiler.compile();
  26859. } catch (e) {
  26860. warn('Failed to compile font ' + properties.loadedName);
  26861. }
  26862. }
  26863. // Re-creating 'name' table
  26864. if (!tables.name) {
  26865. tables.name = {
  26866. tag: 'name',
  26867. data: stringToArray(createNameTable(this.name))
  26868. };
  26869. } else {
  26870. // ... using existing 'name' table as prototype
  26871. var namePrototype = readNameTable(tables.name);
  26872. tables.name.data = stringToArray(createNameTable(name, namePrototype));
  26873. }
  26874. // rewrite the tables but tweak offsets
  26875. for (i = 0; i < numTables; i++) {
  26876. table = tables[tablesNames[i]];
  26877. var data = [];
  26878. tableData = table.data;
  26879. for (var j = 0, jj = tableData.length; j < jj; j++) {
  26880. data.push(tableData[j]);
  26881. }
  26882. createTableEntry(ttf, table.tag, data);
  26883. }
  26884. // Add the table datas
  26885. for (i = 0; i < numTables; i++) {
  26886. table = tables[tablesNames[i]];
  26887. tableData = table.data;
  26888. ttf.file += bytesToString(new Uint8Array(tableData));
  26889. // 4-byte aligned data
  26890. while (ttf.file.length & 3) {
  26891. ttf.file += String.fromCharCode(0);
  26892. }
  26893. }
  26894. return stringToArray(ttf.file);
  26895. },
  26896. convert: function Font_convert(fontName, font, properties) {
  26897. // The offsets object holds at the same time a representation of where
  26898. // to write the table entry information about a table and another offset
  26899. // representing the offset where to draw the actual data of a particular
  26900. // table
  26901. var otf = {
  26902. file: '',
  26903. virtualOffset: 9 * (4 * 4)
  26904. };
  26905. createOpenTypeHeader('\x4F\x54\x54\x4F', otf, 9);
  26906. // TODO: Check the charstring widths to determine this.
  26907. properties.fixedPitch = false;
  26908. var mapping = font.getGlyphMapping(properties);
  26909. var newMapping = adjustMapping(mapping, properties);
  26910. this.toFontChar = newMapping.toFontChar;
  26911. var numGlyphs = font.numGlyphs;
  26912. function getCharCode(charCodeToGlyphId, glyphId, addMap) {
  26913. for (var charCode in charCodeToGlyphId) {
  26914. if (glyphId === charCodeToGlyphId[charCode]) {
  26915. return charCode | 0;
  26916. }
  26917. }
  26918. if (addMap) {
  26919. newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] =
  26920. glyphId;
  26921. return newMapping.nextAvailableFontCharCode++;
  26922. }
  26923. return null;
  26924. }
  26925. var seacs = font.seacs;
  26926. if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) {
  26927. var matrix = properties.fontMatrix || FONT_IDENTITY_MATRIX;
  26928. var charset = font.getCharset();
  26929. var seacMap = Object.create(null);
  26930. for (var glyphId in seacs) {
  26931. glyphId |= 0;
  26932. var seac = seacs[glyphId];
  26933. var baseGlyphName = Encodings.StandardEncoding[seac[2]];
  26934. var accentGlyphName = Encodings.StandardEncoding[seac[3]];
  26935. var baseGlyphId = charset.indexOf(baseGlyphName);
  26936. var accentGlyphId = charset.indexOf(accentGlyphName);
  26937. if (baseGlyphId < 0 || accentGlyphId < 0) {
  26938. continue;
  26939. }
  26940. var accentOffset = {
  26941. x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4],
  26942. y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5]
  26943. };
  26944. var charCode = getCharCode(mapping, glyphId);
  26945. if (charCode === null) {
  26946. // There's no point in mapping it if the char code was never mapped
  26947. // to begin with.
  26948. continue;
  26949. }
  26950. // Find a fontCharCode that maps to the base and accent glyphs. If one
  26951. // doesn't exists, create it.
  26952. var charCodeToGlyphId = newMapping.charCodeToGlyphId;
  26953. var baseFontCharCode = getCharCode(charCodeToGlyphId, baseGlyphId,
  26954. true);
  26955. var accentFontCharCode = getCharCode(charCodeToGlyphId, accentGlyphId,
  26956. true);
  26957. seacMap[charCode] = {
  26958. baseFontCharCode: baseFontCharCode,
  26959. accentFontCharCode: accentFontCharCode,
  26960. accentOffset: accentOffset
  26961. };
  26962. }
  26963. properties.seacMap = seacMap;
  26964. }
  26965. var unitsPerEm = 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0];
  26966. var fields = {
  26967. // PostScript Font Program
  26968. 'CFF ': font.data,
  26969. // OS/2 and Windows Specific metrics
  26970. 'OS/2': stringToArray(createOS2Table(properties,
  26971. newMapping.charCodeToGlyphId)),
  26972. // Character to glyphs mapping
  26973. 'cmap': createCmapTable(newMapping.charCodeToGlyphId),
  26974. // Font header
  26975. 'head': (function fontFieldsHead() {
  26976. return stringToArray(
  26977. '\x00\x01\x00\x00' + // Version number
  26978. '\x00\x00\x10\x00' + // fontRevision
  26979. '\x00\x00\x00\x00' + // checksumAdjustement
  26980. '\x5F\x0F\x3C\xF5' + // magicNumber
  26981. '\x00\x00' + // Flags
  26982. safeString16(unitsPerEm) + // unitsPerEM
  26983. '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // creation date
  26984. '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // modifification date
  26985. '\x00\x00' + // xMin
  26986. safeString16(properties.descent) + // yMin
  26987. '\x0F\xFF' + // xMax
  26988. safeString16(properties.ascent) + // yMax
  26989. string16(properties.italicAngle ? 2 : 0) + // macStyle
  26990. '\x00\x11' + // lowestRecPPEM
  26991. '\x00\x00' + // fontDirectionHint
  26992. '\x00\x00' + // indexToLocFormat
  26993. '\x00\x00'); // glyphDataFormat
  26994. })(),
  26995. // Horizontal header
  26996. 'hhea': (function fontFieldsHhea() {
  26997. return stringToArray(
  26998. '\x00\x01\x00\x00' + // Version number
  26999. safeString16(properties.ascent) + // Typographic Ascent
  27000. safeString16(properties.descent) + // Typographic Descent
  27001. '\x00\x00' + // Line Gap
  27002. '\xFF\xFF' + // advanceWidthMax
  27003. '\x00\x00' + // minLeftSidebearing
  27004. '\x00\x00' + // minRightSidebearing
  27005. '\x00\x00' + // xMaxExtent
  27006. safeString16(properties.capHeight) + // caretSlopeRise
  27007. safeString16(Math.tan(properties.italicAngle) *
  27008. properties.xHeight) + // caretSlopeRun
  27009. '\x00\x00' + // caretOffset
  27010. '\x00\x00' + // -reserved-
  27011. '\x00\x00' + // -reserved-
  27012. '\x00\x00' + // -reserved-
  27013. '\x00\x00' + // -reserved-
  27014. '\x00\x00' + // metricDataFormat
  27015. string16(numGlyphs)); // Number of HMetrics
  27016. })(),
  27017. // Horizontal metrics
  27018. 'hmtx': (function fontFieldsHmtx() {
  27019. var charstrings = font.charstrings;
  27020. var hmtx = '\x00\x00\x00\x00'; // Fake .notdef
  27021. for (var i = 1, ii = numGlyphs; i < ii; i++) {
  27022. // TODO: For CFF fonts the width should technically match th x in
  27023. // the glyph, but it doesn't seem to matter.
  27024. var charstring = charstrings ? charstrings[i - 1] : {};
  27025. var width = 'width' in charstring ? charstring.width : 0;
  27026. hmtx += string16(width) + string16(0);
  27027. }
  27028. return stringToArray(hmtx);
  27029. })(),
  27030. // Maximum profile
  27031. 'maxp': (function fontFieldsMaxp() {
  27032. return stringToArray(
  27033. '\x00\x00\x50\x00' + // Version number
  27034. string16(numGlyphs)); // Num of glyphs
  27035. })(),
  27036. // Naming tables
  27037. 'name': stringToArray(createNameTable(fontName)),
  27038. // PostScript informations
  27039. 'post': stringToArray(createPostTable(properties))
  27040. };
  27041. var field;
  27042. for (field in fields) {
  27043. createTableEntry(otf, field, fields[field]);
  27044. }
  27045. for (field in fields) {
  27046. var table = fields[field];
  27047. otf.file += bytesToString(new Uint8Array(table));
  27048. }
  27049. return stringToArray(otf.file);
  27050. },
  27051. /**
  27052. * Builds a char code to unicode map based on section 9.10 of the spec.
  27053. * @param {Object} properties Font properties object.
  27054. * @return {Object} Has two properties: 'toUnicode' which maps char codes to
  27055. * unicode (string) values and 'isIdentity' which is true if an identity map
  27056. * is used.
  27057. */
  27058. buildToUnicode: function Font_buildToUnicode(properties) {
  27059. var map = {
  27060. isIdentity: false,
  27061. toUnicode: null
  27062. };
  27063. // Section 9.10.2 Mapping Character Codes to Unicode Values
  27064. if (properties.toUnicode && properties.toUnicode.length !== 0) {
  27065. map.toUnicode = properties.toUnicode;
  27066. return map;
  27067. }
  27068. // According to the spec if the font is a simple font we should only map
  27069. // to unicode if the base encoding is MacRoman, MacExpert, or WinAnsi or
  27070. // the differences array only contains adobe standard or symbol set names,
  27071. // in pratice it seems better to always try to create a toUnicode
  27072. // map based of the default encoding.
  27073. var toUnicode, charcode;
  27074. if (!properties.composite /* is simple font */) {
  27075. toUnicode = [];
  27076. var encoding = properties.defaultEncoding.slice();
  27077. // Merge in the differences array.
  27078. var differences = properties.differences;
  27079. for (charcode in differences) {
  27080. encoding[charcode] = differences[charcode];
  27081. }
  27082. for (charcode in encoding) {
  27083. // a) Map the character code to a character name.
  27084. var glyphName = encoding[charcode];
  27085. // b) Look up the character name in the Adobe Glyph List (see the
  27086. // Bibliography) to obtain the corresponding Unicode value.
  27087. if (glyphName === '' || !(glyphName in GlyphsUnicode)) {
  27088. // (undocumented) c) Few heuristics to recognize unknown glyphs
  27089. // NOTE: Adobe Reader does not do this step, but OSX Preview does
  27090. var code;
  27091. // Gxx glyph
  27092. if (glyphName.length === 3 &&
  27093. glyphName[0] === 'G' &&
  27094. (code = parseInt(glyphName.substr(1), 16))) {
  27095. toUnicode[charcode] = String.fromCharCode(code);
  27096. }
  27097. // g00xx glyph
  27098. if (glyphName.length === 5 &&
  27099. glyphName[0] === 'g' &&
  27100. (code = parseInt(glyphName.substr(1), 16))) {
  27101. toUnicode[charcode] = String.fromCharCode(code);
  27102. }
  27103. // Cddd glyph
  27104. if (glyphName.length >= 3 &&
  27105. glyphName[0] === 'C' &&
  27106. (code = +glyphName.substr(1))) {
  27107. toUnicode[charcode] = String.fromCharCode(code);
  27108. }
  27109. continue;
  27110. }
  27111. toUnicode[charcode] = String.fromCharCode(GlyphsUnicode[glyphName]);
  27112. }
  27113. map.toUnicode = toUnicode;
  27114. return map;
  27115. }
  27116. // If the font is a composite font that uses one of the predefined CMaps
  27117. // listed in Table 118 (except Identity–H and Identity–V) or whose
  27118. // descendant CIDFont uses the Adobe-GB1, Adobe-CNS1, Adobe-Japan1, or
  27119. // Adobe-Korea1 character collection:
  27120. if (properties.composite && (
  27121. (properties.cMap.builtInCMap &&
  27122. !(properties.cMap instanceof IdentityCMap)) ||
  27123. (properties.cidSystemInfo.registry === 'Adobe' &&
  27124. (properties.cidSystemInfo.ordering === 'GB1' ||
  27125. properties.cidSystemInfo.ordering === 'CNS1' ||
  27126. properties.cidSystemInfo.ordering === 'Japan1' ||
  27127. properties.cidSystemInfo.ordering === 'Korea1')))) {
  27128. // Then:
  27129. // a) Map the character code to a character identifier (CID) according
  27130. // to the font’s CMap.
  27131. // b) Obtain the registry and ordering of the character collection used
  27132. // by the font’s CMap (for example, Adobe and Japan1) from its
  27133. // CIDSystemInfo dictionary.
  27134. var registry = properties.cidSystemInfo.registry;
  27135. var ordering = properties.cidSystemInfo.ordering;
  27136. // c) Construct a second CMap name by concatenating the registry and
  27137. // ordering obtained in step (b) in the format registry–ordering–UCS2
  27138. // (for example, Adobe–Japan1–UCS2).
  27139. var ucs2CMapName = new Name(registry + '-' + ordering + '-UCS2');
  27140. // d) Obtain the CMap with the name constructed in step (c) (available
  27141. // from the ASN Web site; see the Bibliography).
  27142. var ucs2CMap = CMapFactory.create(ucs2CMapName,
  27143. { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null);
  27144. var cMap = properties.cMap;
  27145. toUnicode = [];
  27146. for (charcode in cMap.map) {
  27147. var cid = cMap.map[charcode];
  27148. assert(cid.length === 1, 'Max size of CID is 65,535');
  27149. // e) Map the CID obtained in step (a) according to the CMap obtained
  27150. // in step (d), producing a Unicode value.
  27151. var ucs2 = ucs2CMap.map[cid.charCodeAt(0)];
  27152. if (!ucs2) {
  27153. continue;
  27154. }
  27155. toUnicode[charcode] = String.fromCharCode((ucs2.charCodeAt(0) << 8) +
  27156. ucs2.charCodeAt(1));
  27157. }
  27158. map.toUnicode = toUnicode;
  27159. return map;
  27160. }
  27161. // The viewer's choice, just use an identity map.
  27162. toUnicode = [];
  27163. var firstChar = properties.firstChar, lastChar = properties.lastChar;
  27164. for (var i = firstChar; i <= lastChar; i++) {
  27165. toUnicode[i] = String.fromCharCode(i);
  27166. }
  27167. map.isIdentity = true;
  27168. map.toUnicode = toUnicode;
  27169. return map;
  27170. },
  27171. get spaceWidth() {
  27172. if ('_shadowWidth' in this) {
  27173. return this._shadowWidth;
  27174. }
  27175. // trying to estimate space character width
  27176. var possibleSpaceReplacements = ['space', 'minus', 'one', 'i'];
  27177. var width;
  27178. for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
  27179. var glyphName = possibleSpaceReplacements[i];
  27180. // if possible, getting width by glyph name
  27181. if (glyphName in this.widths) {
  27182. width = this.widths[glyphName];
  27183. break;
  27184. }
  27185. var glyphUnicode = GlyphsUnicode[glyphName];
  27186. // finding the charcode via unicodeToCID map
  27187. var charcode = 0;
  27188. if (this.composite) {
  27189. if (glyphUnicode in this.cMap.map) {
  27190. charcode = this.cMap.lookup(glyphUnicode).charCodeAt(0);
  27191. }
  27192. }
  27193. // ... via toUnicode map
  27194. if (!charcode && 'toUnicode' in this) {
  27195. charcode = this.toUnicode.indexOf(glyphUnicode);
  27196. }
  27197. // setting it to unicode if negative or undefined
  27198. if (charcode <= 0) {
  27199. charcode = glyphUnicode;
  27200. }
  27201. // trying to get width via charcode
  27202. width = this.widths[charcode];
  27203. if (width) {
  27204. break; // the non-zero width found
  27205. }
  27206. }
  27207. width = width || this.defaultWidth;
  27208. // Do not shadow the property here. See discussion:
  27209. // https://github.com/mozilla/pdf.js/pull/2127#discussion_r1662280
  27210. this._shadowWidth = width;
  27211. return width;
  27212. },
  27213. charToGlyph: function Font_charToGlyph(charcode) {
  27214. var fontCharCode, width, operatorListId;
  27215. var widthCode = charcode;
  27216. if (this.cMap && charcode in this.cMap.map) {
  27217. widthCode = this.cMap.map[charcode].charCodeAt(0);
  27218. }
  27219. width = this.widths[widthCode];
  27220. width = isNum(width) ? width : this.defaultWidth;
  27221. var vmetric = this.vmetrics && this.vmetrics[widthCode];
  27222. var unicode = this.toUnicode[charcode] || charcode;
  27223. if (typeof unicode === 'number') {
  27224. unicode = String.fromCharCode(unicode);
  27225. }
  27226. // First try the toFontChar map, if it's not there then try falling
  27227. // back to the char code.
  27228. fontCharCode = this.toFontChar[charcode] || charcode;
  27229. if (this.missingFile) {
  27230. fontCharCode = mapSpecialUnicodeValues(fontCharCode);
  27231. }
  27232. if (this.isType3Font) {
  27233. // Font char code in this case is actually a glyph name.
  27234. operatorListId = fontCharCode;
  27235. }
  27236. var accent = null;
  27237. if (this.seacMap && this.seacMap[charcode]) {
  27238. var seac = this.seacMap[charcode];
  27239. fontCharCode = seac.baseFontCharCode;
  27240. accent = {
  27241. fontChar: String.fromCharCode(seac.accentFontCharCode),
  27242. offset: seac.accentOffset
  27243. };
  27244. }
  27245. var fontChar = String.fromCharCode(fontCharCode);
  27246. var glyph = this.glyphCache[charcode];
  27247. if (!glyph ||
  27248. !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric,
  27249. operatorListId)) {
  27250. glyph = new Glyph(fontChar, unicode, accent, width, vmetric,
  27251. operatorListId);
  27252. this.glyphCache[charcode] = glyph;
  27253. }
  27254. return glyph;
  27255. },
  27256. charsToGlyphs: function Font_charsToGlyphs(chars) {
  27257. var charsCache = this.charsCache;
  27258. var glyphs, glyph, charcode;
  27259. // if we translated this string before, just grab it from the cache
  27260. if (charsCache) {
  27261. glyphs = charsCache[chars];
  27262. if (glyphs) {
  27263. return glyphs;
  27264. }
  27265. }
  27266. // lazily create the translation cache
  27267. if (!charsCache) {
  27268. charsCache = this.charsCache = Object.create(null);
  27269. }
  27270. glyphs = [];
  27271. var charsCacheKey = chars;
  27272. var i = 0, ii;
  27273. if (this.cMap) {
  27274. // composite fonts have multi-byte strings convert the string from
  27275. // single-byte to multi-byte
  27276. while (i < chars.length) {
  27277. var c = this.cMap.readCharCode(chars, i);
  27278. charcode = c[0];
  27279. var length = c[1];
  27280. i += length;
  27281. glyph = this.charToGlyph(charcode);
  27282. glyphs.push(glyph);
  27283. // placing null after each word break charcode (ASCII SPACE)
  27284. // Ignore occurences of 0x20 in multiple-byte codes.
  27285. if (length === 1 && chars.charCodeAt(i - 1) === 0x20) {
  27286. glyphs.push(null);
  27287. }
  27288. }
  27289. } else {
  27290. for (i = 0, ii = chars.length; i < ii; ++i) {
  27291. charcode = chars.charCodeAt(i);
  27292. glyph = this.charToGlyph(charcode);
  27293. glyphs.push(glyph);
  27294. if (charcode == 0x20) {
  27295. glyphs.push(null);
  27296. }
  27297. }
  27298. }
  27299. // Enter the translated string into the cache
  27300. return (charsCache[charsCacheKey] = glyphs);
  27301. }
  27302. };
  27303. return Font;
  27304. })();
  27305. var ErrorFont = (function ErrorFontClosure() {
  27306. function ErrorFont(error) {
  27307. this.error = error;
  27308. this.loadedName = 'g_font_error';
  27309. this.loading = false;
  27310. }
  27311. ErrorFont.prototype = {
  27312. charsToGlyphs: function ErrorFont_charsToGlyphs() {
  27313. return [];
  27314. },
  27315. exportData: function ErrorFont_exportData() {
  27316. return {error: this.error};
  27317. }
  27318. };
  27319. return ErrorFont;
  27320. })();
  27321. /**
  27322. * Shared logic for building a char code to glyph id mapping for Type1 and
  27323. * simple CFF fonts. See section 9.6.6.2 of the spec.
  27324. * @param {Object} properties Font properties object.
  27325. * @param {Object} builtInEncoding The encoding contained within the actual font
  27326. * data.
  27327. * @param {Array} Array of glyph names where the index is the glyph ID.
  27328. * @returns {Object} A char code to glyph ID map.
  27329. */
  27330. function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
  27331. var charCodeToGlyphId = Object.create(null);
  27332. var glyphId, charCode, baseEncoding;
  27333. if (properties.baseEncodingName) {
  27334. // If a valid base encoding name was used, the mapping is initialized with
  27335. // that.
  27336. baseEncoding = Encodings[properties.baseEncodingName];
  27337. for (charCode = 0; charCode < baseEncoding.length; charCode++) {
  27338. glyphId = glyphNames.indexOf(baseEncoding[charCode]);
  27339. if (glyphId >= 0) {
  27340. charCodeToGlyphId[charCode] = glyphId;
  27341. }
  27342. }
  27343. } else if (!!(properties.flags & FontFlags.Symbolic)) {
  27344. // For a symbolic font the encoding should be the fonts built-in
  27345. // encoding.
  27346. for (charCode in builtInEncoding) {
  27347. charCodeToGlyphId[charCode] = builtInEncoding[charCode];
  27348. }
  27349. } else {
  27350. // For non-symbolic fonts that don't have a base encoding the standard
  27351. // encoding should be used.
  27352. baseEncoding = Encodings.StandardEncoding;
  27353. for (charCode = 0; charCode < baseEncoding.length; charCode++) {
  27354. glyphId = glyphNames.indexOf(baseEncoding[charCode]);
  27355. if (glyphId >= 0) {
  27356. charCodeToGlyphId[charCode] = glyphId;
  27357. }
  27358. }
  27359. }
  27360. // Lastly, merge in the differences.
  27361. var differences = properties.differences;
  27362. if (differences) {
  27363. for (charCode in differences) {
  27364. var glyphName = differences[charCode];
  27365. glyphId = glyphNames.indexOf(glyphName);
  27366. if (glyphId >= 0) {
  27367. charCodeToGlyphId[charCode] = glyphId;
  27368. }
  27369. }
  27370. }
  27371. return charCodeToGlyphId;
  27372. }
  27373. /*
  27374. * CharStrings are encoded following the the CharString Encoding sequence
  27375. * describe in Chapter 6 of the "Adobe Type1 Font Format" specification.
  27376. * The value in a byte indicates a command, a number, or subsequent bytes
  27377. * that are to be interpreted in a special way.
  27378. *
  27379. * CharString Number Encoding:
  27380. * A CharString byte containing the values from 32 through 255 inclusive
  27381. * indicate an integer. These values are decoded in four ranges.
  27382. *
  27383. * 1. A CharString byte containing a value, v, between 32 and 246 inclusive,
  27384. * indicate the integer v - 139. Thus, the integer values from -107 through
  27385. * 107 inclusive may be encoded in single byte.
  27386. *
  27387. * 2. A CharString byte containing a value, v, between 247 and 250 inclusive,
  27388. * indicates an integer involving the next byte, w, according to the formula:
  27389. * [(v - 247) x 256] + w + 108
  27390. *
  27391. * 3. A CharString byte containing a value, v, between 251 and 254 inclusive,
  27392. * indicates an integer involving the next byte, w, according to the formula:
  27393. * -[(v - 251) * 256] - w - 108
  27394. *
  27395. * 4. A CharString containing the value 255 indicates that the next 4 bytes
  27396. * are a two complement signed integer. The first of these bytes contains the
  27397. * highest order bits, the second byte contains the next higher order bits
  27398. * and the fourth byte contain the lowest order bits.
  27399. *
  27400. *
  27401. * CharString Command Encoding:
  27402. * CharStrings commands are encoded in 1 or 2 bytes.
  27403. *
  27404. * Single byte commands are encoded in 1 byte that contains a value between
  27405. * 0 and 31 inclusive.
  27406. * If a command byte contains the value 12, then the value in the next byte
  27407. * indicates a command. This "escape" mechanism allows many extra commands
  27408. * to be encoded and this encoding technique helps to minimize the length of
  27409. * the charStrings.
  27410. */
  27411. var Type1CharString = (function Type1CharStringClosure() {
  27412. var COMMAND_MAP = {
  27413. 'hstem': [1],
  27414. 'vstem': [3],
  27415. 'vmoveto': [4],
  27416. 'rlineto': [5],
  27417. 'hlineto': [6],
  27418. 'vlineto': [7],
  27419. 'rrcurveto': [8],
  27420. 'callsubr': [10],
  27421. 'flex': [12, 35],
  27422. 'drop' : [12, 18],
  27423. 'endchar': [14],
  27424. 'rmoveto': [21],
  27425. 'hmoveto': [22],
  27426. 'vhcurveto': [30],
  27427. 'hvcurveto': [31]
  27428. };
  27429. function Type1CharString() {
  27430. this.width = 0;
  27431. this.lsb = 0;
  27432. this.flexing = false;
  27433. this.output = [];
  27434. this.stack = [];
  27435. }
  27436. Type1CharString.prototype = {
  27437. convert: function Type1CharString_convert(encoded, subrs) {
  27438. var count = encoded.length;
  27439. var error = false;
  27440. var wx, sbx, subrNumber;
  27441. for (var i = 0; i < count; i++) {
  27442. var value = encoded[i];
  27443. if (value < 32) {
  27444. if (value === 12) {
  27445. value = (value << 8) + encoded[++i];
  27446. }
  27447. switch (value) {
  27448. case 1: // hstem
  27449. if (!HINTING_ENABLED) {
  27450. this.stack = [];
  27451. break;
  27452. }
  27453. error = this.executeCommand(2, COMMAND_MAP.hstem);
  27454. break;
  27455. case 3: // vstem
  27456. if (!HINTING_ENABLED) {
  27457. this.stack = [];
  27458. break;
  27459. }
  27460. error = this.executeCommand(2, COMMAND_MAP.vstem);
  27461. break;
  27462. case 4: // vmoveto
  27463. if (this.flexing) {
  27464. if (this.stack.length < 1) {
  27465. error = true;
  27466. break;
  27467. }
  27468. // Add the dx for flex and but also swap the values so they are
  27469. // the right order.
  27470. var dy = this.stack.pop();
  27471. this.stack.push(0, dy);
  27472. break;
  27473. }
  27474. error = this.executeCommand(1, COMMAND_MAP.vmoveto);
  27475. break;
  27476. case 5: // rlineto
  27477. error = this.executeCommand(2, COMMAND_MAP.rlineto);
  27478. break;
  27479. case 6: // hlineto
  27480. error = this.executeCommand(1, COMMAND_MAP.hlineto);
  27481. break;
  27482. case 7: // vlineto
  27483. error = this.executeCommand(1, COMMAND_MAP.vlineto);
  27484. break;
  27485. case 8: // rrcurveto
  27486. error = this.executeCommand(6, COMMAND_MAP.rrcurveto);
  27487. break;
  27488. case 9: // closepath
  27489. // closepath is a Type1 command that does not take argument and is
  27490. // useless in Type2 and it can simply be ignored.
  27491. this.stack = [];
  27492. break;
  27493. case 10: // callsubr
  27494. if (this.stack.length < 1) {
  27495. error = true;
  27496. break;
  27497. }
  27498. subrNumber = this.stack.pop();
  27499. error = this.convert(subrs[subrNumber], subrs);
  27500. break;
  27501. case 11: // return
  27502. return error;
  27503. case 13: // hsbw
  27504. if (this.stack.length < 2) {
  27505. error = true;
  27506. break;
  27507. }
  27508. // To convert to type2 we have to move the width value to the
  27509. // first part of the charstring and then use hmoveto with lsb.
  27510. wx = this.stack.pop();
  27511. sbx = this.stack.pop();
  27512. this.lsb = sbx;
  27513. this.width = wx;
  27514. this.stack.push(sbx);
  27515. error = this.executeCommand(1, COMMAND_MAP.hmoveto);
  27516. break;
  27517. case 14: // endchar
  27518. this.output.push(COMMAND_MAP.endchar[0]);
  27519. break;
  27520. case 21: // rmoveto
  27521. if (this.flexing) {
  27522. break;
  27523. }
  27524. error = this.executeCommand(2, COMMAND_MAP.rmoveto);
  27525. break;
  27526. case 22: // hmoveto
  27527. if (this.flexing) {
  27528. // Add the dy for flex.
  27529. this.stack.push(0);
  27530. break;
  27531. }
  27532. error = this.executeCommand(1, COMMAND_MAP.hmoveto);
  27533. break;
  27534. case 30: // vhcurveto
  27535. error = this.executeCommand(4, COMMAND_MAP.vhcurveto);
  27536. break;
  27537. case 31: // hvcurveto
  27538. error = this.executeCommand(4, COMMAND_MAP.hvcurveto);
  27539. break;
  27540. case (12 << 8) + 0: // dotsection
  27541. // dotsection is a Type1 command to specify some hinting feature
  27542. // for dots that do not take a parameter and it can safely be
  27543. // ignored for Type2.
  27544. this.stack = [];
  27545. break;
  27546. case (12 << 8) + 1: // vstem3
  27547. if (!HINTING_ENABLED) {
  27548. this.stack = [];
  27549. break;
  27550. }
  27551. // [vh]stem3 are Type1 only and Type2 supports [vh]stem with
  27552. // multiple parameters, so instead of returning [vh]stem3 take a
  27553. // shortcut and return [vhstem] instead.
  27554. error = this.executeCommand(2, COMMAND_MAP.vstem);
  27555. break;
  27556. case (12 << 8) + 2: // hstem3
  27557. if (!HINTING_ENABLED) {
  27558. this.stack = [];
  27559. break;
  27560. }
  27561. // See vstem3.
  27562. error = this.executeCommand(2, COMMAND_MAP.hstem);
  27563. break;
  27564. case (12 << 8) + 6: // seac
  27565. // seac is like type 2's special endchar but it doesn't use the
  27566. // first argument asb, so remove it.
  27567. if (SEAC_ANALYSIS_ENABLED) {
  27568. this.seac = this.stack.splice(-4, 4);
  27569. error = this.executeCommand(0, COMMAND_MAP.endchar);
  27570. } else {
  27571. error = this.executeCommand(4, COMMAND_MAP.endchar);
  27572. }
  27573. break;
  27574. case (12 << 8) + 7: // sbw
  27575. if (this.stack.length < 4) {
  27576. error = true;
  27577. break;
  27578. }
  27579. // To convert to type2 we have to move the width value to the
  27580. // first part of the charstring and then use rmoveto with
  27581. // (dx, dy). The height argument will not be used for vmtx and
  27582. // vhea tables reconstruction -- ignoring it.
  27583. var wy = this.stack.pop();
  27584. wx = this.stack.pop();
  27585. var sby = this.stack.pop();
  27586. sbx = this.stack.pop();
  27587. this.lsb = sbx;
  27588. this.width = wx;
  27589. this.stack.push(sbx, sby);
  27590. error = this.executeCommand(2, COMMAND_MAP.rmoveto);
  27591. break;
  27592. case (12 << 8) + 12: // div
  27593. if (this.stack.length < 2) {
  27594. error = true;
  27595. break;
  27596. }
  27597. var num2 = this.stack.pop();
  27598. var num1 = this.stack.pop();
  27599. this.stack.push(num1 / num2);
  27600. break;
  27601. case (12 << 8) + 16: // callothersubr
  27602. if (this.stack.length < 2) {
  27603. error = true;
  27604. break;
  27605. }
  27606. subrNumber = this.stack.pop();
  27607. var numArgs = this.stack.pop();
  27608. if (subrNumber === 0 && numArgs === 3) {
  27609. var flexArgs = this.stack.splice(this.stack.length - 17, 17);
  27610. this.stack.push(
  27611. flexArgs[2] + flexArgs[0], // bcp1x + rpx
  27612. flexArgs[3] + flexArgs[1], // bcp1y + rpy
  27613. flexArgs[4], // bcp2x
  27614. flexArgs[5], // bcp2y
  27615. flexArgs[6], // p2x
  27616. flexArgs[7], // p2y
  27617. flexArgs[8], // bcp3x
  27618. flexArgs[9], // bcp3y
  27619. flexArgs[10], // bcp4x
  27620. flexArgs[11], // bcp4y
  27621. flexArgs[12], // p3x
  27622. flexArgs[13], // p3y
  27623. flexArgs[14] // flexDepth
  27624. // 15 = finalx unused by flex
  27625. // 16 = finaly unused by flex
  27626. );
  27627. error = this.executeCommand(13, COMMAND_MAP.flex, true);
  27628. this.flexing = false;
  27629. this.stack.push(flexArgs[15], flexArgs[16]);
  27630. } else if (subrNumber === 1 && numArgs === 0) {
  27631. this.flexing = true;
  27632. }
  27633. break;
  27634. case (12 << 8) + 17: // pop
  27635. // Ignore this since it is only used with othersubr.
  27636. break;
  27637. case (12 << 8) + 33: // setcurrentpoint
  27638. // Ignore for now.
  27639. this.stack = [];
  27640. break;
  27641. default:
  27642. warn('Unknown type 1 charstring command of "' + value + '"');
  27643. break;
  27644. }
  27645. if (error) {
  27646. break;
  27647. }
  27648. continue;
  27649. } else if (value <= 246) {
  27650. value = value - 139;
  27651. } else if (value <= 250) {
  27652. value = ((value - 247) * 256) + encoded[++i] + 108;
  27653. } else if (value <= 254) {
  27654. value = -((value - 251) * 256) - encoded[++i] - 108;
  27655. } else {
  27656. value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 |
  27657. (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0;
  27658. }
  27659. this.stack.push(value);
  27660. }
  27661. return error;
  27662. },
  27663. executeCommand: function(howManyArgs, command, keepStack) {
  27664. var stackLength = this.stack.length;
  27665. if (howManyArgs > stackLength) {
  27666. return true;
  27667. }
  27668. var start = stackLength - howManyArgs;
  27669. for (var i = start; i < stackLength; i++) {
  27670. var value = this.stack[i];
  27671. if (value === (value | 0)) { // int
  27672. this.output.push(28, (value >> 8) & 0xff, value & 0xff);
  27673. } else { // fixed point
  27674. value = (65536 * value) | 0;
  27675. this.output.push(255,
  27676. (value >> 24) & 0xFF,
  27677. (value >> 16) & 0xFF,
  27678. (value >> 8) & 0xFF,
  27679. value & 0xFF);
  27680. }
  27681. }
  27682. this.output.push.apply(this.output, command);
  27683. if (keepStack) {
  27684. this.stack.splice(start, howManyArgs);
  27685. } else {
  27686. this.stack.length = 0;
  27687. }
  27688. return false;
  27689. }
  27690. };
  27691. return Type1CharString;
  27692. })();
  27693. /*
  27694. * Type1Parser encapsulate the needed code for parsing a Type1 font
  27695. * program. Some of its logic depends on the Type2 charstrings
  27696. * structure.
  27697. * Note: this doesn't really parse the font since that would require evaluation
  27698. * of PostScript, but it is possible in most cases to extract what we need
  27699. * without a full parse.
  27700. */
  27701. var Type1Parser = (function Type1ParserClosure() {
  27702. /*
  27703. * Decrypt a Sequence of Ciphertext Bytes to Produce the Original Sequence
  27704. * of Plaintext Bytes. The function took a key as a parameter which can be
  27705. * for decrypting the eexec block of for decoding charStrings.
  27706. */
  27707. var EEXEC_ENCRYPT_KEY = 55665;
  27708. var CHAR_STRS_ENCRYPT_KEY = 4330;
  27709. function isHexDigit(code) {
  27710. return code >= 48 && code <= 57 || // '0'-'9'
  27711. code >= 65 && code <= 70 || // 'A'-'F'
  27712. code >= 97 && code <= 102; // 'a'-'f'
  27713. }
  27714. function decrypt(data, key, discardNumber) {
  27715. var r = key | 0, c1 = 52845, c2 = 22719;
  27716. var count = data.length;
  27717. var decrypted = new Uint8Array(count);
  27718. for (var i = 0; i < count; i++) {
  27719. var value = data[i];
  27720. decrypted[i] = value ^ (r >> 8);
  27721. r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
  27722. }
  27723. return Array.prototype.slice.call(decrypted, discardNumber);
  27724. }
  27725. function decryptAscii(data, key, discardNumber) {
  27726. var r = key | 0, c1 = 52845, c2 = 22719;
  27727. var count = data.length, maybeLength = count >>> 1;
  27728. var decrypted = new Uint8Array(maybeLength);
  27729. var i, j;
  27730. for (i = 0, j = 0; i < count; i++) {
  27731. var digit1 = data[i];
  27732. if (!isHexDigit(digit1)) {
  27733. continue;
  27734. }
  27735. i++;
  27736. var digit2;
  27737. while (i < count && !isHexDigit(digit2 = data[i])) {
  27738. i++;
  27739. }
  27740. if (i < count) {
  27741. var value = parseInt(String.fromCharCode(digit1, digit2), 16);
  27742. decrypted[j++] = value ^ (r >> 8);
  27743. r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
  27744. }
  27745. }
  27746. return Array.prototype.slice.call(decrypted, discardNumber, j);
  27747. }
  27748. function isSpecial(c) {
  27749. return c === 0x2F || // '/'
  27750. c === 0x5B || c === 0x5D || // '[', ']'
  27751. c === 0x7B || c === 0x7D || // '{', '}'
  27752. c === 0x28 || c === 0x29; // '(', ')'
  27753. }
  27754. function Type1Parser(stream, encrypted) {
  27755. if (encrypted) {
  27756. var data = stream.getBytes();
  27757. var isBinary = !(isHexDigit(data[0]) && isHexDigit(data[1]) &&
  27758. isHexDigit(data[2]) && isHexDigit(data[3]));
  27759. stream = new Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) :
  27760. decryptAscii(data, EEXEC_ENCRYPT_KEY, 4));
  27761. }
  27762. this.stream = stream;
  27763. this.nextChar();
  27764. }
  27765. Type1Parser.prototype = {
  27766. readNumberArray: function Type1Parser_readNumberArray() {
  27767. this.getToken(); // read '[' or '{' (arrays can start with either)
  27768. var array = [];
  27769. while (true) {
  27770. var token = this.getToken();
  27771. if (token === null || token === ']' || token === '}') {
  27772. break;
  27773. }
  27774. array.push(parseFloat(token || 0));
  27775. }
  27776. return array;
  27777. },
  27778. readNumber: function Type1Parser_readNumber() {
  27779. var token = this.getToken();
  27780. return parseFloat(token || 0);
  27781. },
  27782. readInt: function Type1Parser_readInt() {
  27783. // Use '| 0' to prevent setting a double into length such as the double
  27784. // does not flow into the loop variable.
  27785. var token = this.getToken();
  27786. return parseInt(token || 0, 10) | 0;
  27787. },
  27788. readBoolean: function Type1Parser_readBoolean() {
  27789. var token = this.getToken();
  27790. // Use 1 and 0 since that's what type2 charstrings use.
  27791. return token === 'true' ? 1 : 0;
  27792. },
  27793. nextChar : function Type1_nextChar() {
  27794. return (this.currentChar = this.stream.getByte());
  27795. },
  27796. getToken: function Type1Parser_getToken() {
  27797. // Eat whitespace and comments.
  27798. var comment = false;
  27799. var ch = this.currentChar;
  27800. while (true) {
  27801. if (ch === -1) {
  27802. return null;
  27803. }
  27804. if (comment) {
  27805. if (ch === 0x0A || ch === 0x0D) {
  27806. comment = false;
  27807. }
  27808. } else if (ch === 0x25) { // '%'
  27809. comment = true;
  27810. } else if (!Lexer.isSpace(ch)) {
  27811. break;
  27812. }
  27813. ch = this.nextChar();
  27814. }
  27815. if (isSpecial(ch)) {
  27816. this.nextChar();
  27817. return String.fromCharCode(ch);
  27818. }
  27819. var token = '';
  27820. do {
  27821. token += String.fromCharCode(ch);
  27822. ch = this.nextChar();
  27823. } while (ch >= 0 && !Lexer.isSpace(ch) && !isSpecial(ch));
  27824. return token;
  27825. },
  27826. /*
  27827. * Returns an object containing a Subrs array and a CharStrings
  27828. * array extracted from and eexec encrypted block of data
  27829. */
  27830. extractFontProgram: function Type1Parser_extractFontProgram() {
  27831. var stream = this.stream;
  27832. var subrs = [], charstrings = [];
  27833. var program = {
  27834. subrs: [],
  27835. charstrings: [],
  27836. properties: {
  27837. 'privateData': {
  27838. 'lenIV': 4
  27839. }
  27840. }
  27841. };
  27842. var token, length, data, lenIV, encoded;
  27843. while ((token = this.getToken()) !== null) {
  27844. if (token !== '/') {
  27845. continue;
  27846. }
  27847. token = this.getToken();
  27848. switch (token) {
  27849. case 'CharStrings':
  27850. // The number immediately following CharStrings must be greater or
  27851. // equal to the number of CharStrings.
  27852. this.getToken();
  27853. this.getToken(); // read in 'dict'
  27854. this.getToken(); // read in 'dup'
  27855. this.getToken(); // read in 'begin'
  27856. while(true) {
  27857. token = this.getToken();
  27858. if (token === null || token === 'end') {
  27859. break;
  27860. }
  27861. if (token !== '/') {
  27862. continue;
  27863. }
  27864. var glyph = this.getToken();
  27865. length = this.readInt();
  27866. this.getToken(); // read in 'RD' or '-|'
  27867. data = stream.makeSubStream(stream.pos, length);
  27868. lenIV = program.properties.privateData['lenIV'];
  27869. encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV);
  27870. // Skip past the required space and binary data.
  27871. stream.skip(length);
  27872. this.nextChar();
  27873. token = this.getToken(); // read in 'ND' or '|-'
  27874. if (token === 'noaccess') {
  27875. this.getToken(); // read in 'def'
  27876. }
  27877. charstrings.push({
  27878. glyph: glyph,
  27879. encoded: encoded
  27880. });
  27881. }
  27882. break;
  27883. case 'Subrs':
  27884. var num = this.readInt();
  27885. this.getToken(); // read in 'array'
  27886. while ((token = this.getToken()) === 'dup') {
  27887. var index = this.readInt();
  27888. length = this.readInt();
  27889. this.getToken(); // read in 'RD' or '-|'
  27890. data = stream.makeSubStream(stream.pos, length);
  27891. lenIV = program.properties.privateData['lenIV'];
  27892. encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV);
  27893. // Skip past the required space and binary data.
  27894. stream.skip(length);
  27895. this.nextChar();
  27896. token = this.getToken(); // read in 'NP' or '|'
  27897. if (token === 'noaccess') {
  27898. this.getToken(); // read in 'put'
  27899. }
  27900. subrs[index] = encoded;
  27901. }
  27902. break;
  27903. case 'BlueValues':
  27904. case 'OtherBlues':
  27905. case 'FamilyBlues':
  27906. case 'FamilyOtherBlues':
  27907. var blueArray = this.readNumberArray();
  27908. // *Blue* values may contain invalid data: disables reading of
  27909. // those values when hinting is disabled.
  27910. if (blueArray.length > 0 && (blueArray.length % 2) === 0 &&
  27911. HINTING_ENABLED) {
  27912. program.properties.privateData[token] = blueArray;
  27913. }
  27914. break;
  27915. case 'StemSnapH':
  27916. case 'StemSnapV':
  27917. program.properties.privateData[token] = this.readNumberArray();
  27918. break;
  27919. case 'StdHW':
  27920. case 'StdVW':
  27921. program.properties.privateData[token] =
  27922. this.readNumberArray()[0];
  27923. break;
  27924. case 'BlueShift':
  27925. case 'lenIV':
  27926. case 'BlueFuzz':
  27927. case 'BlueScale':
  27928. case 'LanguageGroup':
  27929. case 'ExpansionFactor':
  27930. program.properties.privateData[token] = this.readNumber();
  27931. break;
  27932. case 'ForceBold':
  27933. program.properties.privateData[token] = this.readBoolean();
  27934. break;
  27935. }
  27936. }
  27937. for (var i = 0; i < charstrings.length; i++) {
  27938. glyph = charstrings[i].glyph;
  27939. encoded = charstrings[i].encoded;
  27940. var charString = new Type1CharString();
  27941. var error = charString.convert(encoded, subrs);
  27942. var output = charString.output;
  27943. if (error) {
  27944. // It seems when FreeType encounters an error while evaluating a glyph
  27945. // that it completely ignores the glyph so we'll mimic that behaviour
  27946. // here and put an endchar to make the validator happy.
  27947. output = [14];
  27948. }
  27949. program.charstrings.push({
  27950. glyphName: glyph,
  27951. charstring: output,
  27952. width: charString.width,
  27953. lsb: charString.lsb,
  27954. seac: charString.seac
  27955. });
  27956. }
  27957. return program;
  27958. },
  27959. extractFontHeader: function Type1Parser_extractFontHeader(properties) {
  27960. var token;
  27961. while ((token = this.getToken()) !== null) {
  27962. if (token !== '/') {
  27963. continue;
  27964. }
  27965. token = this.getToken();
  27966. switch (token) {
  27967. case 'FontMatrix':
  27968. var matrix = this.readNumberArray();
  27969. properties.fontMatrix = matrix;
  27970. break;
  27971. case 'Encoding':
  27972. var encodingArg = this.getToken();
  27973. var encoding;
  27974. if (!/^\d+$/.test(encodingArg)) {
  27975. // encoding name is specified
  27976. encoding = Encodings[encodingArg];
  27977. } else {
  27978. encoding = [];
  27979. var size = parseInt(encodingArg, 10) | 0;
  27980. this.getToken(); // read in 'array'
  27981. for (var j = 0; j < size; j++) {
  27982. token = this.getToken();
  27983. // skipping till first dup or def (e.g. ignoring for statement)
  27984. while (token !== 'dup' && token !== 'def') {
  27985. token = this.getToken();
  27986. if (token === null) {
  27987. return; // invalid header
  27988. }
  27989. }
  27990. if (token === 'def') {
  27991. break; // read all array data
  27992. }
  27993. var index = this.readInt();
  27994. this.getToken(); // read in '/'
  27995. var glyph = this.getToken();
  27996. encoding[index] = glyph;
  27997. this.getToken(); // read the in 'put'
  27998. }
  27999. }
  28000. properties.builtInEncoding = encoding;
  28001. break;
  28002. case 'FontBBox':
  28003. var fontBBox = this.readNumberArray();
  28004. // adjusting ascent/descent
  28005. properties.ascent = fontBBox[3];
  28006. properties.descent = fontBBox[1];
  28007. properties.ascentScaled = true;
  28008. break;
  28009. }
  28010. }
  28011. }
  28012. };
  28013. return Type1Parser;
  28014. })();
  28015. /**
  28016. * The CFF class takes a Type1 file and wrap it into a
  28017. * 'Compact Font Format' which itself embed Type2 charstrings.
  28018. */
  28019. var CFFStandardStrings = [
  28020. '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  28021. 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
  28022. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four',
  28023. 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',
  28024. 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
  28025. 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
  28026. 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum',
  28027. 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
  28028. 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
  28029. 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',
  28030. 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  28031. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  28032. 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',
  28033. 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase',
  28034. 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown',
  28035. 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent',
  28036. 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash',
  28037. 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae',
  28038. 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior',
  28039. 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn',
  28040. 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters',
  28041. 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior',
  28042. 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring',
  28043. 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave',
  28044. 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute',
  28045. 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute',
  28046. 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron',
  28047. 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde',
  28048. 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute',
  28049. 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex',
  28050. 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex',
  28051. 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron', 'exclamsmall',
  28052. 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall',
  28053. 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  28054. 'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle',
  28055. 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle',
  28056. 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior',
  28057. 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior',
  28058. 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior',
  28059. 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  28060. 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior',
  28061. 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall',
  28062. 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall',
  28063. 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall',
  28064. 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',
  28065. 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah',
  28066. 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall',
  28067. 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall',
  28068. 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior',
  28069. 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'questiondownsmall', 'oneeighth',
  28070. 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds',
  28071. 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior',
  28072. 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior',
  28073. 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior',
  28074. 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',
  28075. 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior',
  28076. 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall',
  28077. 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',
  28078. 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall',
  28079. 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall',
  28080. 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall',
  28081. 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall',
  28082. 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall',
  28083. 'Thornsmall', 'Ydieresissmall', '001.000', '001.001', '001.002', '001.003',
  28084. 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold'
  28085. ];
  28086. // Type1Font is also a CIDFontType0.
  28087. var Type1Font = function Type1Font(name, file, properties) {
  28088. // Some bad generators embed pfb file as is, we have to strip 6-byte headers.
  28089. // Also, length1 and length2 might be off by 6 bytes as well.
  28090. // http://www.math.ubc.ca/~cass/piscript/type1.pdf
  28091. var PFB_HEADER_SIZE = 6;
  28092. var headerBlockLength = properties.length1;
  28093. var eexecBlockLength = properties.length2;
  28094. var pfbHeader = file.peekBytes(PFB_HEADER_SIZE);
  28095. var pfbHeaderPresent = pfbHeader[0] == 0x80 && pfbHeader[1] == 0x01;
  28096. if (pfbHeaderPresent) {
  28097. file.skip(PFB_HEADER_SIZE);
  28098. headerBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) |
  28099. (pfbHeader[3] << 8) | pfbHeader[2];
  28100. }
  28101. // Get the data block containing glyphs and subrs informations
  28102. var headerBlock = new Stream(file.getBytes(headerBlockLength));
  28103. var headerBlockParser = new Type1Parser(headerBlock);
  28104. headerBlockParser.extractFontHeader(properties);
  28105. if (pfbHeaderPresent) {
  28106. pfbHeader = file.getBytes(PFB_HEADER_SIZE);
  28107. eexecBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) |
  28108. (pfbHeader[3] << 8) | pfbHeader[2];
  28109. }
  28110. // Decrypt the data blocks and retrieve it's content
  28111. var eexecBlock = new Stream(file.getBytes(eexecBlockLength));
  28112. var eexecBlockParser = new Type1Parser(eexecBlock, true);
  28113. var data = eexecBlockParser.extractFontProgram();
  28114. for (var info in data.properties) {
  28115. properties[info] = data.properties[info];
  28116. }
  28117. var charstrings = data.charstrings;
  28118. var type2Charstrings = this.getType2Charstrings(charstrings);
  28119. var subrs = this.getType2Subrs(data.subrs);
  28120. this.charstrings = charstrings;
  28121. this.data = this.wrap(name, type2Charstrings, this.charstrings,
  28122. subrs, properties);
  28123. this.seacs = this.getSeacs(data.charstrings);
  28124. };
  28125. Type1Font.prototype = {
  28126. get numGlyphs() {
  28127. return this.charstrings.length + 1;
  28128. },
  28129. getCharset: function Type1Font_getCharset() {
  28130. var charset = ['.notdef'];
  28131. var charstrings = this.charstrings;
  28132. for (var glyphId = 0; glyphId < charstrings.length; glyphId++) {
  28133. charset.push(charstrings[glyphId].glyphName);
  28134. }
  28135. return charset;
  28136. },
  28137. getGlyphMapping: function Type1Font_getGlyphMapping(properties) {
  28138. var charstrings = this.charstrings;
  28139. var glyphNames = ['.notdef'], glyphId;
  28140. for (glyphId = 0; glyphId < charstrings.length; glyphId++) {
  28141. glyphNames.push(charstrings[glyphId].glyphName);
  28142. }
  28143. var encoding = properties.builtInEncoding;
  28144. if (encoding) {
  28145. var builtInEncoding = {};
  28146. for (var charCode in encoding) {
  28147. glyphId = glyphNames.indexOf(encoding[charCode]);
  28148. if (glyphId >= 0) {
  28149. builtInEncoding[charCode] = glyphId;
  28150. }
  28151. }
  28152. }
  28153. return type1FontGlyphMapping(properties, builtInEncoding, glyphNames);
  28154. },
  28155. getSeacs: function Type1Font_getSeacs(charstrings) {
  28156. var i, ii;
  28157. var seacMap = [];
  28158. for (i = 0, ii = charstrings.length; i < ii; i++) {
  28159. var charstring = charstrings[i];
  28160. if (charstring.seac) {
  28161. // Offset by 1 for .notdef
  28162. seacMap[i + 1] = charstring.seac;
  28163. }
  28164. }
  28165. return seacMap;
  28166. },
  28167. getType2Charstrings: function Type1Font_getType2Charstrings(
  28168. type1Charstrings) {
  28169. var type2Charstrings = [];
  28170. for (var i = 0, ii = type1Charstrings.length; i < ii; i++) {
  28171. type2Charstrings.push(type1Charstrings[i].charstring);
  28172. }
  28173. return type2Charstrings;
  28174. },
  28175. getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) {
  28176. var bias = 0;
  28177. var count = type1Subrs.length;
  28178. if (count < 1133) {
  28179. bias = 107;
  28180. } else if (count < 33769) {
  28181. bias = 1131;
  28182. } else {
  28183. bias = 32768;
  28184. }
  28185. // Add a bunch of empty subrs to deal with the Type2 bias
  28186. var type2Subrs = [];
  28187. var i;
  28188. for (i = 0; i < bias; i++) {
  28189. type2Subrs.push([0x0B]);
  28190. }
  28191. for (i = 0; i < count; i++) {
  28192. type2Subrs.push(type1Subrs[i]);
  28193. }
  28194. return type2Subrs;
  28195. },
  28196. wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) {
  28197. var cff = new CFF();
  28198. cff.header = new CFFHeader(1, 0, 4, 4);
  28199. cff.names = [name];
  28200. var topDict = new CFFTopDict();
  28201. // CFF strings IDs 0...390 are predefined names, so refering
  28202. // to entries in our own String INDEX starts at SID 391.
  28203. topDict.setByName('version', 391);
  28204. topDict.setByName('Notice', 392);
  28205. topDict.setByName('FullName', 393);
  28206. topDict.setByName('FamilyName', 394);
  28207. topDict.setByName('Weight', 395);
  28208. topDict.setByName('Encoding', null); // placeholder
  28209. topDict.setByName('FontMatrix', properties.fontMatrix);
  28210. topDict.setByName('FontBBox', properties.bbox);
  28211. topDict.setByName('charset', null); // placeholder
  28212. topDict.setByName('CharStrings', null); // placeholder
  28213. topDict.setByName('Private', null); // placeholder
  28214. cff.topDict = topDict;
  28215. var strings = new CFFStrings();
  28216. strings.add('Version 0.11'); // Version
  28217. strings.add('See original notice'); // Notice
  28218. strings.add(name); // FullName
  28219. strings.add(name); // FamilyName
  28220. strings.add('Medium'); // Weight
  28221. cff.strings = strings;
  28222. cff.globalSubrIndex = new CFFIndex();
  28223. var count = glyphs.length;
  28224. var charsetArray = [0];
  28225. var i, ii;
  28226. for (i = 0; i < count; i++) {
  28227. var index = CFFStandardStrings.indexOf(charstrings[i].glyphName);
  28228. // TODO: Insert the string and correctly map it. Previously it was
  28229. // thought mapping names that aren't in the standard strings to .notdef
  28230. // was fine, however in issue818 when mapping them all to .notdef the
  28231. // adieresis glyph no longer worked.
  28232. if (index == -1) {
  28233. index = 0;
  28234. }
  28235. charsetArray.push((index >> 8) & 0xff, index & 0xff);
  28236. }
  28237. cff.charset = new CFFCharset(false, 0, [], charsetArray);
  28238. var charStringsIndex = new CFFIndex();
  28239. charStringsIndex.add([0x8B, 0x0E]); // .notdef
  28240. for (i = 0; i < count; i++) {
  28241. charStringsIndex.add(glyphs[i]);
  28242. }
  28243. cff.charStrings = charStringsIndex;
  28244. var privateDict = new CFFPrivateDict();
  28245. privateDict.setByName('Subrs', null); // placeholder
  28246. var fields = [
  28247. 'BlueValues',
  28248. 'OtherBlues',
  28249. 'FamilyBlues',
  28250. 'FamilyOtherBlues',
  28251. 'StemSnapH',
  28252. 'StemSnapV',
  28253. 'BlueShift',
  28254. 'BlueFuzz',
  28255. 'BlueScale',
  28256. 'LanguageGroup',
  28257. 'ExpansionFactor',
  28258. 'ForceBold',
  28259. 'StdHW',
  28260. 'StdVW'
  28261. ];
  28262. for (i = 0, ii = fields.length; i < ii; i++) {
  28263. var field = fields[i];
  28264. if (!properties.privateData.hasOwnProperty(field)) {
  28265. continue;
  28266. }
  28267. var value = properties.privateData[field];
  28268. if (isArray(value)) {
  28269. // All of the private dictionary array data in CFF must be stored as
  28270. // "delta-encoded" numbers.
  28271. for (var j = value.length - 1; j > 0; j--) {
  28272. value[j] -= value[j - 1]; // ... difference from previous value
  28273. }
  28274. }
  28275. privateDict.setByName(field, value);
  28276. }
  28277. cff.topDict.privateDict = privateDict;
  28278. var subrIndex = new CFFIndex();
  28279. for (i = 0, ii = subrs.length; i < ii; i++) {
  28280. subrIndex.add(subrs[i]);
  28281. }
  28282. privateDict.subrsIndex = subrIndex;
  28283. var compiler = new CFFCompiler(cff);
  28284. return compiler.compile();
  28285. }
  28286. };
  28287. var CFFFont = (function CFFFontClosure() {
  28288. function CFFFont(file, properties) {
  28289. this.properties = properties;
  28290. var parser = new CFFParser(file, properties);
  28291. this.cff = parser.parse();
  28292. var compiler = new CFFCompiler(this.cff);
  28293. this.seacs = this.cff.seacs;
  28294. try {
  28295. this.data = compiler.compile();
  28296. } catch (e) {
  28297. warn('Failed to compile font ' + properties.loadedName);
  28298. // There may have just been an issue with the compiler, set the data
  28299. // anyway and hope the font loaded.
  28300. this.data = file;
  28301. }
  28302. }
  28303. CFFFont.prototype = {
  28304. get numGlyphs() {
  28305. return this.cff.charStrings.count;
  28306. },
  28307. getCharset: function CFFFont_getCharset() {
  28308. return this.cff.charset.charset;
  28309. },
  28310. getGlyphMapping: function CFFFont_getGlyphMapping() {
  28311. var cff = this.cff;
  28312. var properties = this.properties;
  28313. var charsets = cff.charset.charset;
  28314. var charCodeToGlyphId;
  28315. var glyphId;
  28316. if (properties.composite) {
  28317. charCodeToGlyphId = Object.create(null);
  28318. if (cff.isCIDFont) {
  28319. // If the font is actually a CID font then we should use the charset
  28320. // to map CIDs to GIDs.
  28321. for (glyphId = 0; glyphId < charsets.length; glyphId++) {
  28322. var cidString = String.fromCharCode(charsets[glyphId]);
  28323. var charCode = properties.cMap.map.indexOf(cidString);
  28324. charCodeToGlyphId[charCode] = glyphId;
  28325. }
  28326. } else {
  28327. // If it is NOT actually a CID font then CIDs should be mapped
  28328. // directly to GIDs.
  28329. for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) {
  28330. charCodeToGlyphId[glyphId] = glyphId;
  28331. }
  28332. }
  28333. return charCodeToGlyphId;
  28334. }
  28335. var encoding = cff.encoding ? cff.encoding.encoding : null;
  28336. charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets);
  28337. return charCodeToGlyphId;
  28338. }
  28339. };
  28340. return CFFFont;
  28341. })();
  28342. var CFFParser = (function CFFParserClosure() {
  28343. var CharstringValidationData = [
  28344. null,
  28345. { id: 'hstem', min: 2, resetStack: true, stem: true },
  28346. null,
  28347. { id: 'vstem', min: 2, resetStack: true, stem: true },
  28348. { id: 'vmoveto', min: 1, resetStack: true },
  28349. { id: 'rlineto', min: 2, resetStack: true },
  28350. { id: 'hlineto', min: 1, resetStack: true },
  28351. { id: 'vlineto', min: 1, resetStack: true },
  28352. { id: 'rrcurveto', min: 6, resetStack: true },
  28353. null,
  28354. { id: 'callsubr', min: 1, undefStack: true },
  28355. { id: 'return', min: 0, undefStack: true },
  28356. null, // 12
  28357. null,
  28358. null, // endchar
  28359. null,
  28360. null,
  28361. null,
  28362. { id: 'hstemhm', min: 2, resetStack: true, stem: true },
  28363. null, // hintmask
  28364. null, // cntrmask
  28365. { id: 'rmoveto', min: 2, resetStack: true },
  28366. { id: 'hmoveto', min: 1, resetStack: true },
  28367. { id: 'vstemhm', min: 2, resetStack: true, stem: true },
  28368. { id: 'rcurveline', min: 8, resetStack: true },
  28369. { id: 'rlinecurve', min: 8, resetStack: true },
  28370. { id: 'vvcurveto', min: 4, resetStack: true },
  28371. { id: 'hhcurveto', min: 4, resetStack: true },
  28372. null, // shortint
  28373. { id: 'callgsubr', min: 1, undefStack: true },
  28374. { id: 'vhcurveto', min: 4, resetStack: true },
  28375. { id: 'hvcurveto', min: 4, resetStack: true }
  28376. ];
  28377. var CharstringValidationData12 = [
  28378. null,
  28379. null,
  28380. null,
  28381. { id: 'and', min: 2, stackDelta: -1 },
  28382. { id: 'or', min: 2, stackDelta: -1 },
  28383. { id: 'not', min: 1, stackDelta: 0 },
  28384. null,
  28385. null,
  28386. null,
  28387. { id: 'abs', min: 1, stackDelta: 0 },
  28388. { id: 'add', min: 2, stackDelta: -1,
  28389. stackFn: function stack_div(stack, index) {
  28390. stack[index - 2] = stack[index - 2] + stack[index - 1];
  28391. }
  28392. },
  28393. { id: 'sub', min: 2, stackDelta: -1,
  28394. stackFn: function stack_div(stack, index) {
  28395. stack[index - 2] = stack[index - 2] - stack[index - 1];
  28396. }
  28397. },
  28398. { id: 'div', min: 2, stackDelta: -1,
  28399. stackFn: function stack_div(stack, index) {
  28400. stack[index - 2] = stack[index - 2] / stack[index - 1];
  28401. }
  28402. },
  28403. null,
  28404. { id: 'neg', min: 1, stackDelta: 0,
  28405. stackFn: function stack_div(stack, index) {
  28406. stack[index - 1] = -stack[index - 1];
  28407. }
  28408. },
  28409. { id: 'eq', min: 2, stackDelta: -1 },
  28410. null,
  28411. null,
  28412. { id: 'drop', min: 1, stackDelta: -1 },
  28413. null,
  28414. { id: 'put', min: 2, stackDelta: -2 },
  28415. { id: 'get', min: 1, stackDelta: 0 },
  28416. { id: 'ifelse', min: 4, stackDelta: -3 },
  28417. { id: 'random', min: 0, stackDelta: 1 },
  28418. { id: 'mul', min: 2, stackDelta: -1,
  28419. stackFn: function stack_div(stack, index) {
  28420. stack[index - 2] = stack[index - 2] * stack[index - 1];
  28421. }
  28422. },
  28423. null,
  28424. { id: 'sqrt', min: 1, stackDelta: 0 },
  28425. { id: 'dup', min: 1, stackDelta: 1 },
  28426. { id: 'exch', min: 2, stackDelta: 0 },
  28427. { id: 'index', min: 2, stackDelta: 0 },
  28428. { id: 'roll', min: 3, stackDelta: -2 },
  28429. null,
  28430. null,
  28431. null,
  28432. { id: 'hflex', min: 7, resetStack: true },
  28433. { id: 'flex', min: 13, resetStack: true },
  28434. { id: 'hflex1', min: 9, resetStack: true },
  28435. { id: 'flex1', min: 11, resetStack: true }
  28436. ];
  28437. function CFFParser(file, properties) {
  28438. this.bytes = file.getBytes();
  28439. this.properties = properties;
  28440. }
  28441. CFFParser.prototype = {
  28442. parse: function CFFParser_parse() {
  28443. var properties = this.properties;
  28444. var cff = new CFF();
  28445. this.cff = cff;
  28446. // The first five sections must be in order, all the others are reached
  28447. // via offsets contained in one of the below.
  28448. var header = this.parseHeader();
  28449. var nameIndex = this.parseIndex(header.endPos);
  28450. var topDictIndex = this.parseIndex(nameIndex.endPos);
  28451. var stringIndex = this.parseIndex(topDictIndex.endPos);
  28452. var globalSubrIndex = this.parseIndex(stringIndex.endPos);
  28453. var topDictParsed = this.parseDict(topDictIndex.obj.get(0));
  28454. var topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings);
  28455. cff.header = header.obj;
  28456. cff.names = this.parseNameIndex(nameIndex.obj);
  28457. cff.strings = this.parseStringIndex(stringIndex.obj);
  28458. cff.topDict = topDict;
  28459. cff.globalSubrIndex = globalSubrIndex.obj;
  28460. this.parsePrivateDict(cff.topDict);
  28461. cff.isCIDFont = topDict.hasName('ROS');
  28462. var charStringOffset = topDict.getByName('CharStrings');
  28463. var charStringsAndSeacs = this.parseCharStrings(charStringOffset);
  28464. cff.charStrings = charStringsAndSeacs.charStrings;
  28465. cff.seacs = charStringsAndSeacs.seacs;
  28466. var fontMatrix = topDict.getByName('FontMatrix');
  28467. if (fontMatrix) {
  28468. properties.fontMatrix = fontMatrix;
  28469. }
  28470. var fontBBox = topDict.getByName('FontBBox');
  28471. if (fontBBox) {
  28472. // adjusting ascent/descent
  28473. properties.ascent = fontBBox[3];
  28474. properties.descent = fontBBox[1];
  28475. properties.ascentScaled = true;
  28476. }
  28477. var charset, encoding;
  28478. if (cff.isCIDFont) {
  28479. var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj;
  28480. for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) {
  28481. var dictRaw = fdArrayIndex.get(i);
  28482. var fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw),
  28483. cff.strings);
  28484. this.parsePrivateDict(fontDict);
  28485. cff.fdArray.push(fontDict);
  28486. }
  28487. // cid fonts don't have an encoding
  28488. encoding = null;
  28489. charset = this.parseCharsets(topDict.getByName('charset'),
  28490. cff.charStrings.count, cff.strings, true);
  28491. cff.fdSelect = this.parseFDSelect(topDict.getByName('FDSelect'),
  28492. cff.charStrings.count);
  28493. } else {
  28494. charset = this.parseCharsets(topDict.getByName('charset'),
  28495. cff.charStrings.count, cff.strings, false);
  28496. encoding = this.parseEncoding(topDict.getByName('Encoding'),
  28497. properties,
  28498. cff.strings, charset.charset);
  28499. }
  28500. cff.charset = charset;
  28501. cff.encoding = encoding;
  28502. return cff;
  28503. },
  28504. parseHeader: function CFFParser_parseHeader() {
  28505. var bytes = this.bytes;
  28506. var bytesLength = bytes.length;
  28507. var offset = 0;
  28508. // Prevent an infinite loop, by checking that the offset is within the
  28509. // bounds of the bytes array. Necessary in empty, or invalid, font files.
  28510. while (offset < bytesLength && bytes[offset] !== 1) {
  28511. ++offset;
  28512. }
  28513. if (offset >= bytesLength) {
  28514. error('Invalid CFF header');
  28515. } else if (offset !== 0) {
  28516. info('cff data is shifted');
  28517. bytes = bytes.subarray(offset);
  28518. this.bytes = bytes;
  28519. }
  28520. var major = bytes[0];
  28521. var minor = bytes[1];
  28522. var hdrSize = bytes[2];
  28523. var offSize = bytes[3];
  28524. var header = new CFFHeader(major, minor, hdrSize, offSize);
  28525. return { obj: header, endPos: hdrSize };
  28526. },
  28527. parseDict: function CFFParser_parseDict(dict) {
  28528. var pos = 0;
  28529. function parseOperand() {
  28530. var value = dict[pos++];
  28531. if (value === 30) {
  28532. return parseFloatOperand(pos);
  28533. } else if (value === 28) {
  28534. value = dict[pos++];
  28535. value = ((value << 24) | (dict[pos++] << 16)) >> 16;
  28536. return value;
  28537. } else if (value === 29) {
  28538. value = dict[pos++];
  28539. value = (value << 8) | dict[pos++];
  28540. value = (value << 8) | dict[pos++];
  28541. value = (value << 8) | dict[pos++];
  28542. return value;
  28543. } else if (value >= 32 && value <= 246) {
  28544. return value - 139;
  28545. } else if (value >= 247 && value <= 250) {
  28546. return ((value - 247) * 256) + dict[pos++] + 108;
  28547. } else if (value >= 251 && value <= 254) {
  28548. return -((value - 251) * 256) - dict[pos++] - 108;
  28549. } else {
  28550. error('255 is not a valid DICT command');
  28551. }
  28552. return -1;
  28553. }
  28554. function parseFloatOperand() {
  28555. var str = '';
  28556. var eof = 15;
  28557. var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8',
  28558. '9', '.', 'E', 'E-', null, '-'];
  28559. var length = dict.length;
  28560. while (pos < length) {
  28561. var b = dict[pos++];
  28562. var b1 = b >> 4;
  28563. var b2 = b & 15;
  28564. if (b1 == eof) {
  28565. break;
  28566. }
  28567. str += lookup[b1];
  28568. if (b2 == eof) {
  28569. break;
  28570. }
  28571. str += lookup[b2];
  28572. }
  28573. return parseFloat(str);
  28574. }
  28575. var operands = [];
  28576. var entries = [];
  28577. pos = 0;
  28578. var end = dict.length;
  28579. while (pos < end) {
  28580. var b = dict[pos];
  28581. if (b <= 21) {
  28582. if (b === 12) {
  28583. b = (b << 8) | dict[++pos];
  28584. }
  28585. entries.push([b, operands]);
  28586. operands = [];
  28587. ++pos;
  28588. } else {
  28589. operands.push(parseOperand());
  28590. }
  28591. }
  28592. return entries;
  28593. },
  28594. parseIndex: function CFFParser_parseIndex(pos) {
  28595. var cffIndex = new CFFIndex();
  28596. var bytes = this.bytes;
  28597. var count = (bytes[pos++] << 8) | bytes[pos++];
  28598. var offsets = [];
  28599. var end = pos;
  28600. var i, ii;
  28601. if (count !== 0) {
  28602. var offsetSize = bytes[pos++];
  28603. // add 1 for offset to determine size of last object
  28604. var startPos = pos + ((count + 1) * offsetSize) - 1;
  28605. for (i = 0, ii = count + 1; i < ii; ++i) {
  28606. var offset = 0;
  28607. for (var j = 0; j < offsetSize; ++j) {
  28608. offset <<= 8;
  28609. offset += bytes[pos++];
  28610. }
  28611. offsets.push(startPos + offset);
  28612. }
  28613. end = offsets[count];
  28614. }
  28615. for (i = 0, ii = offsets.length - 1; i < ii; ++i) {
  28616. var offsetStart = offsets[i];
  28617. var offsetEnd = offsets[i + 1];
  28618. cffIndex.add(bytes.subarray(offsetStart, offsetEnd));
  28619. }
  28620. return {obj: cffIndex, endPos: end};
  28621. },
  28622. parseNameIndex: function CFFParser_parseNameIndex(index) {
  28623. var names = [];
  28624. for (var i = 0, ii = index.count; i < ii; ++i) {
  28625. var name = index.get(i);
  28626. // OTS doesn't allow names to be over 127 characters.
  28627. var length = Math.min(name.length, 127);
  28628. var data = [];
  28629. // OTS also only permits certain characters in the name.
  28630. for (var j = 0; j < length; ++j) {
  28631. var c = name[j];
  28632. if (j === 0 && c === 0) {
  28633. data[j] = c;
  28634. continue;
  28635. }
  28636. if ((c < 33 || c > 126) || c === 91 /* [ */ || c === 93 /* ] */ ||
  28637. c === 40 /* ( */ || c === 41 /* ) */ || c === 123 /* { */ ||
  28638. c === 125 /* } */ || c === 60 /* < */ || c === 62 /* > */ ||
  28639. c === 47 /* / */ || c === 37 /* % */ || c === 35 /* # */) {
  28640. data[j] = 95;
  28641. continue;
  28642. }
  28643. data[j] = c;
  28644. }
  28645. names.push(bytesToString(data));
  28646. }
  28647. return names;
  28648. },
  28649. parseStringIndex: function CFFParser_parseStringIndex(index) {
  28650. var strings = new CFFStrings();
  28651. for (var i = 0, ii = index.count; i < ii; ++i) {
  28652. var data = index.get(i);
  28653. strings.add(bytesToString(data));
  28654. }
  28655. return strings;
  28656. },
  28657. createDict: function CFFParser_createDict(Type, dict, strings) {
  28658. var cffDict = new Type(strings);
  28659. for (var i = 0, ii = dict.length; i < ii; ++i) {
  28660. var pair = dict[i];
  28661. var key = pair[0];
  28662. var value = pair[1];
  28663. cffDict.setByKey(key, value);
  28664. }
  28665. return cffDict;
  28666. },
  28667. parseCharStrings: function CFFParser_parseCharStrings(charStringOffset) {
  28668. var charStrings = this.parseIndex(charStringOffset).obj;
  28669. var seacs = [];
  28670. var count = charStrings.count;
  28671. for (var i = 0; i < count; i++) {
  28672. var charstring = charStrings.get(i);
  28673. var stackSize = 0;
  28674. var stack = [];
  28675. var undefStack = true;
  28676. var hints = 0;
  28677. var valid = true;
  28678. var data = charstring;
  28679. var length = data.length;
  28680. for (var j = 0; j < length;) {
  28681. var value = data[j++];
  28682. var validationCommand = null;
  28683. if (value == 12) {
  28684. var q = data[j++];
  28685. if (q === 0) {
  28686. // The CFF specification state that the 'dotsection' command
  28687. // (12, 0) is deprecated and treated as a no-op, but all Type2
  28688. // charstrings processors should support them. Unfortunately
  28689. // the font sanitizer don't. As a workaround the sequence (12, 0)
  28690. // is replaced by a useless (0, hmoveto).
  28691. data[j - 2] = 139;
  28692. data[j - 1] = 22;
  28693. stackSize = 0;
  28694. } else {
  28695. validationCommand = CharstringValidationData12[q];
  28696. }
  28697. } else if (value === 28) { // number (16 bit)
  28698. stack[stackSize] = ((data[j] << 24) | (data[j + 1] << 16)) >> 16;
  28699. j += 2;
  28700. stackSize++;
  28701. } else if (value == 14) {
  28702. if (stackSize >= 4) {
  28703. stackSize -= 4;
  28704. if (SEAC_ANALYSIS_ENABLED) {
  28705. seacs[i] = stack.slice(stackSize, stackSize + 4);
  28706. valid = false;
  28707. }
  28708. }
  28709. } else if (value >= 32 && value <= 246) { // number
  28710. stack[stackSize] = value - 139;
  28711. stackSize++;
  28712. } else if (value >= 247 && value <= 254) { // number (+1 bytes)
  28713. stack[stackSize] = (value < 251 ?
  28714. ((value - 247) << 8) + data[j] + 108 :
  28715. -((value - 251) << 8) - data[j] - 108);
  28716. j++;
  28717. stackSize++;
  28718. } else if (value == 255) { // number (32 bit)
  28719. stack[stackSize] = ((data[j] << 24) | (data[j + 1] << 16) |
  28720. (data[j + 2] << 8) | data[j + 3]) / 65536;
  28721. j += 4;
  28722. stackSize++;
  28723. } else if (value == 19 || value == 20) {
  28724. hints += stackSize >> 1;
  28725. j += (hints + 7) >> 3; // skipping right amount of hints flag data
  28726. stackSize = 0;
  28727. } else {
  28728. validationCommand = CharstringValidationData[value];
  28729. }
  28730. if (validationCommand) {
  28731. if (validationCommand.stem) {
  28732. hints += stackSize >> 1;
  28733. }
  28734. if ('min' in validationCommand) {
  28735. if (!undefStack && stackSize < validationCommand.min) {
  28736. warn('Not enough parameters for ' + validationCommand.id +
  28737. '; actual: ' + stackSize +
  28738. ', expected: ' + validationCommand.min);
  28739. valid = false;
  28740. break;
  28741. }
  28742. }
  28743. if ('stackDelta' in validationCommand) {
  28744. if ('stackFn' in validationCommand) {
  28745. validationCommand.stackFn(stack, stackSize);
  28746. }
  28747. stackSize += validationCommand.stackDelta;
  28748. } else if (validationCommand.resetStack) {
  28749. stackSize = 0;
  28750. undefStack = false;
  28751. } else if (validationCommand.undefStack) {
  28752. stackSize = 0;
  28753. undefStack = true;
  28754. }
  28755. }
  28756. }
  28757. if (!valid) {
  28758. // resetting invalid charstring to single 'endchar'
  28759. charStrings.set(i, new Uint8Array([14]));
  28760. }
  28761. }
  28762. return { charStrings: charStrings, seacs: seacs };
  28763. },
  28764. emptyPrivateDictionary:
  28765. function CFFParser_emptyPrivateDictionary(parentDict) {
  28766. var privateDict = this.createDict(CFFPrivateDict, [],
  28767. parentDict.strings);
  28768. parentDict.setByKey(18, [0, 0]);
  28769. parentDict.privateDict = privateDict;
  28770. },
  28771. parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) {
  28772. // no private dict, do nothing
  28773. if (!parentDict.hasName('Private')) {
  28774. this.emptyPrivateDictionary(parentDict);
  28775. return;
  28776. }
  28777. var privateOffset = parentDict.getByName('Private');
  28778. // make sure the params are formatted correctly
  28779. if (!isArray(privateOffset) || privateOffset.length !== 2) {
  28780. parentDict.removeByName('Private');
  28781. return;
  28782. }
  28783. var size = privateOffset[0];
  28784. var offset = privateOffset[1];
  28785. // remove empty dicts or ones that refer to invalid location
  28786. if (size === 0 || offset >= this.bytes.length) {
  28787. this.emptyPrivateDictionary(parentDict);
  28788. return;
  28789. }
  28790. var privateDictEnd = offset + size;
  28791. var dictData = this.bytes.subarray(offset, privateDictEnd);
  28792. var dict = this.parseDict(dictData);
  28793. var privateDict = this.createDict(CFFPrivateDict, dict,
  28794. parentDict.strings);
  28795. parentDict.privateDict = privateDict;
  28796. // Parse the Subrs index also since it's relative to the private dict.
  28797. if (!privateDict.getByName('Subrs')) {
  28798. return;
  28799. }
  28800. var subrsOffset = privateDict.getByName('Subrs');
  28801. var relativeOffset = offset + subrsOffset;
  28802. // Validate the offset.
  28803. if (subrsOffset === 0 || relativeOffset >= this.bytes.length) {
  28804. this.emptyPrivateDictionary(parentDict);
  28805. return;
  28806. }
  28807. var subrsIndex = this.parseIndex(relativeOffset);
  28808. privateDict.subrsIndex = subrsIndex.obj;
  28809. },
  28810. parseCharsets: function CFFParser_parseCharsets(pos, length, strings, cid) {
  28811. if (pos === 0) {
  28812. return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE,
  28813. ISOAdobeCharset);
  28814. } else if (pos == 1) {
  28815. return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT,
  28816. ExpertCharset);
  28817. } else if (pos == 2) {
  28818. return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET,
  28819. ExpertSubsetCharset);
  28820. }
  28821. var bytes = this.bytes;
  28822. var start = pos;
  28823. var format = bytes[pos++];
  28824. var charset = ['.notdef'];
  28825. var id, count, i;
  28826. // subtract 1 for the .notdef glyph
  28827. length -= 1;
  28828. switch (format) {
  28829. case 0:
  28830. for (i = 0; i < length; i++) {
  28831. id = (bytes[pos++] << 8) | bytes[pos++];
  28832. charset.push(cid ? id : strings.get(id));
  28833. }
  28834. break;
  28835. case 1:
  28836. while (charset.length <= length) {
  28837. id = (bytes[pos++] << 8) | bytes[pos++];
  28838. count = bytes[pos++];
  28839. for (i = 0; i <= count; i++) {
  28840. charset.push(cid ? id++ : strings.get(id++));
  28841. }
  28842. }
  28843. break;
  28844. case 2:
  28845. while (charset.length <= length) {
  28846. id = (bytes[pos++] << 8) | bytes[pos++];
  28847. count = (bytes[pos++] << 8) | bytes[pos++];
  28848. for (i = 0; i <= count; i++) {
  28849. charset.push(cid ? id++ : strings.get(id++));
  28850. }
  28851. }
  28852. break;
  28853. default:
  28854. error('Unknown charset format');
  28855. }
  28856. // Raw won't be needed if we actually compile the charset.
  28857. var end = pos;
  28858. var raw = bytes.subarray(start, end);
  28859. return new CFFCharset(false, format, charset, raw);
  28860. },
  28861. parseEncoding: function CFFParser_parseEncoding(pos,
  28862. properties,
  28863. strings,
  28864. charset) {
  28865. var encoding = {};
  28866. var bytes = this.bytes;
  28867. var predefined = false;
  28868. var hasSupplement = false;
  28869. var format, i, ii;
  28870. var raw = null;
  28871. function readSupplement() {
  28872. var supplementsCount = bytes[pos++];
  28873. for (i = 0; i < supplementsCount; i++) {
  28874. var code = bytes[pos++];
  28875. var sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff);
  28876. encoding[code] = charset.indexOf(strings.get(sid));
  28877. }
  28878. }
  28879. if (pos === 0 || pos == 1) {
  28880. predefined = true;
  28881. format = pos;
  28882. var baseEncoding = pos ? Encodings.ExpertEncoding :
  28883. Encodings.StandardEncoding;
  28884. for (i = 0, ii = charset.length; i < ii; i++) {
  28885. var index = baseEncoding.indexOf(charset[i]);
  28886. if (index != -1) {
  28887. encoding[index] = i;
  28888. }
  28889. }
  28890. } else {
  28891. var dataStart = pos;
  28892. format = bytes[pos++];
  28893. switch (format & 0x7f) {
  28894. case 0:
  28895. var glyphsCount = bytes[pos++];
  28896. for (i = 1; i <= glyphsCount; i++) {
  28897. encoding[bytes[pos++]] = i;
  28898. }
  28899. break;
  28900. case 1:
  28901. var rangesCount = bytes[pos++];
  28902. var gid = 1;
  28903. for (i = 0; i < rangesCount; i++) {
  28904. var start = bytes[pos++];
  28905. var left = bytes[pos++];
  28906. for (var j = start; j <= start + left; j++) {
  28907. encoding[j] = gid++;
  28908. }
  28909. }
  28910. break;
  28911. default:
  28912. error('Unknow encoding format: ' + format + ' in CFF');
  28913. break;
  28914. }
  28915. var dataEnd = pos;
  28916. if (format & 0x80) {
  28917. // The font sanitizer does not support CFF encoding with a
  28918. // supplement, since the encoding is not really used to map
  28919. // between gid to glyph, let's overwrite what is declared in
  28920. // the top dictionary to let the sanitizer think the font use
  28921. // StandardEncoding, that's a lie but that's ok.
  28922. bytes[dataStart] &= 0x7f;
  28923. readSupplement();
  28924. hasSupplement = true;
  28925. }
  28926. raw = bytes.subarray(dataStart, dataEnd);
  28927. }
  28928. format = format & 0x7f;
  28929. return new CFFEncoding(predefined, format, encoding, raw);
  28930. },
  28931. parseFDSelect: function CFFParser_parseFDSelect(pos, length) {
  28932. var start = pos;
  28933. var bytes = this.bytes;
  28934. var format = bytes[pos++];
  28935. var fdSelect = [];
  28936. var i;
  28937. switch (format) {
  28938. case 0:
  28939. for (i = 0; i < length; ++i) {
  28940. var id = bytes[pos++];
  28941. fdSelect.push(id);
  28942. }
  28943. break;
  28944. case 3:
  28945. var rangesCount = (bytes[pos++] << 8) | bytes[pos++];
  28946. for (i = 0; i < rangesCount; ++i) {
  28947. var first = (bytes[pos++] << 8) | bytes[pos++];
  28948. var fdIndex = bytes[pos++];
  28949. var next = (bytes[pos] << 8) | bytes[pos + 1];
  28950. for (var j = first; j < next; ++j) {
  28951. fdSelect.push(fdIndex);
  28952. }
  28953. }
  28954. // Advance past the sentinel(next).
  28955. pos += 2;
  28956. break;
  28957. default:
  28958. error('Unknown fdselect format ' + format);
  28959. break;
  28960. }
  28961. var end = pos;
  28962. return new CFFFDSelect(fdSelect, bytes.subarray(start, end));
  28963. }
  28964. };
  28965. return CFFParser;
  28966. })();
  28967. // Compact Font Format
  28968. var CFF = (function CFFClosure() {
  28969. function CFF() {
  28970. this.header = null;
  28971. this.names = [];
  28972. this.topDict = null;
  28973. this.strings = new CFFStrings();
  28974. this.globalSubrIndex = null;
  28975. // The following could really be per font, but since we only have one font
  28976. // store them here.
  28977. this.encoding = null;
  28978. this.charset = null;
  28979. this.charStrings = null;
  28980. this.fdArray = [];
  28981. this.fdSelect = null;
  28982. this.isCIDFont = false;
  28983. }
  28984. return CFF;
  28985. })();
  28986. var CFFHeader = (function CFFHeaderClosure() {
  28987. function CFFHeader(major, minor, hdrSize, offSize) {
  28988. this.major = major;
  28989. this.minor = minor;
  28990. this.hdrSize = hdrSize;
  28991. this.offSize = offSize;
  28992. }
  28993. return CFFHeader;
  28994. })();
  28995. var CFFStrings = (function CFFStringsClosure() {
  28996. function CFFStrings() {
  28997. this.strings = [];
  28998. }
  28999. CFFStrings.prototype = {
  29000. get: function CFFStrings_get(index) {
  29001. if (index >= 0 && index <= 390) {
  29002. return CFFStandardStrings[index];
  29003. }
  29004. if (index - 391 <= this.strings.length) {
  29005. return this.strings[index - 391];
  29006. }
  29007. return CFFStandardStrings[0];
  29008. },
  29009. add: function CFFStrings_add(value) {
  29010. this.strings.push(value);
  29011. },
  29012. get count() {
  29013. return this.strings.length;
  29014. }
  29015. };
  29016. return CFFStrings;
  29017. })();
  29018. var CFFIndex = (function CFFIndexClosure() {
  29019. function CFFIndex() {
  29020. this.objects = [];
  29021. this.length = 0;
  29022. }
  29023. CFFIndex.prototype = {
  29024. add: function CFFIndex_add(data) {
  29025. this.length += data.length;
  29026. this.objects.push(data);
  29027. },
  29028. set: function CFFIndex_set(index, data) {
  29029. this.length += data.length - this.objects[index].length;
  29030. this.objects[index] = data;
  29031. },
  29032. get: function CFFIndex_get(index) {
  29033. return this.objects[index];
  29034. },
  29035. get count() {
  29036. return this.objects.length;
  29037. }
  29038. };
  29039. return CFFIndex;
  29040. })();
  29041. var CFFDict = (function CFFDictClosure() {
  29042. function CFFDict(tables, strings) {
  29043. this.keyToNameMap = tables.keyToNameMap;
  29044. this.nameToKeyMap = tables.nameToKeyMap;
  29045. this.defaults = tables.defaults;
  29046. this.types = tables.types;
  29047. this.opcodes = tables.opcodes;
  29048. this.order = tables.order;
  29049. this.strings = strings;
  29050. this.values = {};
  29051. }
  29052. CFFDict.prototype = {
  29053. // value should always be an array
  29054. setByKey: function CFFDict_setByKey(key, value) {
  29055. if (!(key in this.keyToNameMap)) {
  29056. return false;
  29057. }
  29058. // ignore empty values
  29059. if (value.length === 0) {
  29060. return true;
  29061. }
  29062. var type = this.types[key];
  29063. // remove the array wrapping these types of values
  29064. if (type === 'num' || type === 'sid' || type === 'offset') {
  29065. value = value[0];
  29066. }
  29067. this.values[key] = value;
  29068. return true;
  29069. },
  29070. setByName: function CFFDict_setByName(name, value) {
  29071. if (!(name in this.nameToKeyMap)) {
  29072. error('Invalid dictionary name "' + name + '"');
  29073. }
  29074. this.values[this.nameToKeyMap[name]] = value;
  29075. },
  29076. hasName: function CFFDict_hasName(name) {
  29077. return this.nameToKeyMap[name] in this.values;
  29078. },
  29079. getByName: function CFFDict_getByName(name) {
  29080. if (!(name in this.nameToKeyMap)) {
  29081. error('Invalid dictionary name "' + name + '"');
  29082. }
  29083. var key = this.nameToKeyMap[name];
  29084. if (!(key in this.values)) {
  29085. return this.defaults[key];
  29086. }
  29087. return this.values[key];
  29088. },
  29089. removeByName: function CFFDict_removeByName(name) {
  29090. delete this.values[this.nameToKeyMap[name]];
  29091. }
  29092. };
  29093. CFFDict.createTables = function CFFDict_createTables(layout) {
  29094. var tables = {
  29095. keyToNameMap: {},
  29096. nameToKeyMap: {},
  29097. defaults: {},
  29098. types: {},
  29099. opcodes: {},
  29100. order: []
  29101. };
  29102. for (var i = 0, ii = layout.length; i < ii; ++i) {
  29103. var entry = layout[i];
  29104. var key = isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0];
  29105. tables.keyToNameMap[key] = entry[1];
  29106. tables.nameToKeyMap[entry[1]] = key;
  29107. tables.types[key] = entry[2];
  29108. tables.defaults[key] = entry[3];
  29109. tables.opcodes[key] = isArray(entry[0]) ? entry[0] : [entry[0]];
  29110. tables.order.push(key);
  29111. }
  29112. return tables;
  29113. };
  29114. return CFFDict;
  29115. })();
  29116. var CFFTopDict = (function CFFTopDictClosure() {
  29117. var layout = [
  29118. [[12, 30], 'ROS', ['sid', 'sid', 'num'], null],
  29119. [[12, 20], 'SyntheticBase', 'num', null],
  29120. [0, 'version', 'sid', null],
  29121. [1, 'Notice', 'sid', null],
  29122. [[12, 0], 'Copyright', 'sid', null],
  29123. [2, 'FullName', 'sid', null],
  29124. [3, 'FamilyName', 'sid', null],
  29125. [4, 'Weight', 'sid', null],
  29126. [[12, 1], 'isFixedPitch', 'num', 0],
  29127. [[12, 2], 'ItalicAngle', 'num', 0],
  29128. [[12, 3], 'UnderlinePosition', 'num', -100],
  29129. [[12, 4], 'UnderlineThickness', 'num', 50],
  29130. [[12, 5], 'PaintType', 'num', 0],
  29131. [[12, 6], 'CharstringType', 'num', 2],
  29132. [[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'],
  29133. [0.001, 0, 0, 0.001, 0, 0]],
  29134. [13, 'UniqueID', 'num', null],
  29135. [5, 'FontBBox', ['num', 'num', 'num', 'num'], [0, 0, 0, 0]],
  29136. [[12, 8], 'StrokeWidth', 'num', 0],
  29137. [14, 'XUID', 'array', null],
  29138. [15, 'charset', 'offset', 0],
  29139. [16, 'Encoding', 'offset', 0],
  29140. [17, 'CharStrings', 'offset', 0],
  29141. [18, 'Private', ['offset', 'offset'], null],
  29142. [[12, 21], 'PostScript', 'sid', null],
  29143. [[12, 22], 'BaseFontName', 'sid', null],
  29144. [[12, 23], 'BaseFontBlend', 'delta', null],
  29145. [[12, 31], 'CIDFontVersion', 'num', 0],
  29146. [[12, 32], 'CIDFontRevision', 'num', 0],
  29147. [[12, 33], 'CIDFontType', 'num', 0],
  29148. [[12, 34], 'CIDCount', 'num', 8720],
  29149. [[12, 35], 'UIDBase', 'num', null],
  29150. // XXX: CID Fonts on DirectWrite 6.1 only seem to work if FDSelect comes
  29151. // before FDArray.
  29152. [[12, 37], 'FDSelect', 'offset', null],
  29153. [[12, 36], 'FDArray', 'offset', null],
  29154. [[12, 38], 'FontName', 'sid', null]
  29155. ];
  29156. var tables = null;
  29157. function CFFTopDict(strings) {
  29158. if (tables === null) {
  29159. tables = CFFDict.createTables(layout);
  29160. }
  29161. CFFDict.call(this, tables, strings);
  29162. this.privateDict = null;
  29163. }
  29164. CFFTopDict.prototype = Object.create(CFFDict.prototype);
  29165. return CFFTopDict;
  29166. })();
  29167. var CFFPrivateDict = (function CFFPrivateDictClosure() {
  29168. var layout = [
  29169. [6, 'BlueValues', 'delta', null],
  29170. [7, 'OtherBlues', 'delta', null],
  29171. [8, 'FamilyBlues', 'delta', null],
  29172. [9, 'FamilyOtherBlues', 'delta', null],
  29173. [[12, 9], 'BlueScale', 'num', 0.039625],
  29174. [[12, 10], 'BlueShift', 'num', 7],
  29175. [[12, 11], 'BlueFuzz', 'num', 1],
  29176. [10, 'StdHW', 'num', null],
  29177. [11, 'StdVW', 'num', null],
  29178. [[12, 12], 'StemSnapH', 'delta', null],
  29179. [[12, 13], 'StemSnapV', 'delta', null],
  29180. [[12, 14], 'ForceBold', 'num', 0],
  29181. [[12, 17], 'LanguageGroup', 'num', 0],
  29182. [[12, 18], 'ExpansionFactor', 'num', 0.06],
  29183. [[12, 19], 'initialRandomSeed', 'num', 0],
  29184. [20, 'defaultWidthX', 'num', 0],
  29185. [21, 'nominalWidthX', 'num', 0],
  29186. [19, 'Subrs', 'offset', null]
  29187. ];
  29188. var tables = null;
  29189. function CFFPrivateDict(strings) {
  29190. if (tables === null) {
  29191. tables = CFFDict.createTables(layout);
  29192. }
  29193. CFFDict.call(this, tables, strings);
  29194. this.subrsIndex = null;
  29195. }
  29196. CFFPrivateDict.prototype = Object.create(CFFDict.prototype);
  29197. return CFFPrivateDict;
  29198. })();
  29199. var CFFCharsetPredefinedTypes = {
  29200. ISO_ADOBE: 0,
  29201. EXPERT: 1,
  29202. EXPERT_SUBSET: 2
  29203. };
  29204. var CFFCharset = (function CFFCharsetClosure() {
  29205. function CFFCharset(predefined, format, charset, raw) {
  29206. this.predefined = predefined;
  29207. this.format = format;
  29208. this.charset = charset;
  29209. this.raw = raw;
  29210. }
  29211. return CFFCharset;
  29212. })();
  29213. var CFFEncoding = (function CFFEncodingClosure() {
  29214. function CFFEncoding(predefined, format, encoding, raw) {
  29215. this.predefined = predefined;
  29216. this.format = format;
  29217. this.encoding = encoding;
  29218. this.raw = raw;
  29219. }
  29220. return CFFEncoding;
  29221. })();
  29222. var CFFFDSelect = (function CFFFDSelectClosure() {
  29223. function CFFFDSelect(fdSelect, raw) {
  29224. this.fdSelect = fdSelect;
  29225. this.raw = raw;
  29226. }
  29227. return CFFFDSelect;
  29228. })();
  29229. // Helper class to keep track of where an offset is within the data and helps
  29230. // filling in that offset once it's known.
  29231. var CFFOffsetTracker = (function CFFOffsetTrackerClosure() {
  29232. function CFFOffsetTracker() {
  29233. this.offsets = {};
  29234. }
  29235. CFFOffsetTracker.prototype = {
  29236. isTracking: function CFFOffsetTracker_isTracking(key) {
  29237. return key in this.offsets;
  29238. },
  29239. track: function CFFOffsetTracker_track(key, location) {
  29240. if (key in this.offsets) {
  29241. error('Already tracking location of ' + key);
  29242. }
  29243. this.offsets[key] = location;
  29244. },
  29245. offset: function CFFOffsetTracker_offset(value) {
  29246. for (var key in this.offsets) {
  29247. this.offsets[key] += value;
  29248. }
  29249. },
  29250. setEntryLocation: function CFFOffsetTracker_setEntryLocation(key,
  29251. values,
  29252. output) {
  29253. if (!(key in this.offsets)) {
  29254. error('Not tracking location of ' + key);
  29255. }
  29256. var data = output.data;
  29257. var dataOffset = this.offsets[key];
  29258. var size = 5;
  29259. for (var i = 0, ii = values.length; i < ii; ++i) {
  29260. var offset0 = i * size + dataOffset;
  29261. var offset1 = offset0 + 1;
  29262. var offset2 = offset0 + 2;
  29263. var offset3 = offset0 + 3;
  29264. var offset4 = offset0 + 4;
  29265. // It's easy to screw up offsets so perform this sanity check.
  29266. if (data[offset0] !== 0x1d || data[offset1] !== 0 ||
  29267. data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) {
  29268. error('writing to an offset that is not empty');
  29269. }
  29270. var value = values[i];
  29271. data[offset0] = 0x1d;
  29272. data[offset1] = (value >> 24) & 0xFF;
  29273. data[offset2] = (value >> 16) & 0xFF;
  29274. data[offset3] = (value >> 8) & 0xFF;
  29275. data[offset4] = value & 0xFF;
  29276. }
  29277. }
  29278. };
  29279. return CFFOffsetTracker;
  29280. })();
  29281. // Takes a CFF and converts it to the binary representation.
  29282. var CFFCompiler = (function CFFCompilerClosure() {
  29283. function CFFCompiler(cff) {
  29284. this.cff = cff;
  29285. }
  29286. CFFCompiler.prototype = {
  29287. compile: function CFFCompiler_compile() {
  29288. var cff = this.cff;
  29289. var output = {
  29290. data: [],
  29291. length: 0,
  29292. add: function CFFCompiler_add(data) {
  29293. this.data = this.data.concat(data);
  29294. this.length = this.data.length;
  29295. }
  29296. };
  29297. // Compile the five entries that must be in order.
  29298. var header = this.compileHeader(cff.header);
  29299. output.add(header);
  29300. var nameIndex = this.compileNameIndex(cff.names);
  29301. output.add(nameIndex);
  29302. if (cff.isCIDFont) {
  29303. // The spec is unclear on how font matrices should relate to each other
  29304. // when there is one in the main top dict and the sub top dicts.
  29305. // Windows handles this differently than linux and osx so we have to
  29306. // normalize to work on all.
  29307. // Rules based off of some mailing list discussions:
  29308. // - If main font has a matrix and subfont doesn't, use the main matrix.
  29309. // - If no main font matrix and there is a subfont matrix, use the
  29310. // subfont matrix.
  29311. // - If both have matrices, concat together.
  29312. // - If neither have matrices, use default.
  29313. // To make this work on all platforms we move the top matrix into each
  29314. // sub top dict and concat if necessary.
  29315. if (cff.topDict.hasName('FontMatrix')) {
  29316. var base = cff.topDict.getByName('FontMatrix');
  29317. cff.topDict.removeByName('FontMatrix');
  29318. for (var i = 0, ii = cff.fdArray.length; i < ii; i++) {
  29319. var subDict = cff.fdArray[i];
  29320. var matrix = base.slice(0);
  29321. if (subDict.hasName('FontMatrix')) {
  29322. matrix = Util.transform(matrix, subDict.getByName('FontMatrix'));
  29323. }
  29324. subDict.setByName('FontMatrix', matrix);
  29325. }
  29326. }
  29327. }
  29328. var compiled = this.compileTopDicts([cff.topDict],
  29329. output.length,
  29330. cff.isCIDFont);
  29331. output.add(compiled.output);
  29332. var topDictTracker = compiled.trackers[0];
  29333. var stringIndex = this.compileStringIndex(cff.strings.strings);
  29334. output.add(stringIndex);
  29335. var globalSubrIndex = this.compileIndex(cff.globalSubrIndex);
  29336. output.add(globalSubrIndex);
  29337. // Now start on the other entries that have no specfic order.
  29338. if (cff.encoding && cff.topDict.hasName('Encoding')) {
  29339. if (cff.encoding.predefined) {
  29340. topDictTracker.setEntryLocation('Encoding', [cff.encoding.format],
  29341. output);
  29342. } else {
  29343. var encoding = this.compileEncoding(cff.encoding);
  29344. topDictTracker.setEntryLocation('Encoding', [output.length], output);
  29345. output.add(encoding);
  29346. }
  29347. }
  29348. if (cff.charset && cff.topDict.hasName('charset')) {
  29349. if (cff.charset.predefined) {
  29350. topDictTracker.setEntryLocation('charset', [cff.charset.format],
  29351. output);
  29352. } else {
  29353. var charset = this.compileCharset(cff.charset);
  29354. topDictTracker.setEntryLocation('charset', [output.length], output);
  29355. output.add(charset);
  29356. }
  29357. }
  29358. var charStrings = this.compileCharStrings(cff.charStrings);
  29359. topDictTracker.setEntryLocation('CharStrings', [output.length], output);
  29360. output.add(charStrings);
  29361. if (cff.isCIDFont) {
  29362. // For some reason FDSelect must be in front of FDArray on windows. OSX
  29363. // and linux don't seem to care.
  29364. topDictTracker.setEntryLocation('FDSelect', [output.length], output);
  29365. var fdSelect = this.compileFDSelect(cff.fdSelect.raw);
  29366. output.add(fdSelect);
  29367. // It is unclear if the sub font dictionary can have CID related
  29368. // dictionary keys, but the sanitizer doesn't like them so remove them.
  29369. compiled = this.compileTopDicts(cff.fdArray, output.length, true);
  29370. topDictTracker.setEntryLocation('FDArray', [output.length], output);
  29371. output.add(compiled.output);
  29372. var fontDictTrackers = compiled.trackers;
  29373. this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output);
  29374. }
  29375. this.compilePrivateDicts([cff.topDict], [topDictTracker], output);
  29376. // If the font data ends with INDEX whose object data is zero-length,
  29377. // the sanitizer will bail out. Add a dummy byte to avoid that.
  29378. output.add([0]);
  29379. return output.data;
  29380. },
  29381. encodeNumber: function CFFCompiler_encodeNumber(value) {
  29382. if (parseFloat(value) == parseInt(value, 10) && !isNaN(value)) { // isInt
  29383. return this.encodeInteger(value);
  29384. } else {
  29385. return this.encodeFloat(value);
  29386. }
  29387. },
  29388. encodeFloat: function CFFCompiler_encodeFloat(num) {
  29389. var value = num.toString();
  29390. // rounding inaccurate doubles
  29391. var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value);
  29392. if (m) {
  29393. var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));
  29394. value = (Math.round(num * epsilon) / epsilon).toString();
  29395. }
  29396. var nibbles = '';
  29397. var i, ii;
  29398. for (i = 0, ii = value.length; i < ii; ++i) {
  29399. var a = value[i];
  29400. if (a === 'e') {
  29401. nibbles += value[++i] === '-' ? 'c' : 'b';
  29402. } else if (a === '.') {
  29403. nibbles += 'a';
  29404. } else if (a === '-') {
  29405. nibbles += 'e';
  29406. } else {
  29407. nibbles += a;
  29408. }
  29409. }
  29410. nibbles += (nibbles.length & 1) ? 'f' : 'ff';
  29411. var out = [30];
  29412. for (i = 0, ii = nibbles.length; i < ii; i += 2) {
  29413. out.push(parseInt(nibbles.substr(i, 2), 16));
  29414. }
  29415. return out;
  29416. },
  29417. encodeInteger: function CFFCompiler_encodeInteger(value) {
  29418. var code;
  29419. if (value >= -107 && value <= 107) {
  29420. code = [value + 139];
  29421. } else if (value >= 108 && value <= 1131) {
  29422. value = [value - 108];
  29423. code = [(value >> 8) + 247, value & 0xFF];
  29424. } else if (value >= -1131 && value <= -108) {
  29425. value = -value - 108;
  29426. code = [(value >> 8) + 251, value & 0xFF];
  29427. } else if (value >= -32768 && value <= 32767) {
  29428. code = [0x1c, (value >> 8) & 0xFF, value & 0xFF];
  29429. } else {
  29430. code = [0x1d,
  29431. (value >> 24) & 0xFF,
  29432. (value >> 16) & 0xFF,
  29433. (value >> 8) & 0xFF,
  29434. value & 0xFF];
  29435. }
  29436. return code;
  29437. },
  29438. compileHeader: function CFFCompiler_compileHeader(header) {
  29439. return [
  29440. header.major,
  29441. header.minor,
  29442. header.hdrSize,
  29443. header.offSize
  29444. ];
  29445. },
  29446. compileNameIndex: function CFFCompiler_compileNameIndex(names) {
  29447. var nameIndex = new CFFIndex();
  29448. for (var i = 0, ii = names.length; i < ii; ++i) {
  29449. nameIndex.add(stringToArray(names[i]));
  29450. }
  29451. return this.compileIndex(nameIndex);
  29452. },
  29453. compileTopDicts: function CFFCompiler_compileTopDicts(dicts,
  29454. length,
  29455. removeCidKeys) {
  29456. var fontDictTrackers = [];
  29457. var fdArrayIndex = new CFFIndex();
  29458. for (var i = 0, ii = dicts.length; i < ii; ++i) {
  29459. var fontDict = dicts[i];
  29460. if (removeCidKeys) {
  29461. fontDict.removeByName('CIDFontVersion');
  29462. fontDict.removeByName('CIDFontRevision');
  29463. fontDict.removeByName('CIDFontType');
  29464. fontDict.removeByName('CIDCount');
  29465. fontDict.removeByName('UIDBase');
  29466. }
  29467. var fontDictTracker = new CFFOffsetTracker();
  29468. var fontDictData = this.compileDict(fontDict, fontDictTracker);
  29469. fontDictTrackers.push(fontDictTracker);
  29470. fdArrayIndex.add(fontDictData);
  29471. fontDictTracker.offset(length);
  29472. }
  29473. fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers);
  29474. return {
  29475. trackers: fontDictTrackers,
  29476. output: fdArrayIndex
  29477. };
  29478. },
  29479. compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts,
  29480. trackers,
  29481. output) {
  29482. for (var i = 0, ii = dicts.length; i < ii; ++i) {
  29483. var fontDict = dicts[i];
  29484. assert(fontDict.privateDict && fontDict.hasName('Private'),
  29485. 'There must be an private dictionary.');
  29486. var privateDict = fontDict.privateDict;
  29487. var privateDictTracker = new CFFOffsetTracker();
  29488. var privateDictData = this.compileDict(privateDict, privateDictTracker);
  29489. var outputLength = output.length;
  29490. privateDictTracker.offset(outputLength);
  29491. if (!privateDictData.length) {
  29492. // The private dictionary was empty, set the output length to zero to
  29493. // ensure the offset length isn't out of bounds in the eyes of the
  29494. // sanitizer.
  29495. outputLength = 0;
  29496. }
  29497. trackers[i].setEntryLocation('Private',
  29498. [privateDictData.length, outputLength],
  29499. output);
  29500. output.add(privateDictData);
  29501. if (privateDict.subrsIndex && privateDict.hasName('Subrs')) {
  29502. var subrs = this.compileIndex(privateDict.subrsIndex);
  29503. privateDictTracker.setEntryLocation('Subrs', [privateDictData.length],
  29504. output);
  29505. output.add(subrs);
  29506. }
  29507. }
  29508. },
  29509. compileDict: function CFFCompiler_compileDict(dict, offsetTracker) {
  29510. var out = [];
  29511. // The dictionary keys must be in a certain order.
  29512. var order = dict.order;
  29513. for (var i = 0; i < order.length; ++i) {
  29514. var key = order[i];
  29515. if (!(key in dict.values)) {
  29516. continue;
  29517. }
  29518. var values = dict.values[key];
  29519. var types = dict.types[key];
  29520. if (!isArray(types)) {
  29521. types = [types];
  29522. }
  29523. if (!isArray(values)) {
  29524. values = [values];
  29525. }
  29526. // Remove any empty dict values.
  29527. if (values.length === 0) {
  29528. continue;
  29529. }
  29530. for (var j = 0, jj = types.length; j < jj; ++j) {
  29531. var type = types[j];
  29532. var value = values[j];
  29533. switch (type) {
  29534. case 'num':
  29535. case 'sid':
  29536. out = out.concat(this.encodeNumber(value));
  29537. break;
  29538. case 'offset':
  29539. // For offsets we just insert a 32bit integer so we don't have to
  29540. // deal with figuring out the length of the offset when it gets
  29541. // replaced later on by the compiler.
  29542. var name = dict.keyToNameMap[key];
  29543. // Some offsets have the offset and the length, so just record the
  29544. // position of the first one.
  29545. if (!offsetTracker.isTracking(name)) {
  29546. offsetTracker.track(name, out.length);
  29547. }
  29548. out = out.concat([0x1d, 0, 0, 0, 0]);
  29549. break;
  29550. case 'array':
  29551. case 'delta':
  29552. out = out.concat(this.encodeNumber(value));
  29553. for (var k = 1, kk = values.length; k < kk; ++k) {
  29554. out = out.concat(this.encodeNumber(values[k]));
  29555. }
  29556. break;
  29557. default:
  29558. error('Unknown data type of ' + type);
  29559. break;
  29560. }
  29561. }
  29562. out = out.concat(dict.opcodes[key]);
  29563. }
  29564. return out;
  29565. },
  29566. compileStringIndex: function CFFCompiler_compileStringIndex(strings) {
  29567. var stringIndex = new CFFIndex();
  29568. for (var i = 0, ii = strings.length; i < ii; ++i) {
  29569. stringIndex.add(stringToArray(strings[i]));
  29570. }
  29571. return this.compileIndex(stringIndex);
  29572. },
  29573. compileGlobalSubrIndex: function CFFCompiler_compileGlobalSubrIndex() {
  29574. var globalSubrIndex = this.cff.globalSubrIndex;
  29575. this.out.writeByteArray(this.compileIndex(globalSubrIndex));
  29576. },
  29577. compileCharStrings: function CFFCompiler_compileCharStrings(charStrings) {
  29578. return this.compileIndex(charStrings);
  29579. },
  29580. compileCharset: function CFFCompiler_compileCharset(charset) {
  29581. return this.compileTypedArray(charset.raw);
  29582. },
  29583. compileEncoding: function CFFCompiler_compileEncoding(encoding) {
  29584. return this.compileTypedArray(encoding.raw);
  29585. },
  29586. compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) {
  29587. return this.compileTypedArray(fdSelect);
  29588. },
  29589. compileTypedArray: function CFFCompiler_compileTypedArray(data) {
  29590. var out = [];
  29591. for (var i = 0, ii = data.length; i < ii; ++i) {
  29592. out[i] = data[i];
  29593. }
  29594. return out;
  29595. },
  29596. compileIndex: function CFFCompiler_compileIndex(index, trackers) {
  29597. trackers = trackers || [];
  29598. var objects = index.objects;
  29599. // First 2 bytes contains the number of objects contained into this index
  29600. var count = objects.length;
  29601. // If there is no object, just create an index. This technically
  29602. // should just be [0, 0] but OTS has an issue with that.
  29603. if (count === 0) {
  29604. return [0, 0, 0];
  29605. }
  29606. var data = [(count >> 8) & 0xFF, count & 0xff];
  29607. var lastOffset = 1, i;
  29608. for (i = 0; i < count; ++i) {
  29609. lastOffset += objects[i].length;
  29610. }
  29611. var offsetSize;
  29612. if (lastOffset < 0x100) {
  29613. offsetSize = 1;
  29614. } else if (lastOffset < 0x10000) {
  29615. offsetSize = 2;
  29616. } else if (lastOffset < 0x1000000) {
  29617. offsetSize = 3;
  29618. } else {
  29619. offsetSize = 4;
  29620. }
  29621. // Next byte contains the offset size use to reference object in the file
  29622. data.push(offsetSize);
  29623. // Add another offset after this one because we need a new offset
  29624. var relativeOffset = 1;
  29625. for (i = 0; i < count + 1; i++) {
  29626. if (offsetSize === 1) {
  29627. data.push(relativeOffset & 0xFF);
  29628. } else if (offsetSize === 2) {
  29629. data.push((relativeOffset >> 8) & 0xFF,
  29630. relativeOffset & 0xFF);
  29631. } else if (offsetSize === 3) {
  29632. data.push((relativeOffset >> 16) & 0xFF,
  29633. (relativeOffset >> 8) & 0xFF,
  29634. relativeOffset & 0xFF);
  29635. } else {
  29636. data.push((relativeOffset >>> 24) & 0xFF,
  29637. (relativeOffset >> 16) & 0xFF,
  29638. (relativeOffset >> 8) & 0xFF,
  29639. relativeOffset & 0xFF);
  29640. }
  29641. if (objects[i]) {
  29642. relativeOffset += objects[i].length;
  29643. }
  29644. }
  29645. for (i = 0; i < count; i++) {
  29646. // Notify the tracker where the object will be offset in the data.
  29647. if (trackers[i]) {
  29648. trackers[i].offset(data.length);
  29649. }
  29650. for (var j = 0, jj = objects[i].length; j < jj; j++) {
  29651. data.push(objects[i][j]);
  29652. }
  29653. }
  29654. return data;
  29655. }
  29656. };
  29657. return CFFCompiler;
  29658. })();
  29659. // Workaround for seac on Windows.
  29660. (function checkSeacSupport() {
  29661. if (/Windows/.test(navigator.userAgent)) {
  29662. SEAC_ANALYSIS_ENABLED = true;
  29663. }
  29664. })();
  29665. // Workaround for Private Use Area characters in Chrome on Windows
  29666. // http://code.google.com/p/chromium/issues/detail?id=122465
  29667. // https://github.com/mozilla/pdf.js/issues/1689
  29668. (function checkChromeWindows() {
  29669. if (/Windows.*Chrome/.test(navigator.userAgent)) {
  29670. SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = true;
  29671. }
  29672. })();
  29673. var FontRendererFactory = (function FontRendererFactoryClosure() {
  29674. function getLong(data, offset) {
  29675. return (data[offset] << 24) | (data[offset + 1] << 16) |
  29676. (data[offset + 2] << 8) | data[offset + 3];
  29677. }
  29678. function getUshort(data, offset) {
  29679. return (data[offset] << 8) | data[offset + 1];
  29680. }
  29681. function parseCmap(data, start, end) {
  29682. var offset = (getUshort(data, start + 2) === 1 ?
  29683. getLong(data, start + 8) : getLong(data, start + 16));
  29684. var format = getUshort(data, start + offset);
  29685. var length, ranges, p, i;
  29686. if (format === 4) {
  29687. length = getUshort(data, start + offset + 2);
  29688. var segCount = getUshort(data, start + offset + 6) >> 1;
  29689. p = start + offset + 14;
  29690. ranges = [];
  29691. for (i = 0; i < segCount; i++, p += 2) {
  29692. ranges[i] = {end: getUshort(data, p)};
  29693. }
  29694. p += 2;
  29695. for (i = 0; i < segCount; i++, p += 2) {
  29696. ranges[i].start = getUshort(data, p);
  29697. }
  29698. for (i = 0; i < segCount; i++, p += 2) {
  29699. ranges[i].idDelta = getUshort(data, p);
  29700. }
  29701. for (i = 0; i < segCount; i++, p += 2) {
  29702. var idOffset = getUshort(data, p);
  29703. if (idOffset === 0) {
  29704. continue;
  29705. }
  29706. ranges[i].ids = [];
  29707. for (var j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) {
  29708. ranges[i].ids[j] = getUshort(data, p + idOffset);
  29709. idOffset += 2;
  29710. }
  29711. }
  29712. return ranges;
  29713. } else if (format === 12) {
  29714. length = getLong(data, start + offset + 4);
  29715. var groups = getLong(data, start + offset + 12);
  29716. p = start + offset + 16;
  29717. ranges = [];
  29718. for (i = 0; i < groups; i++) {
  29719. ranges.push({
  29720. start: getLong(data, p),
  29721. end: getLong(data, p + 4),
  29722. idDelta: getLong(data, p + 8) - getLong(data, p)
  29723. });
  29724. p += 12;
  29725. }
  29726. return ranges;
  29727. }
  29728. error('not supported cmap: ' + format);
  29729. }
  29730. function parseCff(data, start, end) {
  29731. var properties = {};
  29732. var parser = new CFFParser(new Stream(data, start, end - start),
  29733. properties);
  29734. var cff = parser.parse();
  29735. return {
  29736. glyphs: cff.charStrings.objects,
  29737. subrs: (cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex &&
  29738. cff.topDict.privateDict.subrsIndex.objects),
  29739. gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects
  29740. };
  29741. }
  29742. function parseGlyfTable(glyf, loca, isGlyphLocationsLong) {
  29743. var itemSize, itemDecode;
  29744. if (isGlyphLocationsLong) {
  29745. itemSize = 4;
  29746. itemDecode = function fontItemDecodeLong(data, offset) {
  29747. return (data[offset] << 24) | (data[offset + 1] << 16) |
  29748. (data[offset + 2] << 8) | data[offset + 3];
  29749. };
  29750. } else {
  29751. itemSize = 2;
  29752. itemDecode = function fontItemDecode(data, offset) {
  29753. return (data[offset] << 9) | (data[offset + 1] << 1);
  29754. };
  29755. }
  29756. var glyphs = [];
  29757. var startOffset = itemDecode(loca, 0);
  29758. for (var j = itemSize; j < loca.length; j += itemSize) {
  29759. var endOffset = itemDecode(loca, j);
  29760. glyphs.push(glyf.subarray(startOffset, endOffset));
  29761. startOffset = endOffset;
  29762. }
  29763. return glyphs;
  29764. }
  29765. function lookupCmap(ranges, unicode) {
  29766. var code = unicode.charCodeAt(0);
  29767. var l = 0, r = ranges.length - 1;
  29768. while (l < r) {
  29769. var c = (l + r + 1) >> 1;
  29770. if (code < ranges[c].start) {
  29771. r = c - 1;
  29772. } else {
  29773. l = c;
  29774. }
  29775. }
  29776. if (ranges[l].start <= code && code <= ranges[l].end) {
  29777. return (ranges[l].idDelta + (ranges[l].ids ?
  29778. ranges[l].ids[code - ranges[l].start] : code)) & 0xFFFF;
  29779. }
  29780. return 0;
  29781. }
  29782. function compileGlyf(code, js, font) {
  29783. function moveTo(x, y) {
  29784. js.push('c.moveTo(' + x + ',' + y + ');');
  29785. }
  29786. function lineTo(x, y) {
  29787. js.push('c.lineTo(' + x + ',' + y + ');');
  29788. }
  29789. function quadraticCurveTo(xa, ya, x, y) {
  29790. js.push('c.quadraticCurveTo(' + xa + ',' + ya + ',' +
  29791. x + ',' + y + ');');
  29792. }
  29793. var i = 0;
  29794. var numberOfContours = ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  29795. var flags;
  29796. var x = 0, y = 0;
  29797. i += 10;
  29798. if (numberOfContours < 0) {
  29799. // composite glyph
  29800. do {
  29801. flags = (code[i] << 8) | code[i + 1];
  29802. var glyphIndex = (code[i + 2] << 8) | code[i + 3];
  29803. i += 4;
  29804. var arg1, arg2;
  29805. if ((flags & 0x01)) {
  29806. arg1 = ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  29807. arg2 = ((code[i + 2] << 24) | (code[i + 3] << 16)) >> 16;
  29808. i += 4;
  29809. } else {
  29810. arg1 = code[i++]; arg2 = code[i++];
  29811. }
  29812. if ((flags & 0x02)) {
  29813. x = arg1;
  29814. y = arg2;
  29815. } else {
  29816. x = 0; y = 0; // TODO "they are points" ?
  29817. }
  29818. var scaleX = 1, scaleY = 1, scale01 = 0, scale10 = 0;
  29819. if ((flags & 0x08)) {
  29820. scaleX =
  29821. scaleY = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  29822. i += 2;
  29823. } else if ((flags & 0x40)) {
  29824. scaleX = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  29825. scaleY = ((code[i + 2] << 24) | (code[i + 3] << 16)) / 1073741824;
  29826. i += 4;
  29827. } else if ((flags & 0x80)) {
  29828. scaleX = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  29829. scale01 = ((code[i + 2] << 24) | (code[i + 3] << 16)) / 1073741824;
  29830. scale10 = ((code[i + 4] << 24) | (code[i + 5] << 16)) / 1073741824;
  29831. scaleY = ((code[i + 6] << 24) | (code[i + 7] << 16)) / 1073741824;
  29832. i += 8;
  29833. }
  29834. var subglyph = font.glyphs[glyphIndex];
  29835. if (subglyph) {
  29836. js.push('c.save();');
  29837. js.push('c.transform(' + scaleX + ',' + scale01 + ',' +
  29838. scale10 + ',' + scaleY + ',' + x + ',' + y + ');');
  29839. compileGlyf(subglyph, js, font);
  29840. js.push('c.restore();');
  29841. }
  29842. } while ((flags & 0x20));
  29843. } else {
  29844. // simple glyph
  29845. var endPtsOfContours = [];
  29846. var j, jj;
  29847. for (j = 0; j < numberOfContours; j++) {
  29848. endPtsOfContours.push((code[i] << 8) | code[i + 1]);
  29849. i += 2;
  29850. }
  29851. var instructionLength = (code[i] << 8) | code[i + 1];
  29852. i += 2 + instructionLength; // skipping the instructions
  29853. var numberOfPoints = endPtsOfContours[endPtsOfContours.length - 1] + 1;
  29854. var points = [];
  29855. while (points.length < numberOfPoints) {
  29856. flags = code[i++];
  29857. var repeat = 1;
  29858. if ((flags & 0x08)) {
  29859. repeat += code[i++];
  29860. }
  29861. while (repeat-- > 0) {
  29862. points.push({flags: flags});
  29863. }
  29864. }
  29865. for (j = 0; j < numberOfPoints; j++) {
  29866. switch (points[j].flags & 0x12) {
  29867. case 0x00:
  29868. x += ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  29869. i += 2;
  29870. break;
  29871. case 0x02:
  29872. x -= code[i++];
  29873. break;
  29874. case 0x12:
  29875. x += code[i++];
  29876. break;
  29877. }
  29878. points[j].x = x;
  29879. }
  29880. for (j = 0; j < numberOfPoints; j++) {
  29881. switch (points[j].flags & 0x24) {
  29882. case 0x00:
  29883. y += ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  29884. i += 2;
  29885. break;
  29886. case 0x04:
  29887. y -= code[i++];
  29888. break;
  29889. case 0x24:
  29890. y += code[i++];
  29891. break;
  29892. }
  29893. points[j].y = y;
  29894. }
  29895. var startPoint = 0;
  29896. for (i = 0; i < numberOfContours; i++) {
  29897. var endPoint = endPtsOfContours[i];
  29898. // contours might have implicit points, which is located in the middle
  29899. // between two neighboring off-curve points
  29900. var contour = points.slice(startPoint, endPoint + 1);
  29901. if ((contour[0].flags & 1)) {
  29902. contour.push(contour[0]); // using start point at the contour end
  29903. } else if ((contour[contour.length - 1].flags & 1)) {
  29904. // first is off-curve point, trying to use one from the end
  29905. contour.unshift(contour[contour.length - 1]);
  29906. } else {
  29907. // start and end are off-curve points, creating implicit one
  29908. var p = {
  29909. flags: 1,
  29910. x: (contour[0].x + contour[contour.length - 1].x) / 2,
  29911. y: (contour[0].y + contour[contour.length - 1].y) / 2
  29912. };
  29913. contour.unshift(p);
  29914. contour.push(p);
  29915. }
  29916. moveTo(contour[0].x, contour[0].y);
  29917. for (j = 1, jj = contour.length; j < jj; j++) {
  29918. if ((contour[j].flags & 1)) {
  29919. lineTo(contour[j].x, contour[j].y);
  29920. } else if ((contour[j + 1].flags & 1)){
  29921. quadraticCurveTo(contour[j].x, contour[j].y,
  29922. contour[j + 1].x, contour[j + 1].y);
  29923. j++;
  29924. } else {
  29925. quadraticCurveTo(contour[j].x, contour[j].y,
  29926. (contour[j].x + contour[j + 1].x) / 2,
  29927. (contour[j].y + contour[j + 1].y) / 2);
  29928. }
  29929. }
  29930. startPoint = endPoint + 1;
  29931. }
  29932. }
  29933. }
  29934. function compileCharString(code, js, font) {
  29935. var stack = [];
  29936. var x = 0, y = 0;
  29937. var stems = 0;
  29938. function moveTo(x, y) {
  29939. js.push('c.moveTo(' + x + ',' + y + ');');
  29940. }
  29941. function lineTo(x, y) {
  29942. js.push('c.lineTo(' + x + ',' + y + ');');
  29943. }
  29944. function bezierCurveTo(x1, y1, x2, y2, x, y) {
  29945. js.push('c.bezierCurveTo(' + x1 + ',' + y1 + ',' + x2 + ',' + y2 + ',' +
  29946. x + ',' + y + ');');
  29947. }
  29948. function parse(code) {
  29949. var i = 0;
  29950. while (i < code.length) {
  29951. var stackClean = false;
  29952. var v = code[i++];
  29953. var xa, xb, ya, yb, y1, y2, y3, n, subrCode;
  29954. switch (v) {
  29955. case 1: // hstem
  29956. stems += stack.length >> 1;
  29957. stackClean = true;
  29958. break;
  29959. case 3: // vstem
  29960. stems += stack.length >> 1;
  29961. stackClean = true;
  29962. break;
  29963. case 4: // vmoveto
  29964. y += stack.pop();
  29965. moveTo(x, y);
  29966. stackClean = true;
  29967. break;
  29968. case 5: // rlineto
  29969. while (stack.length > 0) {
  29970. x += stack.shift();
  29971. y += stack.shift();
  29972. lineTo(x, y);
  29973. }
  29974. break;
  29975. case 6: // hlineto
  29976. while (stack.length > 0) {
  29977. x += stack.shift();
  29978. lineTo(x, y);
  29979. if (stack.length === 0) {
  29980. break;
  29981. }
  29982. y += stack.shift();
  29983. lineTo(x, y);
  29984. }
  29985. break;
  29986. case 7: // vlineto
  29987. while (stack.length > 0) {
  29988. y += stack.shift();
  29989. lineTo(x, y);
  29990. if (stack.length === 0) {
  29991. break;
  29992. }
  29993. x += stack.shift();
  29994. lineTo(x, y);
  29995. }
  29996. break;
  29997. case 8: // rrcurveto
  29998. while (stack.length > 0) {
  29999. xa = x + stack.shift(); ya = y + stack.shift();
  30000. xb = xa + stack.shift(); yb = ya + stack.shift();
  30001. x = xb + stack.shift(); y = yb + stack.shift();
  30002. bezierCurveTo(xa, ya, xb, yb, x, y);
  30003. }
  30004. break;
  30005. case 10: // callsubr
  30006. n = stack.pop() + font.subrsBias;
  30007. subrCode = font.subrs[n];
  30008. if (subrCode) {
  30009. parse(subrCode);
  30010. }
  30011. break;
  30012. case 11: // return
  30013. return;
  30014. case 12:
  30015. v = code[i++];
  30016. switch (v) {
  30017. case 34: // flex
  30018. xa = x + stack.shift();
  30019. xb = xa + stack.shift(); y1 = y + stack.shift();
  30020. x = xb + stack.shift();
  30021. bezierCurveTo(xa, y, xb, y1, x, y1);
  30022. xa = x + stack.shift();
  30023. xb = xa + stack.shift();
  30024. x = xb + stack.shift();
  30025. bezierCurveTo(xa, y1, xb, y, x, y);
  30026. break;
  30027. case 35: // flex
  30028. xa = x + stack.shift(); ya = y + stack.shift();
  30029. xb = xa + stack.shift(); yb = ya + stack.shift();
  30030. x = xb + stack.shift(); y = yb + stack.shift();
  30031. bezierCurveTo(xa, ya, xb, yb, x, y);
  30032. xa = x + stack.shift(); ya = y + stack.shift();
  30033. xb = xa + stack.shift(); yb = ya + stack.shift();
  30034. x = xb + stack.shift(); y = yb + stack.shift();
  30035. bezierCurveTo(xa, ya, xb, yb, x, y);
  30036. stack.pop(); // fd
  30037. break;
  30038. case 36: // hflex1
  30039. xa = x + stack.shift(); y1 = y + stack.shift();
  30040. xb = xa + stack.shift(); y2 = y1 + stack.shift();
  30041. x = xb + stack.shift();
  30042. bezierCurveTo(xa, y1, xb, y2, x, y2);
  30043. xa = x + stack.shift();
  30044. xb = xa + stack.shift(); y3 = y2 + stack.shift();
  30045. x = xb + stack.shift();
  30046. bezierCurveTo(xa, y2, xb, y3, x, y);
  30047. break;
  30048. case 37: // flex1
  30049. var x0 = x, y0 = y;
  30050. xa = x + stack.shift(); ya = y + stack.shift();
  30051. xb = xa + stack.shift(); yb = ya + stack.shift();
  30052. x = xb + stack.shift(); y = yb + stack.shift();
  30053. bezierCurveTo(xa, ya, xb, yb, x, y);
  30054. xa = x + stack.shift(); ya = y + stack.shift();
  30055. xb = xa + stack.shift(); yb = ya + stack.shift();
  30056. x = xb; y = yb;
  30057. if (Math.abs(x - x0) > Math.abs(y - y0)) {
  30058. x += stack.shift();
  30059. } else {
  30060. y += stack.shift();
  30061. }
  30062. bezierCurveTo(xa, ya, xb, yb, x, y);
  30063. break;
  30064. default:
  30065. error('unknown operator: 12 ' + v);
  30066. }
  30067. break;
  30068. case 14: // endchar
  30069. if (stack.length >= 4) {
  30070. var achar = stack.pop();
  30071. var bchar = stack.pop();
  30072. y = stack.pop();
  30073. x = stack.pop();
  30074. js.push('c.save();');
  30075. js.push('c.translate('+ x + ',' + y + ');');
  30076. var gid = lookupCmap(font.cmap, String.fromCharCode(
  30077. font.glyphNameMap[Encodings.StandardEncoding[achar]]));
  30078. compileCharString(font.glyphs[gid], js, font);
  30079. js.push('c.restore();');
  30080. gid = lookupCmap(font.cmap, String.fromCharCode(
  30081. font.glyphNameMap[Encodings.StandardEncoding[bchar]]));
  30082. compileCharString(font.glyphs[gid], js, font);
  30083. }
  30084. return;
  30085. case 18: // hstemhm
  30086. stems += stack.length >> 1;
  30087. stackClean = true;
  30088. break;
  30089. case 19: // hintmask
  30090. stems += stack.length >> 1;
  30091. i += (stems + 7) >> 3;
  30092. stackClean = true;
  30093. break;
  30094. case 20: // cntrmask
  30095. stems += stack.length >> 1;
  30096. i += (stems + 7) >> 3;
  30097. stackClean = true;
  30098. break;
  30099. case 21: // rmoveto
  30100. y += stack.pop();
  30101. x += stack.pop();
  30102. moveTo(x, y);
  30103. stackClean = true;
  30104. break;
  30105. case 22: // hmoveto
  30106. x += stack.pop();
  30107. moveTo(x, y);
  30108. stackClean = true;
  30109. break;
  30110. case 23: // vstemhm
  30111. stems += stack.length >> 1;
  30112. stackClean = true;
  30113. break;
  30114. case 24: // rcurveline
  30115. while (stack.length > 2) {
  30116. xa = x + stack.shift(); ya = y + stack.shift();
  30117. xb = xa + stack.shift(); yb = ya + stack.shift();
  30118. x = xb + stack.shift(); y = yb + stack.shift();
  30119. bezierCurveTo(xa, ya, xb, yb, x, y);
  30120. }
  30121. x += stack.shift();
  30122. y += stack.shift();
  30123. lineTo(x, y);
  30124. break;
  30125. case 25: // rlinecurve
  30126. while (stack.length > 6) {
  30127. x += stack.shift();
  30128. y += stack.shift();
  30129. lineTo(x, y);
  30130. }
  30131. xa = x + stack.shift(); ya = y + stack.shift();
  30132. xb = xa + stack.shift(); yb = ya + stack.shift();
  30133. x = xb + stack.shift(); y = yb + stack.shift();
  30134. bezierCurveTo(xa, ya, xb, yb, x, y);
  30135. break;
  30136. case 26: // vvcurveto
  30137. if (stack.length % 2) {
  30138. x += stack.shift();
  30139. }
  30140. while (stack.length > 0) {
  30141. xa = x; ya = y + stack.shift();
  30142. xb = xa + stack.shift(); yb = ya + stack.shift();
  30143. x = xb; y = yb + stack.shift();
  30144. bezierCurveTo(xa, ya, xb, yb, x, y);
  30145. }
  30146. break;
  30147. case 27: // hhcurveto
  30148. if (stack.length % 2) {
  30149. y += stack.shift();
  30150. }
  30151. while (stack.length > 0) {
  30152. xa = x + stack.shift(); ya = y;
  30153. xb = xa + stack.shift(); yb = ya + stack.shift();
  30154. x = xb + stack.shift(); y = yb;
  30155. bezierCurveTo(xa, ya, xb, yb, x, y);
  30156. }
  30157. break;
  30158. case 28:
  30159. stack.push(((code[i] << 24) | (code[i + 1] << 16)) >> 16);
  30160. i += 2;
  30161. break;
  30162. case 29: // callgsubr
  30163. n = stack.pop() + font.gsubrsBias;
  30164. subrCode = font.gsubrs[n];
  30165. if (subrCode) {
  30166. parse(subrCode);
  30167. }
  30168. break;
  30169. case 30: // vhcurveto
  30170. while (stack.length > 0) {
  30171. xa = x; ya = y + stack.shift();
  30172. xb = xa + stack.shift(); yb = ya + stack.shift();
  30173. x = xb + stack.shift();
  30174. y = yb + (stack.length === 1 ? stack.shift() : 0);
  30175. bezierCurveTo(xa, ya, xb, yb, x, y);
  30176. if (stack.length === 0) {
  30177. break;
  30178. }
  30179. xa = x + stack.shift(); ya = y;
  30180. xb = xa + stack.shift(); yb = ya + stack.shift();
  30181. y = yb + stack.shift();
  30182. x = xb + (stack.length === 1 ? stack.shift() : 0);
  30183. bezierCurveTo(xa, ya, xb, yb, x, y);
  30184. }
  30185. break;
  30186. case 31: // hvcurveto
  30187. while (stack.length > 0) {
  30188. xa = x + stack.shift(); ya = y;
  30189. xb = xa + stack.shift(); yb = ya + stack.shift();
  30190. y = yb + stack.shift();
  30191. x = xb + (stack.length === 1 ? stack.shift() : 0);
  30192. bezierCurveTo(xa, ya, xb, yb, x, y);
  30193. if (stack.length === 0) {
  30194. break;
  30195. }
  30196. xa = x; ya = y + stack.shift();
  30197. xb = xa + stack.shift(); yb = ya + stack.shift();
  30198. x = xb + stack.shift();
  30199. y = yb + (stack.length === 1 ? stack.shift() : 0);
  30200. bezierCurveTo(xa, ya, xb, yb, x, y);
  30201. }
  30202. break;
  30203. default:
  30204. if (v < 32) {
  30205. error('unknown operator: ' + v);
  30206. }
  30207. if (v < 247) {
  30208. stack.push(v - 139);
  30209. } else if (v < 251) {
  30210. stack.push((v - 247) * 256 + code[i++] + 108);
  30211. } else if (v < 255) {
  30212. stack.push(-(v - 251) * 256 - code[i++] - 108);
  30213. } else {
  30214. stack.push(((code[i] << 24) | (code[i + 1] << 16) |
  30215. (code[i + 2] << 8) | code[i + 3]) / 65536);
  30216. i += 4;
  30217. }
  30218. break;
  30219. }
  30220. if (stackClean) {
  30221. stack.length = 0;
  30222. }
  30223. }
  30224. }
  30225. parse(code);
  30226. }
  30227. var noop = '';
  30228. function CompiledFont(fontMatrix) {
  30229. this.compiledGlyphs = {};
  30230. this.fontMatrix = fontMatrix;
  30231. }
  30232. CompiledFont.prototype = {
  30233. getPathJs: function (unicode) {
  30234. var gid = lookupCmap(this.cmap, unicode);
  30235. var fn = this.compiledGlyphs[gid];
  30236. if (!fn) {
  30237. this.compiledGlyphs[gid] = fn = this.compileGlyph(this.glyphs[gid]);
  30238. }
  30239. return fn;
  30240. },
  30241. compileGlyph: function (code) {
  30242. if (!code || code.length === 0 || code[0] === 14) {
  30243. return noop;
  30244. }
  30245. var js = [];
  30246. js.push('c.save();');
  30247. js.push('c.transform(' + this.fontMatrix.join(',') + ');');
  30248. js.push('c.scale(size, -size);');
  30249. this.compileGlyphImpl(code, js);
  30250. js.push('c.restore();');
  30251. return js.join('\n');
  30252. },
  30253. compileGlyphImpl: function () {
  30254. error('Children classes should implement this.');
  30255. },
  30256. hasBuiltPath: function (unicode) {
  30257. var gid = lookupCmap(this.cmap, unicode);
  30258. return gid in this.compiledGlyphs;
  30259. }
  30260. };
  30261. function TrueTypeCompiled(glyphs, cmap, fontMatrix) {
  30262. fontMatrix = fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0];
  30263. CompiledFont.call(this, fontMatrix);
  30264. this.glyphs = glyphs;
  30265. this.cmap = cmap;
  30266. this.compiledGlyphs = [];
  30267. }
  30268. Util.inherit(TrueTypeCompiled, CompiledFont, {
  30269. compileGlyphImpl: function (code, js) {
  30270. compileGlyf(code, js, this);
  30271. }
  30272. });
  30273. function Type2Compiled(cffInfo, cmap, fontMatrix, glyphNameMap) {
  30274. fontMatrix = fontMatrix || [0.001, 0, 0, 0.001, 0, 0];
  30275. CompiledFont.call(this, fontMatrix);
  30276. this.glyphs = cffInfo.glyphs;
  30277. this.gsubrs = cffInfo.gsubrs || [];
  30278. this.subrs = cffInfo.subrs || [];
  30279. this.cmap = cmap;
  30280. this.glyphNameMap = glyphNameMap || GlyphsUnicode;
  30281. this.compiledGlyphs = [];
  30282. this.gsubrsBias = (this.gsubrs.length < 1240 ?
  30283. 107 : (this.gsubrs.length < 33900 ? 1131 : 32768));
  30284. this.subrsBias = (this.subrs.length < 1240 ?
  30285. 107 : (this.subrs.length < 33900 ? 1131 : 32768));
  30286. }
  30287. Util.inherit(Type2Compiled, CompiledFont, {
  30288. compileGlyphImpl: function (code, js) {
  30289. compileCharString(code, js, this);
  30290. }
  30291. });
  30292. return {
  30293. create: function FontRendererFactory_create(font) {
  30294. var data = new Uint8Array(font.data);
  30295. var cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm;
  30296. var numTables = getUshort(data, 4);
  30297. for (var i = 0, p = 12; i < numTables; i++, p += 16) {
  30298. var tag = bytesToString(data.subarray(p, p + 4));
  30299. var offset = getLong(data, p + 8);
  30300. var length = getLong(data, p + 12);
  30301. switch (tag) {
  30302. case 'cmap':
  30303. cmap = parseCmap(data, offset, offset + length);
  30304. break;
  30305. case 'glyf':
  30306. glyf = data.subarray(offset, offset + length);
  30307. break;
  30308. case 'loca':
  30309. loca = data.subarray(offset, offset + length);
  30310. break;
  30311. case 'head':
  30312. unitsPerEm = getUshort(data, offset + 18);
  30313. indexToLocFormat = getUshort(data, offset + 50);
  30314. break;
  30315. case 'CFF ':
  30316. cff = parseCff(data, offset, offset + length);
  30317. break;
  30318. }
  30319. }
  30320. if (glyf) {
  30321. var fontMatrix = (!unitsPerEm ? font.fontMatrix :
  30322. [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]);
  30323. return new TrueTypeCompiled(
  30324. parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
  30325. } else {
  30326. return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
  30327. }
  30328. }
  30329. };
  30330. })();
  30331. var GlyphsUnicode = {
  30332. A: 0x0041,
  30333. AE: 0x00C6,
  30334. AEacute: 0x01FC,
  30335. AEmacron: 0x01E2,
  30336. AEsmall: 0xF7E6,
  30337. Aacute: 0x00C1,
  30338. Aacutesmall: 0xF7E1,
  30339. Abreve: 0x0102,
  30340. Abreveacute: 0x1EAE,
  30341. Abrevecyrillic: 0x04D0,
  30342. Abrevedotbelow: 0x1EB6,
  30343. Abrevegrave: 0x1EB0,
  30344. Abrevehookabove: 0x1EB2,
  30345. Abrevetilde: 0x1EB4,
  30346. Acaron: 0x01CD,
  30347. Acircle: 0x24B6,
  30348. Acircumflex: 0x00C2,
  30349. Acircumflexacute: 0x1EA4,
  30350. Acircumflexdotbelow: 0x1EAC,
  30351. Acircumflexgrave: 0x1EA6,
  30352. Acircumflexhookabove: 0x1EA8,
  30353. Acircumflexsmall: 0xF7E2,
  30354. Acircumflextilde: 0x1EAA,
  30355. Acute: 0xF6C9,
  30356. Acutesmall: 0xF7B4,
  30357. Acyrillic: 0x0410,
  30358. Adblgrave: 0x0200,
  30359. Adieresis: 0x00C4,
  30360. Adieresiscyrillic: 0x04D2,
  30361. Adieresismacron: 0x01DE,
  30362. Adieresissmall: 0xF7E4,
  30363. Adotbelow: 0x1EA0,
  30364. Adotmacron: 0x01E0,
  30365. Agrave: 0x00C0,
  30366. Agravesmall: 0xF7E0,
  30367. Ahookabove: 0x1EA2,
  30368. Aiecyrillic: 0x04D4,
  30369. Ainvertedbreve: 0x0202,
  30370. Alpha: 0x0391,
  30371. Alphatonos: 0x0386,
  30372. Amacron: 0x0100,
  30373. Amonospace: 0xFF21,
  30374. Aogonek: 0x0104,
  30375. Aring: 0x00C5,
  30376. Aringacute: 0x01FA,
  30377. Aringbelow: 0x1E00,
  30378. Aringsmall: 0xF7E5,
  30379. Asmall: 0xF761,
  30380. Atilde: 0x00C3,
  30381. Atildesmall: 0xF7E3,
  30382. Aybarmenian: 0x0531,
  30383. B: 0x0042,
  30384. Bcircle: 0x24B7,
  30385. Bdotaccent: 0x1E02,
  30386. Bdotbelow: 0x1E04,
  30387. Becyrillic: 0x0411,
  30388. Benarmenian: 0x0532,
  30389. Beta: 0x0392,
  30390. Bhook: 0x0181,
  30391. Blinebelow: 0x1E06,
  30392. Bmonospace: 0xFF22,
  30393. Brevesmall: 0xF6F4,
  30394. Bsmall: 0xF762,
  30395. Btopbar: 0x0182,
  30396. C: 0x0043,
  30397. Caarmenian: 0x053E,
  30398. Cacute: 0x0106,
  30399. Caron: 0xF6CA,
  30400. Caronsmall: 0xF6F5,
  30401. Ccaron: 0x010C,
  30402. Ccedilla: 0x00C7,
  30403. Ccedillaacute: 0x1E08,
  30404. Ccedillasmall: 0xF7E7,
  30405. Ccircle: 0x24B8,
  30406. Ccircumflex: 0x0108,
  30407. Cdot: 0x010A,
  30408. Cdotaccent: 0x010A,
  30409. Cedillasmall: 0xF7B8,
  30410. Chaarmenian: 0x0549,
  30411. Cheabkhasiancyrillic: 0x04BC,
  30412. Checyrillic: 0x0427,
  30413. Chedescenderabkhasiancyrillic: 0x04BE,
  30414. Chedescendercyrillic: 0x04B6,
  30415. Chedieresiscyrillic: 0x04F4,
  30416. Cheharmenian: 0x0543,
  30417. Chekhakassiancyrillic: 0x04CB,
  30418. Cheverticalstrokecyrillic: 0x04B8,
  30419. Chi: 0x03A7,
  30420. Chook: 0x0187,
  30421. Circumflexsmall: 0xF6F6,
  30422. Cmonospace: 0xFF23,
  30423. Coarmenian: 0x0551,
  30424. Csmall: 0xF763,
  30425. D: 0x0044,
  30426. DZ: 0x01F1,
  30427. DZcaron: 0x01C4,
  30428. Daarmenian: 0x0534,
  30429. Dafrican: 0x0189,
  30430. Dcaron: 0x010E,
  30431. Dcedilla: 0x1E10,
  30432. Dcircle: 0x24B9,
  30433. Dcircumflexbelow: 0x1E12,
  30434. Dcroat: 0x0110,
  30435. Ddotaccent: 0x1E0A,
  30436. Ddotbelow: 0x1E0C,
  30437. Decyrillic: 0x0414,
  30438. Deicoptic: 0x03EE,
  30439. Delta: 0x2206,
  30440. Deltagreek: 0x0394,
  30441. Dhook: 0x018A,
  30442. Dieresis: 0xF6CB,
  30443. DieresisAcute: 0xF6CC,
  30444. DieresisGrave: 0xF6CD,
  30445. Dieresissmall: 0xF7A8,
  30446. Digammagreek: 0x03DC,
  30447. Djecyrillic: 0x0402,
  30448. Dlinebelow: 0x1E0E,
  30449. Dmonospace: 0xFF24,
  30450. Dotaccentsmall: 0xF6F7,
  30451. Dslash: 0x0110,
  30452. Dsmall: 0xF764,
  30453. Dtopbar: 0x018B,
  30454. Dz: 0x01F2,
  30455. Dzcaron: 0x01C5,
  30456. Dzeabkhasiancyrillic: 0x04E0,
  30457. Dzecyrillic: 0x0405,
  30458. Dzhecyrillic: 0x040F,
  30459. E: 0x0045,
  30460. Eacute: 0x00C9,
  30461. Eacutesmall: 0xF7E9,
  30462. Ebreve: 0x0114,
  30463. Ecaron: 0x011A,
  30464. Ecedillabreve: 0x1E1C,
  30465. Echarmenian: 0x0535,
  30466. Ecircle: 0x24BA,
  30467. Ecircumflex: 0x00CA,
  30468. Ecircumflexacute: 0x1EBE,
  30469. Ecircumflexbelow: 0x1E18,
  30470. Ecircumflexdotbelow: 0x1EC6,
  30471. Ecircumflexgrave: 0x1EC0,
  30472. Ecircumflexhookabove: 0x1EC2,
  30473. Ecircumflexsmall: 0xF7EA,
  30474. Ecircumflextilde: 0x1EC4,
  30475. Ecyrillic: 0x0404,
  30476. Edblgrave: 0x0204,
  30477. Edieresis: 0x00CB,
  30478. Edieresissmall: 0xF7EB,
  30479. Edot: 0x0116,
  30480. Edotaccent: 0x0116,
  30481. Edotbelow: 0x1EB8,
  30482. Efcyrillic: 0x0424,
  30483. Egrave: 0x00C8,
  30484. Egravesmall: 0xF7E8,
  30485. Eharmenian: 0x0537,
  30486. Ehookabove: 0x1EBA,
  30487. Eightroman: 0x2167,
  30488. Einvertedbreve: 0x0206,
  30489. Eiotifiedcyrillic: 0x0464,
  30490. Elcyrillic: 0x041B,
  30491. Elevenroman: 0x216A,
  30492. Emacron: 0x0112,
  30493. Emacronacute: 0x1E16,
  30494. Emacrongrave: 0x1E14,
  30495. Emcyrillic: 0x041C,
  30496. Emonospace: 0xFF25,
  30497. Encyrillic: 0x041D,
  30498. Endescendercyrillic: 0x04A2,
  30499. Eng: 0x014A,
  30500. Enghecyrillic: 0x04A4,
  30501. Enhookcyrillic: 0x04C7,
  30502. Eogonek: 0x0118,
  30503. Eopen: 0x0190,
  30504. Epsilon: 0x0395,
  30505. Epsilontonos: 0x0388,
  30506. Ercyrillic: 0x0420,
  30507. Ereversed: 0x018E,
  30508. Ereversedcyrillic: 0x042D,
  30509. Escyrillic: 0x0421,
  30510. Esdescendercyrillic: 0x04AA,
  30511. Esh: 0x01A9,
  30512. Esmall: 0xF765,
  30513. Eta: 0x0397,
  30514. Etarmenian: 0x0538,
  30515. Etatonos: 0x0389,
  30516. Eth: 0x00D0,
  30517. Ethsmall: 0xF7F0,
  30518. Etilde: 0x1EBC,
  30519. Etildebelow: 0x1E1A,
  30520. Euro: 0x20AC,
  30521. Ezh: 0x01B7,
  30522. Ezhcaron: 0x01EE,
  30523. Ezhreversed: 0x01B8,
  30524. F: 0x0046,
  30525. Fcircle: 0x24BB,
  30526. Fdotaccent: 0x1E1E,
  30527. Feharmenian: 0x0556,
  30528. Feicoptic: 0x03E4,
  30529. Fhook: 0x0191,
  30530. Fitacyrillic: 0x0472,
  30531. Fiveroman: 0x2164,
  30532. Fmonospace: 0xFF26,
  30533. Fourroman: 0x2163,
  30534. Fsmall: 0xF766,
  30535. G: 0x0047,
  30536. GBsquare: 0x3387,
  30537. Gacute: 0x01F4,
  30538. Gamma: 0x0393,
  30539. Gammaafrican: 0x0194,
  30540. Gangiacoptic: 0x03EA,
  30541. Gbreve: 0x011E,
  30542. Gcaron: 0x01E6,
  30543. Gcedilla: 0x0122,
  30544. Gcircle: 0x24BC,
  30545. Gcircumflex: 0x011C,
  30546. Gcommaaccent: 0x0122,
  30547. Gdot: 0x0120,
  30548. Gdotaccent: 0x0120,
  30549. Gecyrillic: 0x0413,
  30550. Ghadarmenian: 0x0542,
  30551. Ghemiddlehookcyrillic: 0x0494,
  30552. Ghestrokecyrillic: 0x0492,
  30553. Gheupturncyrillic: 0x0490,
  30554. Ghook: 0x0193,
  30555. Gimarmenian: 0x0533,
  30556. Gjecyrillic: 0x0403,
  30557. Gmacron: 0x1E20,
  30558. Gmonospace: 0xFF27,
  30559. Grave: 0xF6CE,
  30560. Gravesmall: 0xF760,
  30561. Gsmall: 0xF767,
  30562. Gsmallhook: 0x029B,
  30563. Gstroke: 0x01E4,
  30564. H: 0x0048,
  30565. H18533: 0x25CF,
  30566. H18543: 0x25AA,
  30567. H18551: 0x25AB,
  30568. H22073: 0x25A1,
  30569. HPsquare: 0x33CB,
  30570. Haabkhasiancyrillic: 0x04A8,
  30571. Hadescendercyrillic: 0x04B2,
  30572. Hardsigncyrillic: 0x042A,
  30573. Hbar: 0x0126,
  30574. Hbrevebelow: 0x1E2A,
  30575. Hcedilla: 0x1E28,
  30576. Hcircle: 0x24BD,
  30577. Hcircumflex: 0x0124,
  30578. Hdieresis: 0x1E26,
  30579. Hdotaccent: 0x1E22,
  30580. Hdotbelow: 0x1E24,
  30581. Hmonospace: 0xFF28,
  30582. Hoarmenian: 0x0540,
  30583. Horicoptic: 0x03E8,
  30584. Hsmall: 0xF768,
  30585. Hungarumlaut: 0xF6CF,
  30586. Hungarumlautsmall: 0xF6F8,
  30587. Hzsquare: 0x3390,
  30588. I: 0x0049,
  30589. IAcyrillic: 0x042F,
  30590. IJ: 0x0132,
  30591. IUcyrillic: 0x042E,
  30592. Iacute: 0x00CD,
  30593. Iacutesmall: 0xF7ED,
  30594. Ibreve: 0x012C,
  30595. Icaron: 0x01CF,
  30596. Icircle: 0x24BE,
  30597. Icircumflex: 0x00CE,
  30598. Icircumflexsmall: 0xF7EE,
  30599. Icyrillic: 0x0406,
  30600. Idblgrave: 0x0208,
  30601. Idieresis: 0x00CF,
  30602. Idieresisacute: 0x1E2E,
  30603. Idieresiscyrillic: 0x04E4,
  30604. Idieresissmall: 0xF7EF,
  30605. Idot: 0x0130,
  30606. Idotaccent: 0x0130,
  30607. Idotbelow: 0x1ECA,
  30608. Iebrevecyrillic: 0x04D6,
  30609. Iecyrillic: 0x0415,
  30610. Ifraktur: 0x2111,
  30611. Igrave: 0x00CC,
  30612. Igravesmall: 0xF7EC,
  30613. Ihookabove: 0x1EC8,
  30614. Iicyrillic: 0x0418,
  30615. Iinvertedbreve: 0x020A,
  30616. Iishortcyrillic: 0x0419,
  30617. Imacron: 0x012A,
  30618. Imacroncyrillic: 0x04E2,
  30619. Imonospace: 0xFF29,
  30620. Iniarmenian: 0x053B,
  30621. Iocyrillic: 0x0401,
  30622. Iogonek: 0x012E,
  30623. Iota: 0x0399,
  30624. Iotaafrican: 0x0196,
  30625. Iotadieresis: 0x03AA,
  30626. Iotatonos: 0x038A,
  30627. Ismall: 0xF769,
  30628. Istroke: 0x0197,
  30629. Itilde: 0x0128,
  30630. Itildebelow: 0x1E2C,
  30631. Izhitsacyrillic: 0x0474,
  30632. Izhitsadblgravecyrillic: 0x0476,
  30633. J: 0x004A,
  30634. Jaarmenian: 0x0541,
  30635. Jcircle: 0x24BF,
  30636. Jcircumflex: 0x0134,
  30637. Jecyrillic: 0x0408,
  30638. Jheharmenian: 0x054B,
  30639. Jmonospace: 0xFF2A,
  30640. Jsmall: 0xF76A,
  30641. K: 0x004B,
  30642. KBsquare: 0x3385,
  30643. KKsquare: 0x33CD,
  30644. Kabashkircyrillic: 0x04A0,
  30645. Kacute: 0x1E30,
  30646. Kacyrillic: 0x041A,
  30647. Kadescendercyrillic: 0x049A,
  30648. Kahookcyrillic: 0x04C3,
  30649. Kappa: 0x039A,
  30650. Kastrokecyrillic: 0x049E,
  30651. Kaverticalstrokecyrillic: 0x049C,
  30652. Kcaron: 0x01E8,
  30653. Kcedilla: 0x0136,
  30654. Kcircle: 0x24C0,
  30655. Kcommaaccent: 0x0136,
  30656. Kdotbelow: 0x1E32,
  30657. Keharmenian: 0x0554,
  30658. Kenarmenian: 0x053F,
  30659. Khacyrillic: 0x0425,
  30660. Kheicoptic: 0x03E6,
  30661. Khook: 0x0198,
  30662. Kjecyrillic: 0x040C,
  30663. Klinebelow: 0x1E34,
  30664. Kmonospace: 0xFF2B,
  30665. Koppacyrillic: 0x0480,
  30666. Koppagreek: 0x03DE,
  30667. Ksicyrillic: 0x046E,
  30668. Ksmall: 0xF76B,
  30669. L: 0x004C,
  30670. LJ: 0x01C7,
  30671. LL: 0xF6BF,
  30672. Lacute: 0x0139,
  30673. Lambda: 0x039B,
  30674. Lcaron: 0x013D,
  30675. Lcedilla: 0x013B,
  30676. Lcircle: 0x24C1,
  30677. Lcircumflexbelow: 0x1E3C,
  30678. Lcommaaccent: 0x013B,
  30679. Ldot: 0x013F,
  30680. Ldotaccent: 0x013F,
  30681. Ldotbelow: 0x1E36,
  30682. Ldotbelowmacron: 0x1E38,
  30683. Liwnarmenian: 0x053C,
  30684. Lj: 0x01C8,
  30685. Ljecyrillic: 0x0409,
  30686. Llinebelow: 0x1E3A,
  30687. Lmonospace: 0xFF2C,
  30688. Lslash: 0x0141,
  30689. Lslashsmall: 0xF6F9,
  30690. Lsmall: 0xF76C,
  30691. M: 0x004D,
  30692. MBsquare: 0x3386,
  30693. Macron: 0xF6D0,
  30694. Macronsmall: 0xF7AF,
  30695. Macute: 0x1E3E,
  30696. Mcircle: 0x24C2,
  30697. Mdotaccent: 0x1E40,
  30698. Mdotbelow: 0x1E42,
  30699. Menarmenian: 0x0544,
  30700. Mmonospace: 0xFF2D,
  30701. Msmall: 0xF76D,
  30702. Mturned: 0x019C,
  30703. Mu: 0x039C,
  30704. N: 0x004E,
  30705. NJ: 0x01CA,
  30706. Nacute: 0x0143,
  30707. Ncaron: 0x0147,
  30708. Ncedilla: 0x0145,
  30709. Ncircle: 0x24C3,
  30710. Ncircumflexbelow: 0x1E4A,
  30711. Ncommaaccent: 0x0145,
  30712. Ndotaccent: 0x1E44,
  30713. Ndotbelow: 0x1E46,
  30714. Nhookleft: 0x019D,
  30715. Nineroman: 0x2168,
  30716. Nj: 0x01CB,
  30717. Njecyrillic: 0x040A,
  30718. Nlinebelow: 0x1E48,
  30719. Nmonospace: 0xFF2E,
  30720. Nowarmenian: 0x0546,
  30721. Nsmall: 0xF76E,
  30722. Ntilde: 0x00D1,
  30723. Ntildesmall: 0xF7F1,
  30724. Nu: 0x039D,
  30725. O: 0x004F,
  30726. OE: 0x0152,
  30727. OEsmall: 0xF6FA,
  30728. Oacute: 0x00D3,
  30729. Oacutesmall: 0xF7F3,
  30730. Obarredcyrillic: 0x04E8,
  30731. Obarreddieresiscyrillic: 0x04EA,
  30732. Obreve: 0x014E,
  30733. Ocaron: 0x01D1,
  30734. Ocenteredtilde: 0x019F,
  30735. Ocircle: 0x24C4,
  30736. Ocircumflex: 0x00D4,
  30737. Ocircumflexacute: 0x1ED0,
  30738. Ocircumflexdotbelow: 0x1ED8,
  30739. Ocircumflexgrave: 0x1ED2,
  30740. Ocircumflexhookabove: 0x1ED4,
  30741. Ocircumflexsmall: 0xF7F4,
  30742. Ocircumflextilde: 0x1ED6,
  30743. Ocyrillic: 0x041E,
  30744. Odblacute: 0x0150,
  30745. Odblgrave: 0x020C,
  30746. Odieresis: 0x00D6,
  30747. Odieresiscyrillic: 0x04E6,
  30748. Odieresissmall: 0xF7F6,
  30749. Odotbelow: 0x1ECC,
  30750. Ogoneksmall: 0xF6FB,
  30751. Ograve: 0x00D2,
  30752. Ogravesmall: 0xF7F2,
  30753. Oharmenian: 0x0555,
  30754. Ohm: 0x2126,
  30755. Ohookabove: 0x1ECE,
  30756. Ohorn: 0x01A0,
  30757. Ohornacute: 0x1EDA,
  30758. Ohorndotbelow: 0x1EE2,
  30759. Ohorngrave: 0x1EDC,
  30760. Ohornhookabove: 0x1EDE,
  30761. Ohorntilde: 0x1EE0,
  30762. Ohungarumlaut: 0x0150,
  30763. Oi: 0x01A2,
  30764. Oinvertedbreve: 0x020E,
  30765. Omacron: 0x014C,
  30766. Omacronacute: 0x1E52,
  30767. Omacrongrave: 0x1E50,
  30768. Omega: 0x2126,
  30769. Omegacyrillic: 0x0460,
  30770. Omegagreek: 0x03A9,
  30771. Omegaroundcyrillic: 0x047A,
  30772. Omegatitlocyrillic: 0x047C,
  30773. Omegatonos: 0x038F,
  30774. Omicron: 0x039F,
  30775. Omicrontonos: 0x038C,
  30776. Omonospace: 0xFF2F,
  30777. Oneroman: 0x2160,
  30778. Oogonek: 0x01EA,
  30779. Oogonekmacron: 0x01EC,
  30780. Oopen: 0x0186,
  30781. Oslash: 0x00D8,
  30782. Oslashacute: 0x01FE,
  30783. Oslashsmall: 0xF7F8,
  30784. Osmall: 0xF76F,
  30785. Ostrokeacute: 0x01FE,
  30786. Otcyrillic: 0x047E,
  30787. Otilde: 0x00D5,
  30788. Otildeacute: 0x1E4C,
  30789. Otildedieresis: 0x1E4E,
  30790. Otildesmall: 0xF7F5,
  30791. P: 0x0050,
  30792. Pacute: 0x1E54,
  30793. Pcircle: 0x24C5,
  30794. Pdotaccent: 0x1E56,
  30795. Pecyrillic: 0x041F,
  30796. Peharmenian: 0x054A,
  30797. Pemiddlehookcyrillic: 0x04A6,
  30798. Phi: 0x03A6,
  30799. Phook: 0x01A4,
  30800. Pi: 0x03A0,
  30801. Piwrarmenian: 0x0553,
  30802. Pmonospace: 0xFF30,
  30803. Psi: 0x03A8,
  30804. Psicyrillic: 0x0470,
  30805. Psmall: 0xF770,
  30806. Q: 0x0051,
  30807. Qcircle: 0x24C6,
  30808. Qmonospace: 0xFF31,
  30809. Qsmall: 0xF771,
  30810. R: 0x0052,
  30811. Raarmenian: 0x054C,
  30812. Racute: 0x0154,
  30813. Rcaron: 0x0158,
  30814. Rcedilla: 0x0156,
  30815. Rcircle: 0x24C7,
  30816. Rcommaaccent: 0x0156,
  30817. Rdblgrave: 0x0210,
  30818. Rdotaccent: 0x1E58,
  30819. Rdotbelow: 0x1E5A,
  30820. Rdotbelowmacron: 0x1E5C,
  30821. Reharmenian: 0x0550,
  30822. Rfraktur: 0x211C,
  30823. Rho: 0x03A1,
  30824. Ringsmall: 0xF6FC,
  30825. Rinvertedbreve: 0x0212,
  30826. Rlinebelow: 0x1E5E,
  30827. Rmonospace: 0xFF32,
  30828. Rsmall: 0xF772,
  30829. Rsmallinverted: 0x0281,
  30830. Rsmallinvertedsuperior: 0x02B6,
  30831. S: 0x0053,
  30832. SF010000: 0x250C,
  30833. SF020000: 0x2514,
  30834. SF030000: 0x2510,
  30835. SF040000: 0x2518,
  30836. SF050000: 0x253C,
  30837. SF060000: 0x252C,
  30838. SF070000: 0x2534,
  30839. SF080000: 0x251C,
  30840. SF090000: 0x2524,
  30841. SF100000: 0x2500,
  30842. SF110000: 0x2502,
  30843. SF190000: 0x2561,
  30844. SF200000: 0x2562,
  30845. SF210000: 0x2556,
  30846. SF220000: 0x2555,
  30847. SF230000: 0x2563,
  30848. SF240000: 0x2551,
  30849. SF250000: 0x2557,
  30850. SF260000: 0x255D,
  30851. SF270000: 0x255C,
  30852. SF280000: 0x255B,
  30853. SF360000: 0x255E,
  30854. SF370000: 0x255F,
  30855. SF380000: 0x255A,
  30856. SF390000: 0x2554,
  30857. SF400000: 0x2569,
  30858. SF410000: 0x2566,
  30859. SF420000: 0x2560,
  30860. SF430000: 0x2550,
  30861. SF440000: 0x256C,
  30862. SF450000: 0x2567,
  30863. SF460000: 0x2568,
  30864. SF470000: 0x2564,
  30865. SF480000: 0x2565,
  30866. SF490000: 0x2559,
  30867. SF500000: 0x2558,
  30868. SF510000: 0x2552,
  30869. SF520000: 0x2553,
  30870. SF530000: 0x256B,
  30871. SF540000: 0x256A,
  30872. Sacute: 0x015A,
  30873. Sacutedotaccent: 0x1E64,
  30874. Sampigreek: 0x03E0,
  30875. Scaron: 0x0160,
  30876. Scarondotaccent: 0x1E66,
  30877. Scaronsmall: 0xF6FD,
  30878. Scedilla: 0x015E,
  30879. Schwa: 0x018F,
  30880. Schwacyrillic: 0x04D8,
  30881. Schwadieresiscyrillic: 0x04DA,
  30882. Scircle: 0x24C8,
  30883. Scircumflex: 0x015C,
  30884. Scommaaccent: 0x0218,
  30885. Sdotaccent: 0x1E60,
  30886. Sdotbelow: 0x1E62,
  30887. Sdotbelowdotaccent: 0x1E68,
  30888. Seharmenian: 0x054D,
  30889. Sevenroman: 0x2166,
  30890. Shaarmenian: 0x0547,
  30891. Shacyrillic: 0x0428,
  30892. Shchacyrillic: 0x0429,
  30893. Sheicoptic: 0x03E2,
  30894. Shhacyrillic: 0x04BA,
  30895. Shimacoptic: 0x03EC,
  30896. Sigma: 0x03A3,
  30897. Sixroman: 0x2165,
  30898. Smonospace: 0xFF33,
  30899. Softsigncyrillic: 0x042C,
  30900. Ssmall: 0xF773,
  30901. Stigmagreek: 0x03DA,
  30902. T: 0x0054,
  30903. Tau: 0x03A4,
  30904. Tbar: 0x0166,
  30905. Tcaron: 0x0164,
  30906. Tcedilla: 0x0162,
  30907. Tcircle: 0x24C9,
  30908. Tcircumflexbelow: 0x1E70,
  30909. Tcommaaccent: 0x0162,
  30910. Tdotaccent: 0x1E6A,
  30911. Tdotbelow: 0x1E6C,
  30912. Tecyrillic: 0x0422,
  30913. Tedescendercyrillic: 0x04AC,
  30914. Tenroman: 0x2169,
  30915. Tetsecyrillic: 0x04B4,
  30916. Theta: 0x0398,
  30917. Thook: 0x01AC,
  30918. Thorn: 0x00DE,
  30919. Thornsmall: 0xF7FE,
  30920. Threeroman: 0x2162,
  30921. Tildesmall: 0xF6FE,
  30922. Tiwnarmenian: 0x054F,
  30923. Tlinebelow: 0x1E6E,
  30924. Tmonospace: 0xFF34,
  30925. Toarmenian: 0x0539,
  30926. Tonefive: 0x01BC,
  30927. Tonesix: 0x0184,
  30928. Tonetwo: 0x01A7,
  30929. Tretroflexhook: 0x01AE,
  30930. Tsecyrillic: 0x0426,
  30931. Tshecyrillic: 0x040B,
  30932. Tsmall: 0xF774,
  30933. Twelveroman: 0x216B,
  30934. Tworoman: 0x2161,
  30935. U: 0x0055,
  30936. Uacute: 0x00DA,
  30937. Uacutesmall: 0xF7FA,
  30938. Ubreve: 0x016C,
  30939. Ucaron: 0x01D3,
  30940. Ucircle: 0x24CA,
  30941. Ucircumflex: 0x00DB,
  30942. Ucircumflexbelow: 0x1E76,
  30943. Ucircumflexsmall: 0xF7FB,
  30944. Ucyrillic: 0x0423,
  30945. Udblacute: 0x0170,
  30946. Udblgrave: 0x0214,
  30947. Udieresis: 0x00DC,
  30948. Udieresisacute: 0x01D7,
  30949. Udieresisbelow: 0x1E72,
  30950. Udieresiscaron: 0x01D9,
  30951. Udieresiscyrillic: 0x04F0,
  30952. Udieresisgrave: 0x01DB,
  30953. Udieresismacron: 0x01D5,
  30954. Udieresissmall: 0xF7FC,
  30955. Udotbelow: 0x1EE4,
  30956. Ugrave: 0x00D9,
  30957. Ugravesmall: 0xF7F9,
  30958. Uhookabove: 0x1EE6,
  30959. Uhorn: 0x01AF,
  30960. Uhornacute: 0x1EE8,
  30961. Uhorndotbelow: 0x1EF0,
  30962. Uhorngrave: 0x1EEA,
  30963. Uhornhookabove: 0x1EEC,
  30964. Uhorntilde: 0x1EEE,
  30965. Uhungarumlaut: 0x0170,
  30966. Uhungarumlautcyrillic: 0x04F2,
  30967. Uinvertedbreve: 0x0216,
  30968. Ukcyrillic: 0x0478,
  30969. Umacron: 0x016A,
  30970. Umacroncyrillic: 0x04EE,
  30971. Umacrondieresis: 0x1E7A,
  30972. Umonospace: 0xFF35,
  30973. Uogonek: 0x0172,
  30974. Upsilon: 0x03A5,
  30975. Upsilon1: 0x03D2,
  30976. Upsilonacutehooksymbolgreek: 0x03D3,
  30977. Upsilonafrican: 0x01B1,
  30978. Upsilondieresis: 0x03AB,
  30979. Upsilondieresishooksymbolgreek: 0x03D4,
  30980. Upsilonhooksymbol: 0x03D2,
  30981. Upsilontonos: 0x038E,
  30982. Uring: 0x016E,
  30983. Ushortcyrillic: 0x040E,
  30984. Usmall: 0xF775,
  30985. Ustraightcyrillic: 0x04AE,
  30986. Ustraightstrokecyrillic: 0x04B0,
  30987. Utilde: 0x0168,
  30988. Utildeacute: 0x1E78,
  30989. Utildebelow: 0x1E74,
  30990. V: 0x0056,
  30991. Vcircle: 0x24CB,
  30992. Vdotbelow: 0x1E7E,
  30993. Vecyrillic: 0x0412,
  30994. Vewarmenian: 0x054E,
  30995. Vhook: 0x01B2,
  30996. Vmonospace: 0xFF36,
  30997. Voarmenian: 0x0548,
  30998. Vsmall: 0xF776,
  30999. Vtilde: 0x1E7C,
  31000. W: 0x0057,
  31001. Wacute: 0x1E82,
  31002. Wcircle: 0x24CC,
  31003. Wcircumflex: 0x0174,
  31004. Wdieresis: 0x1E84,
  31005. Wdotaccent: 0x1E86,
  31006. Wdotbelow: 0x1E88,
  31007. Wgrave: 0x1E80,
  31008. Wmonospace: 0xFF37,
  31009. Wsmall: 0xF777,
  31010. X: 0x0058,
  31011. Xcircle: 0x24CD,
  31012. Xdieresis: 0x1E8C,
  31013. Xdotaccent: 0x1E8A,
  31014. Xeharmenian: 0x053D,
  31015. Xi: 0x039E,
  31016. Xmonospace: 0xFF38,
  31017. Xsmall: 0xF778,
  31018. Y: 0x0059,
  31019. Yacute: 0x00DD,
  31020. Yacutesmall: 0xF7FD,
  31021. Yatcyrillic: 0x0462,
  31022. Ycircle: 0x24CE,
  31023. Ycircumflex: 0x0176,
  31024. Ydieresis: 0x0178,
  31025. Ydieresissmall: 0xF7FF,
  31026. Ydotaccent: 0x1E8E,
  31027. Ydotbelow: 0x1EF4,
  31028. Yericyrillic: 0x042B,
  31029. Yerudieresiscyrillic: 0x04F8,
  31030. Ygrave: 0x1EF2,
  31031. Yhook: 0x01B3,
  31032. Yhookabove: 0x1EF6,
  31033. Yiarmenian: 0x0545,
  31034. Yicyrillic: 0x0407,
  31035. Yiwnarmenian: 0x0552,
  31036. Ymonospace: 0xFF39,
  31037. Ysmall: 0xF779,
  31038. Ytilde: 0x1EF8,
  31039. Yusbigcyrillic: 0x046A,
  31040. Yusbigiotifiedcyrillic: 0x046C,
  31041. Yuslittlecyrillic: 0x0466,
  31042. Yuslittleiotifiedcyrillic: 0x0468,
  31043. Z: 0x005A,
  31044. Zaarmenian: 0x0536,
  31045. Zacute: 0x0179,
  31046. Zcaron: 0x017D,
  31047. Zcaronsmall: 0xF6FF,
  31048. Zcircle: 0x24CF,
  31049. Zcircumflex: 0x1E90,
  31050. Zdot: 0x017B,
  31051. Zdotaccent: 0x017B,
  31052. Zdotbelow: 0x1E92,
  31053. Zecyrillic: 0x0417,
  31054. Zedescendercyrillic: 0x0498,
  31055. Zedieresiscyrillic: 0x04DE,
  31056. Zeta: 0x0396,
  31057. Zhearmenian: 0x053A,
  31058. Zhebrevecyrillic: 0x04C1,
  31059. Zhecyrillic: 0x0416,
  31060. Zhedescendercyrillic: 0x0496,
  31061. Zhedieresiscyrillic: 0x04DC,
  31062. Zlinebelow: 0x1E94,
  31063. Zmonospace: 0xFF3A,
  31064. Zsmall: 0xF77A,
  31065. Zstroke: 0x01B5,
  31066. a: 0x0061,
  31067. aabengali: 0x0986,
  31068. aacute: 0x00E1,
  31069. aadeva: 0x0906,
  31070. aagujarati: 0x0A86,
  31071. aagurmukhi: 0x0A06,
  31072. aamatragurmukhi: 0x0A3E,
  31073. aarusquare: 0x3303,
  31074. aavowelsignbengali: 0x09BE,
  31075. aavowelsigndeva: 0x093E,
  31076. aavowelsigngujarati: 0x0ABE,
  31077. abbreviationmarkarmenian: 0x055F,
  31078. abbreviationsigndeva: 0x0970,
  31079. abengali: 0x0985,
  31080. abopomofo: 0x311A,
  31081. abreve: 0x0103,
  31082. abreveacute: 0x1EAF,
  31083. abrevecyrillic: 0x04D1,
  31084. abrevedotbelow: 0x1EB7,
  31085. abrevegrave: 0x1EB1,
  31086. abrevehookabove: 0x1EB3,
  31087. abrevetilde: 0x1EB5,
  31088. acaron: 0x01CE,
  31089. acircle: 0x24D0,
  31090. acircumflex: 0x00E2,
  31091. acircumflexacute: 0x1EA5,
  31092. acircumflexdotbelow: 0x1EAD,
  31093. acircumflexgrave: 0x1EA7,
  31094. acircumflexhookabove: 0x1EA9,
  31095. acircumflextilde: 0x1EAB,
  31096. acute: 0x00B4,
  31097. acutebelowcmb: 0x0317,
  31098. acutecmb: 0x0301,
  31099. acutecomb: 0x0301,
  31100. acutedeva: 0x0954,
  31101. acutelowmod: 0x02CF,
  31102. acutetonecmb: 0x0341,
  31103. acyrillic: 0x0430,
  31104. adblgrave: 0x0201,
  31105. addakgurmukhi: 0x0A71,
  31106. adeva: 0x0905,
  31107. adieresis: 0x00E4,
  31108. adieresiscyrillic: 0x04D3,
  31109. adieresismacron: 0x01DF,
  31110. adotbelow: 0x1EA1,
  31111. adotmacron: 0x01E1,
  31112. ae: 0x00E6,
  31113. aeacute: 0x01FD,
  31114. aekorean: 0x3150,
  31115. aemacron: 0x01E3,
  31116. afii00208: 0x2015,
  31117. afii08941: 0x20A4,
  31118. afii10017: 0x0410,
  31119. afii10018: 0x0411,
  31120. afii10019: 0x0412,
  31121. afii10020: 0x0413,
  31122. afii10021: 0x0414,
  31123. afii10022: 0x0415,
  31124. afii10023: 0x0401,
  31125. afii10024: 0x0416,
  31126. afii10025: 0x0417,
  31127. afii10026: 0x0418,
  31128. afii10027: 0x0419,
  31129. afii10028: 0x041A,
  31130. afii10029: 0x041B,
  31131. afii10030: 0x041C,
  31132. afii10031: 0x041D,
  31133. afii10032: 0x041E,
  31134. afii10033: 0x041F,
  31135. afii10034: 0x0420,
  31136. afii10035: 0x0421,
  31137. afii10036: 0x0422,
  31138. afii10037: 0x0423,
  31139. afii10038: 0x0424,
  31140. afii10039: 0x0425,
  31141. afii10040: 0x0426,
  31142. afii10041: 0x0427,
  31143. afii10042: 0x0428,
  31144. afii10043: 0x0429,
  31145. afii10044: 0x042A,
  31146. afii10045: 0x042B,
  31147. afii10046: 0x042C,
  31148. afii10047: 0x042D,
  31149. afii10048: 0x042E,
  31150. afii10049: 0x042F,
  31151. afii10050: 0x0490,
  31152. afii10051: 0x0402,
  31153. afii10052: 0x0403,
  31154. afii10053: 0x0404,
  31155. afii10054: 0x0405,
  31156. afii10055: 0x0406,
  31157. afii10056: 0x0407,
  31158. afii10057: 0x0408,
  31159. afii10058: 0x0409,
  31160. afii10059: 0x040A,
  31161. afii10060: 0x040B,
  31162. afii10061: 0x040C,
  31163. afii10062: 0x040E,
  31164. afii10063: 0xF6C4,
  31165. afii10064: 0xF6C5,
  31166. afii10065: 0x0430,
  31167. afii10066: 0x0431,
  31168. afii10067: 0x0432,
  31169. afii10068: 0x0433,
  31170. afii10069: 0x0434,
  31171. afii10070: 0x0435,
  31172. afii10071: 0x0451,
  31173. afii10072: 0x0436,
  31174. afii10073: 0x0437,
  31175. afii10074: 0x0438,
  31176. afii10075: 0x0439,
  31177. afii10076: 0x043A,
  31178. afii10077: 0x043B,
  31179. afii10078: 0x043C,
  31180. afii10079: 0x043D,
  31181. afii10080: 0x043E,
  31182. afii10081: 0x043F,
  31183. afii10082: 0x0440,
  31184. afii10083: 0x0441,
  31185. afii10084: 0x0442,
  31186. afii10085: 0x0443,
  31187. afii10086: 0x0444,
  31188. afii10087: 0x0445,
  31189. afii10088: 0x0446,
  31190. afii10089: 0x0447,
  31191. afii10090: 0x0448,
  31192. afii10091: 0x0449,
  31193. afii10092: 0x044A,
  31194. afii10093: 0x044B,
  31195. afii10094: 0x044C,
  31196. afii10095: 0x044D,
  31197. afii10096: 0x044E,
  31198. afii10097: 0x044F,
  31199. afii10098: 0x0491,
  31200. afii10099: 0x0452,
  31201. afii10100: 0x0453,
  31202. afii10101: 0x0454,
  31203. afii10102: 0x0455,
  31204. afii10103: 0x0456,
  31205. afii10104: 0x0457,
  31206. afii10105: 0x0458,
  31207. afii10106: 0x0459,
  31208. afii10107: 0x045A,
  31209. afii10108: 0x045B,
  31210. afii10109: 0x045C,
  31211. afii10110: 0x045E,
  31212. afii10145: 0x040F,
  31213. afii10146: 0x0462,
  31214. afii10147: 0x0472,
  31215. afii10148: 0x0474,
  31216. afii10192: 0xF6C6,
  31217. afii10193: 0x045F,
  31218. afii10194: 0x0463,
  31219. afii10195: 0x0473,
  31220. afii10196: 0x0475,
  31221. afii10831: 0xF6C7,
  31222. afii10832: 0xF6C8,
  31223. afii10846: 0x04D9,
  31224. afii299: 0x200E,
  31225. afii300: 0x200F,
  31226. afii301: 0x200D,
  31227. afii57381: 0x066A,
  31228. afii57388: 0x060C,
  31229. afii57392: 0x0660,
  31230. afii57393: 0x0661,
  31231. afii57394: 0x0662,
  31232. afii57395: 0x0663,
  31233. afii57396: 0x0664,
  31234. afii57397: 0x0665,
  31235. afii57398: 0x0666,
  31236. afii57399: 0x0667,
  31237. afii57400: 0x0668,
  31238. afii57401: 0x0669,
  31239. afii57403: 0x061B,
  31240. afii57407: 0x061F,
  31241. afii57409: 0x0621,
  31242. afii57410: 0x0622,
  31243. afii57411: 0x0623,
  31244. afii57412: 0x0624,
  31245. afii57413: 0x0625,
  31246. afii57414: 0x0626,
  31247. afii57415: 0x0627,
  31248. afii57416: 0x0628,
  31249. afii57417: 0x0629,
  31250. afii57418: 0x062A,
  31251. afii57419: 0x062B,
  31252. afii57420: 0x062C,
  31253. afii57421: 0x062D,
  31254. afii57422: 0x062E,
  31255. afii57423: 0x062F,
  31256. afii57424: 0x0630,
  31257. afii57425: 0x0631,
  31258. afii57426: 0x0632,
  31259. afii57427: 0x0633,
  31260. afii57428: 0x0634,
  31261. afii57429: 0x0635,
  31262. afii57430: 0x0636,
  31263. afii57431: 0x0637,
  31264. afii57432: 0x0638,
  31265. afii57433: 0x0639,
  31266. afii57434: 0x063A,
  31267. afii57440: 0x0640,
  31268. afii57441: 0x0641,
  31269. afii57442: 0x0642,
  31270. afii57443: 0x0643,
  31271. afii57444: 0x0644,
  31272. afii57445: 0x0645,
  31273. afii57446: 0x0646,
  31274. afii57448: 0x0648,
  31275. afii57449: 0x0649,
  31276. afii57450: 0x064A,
  31277. afii57451: 0x064B,
  31278. afii57452: 0x064C,
  31279. afii57453: 0x064D,
  31280. afii57454: 0x064E,
  31281. afii57455: 0x064F,
  31282. afii57456: 0x0650,
  31283. afii57457: 0x0651,
  31284. afii57458: 0x0652,
  31285. afii57470: 0x0647,
  31286. afii57505: 0x06A4,
  31287. afii57506: 0x067E,
  31288. afii57507: 0x0686,
  31289. afii57508: 0x0698,
  31290. afii57509: 0x06AF,
  31291. afii57511: 0x0679,
  31292. afii57512: 0x0688,
  31293. afii57513: 0x0691,
  31294. afii57514: 0x06BA,
  31295. afii57519: 0x06D2,
  31296. afii57534: 0x06D5,
  31297. afii57636: 0x20AA,
  31298. afii57645: 0x05BE,
  31299. afii57658: 0x05C3,
  31300. afii57664: 0x05D0,
  31301. afii57665: 0x05D1,
  31302. afii57666: 0x05D2,
  31303. afii57667: 0x05D3,
  31304. afii57668: 0x05D4,
  31305. afii57669: 0x05D5,
  31306. afii57670: 0x05D6,
  31307. afii57671: 0x05D7,
  31308. afii57672: 0x05D8,
  31309. afii57673: 0x05D9,
  31310. afii57674: 0x05DA,
  31311. afii57675: 0x05DB,
  31312. afii57676: 0x05DC,
  31313. afii57677: 0x05DD,
  31314. afii57678: 0x05DE,
  31315. afii57679: 0x05DF,
  31316. afii57680: 0x05E0,
  31317. afii57681: 0x05E1,
  31318. afii57682: 0x05E2,
  31319. afii57683: 0x05E3,
  31320. afii57684: 0x05E4,
  31321. afii57685: 0x05E5,
  31322. afii57686: 0x05E6,
  31323. afii57687: 0x05E7,
  31324. afii57688: 0x05E8,
  31325. afii57689: 0x05E9,
  31326. afii57690: 0x05EA,
  31327. afii57694: 0xFB2A,
  31328. afii57695: 0xFB2B,
  31329. afii57700: 0xFB4B,
  31330. afii57705: 0xFB1F,
  31331. afii57716: 0x05F0,
  31332. afii57717: 0x05F1,
  31333. afii57718: 0x05F2,
  31334. afii57723: 0xFB35,
  31335. afii57793: 0x05B4,
  31336. afii57794: 0x05B5,
  31337. afii57795: 0x05B6,
  31338. afii57796: 0x05BB,
  31339. afii57797: 0x05B8,
  31340. afii57798: 0x05B7,
  31341. afii57799: 0x05B0,
  31342. afii57800: 0x05B2,
  31343. afii57801: 0x05B1,
  31344. afii57802: 0x05B3,
  31345. afii57803: 0x05C2,
  31346. afii57804: 0x05C1,
  31347. afii57806: 0x05B9,
  31348. afii57807: 0x05BC,
  31349. afii57839: 0x05BD,
  31350. afii57841: 0x05BF,
  31351. afii57842: 0x05C0,
  31352. afii57929: 0x02BC,
  31353. afii61248: 0x2105,
  31354. afii61289: 0x2113,
  31355. afii61352: 0x2116,
  31356. afii61573: 0x202C,
  31357. afii61574: 0x202D,
  31358. afii61575: 0x202E,
  31359. afii61664: 0x200C,
  31360. afii63167: 0x066D,
  31361. afii64937: 0x02BD,
  31362. agrave: 0x00E0,
  31363. agujarati: 0x0A85,
  31364. agurmukhi: 0x0A05,
  31365. ahiragana: 0x3042,
  31366. ahookabove: 0x1EA3,
  31367. aibengali: 0x0990,
  31368. aibopomofo: 0x311E,
  31369. aideva: 0x0910,
  31370. aiecyrillic: 0x04D5,
  31371. aigujarati: 0x0A90,
  31372. aigurmukhi: 0x0A10,
  31373. aimatragurmukhi: 0x0A48,
  31374. ainarabic: 0x0639,
  31375. ainfinalarabic: 0xFECA,
  31376. aininitialarabic: 0xFECB,
  31377. ainmedialarabic: 0xFECC,
  31378. ainvertedbreve: 0x0203,
  31379. aivowelsignbengali: 0x09C8,
  31380. aivowelsigndeva: 0x0948,
  31381. aivowelsigngujarati: 0x0AC8,
  31382. akatakana: 0x30A2,
  31383. akatakanahalfwidth: 0xFF71,
  31384. akorean: 0x314F,
  31385. alef: 0x05D0,
  31386. alefarabic: 0x0627,
  31387. alefdageshhebrew: 0xFB30,
  31388. aleffinalarabic: 0xFE8E,
  31389. alefhamzaabovearabic: 0x0623,
  31390. alefhamzaabovefinalarabic: 0xFE84,
  31391. alefhamzabelowarabic: 0x0625,
  31392. alefhamzabelowfinalarabic: 0xFE88,
  31393. alefhebrew: 0x05D0,
  31394. aleflamedhebrew: 0xFB4F,
  31395. alefmaddaabovearabic: 0x0622,
  31396. alefmaddaabovefinalarabic: 0xFE82,
  31397. alefmaksuraarabic: 0x0649,
  31398. alefmaksurafinalarabic: 0xFEF0,
  31399. alefmaksurainitialarabic: 0xFEF3,
  31400. alefmaksuramedialarabic: 0xFEF4,
  31401. alefpatahhebrew: 0xFB2E,
  31402. alefqamatshebrew: 0xFB2F,
  31403. aleph: 0x2135,
  31404. allequal: 0x224C,
  31405. alpha: 0x03B1,
  31406. alphatonos: 0x03AC,
  31407. amacron: 0x0101,
  31408. amonospace: 0xFF41,
  31409. ampersand: 0x0026,
  31410. ampersandmonospace: 0xFF06,
  31411. ampersandsmall: 0xF726,
  31412. amsquare: 0x33C2,
  31413. anbopomofo: 0x3122,
  31414. angbopomofo: 0x3124,
  31415. angbracketleft: 0x3008, // This glyph is missing from Adobe's original list.
  31416. angbracketright: 0x3009, // This glyph is missing from Adobe's original list.
  31417. angkhankhuthai: 0x0E5A,
  31418. angle: 0x2220,
  31419. anglebracketleft: 0x3008,
  31420. anglebracketleftvertical: 0xFE3F,
  31421. anglebracketright: 0x3009,
  31422. anglebracketrightvertical: 0xFE40,
  31423. angleleft: 0x2329,
  31424. angleright: 0x232A,
  31425. angstrom: 0x212B,
  31426. anoteleia: 0x0387,
  31427. anudattadeva: 0x0952,
  31428. anusvarabengali: 0x0982,
  31429. anusvaradeva: 0x0902,
  31430. anusvaragujarati: 0x0A82,
  31431. aogonek: 0x0105,
  31432. apaatosquare: 0x3300,
  31433. aparen: 0x249C,
  31434. apostrophearmenian: 0x055A,
  31435. apostrophemod: 0x02BC,
  31436. apple: 0xF8FF,
  31437. approaches: 0x2250,
  31438. approxequal: 0x2248,
  31439. approxequalorimage: 0x2252,
  31440. approximatelyequal: 0x2245,
  31441. araeaekorean: 0x318E,
  31442. araeakorean: 0x318D,
  31443. arc: 0x2312,
  31444. arighthalfring: 0x1E9A,
  31445. aring: 0x00E5,
  31446. aringacute: 0x01FB,
  31447. aringbelow: 0x1E01,
  31448. arrowboth: 0x2194,
  31449. arrowdashdown: 0x21E3,
  31450. arrowdashleft: 0x21E0,
  31451. arrowdashright: 0x21E2,
  31452. arrowdashup: 0x21E1,
  31453. arrowdblboth: 0x21D4,
  31454. arrowdbldown: 0x21D3,
  31455. arrowdblleft: 0x21D0,
  31456. arrowdblright: 0x21D2,
  31457. arrowdblup: 0x21D1,
  31458. arrowdown: 0x2193,
  31459. arrowdownleft: 0x2199,
  31460. arrowdownright: 0x2198,
  31461. arrowdownwhite: 0x21E9,
  31462. arrowheaddownmod: 0x02C5,
  31463. arrowheadleftmod: 0x02C2,
  31464. arrowheadrightmod: 0x02C3,
  31465. arrowheadupmod: 0x02C4,
  31466. arrowhorizex: 0xF8E7,
  31467. arrowleft: 0x2190,
  31468. arrowleftdbl: 0x21D0,
  31469. arrowleftdblstroke: 0x21CD,
  31470. arrowleftoverright: 0x21C6,
  31471. arrowleftwhite: 0x21E6,
  31472. arrowright: 0x2192,
  31473. arrowrightdblstroke: 0x21CF,
  31474. arrowrightheavy: 0x279E,
  31475. arrowrightoverleft: 0x21C4,
  31476. arrowrightwhite: 0x21E8,
  31477. arrowtableft: 0x21E4,
  31478. arrowtabright: 0x21E5,
  31479. arrowup: 0x2191,
  31480. arrowupdn: 0x2195,
  31481. arrowupdnbse: 0x21A8,
  31482. arrowupdownbase: 0x21A8,
  31483. arrowupleft: 0x2196,
  31484. arrowupleftofdown: 0x21C5,
  31485. arrowupright: 0x2197,
  31486. arrowupwhite: 0x21E7,
  31487. arrowvertex: 0xF8E6,
  31488. asciicircum: 0x005E,
  31489. asciicircummonospace: 0xFF3E,
  31490. asciitilde: 0x007E,
  31491. asciitildemonospace: 0xFF5E,
  31492. ascript: 0x0251,
  31493. ascriptturned: 0x0252,
  31494. asmallhiragana: 0x3041,
  31495. asmallkatakana: 0x30A1,
  31496. asmallkatakanahalfwidth: 0xFF67,
  31497. asterisk: 0x002A,
  31498. asteriskaltonearabic: 0x066D,
  31499. asteriskarabic: 0x066D,
  31500. asteriskmath: 0x2217,
  31501. asteriskmonospace: 0xFF0A,
  31502. asterisksmall: 0xFE61,
  31503. asterism: 0x2042,
  31504. asuperior: 0xF6E9,
  31505. asymptoticallyequal: 0x2243,
  31506. at: 0x0040,
  31507. atilde: 0x00E3,
  31508. atmonospace: 0xFF20,
  31509. atsmall: 0xFE6B,
  31510. aturned: 0x0250,
  31511. aubengali: 0x0994,
  31512. aubopomofo: 0x3120,
  31513. audeva: 0x0914,
  31514. augujarati: 0x0A94,
  31515. augurmukhi: 0x0A14,
  31516. aulengthmarkbengali: 0x09D7,
  31517. aumatragurmukhi: 0x0A4C,
  31518. auvowelsignbengali: 0x09CC,
  31519. auvowelsigndeva: 0x094C,
  31520. auvowelsigngujarati: 0x0ACC,
  31521. avagrahadeva: 0x093D,
  31522. aybarmenian: 0x0561,
  31523. ayin: 0x05E2,
  31524. ayinaltonehebrew: 0xFB20,
  31525. ayinhebrew: 0x05E2,
  31526. b: 0x0062,
  31527. babengali: 0x09AC,
  31528. backslash: 0x005C,
  31529. backslashmonospace: 0xFF3C,
  31530. badeva: 0x092C,
  31531. bagujarati: 0x0AAC,
  31532. bagurmukhi: 0x0A2C,
  31533. bahiragana: 0x3070,
  31534. bahtthai: 0x0E3F,
  31535. bakatakana: 0x30D0,
  31536. bar: 0x007C,
  31537. barmonospace: 0xFF5C,
  31538. bbopomofo: 0x3105,
  31539. bcircle: 0x24D1,
  31540. bdotaccent: 0x1E03,
  31541. bdotbelow: 0x1E05,
  31542. beamedsixteenthnotes: 0x266C,
  31543. because: 0x2235,
  31544. becyrillic: 0x0431,
  31545. beharabic: 0x0628,
  31546. behfinalarabic: 0xFE90,
  31547. behinitialarabic: 0xFE91,
  31548. behiragana: 0x3079,
  31549. behmedialarabic: 0xFE92,
  31550. behmeeminitialarabic: 0xFC9F,
  31551. behmeemisolatedarabic: 0xFC08,
  31552. behnoonfinalarabic: 0xFC6D,
  31553. bekatakana: 0x30D9,
  31554. benarmenian: 0x0562,
  31555. bet: 0x05D1,
  31556. beta: 0x03B2,
  31557. betasymbolgreek: 0x03D0,
  31558. betdagesh: 0xFB31,
  31559. betdageshhebrew: 0xFB31,
  31560. bethebrew: 0x05D1,
  31561. betrafehebrew: 0xFB4C,
  31562. bhabengali: 0x09AD,
  31563. bhadeva: 0x092D,
  31564. bhagujarati: 0x0AAD,
  31565. bhagurmukhi: 0x0A2D,
  31566. bhook: 0x0253,
  31567. bihiragana: 0x3073,
  31568. bikatakana: 0x30D3,
  31569. bilabialclick: 0x0298,
  31570. bindigurmukhi: 0x0A02,
  31571. birusquare: 0x3331,
  31572. blackcircle: 0x25CF,
  31573. blackdiamond: 0x25C6,
  31574. blackdownpointingtriangle: 0x25BC,
  31575. blackleftpointingpointer: 0x25C4,
  31576. blackleftpointingtriangle: 0x25C0,
  31577. blacklenticularbracketleft: 0x3010,
  31578. blacklenticularbracketleftvertical: 0xFE3B,
  31579. blacklenticularbracketright: 0x3011,
  31580. blacklenticularbracketrightvertical: 0xFE3C,
  31581. blacklowerlefttriangle: 0x25E3,
  31582. blacklowerrighttriangle: 0x25E2,
  31583. blackrectangle: 0x25AC,
  31584. blackrightpointingpointer: 0x25BA,
  31585. blackrightpointingtriangle: 0x25B6,
  31586. blacksmallsquare: 0x25AA,
  31587. blacksmilingface: 0x263B,
  31588. blacksquare: 0x25A0,
  31589. blackstar: 0x2605,
  31590. blackupperlefttriangle: 0x25E4,
  31591. blackupperrighttriangle: 0x25E5,
  31592. blackuppointingsmalltriangle: 0x25B4,
  31593. blackuppointingtriangle: 0x25B2,
  31594. blank: 0x2423,
  31595. blinebelow: 0x1E07,
  31596. block: 0x2588,
  31597. bmonospace: 0xFF42,
  31598. bobaimaithai: 0x0E1A,
  31599. bohiragana: 0x307C,
  31600. bokatakana: 0x30DC,
  31601. bparen: 0x249D,
  31602. bqsquare: 0x33C3,
  31603. braceex: 0xF8F4,
  31604. braceleft: 0x007B,
  31605. braceleftbt: 0xF8F3,
  31606. braceleftmid: 0xF8F2,
  31607. braceleftmonospace: 0xFF5B,
  31608. braceleftsmall: 0xFE5B,
  31609. bracelefttp: 0xF8F1,
  31610. braceleftvertical: 0xFE37,
  31611. braceright: 0x007D,
  31612. bracerightbt: 0xF8FE,
  31613. bracerightmid: 0xF8FD,
  31614. bracerightmonospace: 0xFF5D,
  31615. bracerightsmall: 0xFE5C,
  31616. bracerighttp: 0xF8FC,
  31617. bracerightvertical: 0xFE38,
  31618. bracketleft: 0x005B,
  31619. bracketleftbt: 0xF8F0,
  31620. bracketleftex: 0xF8EF,
  31621. bracketleftmonospace: 0xFF3B,
  31622. bracketlefttp: 0xF8EE,
  31623. bracketright: 0x005D,
  31624. bracketrightbt: 0xF8FB,
  31625. bracketrightex: 0xF8FA,
  31626. bracketrightmonospace: 0xFF3D,
  31627. bracketrighttp: 0xF8F9,
  31628. breve: 0x02D8,
  31629. brevebelowcmb: 0x032E,
  31630. brevecmb: 0x0306,
  31631. breveinvertedbelowcmb: 0x032F,
  31632. breveinvertedcmb: 0x0311,
  31633. breveinverteddoublecmb: 0x0361,
  31634. bridgebelowcmb: 0x032A,
  31635. bridgeinvertedbelowcmb: 0x033A,
  31636. brokenbar: 0x00A6,
  31637. bstroke: 0x0180,
  31638. bsuperior: 0xF6EA,
  31639. btopbar: 0x0183,
  31640. buhiragana: 0x3076,
  31641. bukatakana: 0x30D6,
  31642. bullet: 0x2022,
  31643. bulletinverse: 0x25D8,
  31644. bulletoperator: 0x2219,
  31645. bullseye: 0x25CE,
  31646. c: 0x0063,
  31647. caarmenian: 0x056E,
  31648. cabengali: 0x099A,
  31649. cacute: 0x0107,
  31650. cadeva: 0x091A,
  31651. cagujarati: 0x0A9A,
  31652. cagurmukhi: 0x0A1A,
  31653. calsquare: 0x3388,
  31654. candrabindubengali: 0x0981,
  31655. candrabinducmb: 0x0310,
  31656. candrabindudeva: 0x0901,
  31657. candrabindugujarati: 0x0A81,
  31658. capslock: 0x21EA,
  31659. careof: 0x2105,
  31660. caron: 0x02C7,
  31661. caronbelowcmb: 0x032C,
  31662. caroncmb: 0x030C,
  31663. carriagereturn: 0x21B5,
  31664. cbopomofo: 0x3118,
  31665. ccaron: 0x010D,
  31666. ccedilla: 0x00E7,
  31667. ccedillaacute: 0x1E09,
  31668. ccircle: 0x24D2,
  31669. ccircumflex: 0x0109,
  31670. ccurl: 0x0255,
  31671. cdot: 0x010B,
  31672. cdotaccent: 0x010B,
  31673. cdsquare: 0x33C5,
  31674. cedilla: 0x00B8,
  31675. cedillacmb: 0x0327,
  31676. cent: 0x00A2,
  31677. centigrade: 0x2103,
  31678. centinferior: 0xF6DF,
  31679. centmonospace: 0xFFE0,
  31680. centoldstyle: 0xF7A2,
  31681. centsuperior: 0xF6E0,
  31682. chaarmenian: 0x0579,
  31683. chabengali: 0x099B,
  31684. chadeva: 0x091B,
  31685. chagujarati: 0x0A9B,
  31686. chagurmukhi: 0x0A1B,
  31687. chbopomofo: 0x3114,
  31688. cheabkhasiancyrillic: 0x04BD,
  31689. checkmark: 0x2713,
  31690. checyrillic: 0x0447,
  31691. chedescenderabkhasiancyrillic: 0x04BF,
  31692. chedescendercyrillic: 0x04B7,
  31693. chedieresiscyrillic: 0x04F5,
  31694. cheharmenian: 0x0573,
  31695. chekhakassiancyrillic: 0x04CC,
  31696. cheverticalstrokecyrillic: 0x04B9,
  31697. chi: 0x03C7,
  31698. chieuchacirclekorean: 0x3277,
  31699. chieuchaparenkorean: 0x3217,
  31700. chieuchcirclekorean: 0x3269,
  31701. chieuchkorean: 0x314A,
  31702. chieuchparenkorean: 0x3209,
  31703. chochangthai: 0x0E0A,
  31704. chochanthai: 0x0E08,
  31705. chochingthai: 0x0E09,
  31706. chochoethai: 0x0E0C,
  31707. chook: 0x0188,
  31708. cieucacirclekorean: 0x3276,
  31709. cieucaparenkorean: 0x3216,
  31710. cieuccirclekorean: 0x3268,
  31711. cieuckorean: 0x3148,
  31712. cieucparenkorean: 0x3208,
  31713. cieucuparenkorean: 0x321C,
  31714. circle: 0x25CB,
  31715. circlecopyrt: 0x00A9, // This glyph is missing from Adobe's original list.
  31716. circlemultiply: 0x2297,
  31717. circleot: 0x2299,
  31718. circleplus: 0x2295,
  31719. circlepostalmark: 0x3036,
  31720. circlewithlefthalfblack: 0x25D0,
  31721. circlewithrighthalfblack: 0x25D1,
  31722. circumflex: 0x02C6,
  31723. circumflexbelowcmb: 0x032D,
  31724. circumflexcmb: 0x0302,
  31725. clear: 0x2327,
  31726. clickalveolar: 0x01C2,
  31727. clickdental: 0x01C0,
  31728. clicklateral: 0x01C1,
  31729. clickretroflex: 0x01C3,
  31730. club: 0x2663,
  31731. clubsuitblack: 0x2663,
  31732. clubsuitwhite: 0x2667,
  31733. cmcubedsquare: 0x33A4,
  31734. cmonospace: 0xFF43,
  31735. cmsquaredsquare: 0x33A0,
  31736. coarmenian: 0x0581,
  31737. colon: 0x003A,
  31738. colonmonetary: 0x20A1,
  31739. colonmonospace: 0xFF1A,
  31740. colonsign: 0x20A1,
  31741. colonsmall: 0xFE55,
  31742. colontriangularhalfmod: 0x02D1,
  31743. colontriangularmod: 0x02D0,
  31744. comma: 0x002C,
  31745. commaabovecmb: 0x0313,
  31746. commaaboverightcmb: 0x0315,
  31747. commaaccent: 0xF6C3,
  31748. commaarabic: 0x060C,
  31749. commaarmenian: 0x055D,
  31750. commainferior: 0xF6E1,
  31751. commamonospace: 0xFF0C,
  31752. commareversedabovecmb: 0x0314,
  31753. commareversedmod: 0x02BD,
  31754. commasmall: 0xFE50,
  31755. commasuperior: 0xF6E2,
  31756. commaturnedabovecmb: 0x0312,
  31757. commaturnedmod: 0x02BB,
  31758. compass: 0x263C,
  31759. congruent: 0x2245,
  31760. contourintegral: 0x222E,
  31761. control: 0x2303,
  31762. controlACK: 0x0006,
  31763. controlBEL: 0x0007,
  31764. controlBS: 0x0008,
  31765. controlCAN: 0x0018,
  31766. controlCR: 0x000D,
  31767. controlDC1: 0x0011,
  31768. controlDC2: 0x0012,
  31769. controlDC3: 0x0013,
  31770. controlDC4: 0x0014,
  31771. controlDEL: 0x007F,
  31772. controlDLE: 0x0010,
  31773. controlEM: 0x0019,
  31774. controlENQ: 0x0005,
  31775. controlEOT: 0x0004,
  31776. controlESC: 0x001B,
  31777. controlETB: 0x0017,
  31778. controlETX: 0x0003,
  31779. controlFF: 0x000C,
  31780. controlFS: 0x001C,
  31781. controlGS: 0x001D,
  31782. controlHT: 0x0009,
  31783. controlLF: 0x000A,
  31784. controlNAK: 0x0015,
  31785. controlRS: 0x001E,
  31786. controlSI: 0x000F,
  31787. controlSO: 0x000E,
  31788. controlSOT: 0x0002,
  31789. controlSTX: 0x0001,
  31790. controlSUB: 0x001A,
  31791. controlSYN: 0x0016,
  31792. controlUS: 0x001F,
  31793. controlVT: 0x000B,
  31794. copyright: 0x00A9,
  31795. copyrightsans: 0xF8E9,
  31796. copyrightserif: 0xF6D9,
  31797. cornerbracketleft: 0x300C,
  31798. cornerbracketlefthalfwidth: 0xFF62,
  31799. cornerbracketleftvertical: 0xFE41,
  31800. cornerbracketright: 0x300D,
  31801. cornerbracketrighthalfwidth: 0xFF63,
  31802. cornerbracketrightvertical: 0xFE42,
  31803. corporationsquare: 0x337F,
  31804. cosquare: 0x33C7,
  31805. coverkgsquare: 0x33C6,
  31806. cparen: 0x249E,
  31807. cruzeiro: 0x20A2,
  31808. cstretched: 0x0297,
  31809. curlyand: 0x22CF,
  31810. curlyor: 0x22CE,
  31811. currency: 0x00A4,
  31812. cyrBreve: 0xF6D1,
  31813. cyrFlex: 0xF6D2,
  31814. cyrbreve: 0xF6D4,
  31815. cyrflex: 0xF6D5,
  31816. d: 0x0064,
  31817. daarmenian: 0x0564,
  31818. dabengali: 0x09A6,
  31819. dadarabic: 0x0636,
  31820. dadeva: 0x0926,
  31821. dadfinalarabic: 0xFEBE,
  31822. dadinitialarabic: 0xFEBF,
  31823. dadmedialarabic: 0xFEC0,
  31824. dagesh: 0x05BC,
  31825. dageshhebrew: 0x05BC,
  31826. dagger: 0x2020,
  31827. daggerdbl: 0x2021,
  31828. dagujarati: 0x0AA6,
  31829. dagurmukhi: 0x0A26,
  31830. dahiragana: 0x3060,
  31831. dakatakana: 0x30C0,
  31832. dalarabic: 0x062F,
  31833. dalet: 0x05D3,
  31834. daletdagesh: 0xFB33,
  31835. daletdageshhebrew: 0xFB33,
  31836. dalethebrew: 0x05D3,
  31837. dalfinalarabic: 0xFEAA,
  31838. dammaarabic: 0x064F,
  31839. dammalowarabic: 0x064F,
  31840. dammatanaltonearabic: 0x064C,
  31841. dammatanarabic: 0x064C,
  31842. danda: 0x0964,
  31843. dargahebrew: 0x05A7,
  31844. dargalefthebrew: 0x05A7,
  31845. dasiapneumatacyrilliccmb: 0x0485,
  31846. dblGrave: 0xF6D3,
  31847. dblanglebracketleft: 0x300A,
  31848. dblanglebracketleftvertical: 0xFE3D,
  31849. dblanglebracketright: 0x300B,
  31850. dblanglebracketrightvertical: 0xFE3E,
  31851. dblarchinvertedbelowcmb: 0x032B,
  31852. dblarrowleft: 0x21D4,
  31853. dblarrowright: 0x21D2,
  31854. dbldanda: 0x0965,
  31855. dblgrave: 0xF6D6,
  31856. dblgravecmb: 0x030F,
  31857. dblintegral: 0x222C,
  31858. dbllowline: 0x2017,
  31859. dbllowlinecmb: 0x0333,
  31860. dbloverlinecmb: 0x033F,
  31861. dblprimemod: 0x02BA,
  31862. dblverticalbar: 0x2016,
  31863. dblverticallineabovecmb: 0x030E,
  31864. dbopomofo: 0x3109,
  31865. dbsquare: 0x33C8,
  31866. dcaron: 0x010F,
  31867. dcedilla: 0x1E11,
  31868. dcircle: 0x24D3,
  31869. dcircumflexbelow: 0x1E13,
  31870. dcroat: 0x0111,
  31871. ddabengali: 0x09A1,
  31872. ddadeva: 0x0921,
  31873. ddagujarati: 0x0AA1,
  31874. ddagurmukhi: 0x0A21,
  31875. ddalarabic: 0x0688,
  31876. ddalfinalarabic: 0xFB89,
  31877. dddhadeva: 0x095C,
  31878. ddhabengali: 0x09A2,
  31879. ddhadeva: 0x0922,
  31880. ddhagujarati: 0x0AA2,
  31881. ddhagurmukhi: 0x0A22,
  31882. ddotaccent: 0x1E0B,
  31883. ddotbelow: 0x1E0D,
  31884. decimalseparatorarabic: 0x066B,
  31885. decimalseparatorpersian: 0x066B,
  31886. decyrillic: 0x0434,
  31887. degree: 0x00B0,
  31888. dehihebrew: 0x05AD,
  31889. dehiragana: 0x3067,
  31890. deicoptic: 0x03EF,
  31891. dekatakana: 0x30C7,
  31892. deleteleft: 0x232B,
  31893. deleteright: 0x2326,
  31894. delta: 0x03B4,
  31895. deltaturned: 0x018D,
  31896. denominatorminusonenumeratorbengali: 0x09F8,
  31897. dezh: 0x02A4,
  31898. dhabengali: 0x09A7,
  31899. dhadeva: 0x0927,
  31900. dhagujarati: 0x0AA7,
  31901. dhagurmukhi: 0x0A27,
  31902. dhook: 0x0257,
  31903. dialytikatonos: 0x0385,
  31904. dialytikatonoscmb: 0x0344,
  31905. diamond: 0x2666,
  31906. diamondsuitwhite: 0x2662,
  31907. dieresis: 0x00A8,
  31908. dieresisacute: 0xF6D7,
  31909. dieresisbelowcmb: 0x0324,
  31910. dieresiscmb: 0x0308,
  31911. dieresisgrave: 0xF6D8,
  31912. dieresistonos: 0x0385,
  31913. dihiragana: 0x3062,
  31914. dikatakana: 0x30C2,
  31915. dittomark: 0x3003,
  31916. divide: 0x00F7,
  31917. divides: 0x2223,
  31918. divisionslash: 0x2215,
  31919. djecyrillic: 0x0452,
  31920. dkshade: 0x2593,
  31921. dlinebelow: 0x1E0F,
  31922. dlsquare: 0x3397,
  31923. dmacron: 0x0111,
  31924. dmonospace: 0xFF44,
  31925. dnblock: 0x2584,
  31926. dochadathai: 0x0E0E,
  31927. dodekthai: 0x0E14,
  31928. dohiragana: 0x3069,
  31929. dokatakana: 0x30C9,
  31930. dollar: 0x0024,
  31931. dollarinferior: 0xF6E3,
  31932. dollarmonospace: 0xFF04,
  31933. dollaroldstyle: 0xF724,
  31934. dollarsmall: 0xFE69,
  31935. dollarsuperior: 0xF6E4,
  31936. dong: 0x20AB,
  31937. dorusquare: 0x3326,
  31938. dotaccent: 0x02D9,
  31939. dotaccentcmb: 0x0307,
  31940. dotbelowcmb: 0x0323,
  31941. dotbelowcomb: 0x0323,
  31942. dotkatakana: 0x30FB,
  31943. dotlessi: 0x0131,
  31944. dotlessj: 0xF6BE,
  31945. dotlessjstrokehook: 0x0284,
  31946. dotmath: 0x22C5,
  31947. dottedcircle: 0x25CC,
  31948. doubleyodpatah: 0xFB1F,
  31949. doubleyodpatahhebrew: 0xFB1F,
  31950. downtackbelowcmb: 0x031E,
  31951. downtackmod: 0x02D5,
  31952. dparen: 0x249F,
  31953. dsuperior: 0xF6EB,
  31954. dtail: 0x0256,
  31955. dtopbar: 0x018C,
  31956. duhiragana: 0x3065,
  31957. dukatakana: 0x30C5,
  31958. dz: 0x01F3,
  31959. dzaltone: 0x02A3,
  31960. dzcaron: 0x01C6,
  31961. dzcurl: 0x02A5,
  31962. dzeabkhasiancyrillic: 0x04E1,
  31963. dzecyrillic: 0x0455,
  31964. dzhecyrillic: 0x045F,
  31965. e: 0x0065,
  31966. eacute: 0x00E9,
  31967. earth: 0x2641,
  31968. ebengali: 0x098F,
  31969. ebopomofo: 0x311C,
  31970. ebreve: 0x0115,
  31971. ecandradeva: 0x090D,
  31972. ecandragujarati: 0x0A8D,
  31973. ecandravowelsigndeva: 0x0945,
  31974. ecandravowelsigngujarati: 0x0AC5,
  31975. ecaron: 0x011B,
  31976. ecedillabreve: 0x1E1D,
  31977. echarmenian: 0x0565,
  31978. echyiwnarmenian: 0x0587,
  31979. ecircle: 0x24D4,
  31980. ecircumflex: 0x00EA,
  31981. ecircumflexacute: 0x1EBF,
  31982. ecircumflexbelow: 0x1E19,
  31983. ecircumflexdotbelow: 0x1EC7,
  31984. ecircumflexgrave: 0x1EC1,
  31985. ecircumflexhookabove: 0x1EC3,
  31986. ecircumflextilde: 0x1EC5,
  31987. ecyrillic: 0x0454,
  31988. edblgrave: 0x0205,
  31989. edeva: 0x090F,
  31990. edieresis: 0x00EB,
  31991. edot: 0x0117,
  31992. edotaccent: 0x0117,
  31993. edotbelow: 0x1EB9,
  31994. eegurmukhi: 0x0A0F,
  31995. eematragurmukhi: 0x0A47,
  31996. efcyrillic: 0x0444,
  31997. egrave: 0x00E8,
  31998. egujarati: 0x0A8F,
  31999. eharmenian: 0x0567,
  32000. ehbopomofo: 0x311D,
  32001. ehiragana: 0x3048,
  32002. ehookabove: 0x1EBB,
  32003. eibopomofo: 0x311F,
  32004. eight: 0x0038,
  32005. eightarabic: 0x0668,
  32006. eightbengali: 0x09EE,
  32007. eightcircle: 0x2467,
  32008. eightcircleinversesansserif: 0x2791,
  32009. eightdeva: 0x096E,
  32010. eighteencircle: 0x2471,
  32011. eighteenparen: 0x2485,
  32012. eighteenperiod: 0x2499,
  32013. eightgujarati: 0x0AEE,
  32014. eightgurmukhi: 0x0A6E,
  32015. eighthackarabic: 0x0668,
  32016. eighthangzhou: 0x3028,
  32017. eighthnotebeamed: 0x266B,
  32018. eightideographicparen: 0x3227,
  32019. eightinferior: 0x2088,
  32020. eightmonospace: 0xFF18,
  32021. eightoldstyle: 0xF738,
  32022. eightparen: 0x247B,
  32023. eightperiod: 0x248F,
  32024. eightpersian: 0x06F8,
  32025. eightroman: 0x2177,
  32026. eightsuperior: 0x2078,
  32027. eightthai: 0x0E58,
  32028. einvertedbreve: 0x0207,
  32029. eiotifiedcyrillic: 0x0465,
  32030. ekatakana: 0x30A8,
  32031. ekatakanahalfwidth: 0xFF74,
  32032. ekonkargurmukhi: 0x0A74,
  32033. ekorean: 0x3154,
  32034. elcyrillic: 0x043B,
  32035. element: 0x2208,
  32036. elevencircle: 0x246A,
  32037. elevenparen: 0x247E,
  32038. elevenperiod: 0x2492,
  32039. elevenroman: 0x217A,
  32040. ellipsis: 0x2026,
  32041. ellipsisvertical: 0x22EE,
  32042. emacron: 0x0113,
  32043. emacronacute: 0x1E17,
  32044. emacrongrave: 0x1E15,
  32045. emcyrillic: 0x043C,
  32046. emdash: 0x2014,
  32047. emdashvertical: 0xFE31,
  32048. emonospace: 0xFF45,
  32049. emphasismarkarmenian: 0x055B,
  32050. emptyset: 0x2205,
  32051. enbopomofo: 0x3123,
  32052. encyrillic: 0x043D,
  32053. endash: 0x2013,
  32054. endashvertical: 0xFE32,
  32055. endescendercyrillic: 0x04A3,
  32056. eng: 0x014B,
  32057. engbopomofo: 0x3125,
  32058. enghecyrillic: 0x04A5,
  32059. enhookcyrillic: 0x04C8,
  32060. enspace: 0x2002,
  32061. eogonek: 0x0119,
  32062. eokorean: 0x3153,
  32063. eopen: 0x025B,
  32064. eopenclosed: 0x029A,
  32065. eopenreversed: 0x025C,
  32066. eopenreversedclosed: 0x025E,
  32067. eopenreversedhook: 0x025D,
  32068. eparen: 0x24A0,
  32069. epsilon: 0x03B5,
  32070. epsilontonos: 0x03AD,
  32071. equal: 0x003D,
  32072. equalmonospace: 0xFF1D,
  32073. equalsmall: 0xFE66,
  32074. equalsuperior: 0x207C,
  32075. equivalence: 0x2261,
  32076. erbopomofo: 0x3126,
  32077. ercyrillic: 0x0440,
  32078. ereversed: 0x0258,
  32079. ereversedcyrillic: 0x044D,
  32080. escyrillic: 0x0441,
  32081. esdescendercyrillic: 0x04AB,
  32082. esh: 0x0283,
  32083. eshcurl: 0x0286,
  32084. eshortdeva: 0x090E,
  32085. eshortvowelsigndeva: 0x0946,
  32086. eshreversedloop: 0x01AA,
  32087. eshsquatreversed: 0x0285,
  32088. esmallhiragana: 0x3047,
  32089. esmallkatakana: 0x30A7,
  32090. esmallkatakanahalfwidth: 0xFF6A,
  32091. estimated: 0x212E,
  32092. esuperior: 0xF6EC,
  32093. eta: 0x03B7,
  32094. etarmenian: 0x0568,
  32095. etatonos: 0x03AE,
  32096. eth: 0x00F0,
  32097. etilde: 0x1EBD,
  32098. etildebelow: 0x1E1B,
  32099. etnahtafoukhhebrew: 0x0591,
  32100. etnahtafoukhlefthebrew: 0x0591,
  32101. etnahtahebrew: 0x0591,
  32102. etnahtalefthebrew: 0x0591,
  32103. eturned: 0x01DD,
  32104. eukorean: 0x3161,
  32105. euro: 0x20AC,
  32106. evowelsignbengali: 0x09C7,
  32107. evowelsigndeva: 0x0947,
  32108. evowelsigngujarati: 0x0AC7,
  32109. exclam: 0x0021,
  32110. exclamarmenian: 0x055C,
  32111. exclamdbl: 0x203C,
  32112. exclamdown: 0x00A1,
  32113. exclamdownsmall: 0xF7A1,
  32114. exclammonospace: 0xFF01,
  32115. exclamsmall: 0xF721,
  32116. existential: 0x2203,
  32117. ezh: 0x0292,
  32118. ezhcaron: 0x01EF,
  32119. ezhcurl: 0x0293,
  32120. ezhreversed: 0x01B9,
  32121. ezhtail: 0x01BA,
  32122. f: 0x0066,
  32123. fadeva: 0x095E,
  32124. fagurmukhi: 0x0A5E,
  32125. fahrenheit: 0x2109,
  32126. fathaarabic: 0x064E,
  32127. fathalowarabic: 0x064E,
  32128. fathatanarabic: 0x064B,
  32129. fbopomofo: 0x3108,
  32130. fcircle: 0x24D5,
  32131. fdotaccent: 0x1E1F,
  32132. feharabic: 0x0641,
  32133. feharmenian: 0x0586,
  32134. fehfinalarabic: 0xFED2,
  32135. fehinitialarabic: 0xFED3,
  32136. fehmedialarabic: 0xFED4,
  32137. feicoptic: 0x03E5,
  32138. female: 0x2640,
  32139. ff: 0xFB00,
  32140. ffi: 0xFB03,
  32141. ffl: 0xFB04,
  32142. fi: 0xFB01,
  32143. fifteencircle: 0x246E,
  32144. fifteenparen: 0x2482,
  32145. fifteenperiod: 0x2496,
  32146. figuredash: 0x2012,
  32147. filledbox: 0x25A0,
  32148. filledrect: 0x25AC,
  32149. finalkaf: 0x05DA,
  32150. finalkafdagesh: 0xFB3A,
  32151. finalkafdageshhebrew: 0xFB3A,
  32152. finalkafhebrew: 0x05DA,
  32153. finalmem: 0x05DD,
  32154. finalmemhebrew: 0x05DD,
  32155. finalnun: 0x05DF,
  32156. finalnunhebrew: 0x05DF,
  32157. finalpe: 0x05E3,
  32158. finalpehebrew: 0x05E3,
  32159. finaltsadi: 0x05E5,
  32160. finaltsadihebrew: 0x05E5,
  32161. firsttonechinese: 0x02C9,
  32162. fisheye: 0x25C9,
  32163. fitacyrillic: 0x0473,
  32164. five: 0x0035,
  32165. fivearabic: 0x0665,
  32166. fivebengali: 0x09EB,
  32167. fivecircle: 0x2464,
  32168. fivecircleinversesansserif: 0x278E,
  32169. fivedeva: 0x096B,
  32170. fiveeighths: 0x215D,
  32171. fivegujarati: 0x0AEB,
  32172. fivegurmukhi: 0x0A6B,
  32173. fivehackarabic: 0x0665,
  32174. fivehangzhou: 0x3025,
  32175. fiveideographicparen: 0x3224,
  32176. fiveinferior: 0x2085,
  32177. fivemonospace: 0xFF15,
  32178. fiveoldstyle: 0xF735,
  32179. fiveparen: 0x2478,
  32180. fiveperiod: 0x248C,
  32181. fivepersian: 0x06F5,
  32182. fiveroman: 0x2174,
  32183. fivesuperior: 0x2075,
  32184. fivethai: 0x0E55,
  32185. fl: 0xFB02,
  32186. florin: 0x0192,
  32187. fmonospace: 0xFF46,
  32188. fmsquare: 0x3399,
  32189. fofanthai: 0x0E1F,
  32190. fofathai: 0x0E1D,
  32191. fongmanthai: 0x0E4F,
  32192. forall: 0x2200,
  32193. four: 0x0034,
  32194. fourarabic: 0x0664,
  32195. fourbengali: 0x09EA,
  32196. fourcircle: 0x2463,
  32197. fourcircleinversesansserif: 0x278D,
  32198. fourdeva: 0x096A,
  32199. fourgujarati: 0x0AEA,
  32200. fourgurmukhi: 0x0A6A,
  32201. fourhackarabic: 0x0664,
  32202. fourhangzhou: 0x3024,
  32203. fourideographicparen: 0x3223,
  32204. fourinferior: 0x2084,
  32205. fourmonospace: 0xFF14,
  32206. fournumeratorbengali: 0x09F7,
  32207. fouroldstyle: 0xF734,
  32208. fourparen: 0x2477,
  32209. fourperiod: 0x248B,
  32210. fourpersian: 0x06F4,
  32211. fourroman: 0x2173,
  32212. foursuperior: 0x2074,
  32213. fourteencircle: 0x246D,
  32214. fourteenparen: 0x2481,
  32215. fourteenperiod: 0x2495,
  32216. fourthai: 0x0E54,
  32217. fourthtonechinese: 0x02CB,
  32218. fparen: 0x24A1,
  32219. fraction: 0x2044,
  32220. franc: 0x20A3,
  32221. g: 0x0067,
  32222. gabengali: 0x0997,
  32223. gacute: 0x01F5,
  32224. gadeva: 0x0917,
  32225. gafarabic: 0x06AF,
  32226. gaffinalarabic: 0xFB93,
  32227. gafinitialarabic: 0xFB94,
  32228. gafmedialarabic: 0xFB95,
  32229. gagujarati: 0x0A97,
  32230. gagurmukhi: 0x0A17,
  32231. gahiragana: 0x304C,
  32232. gakatakana: 0x30AC,
  32233. gamma: 0x03B3,
  32234. gammalatinsmall: 0x0263,
  32235. gammasuperior: 0x02E0,
  32236. gangiacoptic: 0x03EB,
  32237. gbopomofo: 0x310D,
  32238. gbreve: 0x011F,
  32239. gcaron: 0x01E7,
  32240. gcedilla: 0x0123,
  32241. gcircle: 0x24D6,
  32242. gcircumflex: 0x011D,
  32243. gcommaaccent: 0x0123,
  32244. gdot: 0x0121,
  32245. gdotaccent: 0x0121,
  32246. gecyrillic: 0x0433,
  32247. gehiragana: 0x3052,
  32248. gekatakana: 0x30B2,
  32249. geometricallyequal: 0x2251,
  32250. gereshaccenthebrew: 0x059C,
  32251. gereshhebrew: 0x05F3,
  32252. gereshmuqdamhebrew: 0x059D,
  32253. germandbls: 0x00DF,
  32254. gershayimaccenthebrew: 0x059E,
  32255. gershayimhebrew: 0x05F4,
  32256. getamark: 0x3013,
  32257. ghabengali: 0x0998,
  32258. ghadarmenian: 0x0572,
  32259. ghadeva: 0x0918,
  32260. ghagujarati: 0x0A98,
  32261. ghagurmukhi: 0x0A18,
  32262. ghainarabic: 0x063A,
  32263. ghainfinalarabic: 0xFECE,
  32264. ghaininitialarabic: 0xFECF,
  32265. ghainmedialarabic: 0xFED0,
  32266. ghemiddlehookcyrillic: 0x0495,
  32267. ghestrokecyrillic: 0x0493,
  32268. gheupturncyrillic: 0x0491,
  32269. ghhadeva: 0x095A,
  32270. ghhagurmukhi: 0x0A5A,
  32271. ghook: 0x0260,
  32272. ghzsquare: 0x3393,
  32273. gihiragana: 0x304E,
  32274. gikatakana: 0x30AE,
  32275. gimarmenian: 0x0563,
  32276. gimel: 0x05D2,
  32277. gimeldagesh: 0xFB32,
  32278. gimeldageshhebrew: 0xFB32,
  32279. gimelhebrew: 0x05D2,
  32280. gjecyrillic: 0x0453,
  32281. glottalinvertedstroke: 0x01BE,
  32282. glottalstop: 0x0294,
  32283. glottalstopinverted: 0x0296,
  32284. glottalstopmod: 0x02C0,
  32285. glottalstopreversed: 0x0295,
  32286. glottalstopreversedmod: 0x02C1,
  32287. glottalstopreversedsuperior: 0x02E4,
  32288. glottalstopstroke: 0x02A1,
  32289. glottalstopstrokereversed: 0x02A2,
  32290. gmacron: 0x1E21,
  32291. gmonospace: 0xFF47,
  32292. gohiragana: 0x3054,
  32293. gokatakana: 0x30B4,
  32294. gparen: 0x24A2,
  32295. gpasquare: 0x33AC,
  32296. gradient: 0x2207,
  32297. grave: 0x0060,
  32298. gravebelowcmb: 0x0316,
  32299. gravecmb: 0x0300,
  32300. gravecomb: 0x0300,
  32301. gravedeva: 0x0953,
  32302. gravelowmod: 0x02CE,
  32303. gravemonospace: 0xFF40,
  32304. gravetonecmb: 0x0340,
  32305. greater: 0x003E,
  32306. greaterequal: 0x2265,
  32307. greaterequalorless: 0x22DB,
  32308. greatermonospace: 0xFF1E,
  32309. greaterorequivalent: 0x2273,
  32310. greaterorless: 0x2277,
  32311. greateroverequal: 0x2267,
  32312. greatersmall: 0xFE65,
  32313. gscript: 0x0261,
  32314. gstroke: 0x01E5,
  32315. guhiragana: 0x3050,
  32316. guillemotleft: 0x00AB,
  32317. guillemotright: 0x00BB,
  32318. guilsinglleft: 0x2039,
  32319. guilsinglright: 0x203A,
  32320. gukatakana: 0x30B0,
  32321. guramusquare: 0x3318,
  32322. gysquare: 0x33C9,
  32323. h: 0x0068,
  32324. haabkhasiancyrillic: 0x04A9,
  32325. haaltonearabic: 0x06C1,
  32326. habengali: 0x09B9,
  32327. hadescendercyrillic: 0x04B3,
  32328. hadeva: 0x0939,
  32329. hagujarati: 0x0AB9,
  32330. hagurmukhi: 0x0A39,
  32331. haharabic: 0x062D,
  32332. hahfinalarabic: 0xFEA2,
  32333. hahinitialarabic: 0xFEA3,
  32334. hahiragana: 0x306F,
  32335. hahmedialarabic: 0xFEA4,
  32336. haitusquare: 0x332A,
  32337. hakatakana: 0x30CF,
  32338. hakatakanahalfwidth: 0xFF8A,
  32339. halantgurmukhi: 0x0A4D,
  32340. hamzaarabic: 0x0621,
  32341. hamzalowarabic: 0x0621,
  32342. hangulfiller: 0x3164,
  32343. hardsigncyrillic: 0x044A,
  32344. harpoonleftbarbup: 0x21BC,
  32345. harpoonrightbarbup: 0x21C0,
  32346. hasquare: 0x33CA,
  32347. hatafpatah: 0x05B2,
  32348. hatafpatah16: 0x05B2,
  32349. hatafpatah23: 0x05B2,
  32350. hatafpatah2f: 0x05B2,
  32351. hatafpatahhebrew: 0x05B2,
  32352. hatafpatahnarrowhebrew: 0x05B2,
  32353. hatafpatahquarterhebrew: 0x05B2,
  32354. hatafpatahwidehebrew: 0x05B2,
  32355. hatafqamats: 0x05B3,
  32356. hatafqamats1b: 0x05B3,
  32357. hatafqamats28: 0x05B3,
  32358. hatafqamats34: 0x05B3,
  32359. hatafqamatshebrew: 0x05B3,
  32360. hatafqamatsnarrowhebrew: 0x05B3,
  32361. hatafqamatsquarterhebrew: 0x05B3,
  32362. hatafqamatswidehebrew: 0x05B3,
  32363. hatafsegol: 0x05B1,
  32364. hatafsegol17: 0x05B1,
  32365. hatafsegol24: 0x05B1,
  32366. hatafsegol30: 0x05B1,
  32367. hatafsegolhebrew: 0x05B1,
  32368. hatafsegolnarrowhebrew: 0x05B1,
  32369. hatafsegolquarterhebrew: 0x05B1,
  32370. hatafsegolwidehebrew: 0x05B1,
  32371. hbar: 0x0127,
  32372. hbopomofo: 0x310F,
  32373. hbrevebelow: 0x1E2B,
  32374. hcedilla: 0x1E29,
  32375. hcircle: 0x24D7,
  32376. hcircumflex: 0x0125,
  32377. hdieresis: 0x1E27,
  32378. hdotaccent: 0x1E23,
  32379. hdotbelow: 0x1E25,
  32380. he: 0x05D4,
  32381. heart: 0x2665,
  32382. heartsuitblack: 0x2665,
  32383. heartsuitwhite: 0x2661,
  32384. hedagesh: 0xFB34,
  32385. hedageshhebrew: 0xFB34,
  32386. hehaltonearabic: 0x06C1,
  32387. heharabic: 0x0647,
  32388. hehebrew: 0x05D4,
  32389. hehfinalaltonearabic: 0xFBA7,
  32390. hehfinalalttwoarabic: 0xFEEA,
  32391. hehfinalarabic: 0xFEEA,
  32392. hehhamzaabovefinalarabic: 0xFBA5,
  32393. hehhamzaaboveisolatedarabic: 0xFBA4,
  32394. hehinitialaltonearabic: 0xFBA8,
  32395. hehinitialarabic: 0xFEEB,
  32396. hehiragana: 0x3078,
  32397. hehmedialaltonearabic: 0xFBA9,
  32398. hehmedialarabic: 0xFEEC,
  32399. heiseierasquare: 0x337B,
  32400. hekatakana: 0x30D8,
  32401. hekatakanahalfwidth: 0xFF8D,
  32402. hekutaarusquare: 0x3336,
  32403. henghook: 0x0267,
  32404. herutusquare: 0x3339,
  32405. het: 0x05D7,
  32406. hethebrew: 0x05D7,
  32407. hhook: 0x0266,
  32408. hhooksuperior: 0x02B1,
  32409. hieuhacirclekorean: 0x327B,
  32410. hieuhaparenkorean: 0x321B,
  32411. hieuhcirclekorean: 0x326D,
  32412. hieuhkorean: 0x314E,
  32413. hieuhparenkorean: 0x320D,
  32414. hihiragana: 0x3072,
  32415. hikatakana: 0x30D2,
  32416. hikatakanahalfwidth: 0xFF8B,
  32417. hiriq: 0x05B4,
  32418. hiriq14: 0x05B4,
  32419. hiriq21: 0x05B4,
  32420. hiriq2d: 0x05B4,
  32421. hiriqhebrew: 0x05B4,
  32422. hiriqnarrowhebrew: 0x05B4,
  32423. hiriqquarterhebrew: 0x05B4,
  32424. hiriqwidehebrew: 0x05B4,
  32425. hlinebelow: 0x1E96,
  32426. hmonospace: 0xFF48,
  32427. hoarmenian: 0x0570,
  32428. hohipthai: 0x0E2B,
  32429. hohiragana: 0x307B,
  32430. hokatakana: 0x30DB,
  32431. hokatakanahalfwidth: 0xFF8E,
  32432. holam: 0x05B9,
  32433. holam19: 0x05B9,
  32434. holam26: 0x05B9,
  32435. holam32: 0x05B9,
  32436. holamhebrew: 0x05B9,
  32437. holamnarrowhebrew: 0x05B9,
  32438. holamquarterhebrew: 0x05B9,
  32439. holamwidehebrew: 0x05B9,
  32440. honokhukthai: 0x0E2E,
  32441. hookabovecomb: 0x0309,
  32442. hookcmb: 0x0309,
  32443. hookpalatalizedbelowcmb: 0x0321,
  32444. hookretroflexbelowcmb: 0x0322,
  32445. hoonsquare: 0x3342,
  32446. horicoptic: 0x03E9,
  32447. horizontalbar: 0x2015,
  32448. horncmb: 0x031B,
  32449. hotsprings: 0x2668,
  32450. house: 0x2302,
  32451. hparen: 0x24A3,
  32452. hsuperior: 0x02B0,
  32453. hturned: 0x0265,
  32454. huhiragana: 0x3075,
  32455. huiitosquare: 0x3333,
  32456. hukatakana: 0x30D5,
  32457. hukatakanahalfwidth: 0xFF8C,
  32458. hungarumlaut: 0x02DD,
  32459. hungarumlautcmb: 0x030B,
  32460. hv: 0x0195,
  32461. hyphen: 0x002D,
  32462. hypheninferior: 0xF6E5,
  32463. hyphenmonospace: 0xFF0D,
  32464. hyphensmall: 0xFE63,
  32465. hyphensuperior: 0xF6E6,
  32466. hyphentwo: 0x2010,
  32467. i: 0x0069,
  32468. iacute: 0x00ED,
  32469. iacyrillic: 0x044F,
  32470. ibengali: 0x0987,
  32471. ibopomofo: 0x3127,
  32472. ibreve: 0x012D,
  32473. icaron: 0x01D0,
  32474. icircle: 0x24D8,
  32475. icircumflex: 0x00EE,
  32476. icyrillic: 0x0456,
  32477. idblgrave: 0x0209,
  32478. ideographearthcircle: 0x328F,
  32479. ideographfirecircle: 0x328B,
  32480. ideographicallianceparen: 0x323F,
  32481. ideographiccallparen: 0x323A,
  32482. ideographiccentrecircle: 0x32A5,
  32483. ideographicclose: 0x3006,
  32484. ideographiccomma: 0x3001,
  32485. ideographiccommaleft: 0xFF64,
  32486. ideographiccongratulationparen: 0x3237,
  32487. ideographiccorrectcircle: 0x32A3,
  32488. ideographicearthparen: 0x322F,
  32489. ideographicenterpriseparen: 0x323D,
  32490. ideographicexcellentcircle: 0x329D,
  32491. ideographicfestivalparen: 0x3240,
  32492. ideographicfinancialcircle: 0x3296,
  32493. ideographicfinancialparen: 0x3236,
  32494. ideographicfireparen: 0x322B,
  32495. ideographichaveparen: 0x3232,
  32496. ideographichighcircle: 0x32A4,
  32497. ideographiciterationmark: 0x3005,
  32498. ideographiclaborcircle: 0x3298,
  32499. ideographiclaborparen: 0x3238,
  32500. ideographicleftcircle: 0x32A7,
  32501. ideographiclowcircle: 0x32A6,
  32502. ideographicmedicinecircle: 0x32A9,
  32503. ideographicmetalparen: 0x322E,
  32504. ideographicmoonparen: 0x322A,
  32505. ideographicnameparen: 0x3234,
  32506. ideographicperiod: 0x3002,
  32507. ideographicprintcircle: 0x329E,
  32508. ideographicreachparen: 0x3243,
  32509. ideographicrepresentparen: 0x3239,
  32510. ideographicresourceparen: 0x323E,
  32511. ideographicrightcircle: 0x32A8,
  32512. ideographicsecretcircle: 0x3299,
  32513. ideographicselfparen: 0x3242,
  32514. ideographicsocietyparen: 0x3233,
  32515. ideographicspace: 0x3000,
  32516. ideographicspecialparen: 0x3235,
  32517. ideographicstockparen: 0x3231,
  32518. ideographicstudyparen: 0x323B,
  32519. ideographicsunparen: 0x3230,
  32520. ideographicsuperviseparen: 0x323C,
  32521. ideographicwaterparen: 0x322C,
  32522. ideographicwoodparen: 0x322D,
  32523. ideographiczero: 0x3007,
  32524. ideographmetalcircle: 0x328E,
  32525. ideographmooncircle: 0x328A,
  32526. ideographnamecircle: 0x3294,
  32527. ideographsuncircle: 0x3290,
  32528. ideographwatercircle: 0x328C,
  32529. ideographwoodcircle: 0x328D,
  32530. ideva: 0x0907,
  32531. idieresis: 0x00EF,
  32532. idieresisacute: 0x1E2F,
  32533. idieresiscyrillic: 0x04E5,
  32534. idotbelow: 0x1ECB,
  32535. iebrevecyrillic: 0x04D7,
  32536. iecyrillic: 0x0435,
  32537. ieungacirclekorean: 0x3275,
  32538. ieungaparenkorean: 0x3215,
  32539. ieungcirclekorean: 0x3267,
  32540. ieungkorean: 0x3147,
  32541. ieungparenkorean: 0x3207,
  32542. igrave: 0x00EC,
  32543. igujarati: 0x0A87,
  32544. igurmukhi: 0x0A07,
  32545. ihiragana: 0x3044,
  32546. ihookabove: 0x1EC9,
  32547. iibengali: 0x0988,
  32548. iicyrillic: 0x0438,
  32549. iideva: 0x0908,
  32550. iigujarati: 0x0A88,
  32551. iigurmukhi: 0x0A08,
  32552. iimatragurmukhi: 0x0A40,
  32553. iinvertedbreve: 0x020B,
  32554. iishortcyrillic: 0x0439,
  32555. iivowelsignbengali: 0x09C0,
  32556. iivowelsigndeva: 0x0940,
  32557. iivowelsigngujarati: 0x0AC0,
  32558. ij: 0x0133,
  32559. ikatakana: 0x30A4,
  32560. ikatakanahalfwidth: 0xFF72,
  32561. ikorean: 0x3163,
  32562. ilde: 0x02DC,
  32563. iluyhebrew: 0x05AC,
  32564. imacron: 0x012B,
  32565. imacroncyrillic: 0x04E3,
  32566. imageorapproximatelyequal: 0x2253,
  32567. imatragurmukhi: 0x0A3F,
  32568. imonospace: 0xFF49,
  32569. increment: 0x2206,
  32570. infinity: 0x221E,
  32571. iniarmenian: 0x056B,
  32572. integral: 0x222B,
  32573. integralbottom: 0x2321,
  32574. integralbt: 0x2321,
  32575. integralex: 0xF8F5,
  32576. integraltop: 0x2320,
  32577. integraltp: 0x2320,
  32578. intersection: 0x2229,
  32579. intisquare: 0x3305,
  32580. invbullet: 0x25D8,
  32581. invcircle: 0x25D9,
  32582. invsmileface: 0x263B,
  32583. iocyrillic: 0x0451,
  32584. iogonek: 0x012F,
  32585. iota: 0x03B9,
  32586. iotadieresis: 0x03CA,
  32587. iotadieresistonos: 0x0390,
  32588. iotalatin: 0x0269,
  32589. iotatonos: 0x03AF,
  32590. iparen: 0x24A4,
  32591. irigurmukhi: 0x0A72,
  32592. ismallhiragana: 0x3043,
  32593. ismallkatakana: 0x30A3,
  32594. ismallkatakanahalfwidth: 0xFF68,
  32595. issharbengali: 0x09FA,
  32596. istroke: 0x0268,
  32597. isuperior: 0xF6ED,
  32598. iterationhiragana: 0x309D,
  32599. iterationkatakana: 0x30FD,
  32600. itilde: 0x0129,
  32601. itildebelow: 0x1E2D,
  32602. iubopomofo: 0x3129,
  32603. iucyrillic: 0x044E,
  32604. ivowelsignbengali: 0x09BF,
  32605. ivowelsigndeva: 0x093F,
  32606. ivowelsigngujarati: 0x0ABF,
  32607. izhitsacyrillic: 0x0475,
  32608. izhitsadblgravecyrillic: 0x0477,
  32609. j: 0x006A,
  32610. jaarmenian: 0x0571,
  32611. jabengali: 0x099C,
  32612. jadeva: 0x091C,
  32613. jagujarati: 0x0A9C,
  32614. jagurmukhi: 0x0A1C,
  32615. jbopomofo: 0x3110,
  32616. jcaron: 0x01F0,
  32617. jcircle: 0x24D9,
  32618. jcircumflex: 0x0135,
  32619. jcrossedtail: 0x029D,
  32620. jdotlessstroke: 0x025F,
  32621. jecyrillic: 0x0458,
  32622. jeemarabic: 0x062C,
  32623. jeemfinalarabic: 0xFE9E,
  32624. jeeminitialarabic: 0xFE9F,
  32625. jeemmedialarabic: 0xFEA0,
  32626. jeharabic: 0x0698,
  32627. jehfinalarabic: 0xFB8B,
  32628. jhabengali: 0x099D,
  32629. jhadeva: 0x091D,
  32630. jhagujarati: 0x0A9D,
  32631. jhagurmukhi: 0x0A1D,
  32632. jheharmenian: 0x057B,
  32633. jis: 0x3004,
  32634. jmonospace: 0xFF4A,
  32635. jparen: 0x24A5,
  32636. jsuperior: 0x02B2,
  32637. k: 0x006B,
  32638. kabashkircyrillic: 0x04A1,
  32639. kabengali: 0x0995,
  32640. kacute: 0x1E31,
  32641. kacyrillic: 0x043A,
  32642. kadescendercyrillic: 0x049B,
  32643. kadeva: 0x0915,
  32644. kaf: 0x05DB,
  32645. kafarabic: 0x0643,
  32646. kafdagesh: 0xFB3B,
  32647. kafdageshhebrew: 0xFB3B,
  32648. kaffinalarabic: 0xFEDA,
  32649. kafhebrew: 0x05DB,
  32650. kafinitialarabic: 0xFEDB,
  32651. kafmedialarabic: 0xFEDC,
  32652. kafrafehebrew: 0xFB4D,
  32653. kagujarati: 0x0A95,
  32654. kagurmukhi: 0x0A15,
  32655. kahiragana: 0x304B,
  32656. kahookcyrillic: 0x04C4,
  32657. kakatakana: 0x30AB,
  32658. kakatakanahalfwidth: 0xFF76,
  32659. kappa: 0x03BA,
  32660. kappasymbolgreek: 0x03F0,
  32661. kapyeounmieumkorean: 0x3171,
  32662. kapyeounphieuphkorean: 0x3184,
  32663. kapyeounpieupkorean: 0x3178,
  32664. kapyeounssangpieupkorean: 0x3179,
  32665. karoriisquare: 0x330D,
  32666. kashidaautoarabic: 0x0640,
  32667. kashidaautonosidebearingarabic: 0x0640,
  32668. kasmallkatakana: 0x30F5,
  32669. kasquare: 0x3384,
  32670. kasraarabic: 0x0650,
  32671. kasratanarabic: 0x064D,
  32672. kastrokecyrillic: 0x049F,
  32673. katahiraprolongmarkhalfwidth: 0xFF70,
  32674. kaverticalstrokecyrillic: 0x049D,
  32675. kbopomofo: 0x310E,
  32676. kcalsquare: 0x3389,
  32677. kcaron: 0x01E9,
  32678. kcedilla: 0x0137,
  32679. kcircle: 0x24DA,
  32680. kcommaaccent: 0x0137,
  32681. kdotbelow: 0x1E33,
  32682. keharmenian: 0x0584,
  32683. kehiragana: 0x3051,
  32684. kekatakana: 0x30B1,
  32685. kekatakanahalfwidth: 0xFF79,
  32686. kenarmenian: 0x056F,
  32687. kesmallkatakana: 0x30F6,
  32688. kgreenlandic: 0x0138,
  32689. khabengali: 0x0996,
  32690. khacyrillic: 0x0445,
  32691. khadeva: 0x0916,
  32692. khagujarati: 0x0A96,
  32693. khagurmukhi: 0x0A16,
  32694. khaharabic: 0x062E,
  32695. khahfinalarabic: 0xFEA6,
  32696. khahinitialarabic: 0xFEA7,
  32697. khahmedialarabic: 0xFEA8,
  32698. kheicoptic: 0x03E7,
  32699. khhadeva: 0x0959,
  32700. khhagurmukhi: 0x0A59,
  32701. khieukhacirclekorean: 0x3278,
  32702. khieukhaparenkorean: 0x3218,
  32703. khieukhcirclekorean: 0x326A,
  32704. khieukhkorean: 0x314B,
  32705. khieukhparenkorean: 0x320A,
  32706. khokhaithai: 0x0E02,
  32707. khokhonthai: 0x0E05,
  32708. khokhuatthai: 0x0E03,
  32709. khokhwaithai: 0x0E04,
  32710. khomutthai: 0x0E5B,
  32711. khook: 0x0199,
  32712. khorakhangthai: 0x0E06,
  32713. khzsquare: 0x3391,
  32714. kihiragana: 0x304D,
  32715. kikatakana: 0x30AD,
  32716. kikatakanahalfwidth: 0xFF77,
  32717. kiroguramusquare: 0x3315,
  32718. kiromeetorusquare: 0x3316,
  32719. kirosquare: 0x3314,
  32720. kiyeokacirclekorean: 0x326E,
  32721. kiyeokaparenkorean: 0x320E,
  32722. kiyeokcirclekorean: 0x3260,
  32723. kiyeokkorean: 0x3131,
  32724. kiyeokparenkorean: 0x3200,
  32725. kiyeoksioskorean: 0x3133,
  32726. kjecyrillic: 0x045C,
  32727. klinebelow: 0x1E35,
  32728. klsquare: 0x3398,
  32729. kmcubedsquare: 0x33A6,
  32730. kmonospace: 0xFF4B,
  32731. kmsquaredsquare: 0x33A2,
  32732. kohiragana: 0x3053,
  32733. kohmsquare: 0x33C0,
  32734. kokaithai: 0x0E01,
  32735. kokatakana: 0x30B3,
  32736. kokatakanahalfwidth: 0xFF7A,
  32737. kooposquare: 0x331E,
  32738. koppacyrillic: 0x0481,
  32739. koreanstandardsymbol: 0x327F,
  32740. koroniscmb: 0x0343,
  32741. kparen: 0x24A6,
  32742. kpasquare: 0x33AA,
  32743. ksicyrillic: 0x046F,
  32744. ktsquare: 0x33CF,
  32745. kturned: 0x029E,
  32746. kuhiragana: 0x304F,
  32747. kukatakana: 0x30AF,
  32748. kukatakanahalfwidth: 0xFF78,
  32749. kvsquare: 0x33B8,
  32750. kwsquare: 0x33BE,
  32751. l: 0x006C,
  32752. labengali: 0x09B2,
  32753. lacute: 0x013A,
  32754. ladeva: 0x0932,
  32755. lagujarati: 0x0AB2,
  32756. lagurmukhi: 0x0A32,
  32757. lakkhangyaothai: 0x0E45,
  32758. lamaleffinalarabic: 0xFEFC,
  32759. lamalefhamzaabovefinalarabic: 0xFEF8,
  32760. lamalefhamzaaboveisolatedarabic: 0xFEF7,
  32761. lamalefhamzabelowfinalarabic: 0xFEFA,
  32762. lamalefhamzabelowisolatedarabic: 0xFEF9,
  32763. lamalefisolatedarabic: 0xFEFB,
  32764. lamalefmaddaabovefinalarabic: 0xFEF6,
  32765. lamalefmaddaaboveisolatedarabic: 0xFEF5,
  32766. lamarabic: 0x0644,
  32767. lambda: 0x03BB,
  32768. lambdastroke: 0x019B,
  32769. lamed: 0x05DC,
  32770. lameddagesh: 0xFB3C,
  32771. lameddageshhebrew: 0xFB3C,
  32772. lamedhebrew: 0x05DC,
  32773. lamfinalarabic: 0xFEDE,
  32774. lamhahinitialarabic: 0xFCCA,
  32775. laminitialarabic: 0xFEDF,
  32776. lamjeeminitialarabic: 0xFCC9,
  32777. lamkhahinitialarabic: 0xFCCB,
  32778. lamlamhehisolatedarabic: 0xFDF2,
  32779. lammedialarabic: 0xFEE0,
  32780. lammeemhahinitialarabic: 0xFD88,
  32781. lammeeminitialarabic: 0xFCCC,
  32782. largecircle: 0x25EF,
  32783. lbar: 0x019A,
  32784. lbelt: 0x026C,
  32785. lbopomofo: 0x310C,
  32786. lcaron: 0x013E,
  32787. lcedilla: 0x013C,
  32788. lcircle: 0x24DB,
  32789. lcircumflexbelow: 0x1E3D,
  32790. lcommaaccent: 0x013C,
  32791. ldot: 0x0140,
  32792. ldotaccent: 0x0140,
  32793. ldotbelow: 0x1E37,
  32794. ldotbelowmacron: 0x1E39,
  32795. leftangleabovecmb: 0x031A,
  32796. lefttackbelowcmb: 0x0318,
  32797. less: 0x003C,
  32798. lessequal: 0x2264,
  32799. lessequalorgreater: 0x22DA,
  32800. lessmonospace: 0xFF1C,
  32801. lessorequivalent: 0x2272,
  32802. lessorgreater: 0x2276,
  32803. lessoverequal: 0x2266,
  32804. lesssmall: 0xFE64,
  32805. lezh: 0x026E,
  32806. lfblock: 0x258C,
  32807. lhookretroflex: 0x026D,
  32808. lira: 0x20A4,
  32809. liwnarmenian: 0x056C,
  32810. lj: 0x01C9,
  32811. ljecyrillic: 0x0459,
  32812. ll: 0xF6C0,
  32813. lladeva: 0x0933,
  32814. llagujarati: 0x0AB3,
  32815. llinebelow: 0x1E3B,
  32816. llladeva: 0x0934,
  32817. llvocalicbengali: 0x09E1,
  32818. llvocalicdeva: 0x0961,
  32819. llvocalicvowelsignbengali: 0x09E3,
  32820. llvocalicvowelsigndeva: 0x0963,
  32821. lmiddletilde: 0x026B,
  32822. lmonospace: 0xFF4C,
  32823. lmsquare: 0x33D0,
  32824. lochulathai: 0x0E2C,
  32825. logicaland: 0x2227,
  32826. logicalnot: 0x00AC,
  32827. logicalnotreversed: 0x2310,
  32828. logicalor: 0x2228,
  32829. lolingthai: 0x0E25,
  32830. longs: 0x017F,
  32831. lowlinecenterline: 0xFE4E,
  32832. lowlinecmb: 0x0332,
  32833. lowlinedashed: 0xFE4D,
  32834. lozenge: 0x25CA,
  32835. lparen: 0x24A7,
  32836. lslash: 0x0142,
  32837. lsquare: 0x2113,
  32838. lsuperior: 0xF6EE,
  32839. ltshade: 0x2591,
  32840. luthai: 0x0E26,
  32841. lvocalicbengali: 0x098C,
  32842. lvocalicdeva: 0x090C,
  32843. lvocalicvowelsignbengali: 0x09E2,
  32844. lvocalicvowelsigndeva: 0x0962,
  32845. lxsquare: 0x33D3,
  32846. m: 0x006D,
  32847. mabengali: 0x09AE,
  32848. macron: 0x00AF,
  32849. macronbelowcmb: 0x0331,
  32850. macroncmb: 0x0304,
  32851. macronlowmod: 0x02CD,
  32852. macronmonospace: 0xFFE3,
  32853. macute: 0x1E3F,
  32854. madeva: 0x092E,
  32855. magujarati: 0x0AAE,
  32856. magurmukhi: 0x0A2E,
  32857. mahapakhhebrew: 0x05A4,
  32858. mahapakhlefthebrew: 0x05A4,
  32859. mahiragana: 0x307E,
  32860. maichattawalowleftthai: 0xF895,
  32861. maichattawalowrightthai: 0xF894,
  32862. maichattawathai: 0x0E4B,
  32863. maichattawaupperleftthai: 0xF893,
  32864. maieklowleftthai: 0xF88C,
  32865. maieklowrightthai: 0xF88B,
  32866. maiekthai: 0x0E48,
  32867. maiekupperleftthai: 0xF88A,
  32868. maihanakatleftthai: 0xF884,
  32869. maihanakatthai: 0x0E31,
  32870. maitaikhuleftthai: 0xF889,
  32871. maitaikhuthai: 0x0E47,
  32872. maitholowleftthai: 0xF88F,
  32873. maitholowrightthai: 0xF88E,
  32874. maithothai: 0x0E49,
  32875. maithoupperleftthai: 0xF88D,
  32876. maitrilowleftthai: 0xF892,
  32877. maitrilowrightthai: 0xF891,
  32878. maitrithai: 0x0E4A,
  32879. maitriupperleftthai: 0xF890,
  32880. maiyamokthai: 0x0E46,
  32881. makatakana: 0x30DE,
  32882. makatakanahalfwidth: 0xFF8F,
  32883. male: 0x2642,
  32884. mansyonsquare: 0x3347,
  32885. maqafhebrew: 0x05BE,
  32886. mars: 0x2642,
  32887. masoracirclehebrew: 0x05AF,
  32888. masquare: 0x3383,
  32889. mbopomofo: 0x3107,
  32890. mbsquare: 0x33D4,
  32891. mcircle: 0x24DC,
  32892. mcubedsquare: 0x33A5,
  32893. mdotaccent: 0x1E41,
  32894. mdotbelow: 0x1E43,
  32895. meemarabic: 0x0645,
  32896. meemfinalarabic: 0xFEE2,
  32897. meeminitialarabic: 0xFEE3,
  32898. meemmedialarabic: 0xFEE4,
  32899. meemmeeminitialarabic: 0xFCD1,
  32900. meemmeemisolatedarabic: 0xFC48,
  32901. meetorusquare: 0x334D,
  32902. mehiragana: 0x3081,
  32903. meizierasquare: 0x337E,
  32904. mekatakana: 0x30E1,
  32905. mekatakanahalfwidth: 0xFF92,
  32906. mem: 0x05DE,
  32907. memdagesh: 0xFB3E,
  32908. memdageshhebrew: 0xFB3E,
  32909. memhebrew: 0x05DE,
  32910. menarmenian: 0x0574,
  32911. merkhahebrew: 0x05A5,
  32912. merkhakefulahebrew: 0x05A6,
  32913. merkhakefulalefthebrew: 0x05A6,
  32914. merkhalefthebrew: 0x05A5,
  32915. mhook: 0x0271,
  32916. mhzsquare: 0x3392,
  32917. middledotkatakanahalfwidth: 0xFF65,
  32918. middot: 0x00B7,
  32919. mieumacirclekorean: 0x3272,
  32920. mieumaparenkorean: 0x3212,
  32921. mieumcirclekorean: 0x3264,
  32922. mieumkorean: 0x3141,
  32923. mieumpansioskorean: 0x3170,
  32924. mieumparenkorean: 0x3204,
  32925. mieumpieupkorean: 0x316E,
  32926. mieumsioskorean: 0x316F,
  32927. mihiragana: 0x307F,
  32928. mikatakana: 0x30DF,
  32929. mikatakanahalfwidth: 0xFF90,
  32930. minus: 0x2212,
  32931. minusbelowcmb: 0x0320,
  32932. minuscircle: 0x2296,
  32933. minusmod: 0x02D7,
  32934. minusplus: 0x2213,
  32935. minute: 0x2032,
  32936. miribaarusquare: 0x334A,
  32937. mirisquare: 0x3349,
  32938. mlonglegturned: 0x0270,
  32939. mlsquare: 0x3396,
  32940. mmcubedsquare: 0x33A3,
  32941. mmonospace: 0xFF4D,
  32942. mmsquaredsquare: 0x339F,
  32943. mohiragana: 0x3082,
  32944. mohmsquare: 0x33C1,
  32945. mokatakana: 0x30E2,
  32946. mokatakanahalfwidth: 0xFF93,
  32947. molsquare: 0x33D6,
  32948. momathai: 0x0E21,
  32949. moverssquare: 0x33A7,
  32950. moverssquaredsquare: 0x33A8,
  32951. mparen: 0x24A8,
  32952. mpasquare: 0x33AB,
  32953. mssquare: 0x33B3,
  32954. msuperior: 0xF6EF,
  32955. mturned: 0x026F,
  32956. mu: 0x00B5,
  32957. mu1: 0x00B5,
  32958. muasquare: 0x3382,
  32959. muchgreater: 0x226B,
  32960. muchless: 0x226A,
  32961. mufsquare: 0x338C,
  32962. mugreek: 0x03BC,
  32963. mugsquare: 0x338D,
  32964. muhiragana: 0x3080,
  32965. mukatakana: 0x30E0,
  32966. mukatakanahalfwidth: 0xFF91,
  32967. mulsquare: 0x3395,
  32968. multiply: 0x00D7,
  32969. mumsquare: 0x339B,
  32970. munahhebrew: 0x05A3,
  32971. munahlefthebrew: 0x05A3,
  32972. musicalnote: 0x266A,
  32973. musicalnotedbl: 0x266B,
  32974. musicflatsign: 0x266D,
  32975. musicsharpsign: 0x266F,
  32976. mussquare: 0x33B2,
  32977. muvsquare: 0x33B6,
  32978. muwsquare: 0x33BC,
  32979. mvmegasquare: 0x33B9,
  32980. mvsquare: 0x33B7,
  32981. mwmegasquare: 0x33BF,
  32982. mwsquare: 0x33BD,
  32983. n: 0x006E,
  32984. nabengali: 0x09A8,
  32985. nabla: 0x2207,
  32986. nacute: 0x0144,
  32987. nadeva: 0x0928,
  32988. nagujarati: 0x0AA8,
  32989. nagurmukhi: 0x0A28,
  32990. nahiragana: 0x306A,
  32991. nakatakana: 0x30CA,
  32992. nakatakanahalfwidth: 0xFF85,
  32993. napostrophe: 0x0149,
  32994. nasquare: 0x3381,
  32995. nbopomofo: 0x310B,
  32996. nbspace: 0x00A0,
  32997. ncaron: 0x0148,
  32998. ncedilla: 0x0146,
  32999. ncircle: 0x24DD,
  33000. ncircumflexbelow: 0x1E4B,
  33001. ncommaaccent: 0x0146,
  33002. ndotaccent: 0x1E45,
  33003. ndotbelow: 0x1E47,
  33004. nehiragana: 0x306D,
  33005. nekatakana: 0x30CD,
  33006. nekatakanahalfwidth: 0xFF88,
  33007. newsheqelsign: 0x20AA,
  33008. nfsquare: 0x338B,
  33009. ngabengali: 0x0999,
  33010. ngadeva: 0x0919,
  33011. ngagujarati: 0x0A99,
  33012. ngagurmukhi: 0x0A19,
  33013. ngonguthai: 0x0E07,
  33014. nhiragana: 0x3093,
  33015. nhookleft: 0x0272,
  33016. nhookretroflex: 0x0273,
  33017. nieunacirclekorean: 0x326F,
  33018. nieunaparenkorean: 0x320F,
  33019. nieuncieuckorean: 0x3135,
  33020. nieuncirclekorean: 0x3261,
  33021. nieunhieuhkorean: 0x3136,
  33022. nieunkorean: 0x3134,
  33023. nieunpansioskorean: 0x3168,
  33024. nieunparenkorean: 0x3201,
  33025. nieunsioskorean: 0x3167,
  33026. nieuntikeutkorean: 0x3166,
  33027. nihiragana: 0x306B,
  33028. nikatakana: 0x30CB,
  33029. nikatakanahalfwidth: 0xFF86,
  33030. nikhahitleftthai: 0xF899,
  33031. nikhahitthai: 0x0E4D,
  33032. nine: 0x0039,
  33033. ninearabic: 0x0669,
  33034. ninebengali: 0x09EF,
  33035. ninecircle: 0x2468,
  33036. ninecircleinversesansserif: 0x2792,
  33037. ninedeva: 0x096F,
  33038. ninegujarati: 0x0AEF,
  33039. ninegurmukhi: 0x0A6F,
  33040. ninehackarabic: 0x0669,
  33041. ninehangzhou: 0x3029,
  33042. nineideographicparen: 0x3228,
  33043. nineinferior: 0x2089,
  33044. ninemonospace: 0xFF19,
  33045. nineoldstyle: 0xF739,
  33046. nineparen: 0x247C,
  33047. nineperiod: 0x2490,
  33048. ninepersian: 0x06F9,
  33049. nineroman: 0x2178,
  33050. ninesuperior: 0x2079,
  33051. nineteencircle: 0x2472,
  33052. nineteenparen: 0x2486,
  33053. nineteenperiod: 0x249A,
  33054. ninethai: 0x0E59,
  33055. nj: 0x01CC,
  33056. njecyrillic: 0x045A,
  33057. nkatakana: 0x30F3,
  33058. nkatakanahalfwidth: 0xFF9D,
  33059. nlegrightlong: 0x019E,
  33060. nlinebelow: 0x1E49,
  33061. nmonospace: 0xFF4E,
  33062. nmsquare: 0x339A,
  33063. nnabengali: 0x09A3,
  33064. nnadeva: 0x0923,
  33065. nnagujarati: 0x0AA3,
  33066. nnagurmukhi: 0x0A23,
  33067. nnnadeva: 0x0929,
  33068. nohiragana: 0x306E,
  33069. nokatakana: 0x30CE,
  33070. nokatakanahalfwidth: 0xFF89,
  33071. nonbreakingspace: 0x00A0,
  33072. nonenthai: 0x0E13,
  33073. nonuthai: 0x0E19,
  33074. noonarabic: 0x0646,
  33075. noonfinalarabic: 0xFEE6,
  33076. noonghunnaarabic: 0x06BA,
  33077. noonghunnafinalarabic: 0xFB9F,
  33078. nooninitialarabic: 0xFEE7,
  33079. noonjeeminitialarabic: 0xFCD2,
  33080. noonjeemisolatedarabic: 0xFC4B,
  33081. noonmedialarabic: 0xFEE8,
  33082. noonmeeminitialarabic: 0xFCD5,
  33083. noonmeemisolatedarabic: 0xFC4E,
  33084. noonnoonfinalarabic: 0xFC8D,
  33085. notcontains: 0x220C,
  33086. notelement: 0x2209,
  33087. notelementof: 0x2209,
  33088. notequal: 0x2260,
  33089. notgreater: 0x226F,
  33090. notgreaternorequal: 0x2271,
  33091. notgreaternorless: 0x2279,
  33092. notidentical: 0x2262,
  33093. notless: 0x226E,
  33094. notlessnorequal: 0x2270,
  33095. notparallel: 0x2226,
  33096. notprecedes: 0x2280,
  33097. notsubset: 0x2284,
  33098. notsucceeds: 0x2281,
  33099. notsuperset: 0x2285,
  33100. nowarmenian: 0x0576,
  33101. nparen: 0x24A9,
  33102. nssquare: 0x33B1,
  33103. nsuperior: 0x207F,
  33104. ntilde: 0x00F1,
  33105. nu: 0x03BD,
  33106. nuhiragana: 0x306C,
  33107. nukatakana: 0x30CC,
  33108. nukatakanahalfwidth: 0xFF87,
  33109. nuktabengali: 0x09BC,
  33110. nuktadeva: 0x093C,
  33111. nuktagujarati: 0x0ABC,
  33112. nuktagurmukhi: 0x0A3C,
  33113. numbersign: 0x0023,
  33114. numbersignmonospace: 0xFF03,
  33115. numbersignsmall: 0xFE5F,
  33116. numeralsigngreek: 0x0374,
  33117. numeralsignlowergreek: 0x0375,
  33118. numero: 0x2116,
  33119. nun: 0x05E0,
  33120. nundagesh: 0xFB40,
  33121. nundageshhebrew: 0xFB40,
  33122. nunhebrew: 0x05E0,
  33123. nvsquare: 0x33B5,
  33124. nwsquare: 0x33BB,
  33125. nyabengali: 0x099E,
  33126. nyadeva: 0x091E,
  33127. nyagujarati: 0x0A9E,
  33128. nyagurmukhi: 0x0A1E,
  33129. o: 0x006F,
  33130. oacute: 0x00F3,
  33131. oangthai: 0x0E2D,
  33132. obarred: 0x0275,
  33133. obarredcyrillic: 0x04E9,
  33134. obarreddieresiscyrillic: 0x04EB,
  33135. obengali: 0x0993,
  33136. obopomofo: 0x311B,
  33137. obreve: 0x014F,
  33138. ocandradeva: 0x0911,
  33139. ocandragujarati: 0x0A91,
  33140. ocandravowelsigndeva: 0x0949,
  33141. ocandravowelsigngujarati: 0x0AC9,
  33142. ocaron: 0x01D2,
  33143. ocircle: 0x24DE,
  33144. ocircumflex: 0x00F4,
  33145. ocircumflexacute: 0x1ED1,
  33146. ocircumflexdotbelow: 0x1ED9,
  33147. ocircumflexgrave: 0x1ED3,
  33148. ocircumflexhookabove: 0x1ED5,
  33149. ocircumflextilde: 0x1ED7,
  33150. ocyrillic: 0x043E,
  33151. odblacute: 0x0151,
  33152. odblgrave: 0x020D,
  33153. odeva: 0x0913,
  33154. odieresis: 0x00F6,
  33155. odieresiscyrillic: 0x04E7,
  33156. odotbelow: 0x1ECD,
  33157. oe: 0x0153,
  33158. oekorean: 0x315A,
  33159. ogonek: 0x02DB,
  33160. ogonekcmb: 0x0328,
  33161. ograve: 0x00F2,
  33162. ogujarati: 0x0A93,
  33163. oharmenian: 0x0585,
  33164. ohiragana: 0x304A,
  33165. ohookabove: 0x1ECF,
  33166. ohorn: 0x01A1,
  33167. ohornacute: 0x1EDB,
  33168. ohorndotbelow: 0x1EE3,
  33169. ohorngrave: 0x1EDD,
  33170. ohornhookabove: 0x1EDF,
  33171. ohorntilde: 0x1EE1,
  33172. ohungarumlaut: 0x0151,
  33173. oi: 0x01A3,
  33174. oinvertedbreve: 0x020F,
  33175. okatakana: 0x30AA,
  33176. okatakanahalfwidth: 0xFF75,
  33177. okorean: 0x3157,
  33178. olehebrew: 0x05AB,
  33179. omacron: 0x014D,
  33180. omacronacute: 0x1E53,
  33181. omacrongrave: 0x1E51,
  33182. omdeva: 0x0950,
  33183. omega: 0x03C9,
  33184. omega1: 0x03D6,
  33185. omegacyrillic: 0x0461,
  33186. omegalatinclosed: 0x0277,
  33187. omegaroundcyrillic: 0x047B,
  33188. omegatitlocyrillic: 0x047D,
  33189. omegatonos: 0x03CE,
  33190. omgujarati: 0x0AD0,
  33191. omicron: 0x03BF,
  33192. omicrontonos: 0x03CC,
  33193. omonospace: 0xFF4F,
  33194. one: 0x0031,
  33195. onearabic: 0x0661,
  33196. onebengali: 0x09E7,
  33197. onecircle: 0x2460,
  33198. onecircleinversesansserif: 0x278A,
  33199. onedeva: 0x0967,
  33200. onedotenleader: 0x2024,
  33201. oneeighth: 0x215B,
  33202. onefitted: 0xF6DC,
  33203. onegujarati: 0x0AE7,
  33204. onegurmukhi: 0x0A67,
  33205. onehackarabic: 0x0661,
  33206. onehalf: 0x00BD,
  33207. onehangzhou: 0x3021,
  33208. oneideographicparen: 0x3220,
  33209. oneinferior: 0x2081,
  33210. onemonospace: 0xFF11,
  33211. onenumeratorbengali: 0x09F4,
  33212. oneoldstyle: 0xF731,
  33213. oneparen: 0x2474,
  33214. oneperiod: 0x2488,
  33215. onepersian: 0x06F1,
  33216. onequarter: 0x00BC,
  33217. oneroman: 0x2170,
  33218. onesuperior: 0x00B9,
  33219. onethai: 0x0E51,
  33220. onethird: 0x2153,
  33221. oogonek: 0x01EB,
  33222. oogonekmacron: 0x01ED,
  33223. oogurmukhi: 0x0A13,
  33224. oomatragurmukhi: 0x0A4B,
  33225. oopen: 0x0254,
  33226. oparen: 0x24AA,
  33227. openbullet: 0x25E6,
  33228. option: 0x2325,
  33229. ordfeminine: 0x00AA,
  33230. ordmasculine: 0x00BA,
  33231. orthogonal: 0x221F,
  33232. oshortdeva: 0x0912,
  33233. oshortvowelsigndeva: 0x094A,
  33234. oslash: 0x00F8,
  33235. oslashacute: 0x01FF,
  33236. osmallhiragana: 0x3049,
  33237. osmallkatakana: 0x30A9,
  33238. osmallkatakanahalfwidth: 0xFF6B,
  33239. ostrokeacute: 0x01FF,
  33240. osuperior: 0xF6F0,
  33241. otcyrillic: 0x047F,
  33242. otilde: 0x00F5,
  33243. otildeacute: 0x1E4D,
  33244. otildedieresis: 0x1E4F,
  33245. oubopomofo: 0x3121,
  33246. overline: 0x203E,
  33247. overlinecenterline: 0xFE4A,
  33248. overlinecmb: 0x0305,
  33249. overlinedashed: 0xFE49,
  33250. overlinedblwavy: 0xFE4C,
  33251. overlinewavy: 0xFE4B,
  33252. overscore: 0x00AF,
  33253. ovowelsignbengali: 0x09CB,
  33254. ovowelsigndeva: 0x094B,
  33255. ovowelsigngujarati: 0x0ACB,
  33256. p: 0x0070,
  33257. paampssquare: 0x3380,
  33258. paasentosquare: 0x332B,
  33259. pabengali: 0x09AA,
  33260. pacute: 0x1E55,
  33261. padeva: 0x092A,
  33262. pagedown: 0x21DF,
  33263. pageup: 0x21DE,
  33264. pagujarati: 0x0AAA,
  33265. pagurmukhi: 0x0A2A,
  33266. pahiragana: 0x3071,
  33267. paiyannoithai: 0x0E2F,
  33268. pakatakana: 0x30D1,
  33269. palatalizationcyrilliccmb: 0x0484,
  33270. palochkacyrillic: 0x04C0,
  33271. pansioskorean: 0x317F,
  33272. paragraph: 0x00B6,
  33273. parallel: 0x2225,
  33274. parenleft: 0x0028,
  33275. parenleftaltonearabic: 0xFD3E,
  33276. parenleftbt: 0xF8ED,
  33277. parenleftex: 0xF8EC,
  33278. parenleftinferior: 0x208D,
  33279. parenleftmonospace: 0xFF08,
  33280. parenleftsmall: 0xFE59,
  33281. parenleftsuperior: 0x207D,
  33282. parenlefttp: 0xF8EB,
  33283. parenleftvertical: 0xFE35,
  33284. parenright: 0x0029,
  33285. parenrightaltonearabic: 0xFD3F,
  33286. parenrightbt: 0xF8F8,
  33287. parenrightex: 0xF8F7,
  33288. parenrightinferior: 0x208E,
  33289. parenrightmonospace: 0xFF09,
  33290. parenrightsmall: 0xFE5A,
  33291. parenrightsuperior: 0x207E,
  33292. parenrighttp: 0xF8F6,
  33293. parenrightvertical: 0xFE36,
  33294. partialdiff: 0x2202,
  33295. paseqhebrew: 0x05C0,
  33296. pashtahebrew: 0x0599,
  33297. pasquare: 0x33A9,
  33298. patah: 0x05B7,
  33299. patah11: 0x05B7,
  33300. patah1d: 0x05B7,
  33301. patah2a: 0x05B7,
  33302. patahhebrew: 0x05B7,
  33303. patahnarrowhebrew: 0x05B7,
  33304. patahquarterhebrew: 0x05B7,
  33305. patahwidehebrew: 0x05B7,
  33306. pazerhebrew: 0x05A1,
  33307. pbopomofo: 0x3106,
  33308. pcircle: 0x24DF,
  33309. pdotaccent: 0x1E57,
  33310. pe: 0x05E4,
  33311. pecyrillic: 0x043F,
  33312. pedagesh: 0xFB44,
  33313. pedageshhebrew: 0xFB44,
  33314. peezisquare: 0x333B,
  33315. pefinaldageshhebrew: 0xFB43,
  33316. peharabic: 0x067E,
  33317. peharmenian: 0x057A,
  33318. pehebrew: 0x05E4,
  33319. pehfinalarabic: 0xFB57,
  33320. pehinitialarabic: 0xFB58,
  33321. pehiragana: 0x307A,
  33322. pehmedialarabic: 0xFB59,
  33323. pekatakana: 0x30DA,
  33324. pemiddlehookcyrillic: 0x04A7,
  33325. perafehebrew: 0xFB4E,
  33326. percent: 0x0025,
  33327. percentarabic: 0x066A,
  33328. percentmonospace: 0xFF05,
  33329. percentsmall: 0xFE6A,
  33330. period: 0x002E,
  33331. periodarmenian: 0x0589,
  33332. periodcentered: 0x00B7,
  33333. periodhalfwidth: 0xFF61,
  33334. periodinferior: 0xF6E7,
  33335. periodmonospace: 0xFF0E,
  33336. periodsmall: 0xFE52,
  33337. periodsuperior: 0xF6E8,
  33338. perispomenigreekcmb: 0x0342,
  33339. perpendicular: 0x22A5,
  33340. perthousand: 0x2030,
  33341. peseta: 0x20A7,
  33342. pfsquare: 0x338A,
  33343. phabengali: 0x09AB,
  33344. phadeva: 0x092B,
  33345. phagujarati: 0x0AAB,
  33346. phagurmukhi: 0x0A2B,
  33347. phi: 0x03C6,
  33348. phi1: 0x03D5,
  33349. phieuphacirclekorean: 0x327A,
  33350. phieuphaparenkorean: 0x321A,
  33351. phieuphcirclekorean: 0x326C,
  33352. phieuphkorean: 0x314D,
  33353. phieuphparenkorean: 0x320C,
  33354. philatin: 0x0278,
  33355. phinthuthai: 0x0E3A,
  33356. phisymbolgreek: 0x03D5,
  33357. phook: 0x01A5,
  33358. phophanthai: 0x0E1E,
  33359. phophungthai: 0x0E1C,
  33360. phosamphaothai: 0x0E20,
  33361. pi: 0x03C0,
  33362. pieupacirclekorean: 0x3273,
  33363. pieupaparenkorean: 0x3213,
  33364. pieupcieuckorean: 0x3176,
  33365. pieupcirclekorean: 0x3265,
  33366. pieupkiyeokkorean: 0x3172,
  33367. pieupkorean: 0x3142,
  33368. pieupparenkorean: 0x3205,
  33369. pieupsioskiyeokkorean: 0x3174,
  33370. pieupsioskorean: 0x3144,
  33371. pieupsiostikeutkorean: 0x3175,
  33372. pieupthieuthkorean: 0x3177,
  33373. pieuptikeutkorean: 0x3173,
  33374. pihiragana: 0x3074,
  33375. pikatakana: 0x30D4,
  33376. pisymbolgreek: 0x03D6,
  33377. piwrarmenian: 0x0583,
  33378. plus: 0x002B,
  33379. plusbelowcmb: 0x031F,
  33380. pluscircle: 0x2295,
  33381. plusminus: 0x00B1,
  33382. plusmod: 0x02D6,
  33383. plusmonospace: 0xFF0B,
  33384. plussmall: 0xFE62,
  33385. plussuperior: 0x207A,
  33386. pmonospace: 0xFF50,
  33387. pmsquare: 0x33D8,
  33388. pohiragana: 0x307D,
  33389. pointingindexdownwhite: 0x261F,
  33390. pointingindexleftwhite: 0x261C,
  33391. pointingindexrightwhite: 0x261E,
  33392. pointingindexupwhite: 0x261D,
  33393. pokatakana: 0x30DD,
  33394. poplathai: 0x0E1B,
  33395. postalmark: 0x3012,
  33396. postalmarkface: 0x3020,
  33397. pparen: 0x24AB,
  33398. precedes: 0x227A,
  33399. prescription: 0x211E,
  33400. primemod: 0x02B9,
  33401. primereversed: 0x2035,
  33402. product: 0x220F,
  33403. projective: 0x2305,
  33404. prolongedkana: 0x30FC,
  33405. propellor: 0x2318,
  33406. propersubset: 0x2282,
  33407. propersuperset: 0x2283,
  33408. proportion: 0x2237,
  33409. proportional: 0x221D,
  33410. psi: 0x03C8,
  33411. psicyrillic: 0x0471,
  33412. psilipneumatacyrilliccmb: 0x0486,
  33413. pssquare: 0x33B0,
  33414. puhiragana: 0x3077,
  33415. pukatakana: 0x30D7,
  33416. pvsquare: 0x33B4,
  33417. pwsquare: 0x33BA,
  33418. q: 0x0071,
  33419. qadeva: 0x0958,
  33420. qadmahebrew: 0x05A8,
  33421. qafarabic: 0x0642,
  33422. qaffinalarabic: 0xFED6,
  33423. qafinitialarabic: 0xFED7,
  33424. qafmedialarabic: 0xFED8,
  33425. qamats: 0x05B8,
  33426. qamats10: 0x05B8,
  33427. qamats1a: 0x05B8,
  33428. qamats1c: 0x05B8,
  33429. qamats27: 0x05B8,
  33430. qamats29: 0x05B8,
  33431. qamats33: 0x05B8,
  33432. qamatsde: 0x05B8,
  33433. qamatshebrew: 0x05B8,
  33434. qamatsnarrowhebrew: 0x05B8,
  33435. qamatsqatanhebrew: 0x05B8,
  33436. qamatsqatannarrowhebrew: 0x05B8,
  33437. qamatsqatanquarterhebrew: 0x05B8,
  33438. qamatsqatanwidehebrew: 0x05B8,
  33439. qamatsquarterhebrew: 0x05B8,
  33440. qamatswidehebrew: 0x05B8,
  33441. qarneyparahebrew: 0x059F,
  33442. qbopomofo: 0x3111,
  33443. qcircle: 0x24E0,
  33444. qhook: 0x02A0,
  33445. qmonospace: 0xFF51,
  33446. qof: 0x05E7,
  33447. qofdagesh: 0xFB47,
  33448. qofdageshhebrew: 0xFB47,
  33449. qofhebrew: 0x05E7,
  33450. qparen: 0x24AC,
  33451. quarternote: 0x2669,
  33452. qubuts: 0x05BB,
  33453. qubuts18: 0x05BB,
  33454. qubuts25: 0x05BB,
  33455. qubuts31: 0x05BB,
  33456. qubutshebrew: 0x05BB,
  33457. qubutsnarrowhebrew: 0x05BB,
  33458. qubutsquarterhebrew: 0x05BB,
  33459. qubutswidehebrew: 0x05BB,
  33460. question: 0x003F,
  33461. questionarabic: 0x061F,
  33462. questionarmenian: 0x055E,
  33463. questiondown: 0x00BF,
  33464. questiondownsmall: 0xF7BF,
  33465. questiongreek: 0x037E,
  33466. questionmonospace: 0xFF1F,
  33467. questionsmall: 0xF73F,
  33468. quotedbl: 0x0022,
  33469. quotedblbase: 0x201E,
  33470. quotedblleft: 0x201C,
  33471. quotedblmonospace: 0xFF02,
  33472. quotedblprime: 0x301E,
  33473. quotedblprimereversed: 0x301D,
  33474. quotedblright: 0x201D,
  33475. quoteleft: 0x2018,
  33476. quoteleftreversed: 0x201B,
  33477. quotereversed: 0x201B,
  33478. quoteright: 0x2019,
  33479. quoterightn: 0x0149,
  33480. quotesinglbase: 0x201A,
  33481. quotesingle: 0x0027,
  33482. quotesinglemonospace: 0xFF07,
  33483. r: 0x0072,
  33484. raarmenian: 0x057C,
  33485. rabengali: 0x09B0,
  33486. racute: 0x0155,
  33487. radeva: 0x0930,
  33488. radical: 0x221A,
  33489. radicalex: 0xF8E5,
  33490. radoverssquare: 0x33AE,
  33491. radoverssquaredsquare: 0x33AF,
  33492. radsquare: 0x33AD,
  33493. rafe: 0x05BF,
  33494. rafehebrew: 0x05BF,
  33495. ragujarati: 0x0AB0,
  33496. ragurmukhi: 0x0A30,
  33497. rahiragana: 0x3089,
  33498. rakatakana: 0x30E9,
  33499. rakatakanahalfwidth: 0xFF97,
  33500. ralowerdiagonalbengali: 0x09F1,
  33501. ramiddlediagonalbengali: 0x09F0,
  33502. ramshorn: 0x0264,
  33503. ratio: 0x2236,
  33504. rbopomofo: 0x3116,
  33505. rcaron: 0x0159,
  33506. rcedilla: 0x0157,
  33507. rcircle: 0x24E1,
  33508. rcommaaccent: 0x0157,
  33509. rdblgrave: 0x0211,
  33510. rdotaccent: 0x1E59,
  33511. rdotbelow: 0x1E5B,
  33512. rdotbelowmacron: 0x1E5D,
  33513. referencemark: 0x203B,
  33514. reflexsubset: 0x2286,
  33515. reflexsuperset: 0x2287,
  33516. registered: 0x00AE,
  33517. registersans: 0xF8E8,
  33518. registerserif: 0xF6DA,
  33519. reharabic: 0x0631,
  33520. reharmenian: 0x0580,
  33521. rehfinalarabic: 0xFEAE,
  33522. rehiragana: 0x308C,
  33523. rekatakana: 0x30EC,
  33524. rekatakanahalfwidth: 0xFF9A,
  33525. resh: 0x05E8,
  33526. reshdageshhebrew: 0xFB48,
  33527. reshhebrew: 0x05E8,
  33528. reversedtilde: 0x223D,
  33529. reviahebrew: 0x0597,
  33530. reviamugrashhebrew: 0x0597,
  33531. revlogicalnot: 0x2310,
  33532. rfishhook: 0x027E,
  33533. rfishhookreversed: 0x027F,
  33534. rhabengali: 0x09DD,
  33535. rhadeva: 0x095D,
  33536. rho: 0x03C1,
  33537. rhook: 0x027D,
  33538. rhookturned: 0x027B,
  33539. rhookturnedsuperior: 0x02B5,
  33540. rhosymbolgreek: 0x03F1,
  33541. rhotichookmod: 0x02DE,
  33542. rieulacirclekorean: 0x3271,
  33543. rieulaparenkorean: 0x3211,
  33544. rieulcirclekorean: 0x3263,
  33545. rieulhieuhkorean: 0x3140,
  33546. rieulkiyeokkorean: 0x313A,
  33547. rieulkiyeoksioskorean: 0x3169,
  33548. rieulkorean: 0x3139,
  33549. rieulmieumkorean: 0x313B,
  33550. rieulpansioskorean: 0x316C,
  33551. rieulparenkorean: 0x3203,
  33552. rieulphieuphkorean: 0x313F,
  33553. rieulpieupkorean: 0x313C,
  33554. rieulpieupsioskorean: 0x316B,
  33555. rieulsioskorean: 0x313D,
  33556. rieulthieuthkorean: 0x313E,
  33557. rieultikeutkorean: 0x316A,
  33558. rieulyeorinhieuhkorean: 0x316D,
  33559. rightangle: 0x221F,
  33560. righttackbelowcmb: 0x0319,
  33561. righttriangle: 0x22BF,
  33562. rihiragana: 0x308A,
  33563. rikatakana: 0x30EA,
  33564. rikatakanahalfwidth: 0xFF98,
  33565. ring: 0x02DA,
  33566. ringbelowcmb: 0x0325,
  33567. ringcmb: 0x030A,
  33568. ringhalfleft: 0x02BF,
  33569. ringhalfleftarmenian: 0x0559,
  33570. ringhalfleftbelowcmb: 0x031C,
  33571. ringhalfleftcentered: 0x02D3,
  33572. ringhalfright: 0x02BE,
  33573. ringhalfrightbelowcmb: 0x0339,
  33574. ringhalfrightcentered: 0x02D2,
  33575. rinvertedbreve: 0x0213,
  33576. rittorusquare: 0x3351,
  33577. rlinebelow: 0x1E5F,
  33578. rlongleg: 0x027C,
  33579. rlonglegturned: 0x027A,
  33580. rmonospace: 0xFF52,
  33581. rohiragana: 0x308D,
  33582. rokatakana: 0x30ED,
  33583. rokatakanahalfwidth: 0xFF9B,
  33584. roruathai: 0x0E23,
  33585. rparen: 0x24AD,
  33586. rrabengali: 0x09DC,
  33587. rradeva: 0x0931,
  33588. rragurmukhi: 0x0A5C,
  33589. rreharabic: 0x0691,
  33590. rrehfinalarabic: 0xFB8D,
  33591. rrvocalicbengali: 0x09E0,
  33592. rrvocalicdeva: 0x0960,
  33593. rrvocalicgujarati: 0x0AE0,
  33594. rrvocalicvowelsignbengali: 0x09C4,
  33595. rrvocalicvowelsigndeva: 0x0944,
  33596. rrvocalicvowelsigngujarati: 0x0AC4,
  33597. rsuperior: 0xF6F1,
  33598. rtblock: 0x2590,
  33599. rturned: 0x0279,
  33600. rturnedsuperior: 0x02B4,
  33601. ruhiragana: 0x308B,
  33602. rukatakana: 0x30EB,
  33603. rukatakanahalfwidth: 0xFF99,
  33604. rupeemarkbengali: 0x09F2,
  33605. rupeesignbengali: 0x09F3,
  33606. rupiah: 0xF6DD,
  33607. ruthai: 0x0E24,
  33608. rvocalicbengali: 0x098B,
  33609. rvocalicdeva: 0x090B,
  33610. rvocalicgujarati: 0x0A8B,
  33611. rvocalicvowelsignbengali: 0x09C3,
  33612. rvocalicvowelsigndeva: 0x0943,
  33613. rvocalicvowelsigngujarati: 0x0AC3,
  33614. s: 0x0073,
  33615. sabengali: 0x09B8,
  33616. sacute: 0x015B,
  33617. sacutedotaccent: 0x1E65,
  33618. sadarabic: 0x0635,
  33619. sadeva: 0x0938,
  33620. sadfinalarabic: 0xFEBA,
  33621. sadinitialarabic: 0xFEBB,
  33622. sadmedialarabic: 0xFEBC,
  33623. sagujarati: 0x0AB8,
  33624. sagurmukhi: 0x0A38,
  33625. sahiragana: 0x3055,
  33626. sakatakana: 0x30B5,
  33627. sakatakanahalfwidth: 0xFF7B,
  33628. sallallahoualayhewasallamarabic: 0xFDFA,
  33629. samekh: 0x05E1,
  33630. samekhdagesh: 0xFB41,
  33631. samekhdageshhebrew: 0xFB41,
  33632. samekhhebrew: 0x05E1,
  33633. saraaathai: 0x0E32,
  33634. saraaethai: 0x0E41,
  33635. saraaimaimalaithai: 0x0E44,
  33636. saraaimaimuanthai: 0x0E43,
  33637. saraamthai: 0x0E33,
  33638. saraathai: 0x0E30,
  33639. saraethai: 0x0E40,
  33640. saraiileftthai: 0xF886,
  33641. saraiithai: 0x0E35,
  33642. saraileftthai: 0xF885,
  33643. saraithai: 0x0E34,
  33644. saraothai: 0x0E42,
  33645. saraueeleftthai: 0xF888,
  33646. saraueethai: 0x0E37,
  33647. saraueleftthai: 0xF887,
  33648. sarauethai: 0x0E36,
  33649. sarauthai: 0x0E38,
  33650. sarauuthai: 0x0E39,
  33651. sbopomofo: 0x3119,
  33652. scaron: 0x0161,
  33653. scarondotaccent: 0x1E67,
  33654. scedilla: 0x015F,
  33655. schwa: 0x0259,
  33656. schwacyrillic: 0x04D9,
  33657. schwadieresiscyrillic: 0x04DB,
  33658. schwahook: 0x025A,
  33659. scircle: 0x24E2,
  33660. scircumflex: 0x015D,
  33661. scommaaccent: 0x0219,
  33662. sdotaccent: 0x1E61,
  33663. sdotbelow: 0x1E63,
  33664. sdotbelowdotaccent: 0x1E69,
  33665. seagullbelowcmb: 0x033C,
  33666. second: 0x2033,
  33667. secondtonechinese: 0x02CA,
  33668. section: 0x00A7,
  33669. seenarabic: 0x0633,
  33670. seenfinalarabic: 0xFEB2,
  33671. seeninitialarabic: 0xFEB3,
  33672. seenmedialarabic: 0xFEB4,
  33673. segol: 0x05B6,
  33674. segol13: 0x05B6,
  33675. segol1f: 0x05B6,
  33676. segol2c: 0x05B6,
  33677. segolhebrew: 0x05B6,
  33678. segolnarrowhebrew: 0x05B6,
  33679. segolquarterhebrew: 0x05B6,
  33680. segoltahebrew: 0x0592,
  33681. segolwidehebrew: 0x05B6,
  33682. seharmenian: 0x057D,
  33683. sehiragana: 0x305B,
  33684. sekatakana: 0x30BB,
  33685. sekatakanahalfwidth: 0xFF7E,
  33686. semicolon: 0x003B,
  33687. semicolonarabic: 0x061B,
  33688. semicolonmonospace: 0xFF1B,
  33689. semicolonsmall: 0xFE54,
  33690. semivoicedmarkkana: 0x309C,
  33691. semivoicedmarkkanahalfwidth: 0xFF9F,
  33692. sentisquare: 0x3322,
  33693. sentosquare: 0x3323,
  33694. seven: 0x0037,
  33695. sevenarabic: 0x0667,
  33696. sevenbengali: 0x09ED,
  33697. sevencircle: 0x2466,
  33698. sevencircleinversesansserif: 0x2790,
  33699. sevendeva: 0x096D,
  33700. seveneighths: 0x215E,
  33701. sevengujarati: 0x0AED,
  33702. sevengurmukhi: 0x0A6D,
  33703. sevenhackarabic: 0x0667,
  33704. sevenhangzhou: 0x3027,
  33705. sevenideographicparen: 0x3226,
  33706. seveninferior: 0x2087,
  33707. sevenmonospace: 0xFF17,
  33708. sevenoldstyle: 0xF737,
  33709. sevenparen: 0x247A,
  33710. sevenperiod: 0x248E,
  33711. sevenpersian: 0x06F7,
  33712. sevenroman: 0x2176,
  33713. sevensuperior: 0x2077,
  33714. seventeencircle: 0x2470,
  33715. seventeenparen: 0x2484,
  33716. seventeenperiod: 0x2498,
  33717. seventhai: 0x0E57,
  33718. sfthyphen: 0x00AD,
  33719. shaarmenian: 0x0577,
  33720. shabengali: 0x09B6,
  33721. shacyrillic: 0x0448,
  33722. shaddaarabic: 0x0651,
  33723. shaddadammaarabic: 0xFC61,
  33724. shaddadammatanarabic: 0xFC5E,
  33725. shaddafathaarabic: 0xFC60,
  33726. shaddakasraarabic: 0xFC62,
  33727. shaddakasratanarabic: 0xFC5F,
  33728. shade: 0x2592,
  33729. shadedark: 0x2593,
  33730. shadelight: 0x2591,
  33731. shademedium: 0x2592,
  33732. shadeva: 0x0936,
  33733. shagujarati: 0x0AB6,
  33734. shagurmukhi: 0x0A36,
  33735. shalshelethebrew: 0x0593,
  33736. shbopomofo: 0x3115,
  33737. shchacyrillic: 0x0449,
  33738. sheenarabic: 0x0634,
  33739. sheenfinalarabic: 0xFEB6,
  33740. sheeninitialarabic: 0xFEB7,
  33741. sheenmedialarabic: 0xFEB8,
  33742. sheicoptic: 0x03E3,
  33743. sheqel: 0x20AA,
  33744. sheqelhebrew: 0x20AA,
  33745. sheva: 0x05B0,
  33746. sheva115: 0x05B0,
  33747. sheva15: 0x05B0,
  33748. sheva22: 0x05B0,
  33749. sheva2e: 0x05B0,
  33750. shevahebrew: 0x05B0,
  33751. shevanarrowhebrew: 0x05B0,
  33752. shevaquarterhebrew: 0x05B0,
  33753. shevawidehebrew: 0x05B0,
  33754. shhacyrillic: 0x04BB,
  33755. shimacoptic: 0x03ED,
  33756. shin: 0x05E9,
  33757. shindagesh: 0xFB49,
  33758. shindageshhebrew: 0xFB49,
  33759. shindageshshindot: 0xFB2C,
  33760. shindageshshindothebrew: 0xFB2C,
  33761. shindageshsindot: 0xFB2D,
  33762. shindageshsindothebrew: 0xFB2D,
  33763. shindothebrew: 0x05C1,
  33764. shinhebrew: 0x05E9,
  33765. shinshindot: 0xFB2A,
  33766. shinshindothebrew: 0xFB2A,
  33767. shinsindot: 0xFB2B,
  33768. shinsindothebrew: 0xFB2B,
  33769. shook: 0x0282,
  33770. sigma: 0x03C3,
  33771. sigma1: 0x03C2,
  33772. sigmafinal: 0x03C2,
  33773. sigmalunatesymbolgreek: 0x03F2,
  33774. sihiragana: 0x3057,
  33775. sikatakana: 0x30B7,
  33776. sikatakanahalfwidth: 0xFF7C,
  33777. siluqhebrew: 0x05BD,
  33778. siluqlefthebrew: 0x05BD,
  33779. similar: 0x223C,
  33780. sindothebrew: 0x05C2,
  33781. siosacirclekorean: 0x3274,
  33782. siosaparenkorean: 0x3214,
  33783. sioscieuckorean: 0x317E,
  33784. sioscirclekorean: 0x3266,
  33785. sioskiyeokkorean: 0x317A,
  33786. sioskorean: 0x3145,
  33787. siosnieunkorean: 0x317B,
  33788. siosparenkorean: 0x3206,
  33789. siospieupkorean: 0x317D,
  33790. siostikeutkorean: 0x317C,
  33791. six: 0x0036,
  33792. sixarabic: 0x0666,
  33793. sixbengali: 0x09EC,
  33794. sixcircle: 0x2465,
  33795. sixcircleinversesansserif: 0x278F,
  33796. sixdeva: 0x096C,
  33797. sixgujarati: 0x0AEC,
  33798. sixgurmukhi: 0x0A6C,
  33799. sixhackarabic: 0x0666,
  33800. sixhangzhou: 0x3026,
  33801. sixideographicparen: 0x3225,
  33802. sixinferior: 0x2086,
  33803. sixmonospace: 0xFF16,
  33804. sixoldstyle: 0xF736,
  33805. sixparen: 0x2479,
  33806. sixperiod: 0x248D,
  33807. sixpersian: 0x06F6,
  33808. sixroman: 0x2175,
  33809. sixsuperior: 0x2076,
  33810. sixteencircle: 0x246F,
  33811. sixteencurrencydenominatorbengali: 0x09F9,
  33812. sixteenparen: 0x2483,
  33813. sixteenperiod: 0x2497,
  33814. sixthai: 0x0E56,
  33815. slash: 0x002F,
  33816. slashmonospace: 0xFF0F,
  33817. slong: 0x017F,
  33818. slongdotaccent: 0x1E9B,
  33819. smileface: 0x263A,
  33820. smonospace: 0xFF53,
  33821. sofpasuqhebrew: 0x05C3,
  33822. softhyphen: 0x00AD,
  33823. softsigncyrillic: 0x044C,
  33824. sohiragana: 0x305D,
  33825. sokatakana: 0x30BD,
  33826. sokatakanahalfwidth: 0xFF7F,
  33827. soliduslongoverlaycmb: 0x0338,
  33828. solidusshortoverlaycmb: 0x0337,
  33829. sorusithai: 0x0E29,
  33830. sosalathai: 0x0E28,
  33831. sosothai: 0x0E0B,
  33832. sosuathai: 0x0E2A,
  33833. space: 0x0020,
  33834. spacehackarabic: 0x0020,
  33835. spade: 0x2660,
  33836. spadesuitblack: 0x2660,
  33837. spadesuitwhite: 0x2664,
  33838. sparen: 0x24AE,
  33839. squarebelowcmb: 0x033B,
  33840. squarecc: 0x33C4,
  33841. squarecm: 0x339D,
  33842. squarediagonalcrosshatchfill: 0x25A9,
  33843. squarehorizontalfill: 0x25A4,
  33844. squarekg: 0x338F,
  33845. squarekm: 0x339E,
  33846. squarekmcapital: 0x33CE,
  33847. squareln: 0x33D1,
  33848. squarelog: 0x33D2,
  33849. squaremg: 0x338E,
  33850. squaremil: 0x33D5,
  33851. squaremm: 0x339C,
  33852. squaremsquared: 0x33A1,
  33853. squareorthogonalcrosshatchfill: 0x25A6,
  33854. squareupperlefttolowerrightfill: 0x25A7,
  33855. squareupperrighttolowerleftfill: 0x25A8,
  33856. squareverticalfill: 0x25A5,
  33857. squarewhitewithsmallblack: 0x25A3,
  33858. srsquare: 0x33DB,
  33859. ssabengali: 0x09B7,
  33860. ssadeva: 0x0937,
  33861. ssagujarati: 0x0AB7,
  33862. ssangcieuckorean: 0x3149,
  33863. ssanghieuhkorean: 0x3185,
  33864. ssangieungkorean: 0x3180,
  33865. ssangkiyeokkorean: 0x3132,
  33866. ssangnieunkorean: 0x3165,
  33867. ssangpieupkorean: 0x3143,
  33868. ssangsioskorean: 0x3146,
  33869. ssangtikeutkorean: 0x3138,
  33870. ssuperior: 0xF6F2,
  33871. sterling: 0x00A3,
  33872. sterlingmonospace: 0xFFE1,
  33873. strokelongoverlaycmb: 0x0336,
  33874. strokeshortoverlaycmb: 0x0335,
  33875. subset: 0x2282,
  33876. subsetnotequal: 0x228A,
  33877. subsetorequal: 0x2286,
  33878. succeeds: 0x227B,
  33879. suchthat: 0x220B,
  33880. suhiragana: 0x3059,
  33881. sukatakana: 0x30B9,
  33882. sukatakanahalfwidth: 0xFF7D,
  33883. sukunarabic: 0x0652,
  33884. summation: 0x2211,
  33885. sun: 0x263C,
  33886. superset: 0x2283,
  33887. supersetnotequal: 0x228B,
  33888. supersetorequal: 0x2287,
  33889. svsquare: 0x33DC,
  33890. syouwaerasquare: 0x337C,
  33891. t: 0x0074,
  33892. tabengali: 0x09A4,
  33893. tackdown: 0x22A4,
  33894. tackleft: 0x22A3,
  33895. tadeva: 0x0924,
  33896. tagujarati: 0x0AA4,
  33897. tagurmukhi: 0x0A24,
  33898. taharabic: 0x0637,
  33899. tahfinalarabic: 0xFEC2,
  33900. tahinitialarabic: 0xFEC3,
  33901. tahiragana: 0x305F,
  33902. tahmedialarabic: 0xFEC4,
  33903. taisyouerasquare: 0x337D,
  33904. takatakana: 0x30BF,
  33905. takatakanahalfwidth: 0xFF80,
  33906. tatweelarabic: 0x0640,
  33907. tau: 0x03C4,
  33908. tav: 0x05EA,
  33909. tavdages: 0xFB4A,
  33910. tavdagesh: 0xFB4A,
  33911. tavdageshhebrew: 0xFB4A,
  33912. tavhebrew: 0x05EA,
  33913. tbar: 0x0167,
  33914. tbopomofo: 0x310A,
  33915. tcaron: 0x0165,
  33916. tccurl: 0x02A8,
  33917. tcedilla: 0x0163,
  33918. tcheharabic: 0x0686,
  33919. tchehfinalarabic: 0xFB7B,
  33920. tchehinitialarabic: 0xFB7C,
  33921. tchehmedialarabic: 0xFB7D,
  33922. tcircle: 0x24E3,
  33923. tcircumflexbelow: 0x1E71,
  33924. tcommaaccent: 0x0163,
  33925. tdieresis: 0x1E97,
  33926. tdotaccent: 0x1E6B,
  33927. tdotbelow: 0x1E6D,
  33928. tecyrillic: 0x0442,
  33929. tedescendercyrillic: 0x04AD,
  33930. teharabic: 0x062A,
  33931. tehfinalarabic: 0xFE96,
  33932. tehhahinitialarabic: 0xFCA2,
  33933. tehhahisolatedarabic: 0xFC0C,
  33934. tehinitialarabic: 0xFE97,
  33935. tehiragana: 0x3066,
  33936. tehjeeminitialarabic: 0xFCA1,
  33937. tehjeemisolatedarabic: 0xFC0B,
  33938. tehmarbutaarabic: 0x0629,
  33939. tehmarbutafinalarabic: 0xFE94,
  33940. tehmedialarabic: 0xFE98,
  33941. tehmeeminitialarabic: 0xFCA4,
  33942. tehmeemisolatedarabic: 0xFC0E,
  33943. tehnoonfinalarabic: 0xFC73,
  33944. tekatakana: 0x30C6,
  33945. tekatakanahalfwidth: 0xFF83,
  33946. telephone: 0x2121,
  33947. telephoneblack: 0x260E,
  33948. telishagedolahebrew: 0x05A0,
  33949. telishaqetanahebrew: 0x05A9,
  33950. tencircle: 0x2469,
  33951. tenideographicparen: 0x3229,
  33952. tenparen: 0x247D,
  33953. tenperiod: 0x2491,
  33954. tenroman: 0x2179,
  33955. tesh: 0x02A7,
  33956. tet: 0x05D8,
  33957. tetdagesh: 0xFB38,
  33958. tetdageshhebrew: 0xFB38,
  33959. tethebrew: 0x05D8,
  33960. tetsecyrillic: 0x04B5,
  33961. tevirhebrew: 0x059B,
  33962. tevirlefthebrew: 0x059B,
  33963. thabengali: 0x09A5,
  33964. thadeva: 0x0925,
  33965. thagujarati: 0x0AA5,
  33966. thagurmukhi: 0x0A25,
  33967. thalarabic: 0x0630,
  33968. thalfinalarabic: 0xFEAC,
  33969. thanthakhatlowleftthai: 0xF898,
  33970. thanthakhatlowrightthai: 0xF897,
  33971. thanthakhatthai: 0x0E4C,
  33972. thanthakhatupperleftthai: 0xF896,
  33973. theharabic: 0x062B,
  33974. thehfinalarabic: 0xFE9A,
  33975. thehinitialarabic: 0xFE9B,
  33976. thehmedialarabic: 0xFE9C,
  33977. thereexists: 0x2203,
  33978. therefore: 0x2234,
  33979. theta: 0x03B8,
  33980. theta1: 0x03D1,
  33981. thetasymbolgreek: 0x03D1,
  33982. thieuthacirclekorean: 0x3279,
  33983. thieuthaparenkorean: 0x3219,
  33984. thieuthcirclekorean: 0x326B,
  33985. thieuthkorean: 0x314C,
  33986. thieuthparenkorean: 0x320B,
  33987. thirteencircle: 0x246C,
  33988. thirteenparen: 0x2480,
  33989. thirteenperiod: 0x2494,
  33990. thonangmonthothai: 0x0E11,
  33991. thook: 0x01AD,
  33992. thophuthaothai: 0x0E12,
  33993. thorn: 0x00FE,
  33994. thothahanthai: 0x0E17,
  33995. thothanthai: 0x0E10,
  33996. thothongthai: 0x0E18,
  33997. thothungthai: 0x0E16,
  33998. thousandcyrillic: 0x0482,
  33999. thousandsseparatorarabic: 0x066C,
  34000. thousandsseparatorpersian: 0x066C,
  34001. three: 0x0033,
  34002. threearabic: 0x0663,
  34003. threebengali: 0x09E9,
  34004. threecircle: 0x2462,
  34005. threecircleinversesansserif: 0x278C,
  34006. threedeva: 0x0969,
  34007. threeeighths: 0x215C,
  34008. threegujarati: 0x0AE9,
  34009. threegurmukhi: 0x0A69,
  34010. threehackarabic: 0x0663,
  34011. threehangzhou: 0x3023,
  34012. threeideographicparen: 0x3222,
  34013. threeinferior: 0x2083,
  34014. threemonospace: 0xFF13,
  34015. threenumeratorbengali: 0x09F6,
  34016. threeoldstyle: 0xF733,
  34017. threeparen: 0x2476,
  34018. threeperiod: 0x248A,
  34019. threepersian: 0x06F3,
  34020. threequarters: 0x00BE,
  34021. threequartersemdash: 0xF6DE,
  34022. threeroman: 0x2172,
  34023. threesuperior: 0x00B3,
  34024. threethai: 0x0E53,
  34025. thzsquare: 0x3394,
  34026. tihiragana: 0x3061,
  34027. tikatakana: 0x30C1,
  34028. tikatakanahalfwidth: 0xFF81,
  34029. tikeutacirclekorean: 0x3270,
  34030. tikeutaparenkorean: 0x3210,
  34031. tikeutcirclekorean: 0x3262,
  34032. tikeutkorean: 0x3137,
  34033. tikeutparenkorean: 0x3202,
  34034. tilde: 0x02DC,
  34035. tildebelowcmb: 0x0330,
  34036. tildecmb: 0x0303,
  34037. tildecomb: 0x0303,
  34038. tildedoublecmb: 0x0360,
  34039. tildeoperator: 0x223C,
  34040. tildeoverlaycmb: 0x0334,
  34041. tildeverticalcmb: 0x033E,
  34042. timescircle: 0x2297,
  34043. tipehahebrew: 0x0596,
  34044. tipehalefthebrew: 0x0596,
  34045. tippigurmukhi: 0x0A70,
  34046. titlocyrilliccmb: 0x0483,
  34047. tiwnarmenian: 0x057F,
  34048. tlinebelow: 0x1E6F,
  34049. tmonospace: 0xFF54,
  34050. toarmenian: 0x0569,
  34051. tohiragana: 0x3068,
  34052. tokatakana: 0x30C8,
  34053. tokatakanahalfwidth: 0xFF84,
  34054. tonebarextrahighmod: 0x02E5,
  34055. tonebarextralowmod: 0x02E9,
  34056. tonebarhighmod: 0x02E6,
  34057. tonebarlowmod: 0x02E8,
  34058. tonebarmidmod: 0x02E7,
  34059. tonefive: 0x01BD,
  34060. tonesix: 0x0185,
  34061. tonetwo: 0x01A8,
  34062. tonos: 0x0384,
  34063. tonsquare: 0x3327,
  34064. topatakthai: 0x0E0F,
  34065. tortoiseshellbracketleft: 0x3014,
  34066. tortoiseshellbracketleftsmall: 0xFE5D,
  34067. tortoiseshellbracketleftvertical: 0xFE39,
  34068. tortoiseshellbracketright: 0x3015,
  34069. tortoiseshellbracketrightsmall: 0xFE5E,
  34070. tortoiseshellbracketrightvertical: 0xFE3A,
  34071. totaothai: 0x0E15,
  34072. tpalatalhook: 0x01AB,
  34073. tparen: 0x24AF,
  34074. trademark: 0x2122,
  34075. trademarksans: 0xF8EA,
  34076. trademarkserif: 0xF6DB,
  34077. tretroflexhook: 0x0288,
  34078. triagdn: 0x25BC,
  34079. triaglf: 0x25C4,
  34080. triagrt: 0x25BA,
  34081. triagup: 0x25B2,
  34082. ts: 0x02A6,
  34083. tsadi: 0x05E6,
  34084. tsadidagesh: 0xFB46,
  34085. tsadidageshhebrew: 0xFB46,
  34086. tsadihebrew: 0x05E6,
  34087. tsecyrillic: 0x0446,
  34088. tsere: 0x05B5,
  34089. tsere12: 0x05B5,
  34090. tsere1e: 0x05B5,
  34091. tsere2b: 0x05B5,
  34092. tserehebrew: 0x05B5,
  34093. tserenarrowhebrew: 0x05B5,
  34094. tserequarterhebrew: 0x05B5,
  34095. tserewidehebrew: 0x05B5,
  34096. tshecyrillic: 0x045B,
  34097. tsuperior: 0xF6F3,
  34098. ttabengali: 0x099F,
  34099. ttadeva: 0x091F,
  34100. ttagujarati: 0x0A9F,
  34101. ttagurmukhi: 0x0A1F,
  34102. tteharabic: 0x0679,
  34103. ttehfinalarabic: 0xFB67,
  34104. ttehinitialarabic: 0xFB68,
  34105. ttehmedialarabic: 0xFB69,
  34106. tthabengali: 0x09A0,
  34107. tthadeva: 0x0920,
  34108. tthagujarati: 0x0AA0,
  34109. tthagurmukhi: 0x0A20,
  34110. tturned: 0x0287,
  34111. tuhiragana: 0x3064,
  34112. tukatakana: 0x30C4,
  34113. tukatakanahalfwidth: 0xFF82,
  34114. tusmallhiragana: 0x3063,
  34115. tusmallkatakana: 0x30C3,
  34116. tusmallkatakanahalfwidth: 0xFF6F,
  34117. twelvecircle: 0x246B,
  34118. twelveparen: 0x247F,
  34119. twelveperiod: 0x2493,
  34120. twelveroman: 0x217B,
  34121. twentycircle: 0x2473,
  34122. twentyhangzhou: 0x5344,
  34123. twentyparen: 0x2487,
  34124. twentyperiod: 0x249B,
  34125. two: 0x0032,
  34126. twoarabic: 0x0662,
  34127. twobengali: 0x09E8,
  34128. twocircle: 0x2461,
  34129. twocircleinversesansserif: 0x278B,
  34130. twodeva: 0x0968,
  34131. twodotenleader: 0x2025,
  34132. twodotleader: 0x2025,
  34133. twodotleadervertical: 0xFE30,
  34134. twogujarati: 0x0AE8,
  34135. twogurmukhi: 0x0A68,
  34136. twohackarabic: 0x0662,
  34137. twohangzhou: 0x3022,
  34138. twoideographicparen: 0x3221,
  34139. twoinferior: 0x2082,
  34140. twomonospace: 0xFF12,
  34141. twonumeratorbengali: 0x09F5,
  34142. twooldstyle: 0xF732,
  34143. twoparen: 0x2475,
  34144. twoperiod: 0x2489,
  34145. twopersian: 0x06F2,
  34146. tworoman: 0x2171,
  34147. twostroke: 0x01BB,
  34148. twosuperior: 0x00B2,
  34149. twothai: 0x0E52,
  34150. twothirds: 0x2154,
  34151. u: 0x0075,
  34152. uacute: 0x00FA,
  34153. ubar: 0x0289,
  34154. ubengali: 0x0989,
  34155. ubopomofo: 0x3128,
  34156. ubreve: 0x016D,
  34157. ucaron: 0x01D4,
  34158. ucircle: 0x24E4,
  34159. ucircumflex: 0x00FB,
  34160. ucircumflexbelow: 0x1E77,
  34161. ucyrillic: 0x0443,
  34162. udattadeva: 0x0951,
  34163. udblacute: 0x0171,
  34164. udblgrave: 0x0215,
  34165. udeva: 0x0909,
  34166. udieresis: 0x00FC,
  34167. udieresisacute: 0x01D8,
  34168. udieresisbelow: 0x1E73,
  34169. udieresiscaron: 0x01DA,
  34170. udieresiscyrillic: 0x04F1,
  34171. udieresisgrave: 0x01DC,
  34172. udieresismacron: 0x01D6,
  34173. udotbelow: 0x1EE5,
  34174. ugrave: 0x00F9,
  34175. ugujarati: 0x0A89,
  34176. ugurmukhi: 0x0A09,
  34177. uhiragana: 0x3046,
  34178. uhookabove: 0x1EE7,
  34179. uhorn: 0x01B0,
  34180. uhornacute: 0x1EE9,
  34181. uhorndotbelow: 0x1EF1,
  34182. uhorngrave: 0x1EEB,
  34183. uhornhookabove: 0x1EED,
  34184. uhorntilde: 0x1EEF,
  34185. uhungarumlaut: 0x0171,
  34186. uhungarumlautcyrillic: 0x04F3,
  34187. uinvertedbreve: 0x0217,
  34188. ukatakana: 0x30A6,
  34189. ukatakanahalfwidth: 0xFF73,
  34190. ukcyrillic: 0x0479,
  34191. ukorean: 0x315C,
  34192. umacron: 0x016B,
  34193. umacroncyrillic: 0x04EF,
  34194. umacrondieresis: 0x1E7B,
  34195. umatragurmukhi: 0x0A41,
  34196. umonospace: 0xFF55,
  34197. underscore: 0x005F,
  34198. underscoredbl: 0x2017,
  34199. underscoremonospace: 0xFF3F,
  34200. underscorevertical: 0xFE33,
  34201. underscorewavy: 0xFE4F,
  34202. union: 0x222A,
  34203. universal: 0x2200,
  34204. uogonek: 0x0173,
  34205. uparen: 0x24B0,
  34206. upblock: 0x2580,
  34207. upperdothebrew: 0x05C4,
  34208. upsilon: 0x03C5,
  34209. upsilondieresis: 0x03CB,
  34210. upsilondieresistonos: 0x03B0,
  34211. upsilonlatin: 0x028A,
  34212. upsilontonos: 0x03CD,
  34213. uptackbelowcmb: 0x031D,
  34214. uptackmod: 0x02D4,
  34215. uragurmukhi: 0x0A73,
  34216. uring: 0x016F,
  34217. ushortcyrillic: 0x045E,
  34218. usmallhiragana: 0x3045,
  34219. usmallkatakana: 0x30A5,
  34220. usmallkatakanahalfwidth: 0xFF69,
  34221. ustraightcyrillic: 0x04AF,
  34222. ustraightstrokecyrillic: 0x04B1,
  34223. utilde: 0x0169,
  34224. utildeacute: 0x1E79,
  34225. utildebelow: 0x1E75,
  34226. uubengali: 0x098A,
  34227. uudeva: 0x090A,
  34228. uugujarati: 0x0A8A,
  34229. uugurmukhi: 0x0A0A,
  34230. uumatragurmukhi: 0x0A42,
  34231. uuvowelsignbengali: 0x09C2,
  34232. uuvowelsigndeva: 0x0942,
  34233. uuvowelsigngujarati: 0x0AC2,
  34234. uvowelsignbengali: 0x09C1,
  34235. uvowelsigndeva: 0x0941,
  34236. uvowelsigngujarati: 0x0AC1,
  34237. v: 0x0076,
  34238. vadeva: 0x0935,
  34239. vagujarati: 0x0AB5,
  34240. vagurmukhi: 0x0A35,
  34241. vakatakana: 0x30F7,
  34242. vav: 0x05D5,
  34243. vavdagesh: 0xFB35,
  34244. vavdagesh65: 0xFB35,
  34245. vavdageshhebrew: 0xFB35,
  34246. vavhebrew: 0x05D5,
  34247. vavholam: 0xFB4B,
  34248. vavholamhebrew: 0xFB4B,
  34249. vavvavhebrew: 0x05F0,
  34250. vavyodhebrew: 0x05F1,
  34251. vcircle: 0x24E5,
  34252. vdotbelow: 0x1E7F,
  34253. vecyrillic: 0x0432,
  34254. veharabic: 0x06A4,
  34255. vehfinalarabic: 0xFB6B,
  34256. vehinitialarabic: 0xFB6C,
  34257. vehmedialarabic: 0xFB6D,
  34258. vekatakana: 0x30F9,
  34259. venus: 0x2640,
  34260. verticalbar: 0x007C,
  34261. verticallineabovecmb: 0x030D,
  34262. verticallinebelowcmb: 0x0329,
  34263. verticallinelowmod: 0x02CC,
  34264. verticallinemod: 0x02C8,
  34265. vewarmenian: 0x057E,
  34266. vhook: 0x028B,
  34267. vikatakana: 0x30F8,
  34268. viramabengali: 0x09CD,
  34269. viramadeva: 0x094D,
  34270. viramagujarati: 0x0ACD,
  34271. visargabengali: 0x0983,
  34272. visargadeva: 0x0903,
  34273. visargagujarati: 0x0A83,
  34274. vmonospace: 0xFF56,
  34275. voarmenian: 0x0578,
  34276. voicediterationhiragana: 0x309E,
  34277. voicediterationkatakana: 0x30FE,
  34278. voicedmarkkana: 0x309B,
  34279. voicedmarkkanahalfwidth: 0xFF9E,
  34280. vokatakana: 0x30FA,
  34281. vparen: 0x24B1,
  34282. vtilde: 0x1E7D,
  34283. vturned: 0x028C,
  34284. vuhiragana: 0x3094,
  34285. vukatakana: 0x30F4,
  34286. w: 0x0077,
  34287. wacute: 0x1E83,
  34288. waekorean: 0x3159,
  34289. wahiragana: 0x308F,
  34290. wakatakana: 0x30EF,
  34291. wakatakanahalfwidth: 0xFF9C,
  34292. wakorean: 0x3158,
  34293. wasmallhiragana: 0x308E,
  34294. wasmallkatakana: 0x30EE,
  34295. wattosquare: 0x3357,
  34296. wavedash: 0x301C,
  34297. wavyunderscorevertical: 0xFE34,
  34298. wawarabic: 0x0648,
  34299. wawfinalarabic: 0xFEEE,
  34300. wawhamzaabovearabic: 0x0624,
  34301. wawhamzaabovefinalarabic: 0xFE86,
  34302. wbsquare: 0x33DD,
  34303. wcircle: 0x24E6,
  34304. wcircumflex: 0x0175,
  34305. wdieresis: 0x1E85,
  34306. wdotaccent: 0x1E87,
  34307. wdotbelow: 0x1E89,
  34308. wehiragana: 0x3091,
  34309. weierstrass: 0x2118,
  34310. wekatakana: 0x30F1,
  34311. wekorean: 0x315E,
  34312. weokorean: 0x315D,
  34313. wgrave: 0x1E81,
  34314. whitebullet: 0x25E6,
  34315. whitecircle: 0x25CB,
  34316. whitecircleinverse: 0x25D9,
  34317. whitecornerbracketleft: 0x300E,
  34318. whitecornerbracketleftvertical: 0xFE43,
  34319. whitecornerbracketright: 0x300F,
  34320. whitecornerbracketrightvertical: 0xFE44,
  34321. whitediamond: 0x25C7,
  34322. whitediamondcontainingblacksmalldiamond: 0x25C8,
  34323. whitedownpointingsmalltriangle: 0x25BF,
  34324. whitedownpointingtriangle: 0x25BD,
  34325. whiteleftpointingsmalltriangle: 0x25C3,
  34326. whiteleftpointingtriangle: 0x25C1,
  34327. whitelenticularbracketleft: 0x3016,
  34328. whitelenticularbracketright: 0x3017,
  34329. whiterightpointingsmalltriangle: 0x25B9,
  34330. whiterightpointingtriangle: 0x25B7,
  34331. whitesmallsquare: 0x25AB,
  34332. whitesmilingface: 0x263A,
  34333. whitesquare: 0x25A1,
  34334. whitestar: 0x2606,
  34335. whitetelephone: 0x260F,
  34336. whitetortoiseshellbracketleft: 0x3018,
  34337. whitetortoiseshellbracketright: 0x3019,
  34338. whiteuppointingsmalltriangle: 0x25B5,
  34339. whiteuppointingtriangle: 0x25B3,
  34340. wihiragana: 0x3090,
  34341. wikatakana: 0x30F0,
  34342. wikorean: 0x315F,
  34343. wmonospace: 0xFF57,
  34344. wohiragana: 0x3092,
  34345. wokatakana: 0x30F2,
  34346. wokatakanahalfwidth: 0xFF66,
  34347. won: 0x20A9,
  34348. wonmonospace: 0xFFE6,
  34349. wowaenthai: 0x0E27,
  34350. wparen: 0x24B2,
  34351. wring: 0x1E98,
  34352. wsuperior: 0x02B7,
  34353. wturned: 0x028D,
  34354. wynn: 0x01BF,
  34355. x: 0x0078,
  34356. xabovecmb: 0x033D,
  34357. xbopomofo: 0x3112,
  34358. xcircle: 0x24E7,
  34359. xdieresis: 0x1E8D,
  34360. xdotaccent: 0x1E8B,
  34361. xeharmenian: 0x056D,
  34362. xi: 0x03BE,
  34363. xmonospace: 0xFF58,
  34364. xparen: 0x24B3,
  34365. xsuperior: 0x02E3,
  34366. y: 0x0079,
  34367. yaadosquare: 0x334E,
  34368. yabengali: 0x09AF,
  34369. yacute: 0x00FD,
  34370. yadeva: 0x092F,
  34371. yaekorean: 0x3152,
  34372. yagujarati: 0x0AAF,
  34373. yagurmukhi: 0x0A2F,
  34374. yahiragana: 0x3084,
  34375. yakatakana: 0x30E4,
  34376. yakatakanahalfwidth: 0xFF94,
  34377. yakorean: 0x3151,
  34378. yamakkanthai: 0x0E4E,
  34379. yasmallhiragana: 0x3083,
  34380. yasmallkatakana: 0x30E3,
  34381. yasmallkatakanahalfwidth: 0xFF6C,
  34382. yatcyrillic: 0x0463,
  34383. ycircle: 0x24E8,
  34384. ycircumflex: 0x0177,
  34385. ydieresis: 0x00FF,
  34386. ydotaccent: 0x1E8F,
  34387. ydotbelow: 0x1EF5,
  34388. yeharabic: 0x064A,
  34389. yehbarreearabic: 0x06D2,
  34390. yehbarreefinalarabic: 0xFBAF,
  34391. yehfinalarabic: 0xFEF2,
  34392. yehhamzaabovearabic: 0x0626,
  34393. yehhamzaabovefinalarabic: 0xFE8A,
  34394. yehhamzaaboveinitialarabic: 0xFE8B,
  34395. yehhamzaabovemedialarabic: 0xFE8C,
  34396. yehinitialarabic: 0xFEF3,
  34397. yehmedialarabic: 0xFEF4,
  34398. yehmeeminitialarabic: 0xFCDD,
  34399. yehmeemisolatedarabic: 0xFC58,
  34400. yehnoonfinalarabic: 0xFC94,
  34401. yehthreedotsbelowarabic: 0x06D1,
  34402. yekorean: 0x3156,
  34403. yen: 0x00A5,
  34404. yenmonospace: 0xFFE5,
  34405. yeokorean: 0x3155,
  34406. yeorinhieuhkorean: 0x3186,
  34407. yerahbenyomohebrew: 0x05AA,
  34408. yerahbenyomolefthebrew: 0x05AA,
  34409. yericyrillic: 0x044B,
  34410. yerudieresiscyrillic: 0x04F9,
  34411. yesieungkorean: 0x3181,
  34412. yesieungpansioskorean: 0x3183,
  34413. yesieungsioskorean: 0x3182,
  34414. yetivhebrew: 0x059A,
  34415. ygrave: 0x1EF3,
  34416. yhook: 0x01B4,
  34417. yhookabove: 0x1EF7,
  34418. yiarmenian: 0x0575,
  34419. yicyrillic: 0x0457,
  34420. yikorean: 0x3162,
  34421. yinyang: 0x262F,
  34422. yiwnarmenian: 0x0582,
  34423. ymonospace: 0xFF59,
  34424. yod: 0x05D9,
  34425. yoddagesh: 0xFB39,
  34426. yoddageshhebrew: 0xFB39,
  34427. yodhebrew: 0x05D9,
  34428. yodyodhebrew: 0x05F2,
  34429. yodyodpatahhebrew: 0xFB1F,
  34430. yohiragana: 0x3088,
  34431. yoikorean: 0x3189,
  34432. yokatakana: 0x30E8,
  34433. yokatakanahalfwidth: 0xFF96,
  34434. yokorean: 0x315B,
  34435. yosmallhiragana: 0x3087,
  34436. yosmallkatakana: 0x30E7,
  34437. yosmallkatakanahalfwidth: 0xFF6E,
  34438. yotgreek: 0x03F3,
  34439. yoyaekorean: 0x3188,
  34440. yoyakorean: 0x3187,
  34441. yoyakthai: 0x0E22,
  34442. yoyingthai: 0x0E0D,
  34443. yparen: 0x24B4,
  34444. ypogegrammeni: 0x037A,
  34445. ypogegrammenigreekcmb: 0x0345,
  34446. yr: 0x01A6,
  34447. yring: 0x1E99,
  34448. ysuperior: 0x02B8,
  34449. ytilde: 0x1EF9,
  34450. yturned: 0x028E,
  34451. yuhiragana: 0x3086,
  34452. yuikorean: 0x318C,
  34453. yukatakana: 0x30E6,
  34454. yukatakanahalfwidth: 0xFF95,
  34455. yukorean: 0x3160,
  34456. yusbigcyrillic: 0x046B,
  34457. yusbigiotifiedcyrillic: 0x046D,
  34458. yuslittlecyrillic: 0x0467,
  34459. yuslittleiotifiedcyrillic: 0x0469,
  34460. yusmallhiragana: 0x3085,
  34461. yusmallkatakana: 0x30E5,
  34462. yusmallkatakanahalfwidth: 0xFF6D,
  34463. yuyekorean: 0x318B,
  34464. yuyeokorean: 0x318A,
  34465. yyabengali: 0x09DF,
  34466. yyadeva: 0x095F,
  34467. z: 0x007A,
  34468. zaarmenian: 0x0566,
  34469. zacute: 0x017A,
  34470. zadeva: 0x095B,
  34471. zagurmukhi: 0x0A5B,
  34472. zaharabic: 0x0638,
  34473. zahfinalarabic: 0xFEC6,
  34474. zahinitialarabic: 0xFEC7,
  34475. zahiragana: 0x3056,
  34476. zahmedialarabic: 0xFEC8,
  34477. zainarabic: 0x0632,
  34478. zainfinalarabic: 0xFEB0,
  34479. zakatakana: 0x30B6,
  34480. zaqefgadolhebrew: 0x0595,
  34481. zaqefqatanhebrew: 0x0594,
  34482. zarqahebrew: 0x0598,
  34483. zayin: 0x05D6,
  34484. zayindagesh: 0xFB36,
  34485. zayindageshhebrew: 0xFB36,
  34486. zayinhebrew: 0x05D6,
  34487. zbopomofo: 0x3117,
  34488. zcaron: 0x017E,
  34489. zcircle: 0x24E9,
  34490. zcircumflex: 0x1E91,
  34491. zcurl: 0x0291,
  34492. zdot: 0x017C,
  34493. zdotaccent: 0x017C,
  34494. zdotbelow: 0x1E93,
  34495. zecyrillic: 0x0437,
  34496. zedescendercyrillic: 0x0499,
  34497. zedieresiscyrillic: 0x04DF,
  34498. zehiragana: 0x305C,
  34499. zekatakana: 0x30BC,
  34500. zero: 0x0030,
  34501. zeroarabic: 0x0660,
  34502. zerobengali: 0x09E6,
  34503. zerodeva: 0x0966,
  34504. zerogujarati: 0x0AE6,
  34505. zerogurmukhi: 0x0A66,
  34506. zerohackarabic: 0x0660,
  34507. zeroinferior: 0x2080,
  34508. zeromonospace: 0xFF10,
  34509. zerooldstyle: 0xF730,
  34510. zeropersian: 0x06F0,
  34511. zerosuperior: 0x2070,
  34512. zerothai: 0x0E50,
  34513. zerowidthjoiner: 0xFEFF,
  34514. zerowidthnonjoiner: 0x200C,
  34515. zerowidthspace: 0x200B,
  34516. zeta: 0x03B6,
  34517. zhbopomofo: 0x3113,
  34518. zhearmenian: 0x056A,
  34519. zhebrevecyrillic: 0x04C2,
  34520. zhecyrillic: 0x0436,
  34521. zhedescendercyrillic: 0x0497,
  34522. zhedieresiscyrillic: 0x04DD,
  34523. zihiragana: 0x3058,
  34524. zikatakana: 0x30B8,
  34525. zinorhebrew: 0x05AE,
  34526. zlinebelow: 0x1E95,
  34527. zmonospace: 0xFF5A,
  34528. zohiragana: 0x305E,
  34529. zokatakana: 0x30BE,
  34530. zparen: 0x24B5,
  34531. zretroflexhook: 0x0290,
  34532. zstroke: 0x01B6,
  34533. zuhiragana: 0x305A,
  34534. zukatakana: 0x30BA,
  34535. '.notdef': 0x0000
  34536. };
  34537. var PDFImage = (function PDFImageClosure() {
  34538. /**
  34539. * Decode the image in the main thread if it supported. Resovles the promise
  34540. * when the image data is ready.
  34541. */
  34542. function handleImageData(handler, xref, res, image) {
  34543. if (image instanceof JpegStream && image.isNativelyDecodable(xref, res)) {
  34544. // For natively supported jpegs send them to the main thread for decoding.
  34545. var dict = image.dict;
  34546. var colorSpace = dict.get('ColorSpace', 'CS');
  34547. colorSpace = ColorSpace.parse(colorSpace, xref, res);
  34548. var numComps = colorSpace.numComps;
  34549. var decodePromise = handler.sendWithPromise('JpegDecode',
  34550. [image.getIR(), numComps]);
  34551. return decodePromise.then(function (message) {
  34552. var data = message.data;
  34553. return new Stream(data, 0, data.length, image.dict);
  34554. });
  34555. } else {
  34556. return Promise.resolve(image);
  34557. }
  34558. }
  34559. /**
  34560. * Decode and clamp a value. The formula is different from the spec because we
  34561. * don't decode to float range [0,1], we decode it in the [0,max] range.
  34562. */
  34563. function decodeAndClamp(value, addend, coefficient, max) {
  34564. value = addend + value * coefficient;
  34565. // Clamp the value to the range
  34566. return (value < 0 ? 0 : (value > max ? max : value));
  34567. }
  34568. function PDFImage(xref, res, image, inline, smask, mask, isMask) {
  34569. this.image = image;
  34570. var dict = image.dict;
  34571. if (dict.has('Filter')) {
  34572. var filter = dict.get('Filter').name;
  34573. if (filter === 'JPXDecode') {
  34574. var jpxImage = new JpxImage();
  34575. jpxImage.parseImageProperties(image.stream);
  34576. image.stream.reset();
  34577. image.bitsPerComponent = jpxImage.bitsPerComponent;
  34578. image.numComps = jpxImage.componentsCount;
  34579. } else if (filter === 'JBIG2Decode') {
  34580. image.bitsPerComponent = 1;
  34581. image.numComps = 1;
  34582. }
  34583. }
  34584. // TODO cache rendered images?
  34585. this.width = dict.get('Width', 'W');
  34586. this.height = dict.get('Height', 'H');
  34587. if (this.width < 1 || this.height < 1) {
  34588. error('Invalid image width: ' + this.width + ' or height: ' +
  34589. this.height);
  34590. }
  34591. this.interpolate = dict.get('Interpolate', 'I') || false;
  34592. this.imageMask = dict.get('ImageMask', 'IM') || false;
  34593. this.matte = dict.get('Matte') || false;
  34594. var bitsPerComponent = image.bitsPerComponent;
  34595. if (!bitsPerComponent) {
  34596. bitsPerComponent = dict.get('BitsPerComponent', 'BPC');
  34597. if (!bitsPerComponent) {
  34598. if (this.imageMask) {
  34599. bitsPerComponent = 1;
  34600. } else {
  34601. error('Bits per component missing in image: ' + this.imageMask);
  34602. }
  34603. }
  34604. }
  34605. this.bpc = bitsPerComponent;
  34606. if (!this.imageMask) {
  34607. var colorSpace = dict.get('ColorSpace', 'CS');
  34608. if (!colorSpace) {
  34609. info('JPX images (which do not require color spaces)');
  34610. switch (image.numComps) {
  34611. case 1:
  34612. colorSpace = Name.get('DeviceGray');
  34613. break;
  34614. case 3:
  34615. colorSpace = Name.get('DeviceRGB');
  34616. break;
  34617. case 4:
  34618. colorSpace = Name.get('DeviceCMYK');
  34619. break;
  34620. default:
  34621. error('JPX images with ' + this.numComps +
  34622. ' color components not supported.');
  34623. }
  34624. }
  34625. this.colorSpace = ColorSpace.parse(colorSpace, xref, res);
  34626. this.numComps = this.colorSpace.numComps;
  34627. }
  34628. this.decode = dict.get('Decode', 'D');
  34629. this.needsDecode = false;
  34630. if (this.decode &&
  34631. ((this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode)) ||
  34632. (isMask && !ColorSpace.isDefaultDecode(this.decode, 1)))) {
  34633. this.needsDecode = true;
  34634. // Do some preprocessing to avoid more math.
  34635. var max = (1 << bitsPerComponent) - 1;
  34636. this.decodeCoefficients = [];
  34637. this.decodeAddends = [];
  34638. for (var i = 0, j = 0; i < this.decode.length; i += 2, ++j) {
  34639. var dmin = this.decode[i];
  34640. var dmax = this.decode[i + 1];
  34641. this.decodeCoefficients[j] = dmax - dmin;
  34642. this.decodeAddends[j] = max * dmin;
  34643. }
  34644. }
  34645. if (smask) {
  34646. this.smask = new PDFImage(xref, res, smask, false);
  34647. } else if (mask) {
  34648. if (isStream(mask)) {
  34649. this.mask = new PDFImage(xref, res, mask, false, null, null, true);
  34650. } else {
  34651. // Color key mask (just an array).
  34652. this.mask = mask;
  34653. }
  34654. }
  34655. }
  34656. /**
  34657. * Handles processing of image data and returns the Promise that is resolved
  34658. * with a PDFImage when the image is ready to be used.
  34659. */
  34660. PDFImage.buildImage = function PDFImage_buildImage(handler, xref,
  34661. res, image, inline) {
  34662. var imagePromise = handleImageData(handler, xref, res, image);
  34663. var smaskPromise;
  34664. var maskPromise;
  34665. var smask = image.dict.get('SMask');
  34666. var mask = image.dict.get('Mask');
  34667. if (smask) {
  34668. smaskPromise = handleImageData(handler, xref, res, smask);
  34669. maskPromise = Promise.resolve(null);
  34670. } else {
  34671. smaskPromise = Promise.resolve(null);
  34672. if (mask) {
  34673. if (isStream(mask)) {
  34674. maskPromise = handleImageData(handler, xref, res, mask);
  34675. } else if (isArray(mask)) {
  34676. maskPromise = Promise.resolve(mask);
  34677. } else {
  34678. warn('Unsupported mask format.');
  34679. maskPromise = Promise.resolve(null);
  34680. }
  34681. } else {
  34682. maskPromise = Promise.resolve(null);
  34683. }
  34684. }
  34685. return Promise.all([imagePromise, smaskPromise, maskPromise]).then(
  34686. function(results) {
  34687. var imageData = results[0];
  34688. var smaskData = results[1];
  34689. var maskData = results[2];
  34690. return new PDFImage(xref, res, imageData, inline, smaskData, maskData);
  34691. });
  34692. };
  34693. /**
  34694. * Resize an image using the nearest neighbor algorithm. Currently only
  34695. * supports one and three component images.
  34696. * @param {TypedArray} pixels The original image with one component.
  34697. * @param {Number} bpc Number of bits per component.
  34698. * @param {Number} components Number of color components, 1 or 3 is supported.
  34699. * @param {Number} w1 Original width.
  34700. * @param {Number} h1 Original height.
  34701. * @param {Number} w2 New width.
  34702. * @param {Number} h2 New height.
  34703. * @param {TypedArray} dest (Optional) The destination buffer.
  34704. * @param {Number} alpha01 (Optional) Size reserved for the alpha channel.
  34705. * @return {TypedArray} Resized image data.
  34706. */
  34707. PDFImage.resize = function PDFImage_resize(pixels, bpc, components,
  34708. w1, h1, w2, h2, dest, alpha01) {
  34709. if (components !== 1 && components !== 3) {
  34710. error('Unsupported component count for resizing.');
  34711. }
  34712. var length = w2 * h2 * components;
  34713. var temp = dest ? dest : (bpc <= 8 ? new Uint8Array(length) :
  34714. (bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length)));
  34715. var xRatio = w1 / w2;
  34716. var yRatio = h1 / h2;
  34717. var i, j, py, newIndex = 0, oldIndex;
  34718. var xScaled = new Uint16Array(w2);
  34719. var w1Scanline = w1 * components;
  34720. if (alpha01 !== 1) {
  34721. alpha01 = 0;
  34722. }
  34723. for (j = 0; j < w2; j++) {
  34724. xScaled[j] = Math.floor(j * xRatio) * components;
  34725. }
  34726. if (components === 1) {
  34727. for (i = 0; i < h2; i++) {
  34728. py = Math.floor(i * yRatio) * w1Scanline;
  34729. for (j = 0; j < w2; j++) {
  34730. oldIndex = py + xScaled[j];
  34731. temp[newIndex++] = pixels[oldIndex];
  34732. }
  34733. }
  34734. } else if (components === 3) {
  34735. for (i = 0; i < h2; i++) {
  34736. py = Math.floor(i * yRatio) * w1Scanline;
  34737. for (j = 0; j < w2; j++) {
  34738. oldIndex = py + xScaled[j];
  34739. temp[newIndex++] = pixels[oldIndex++];
  34740. temp[newIndex++] = pixels[oldIndex++];
  34741. temp[newIndex++] = pixels[oldIndex++];
  34742. newIndex += alpha01;
  34743. }
  34744. }
  34745. }
  34746. return temp;
  34747. };
  34748. PDFImage.createMask =
  34749. function PDFImage_createMask(imgArray, width, height,
  34750. imageIsFromDecodeStream, inverseDecode) {
  34751. // |imgArray| might not contain full data for every pixel of the mask, so
  34752. // we need to distinguish between |computedLength| and |actualLength|.
  34753. // In particular, if inverseDecode is true, then the array we return must
  34754. // have a length of |computedLength|.
  34755. var computedLength = ((width + 7) >> 3) * height;
  34756. var actualLength = imgArray.byteLength;
  34757. var haveFullData = computedLength == actualLength;
  34758. var data, i;
  34759. if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) {
  34760. // imgArray came from a DecodeStream and its data is in an appropriate
  34761. // form, so we can just transfer it.
  34762. data = imgArray;
  34763. } else if (!inverseDecode) {
  34764. data = new Uint8Array(actualLength);
  34765. data.set(imgArray);
  34766. } else {
  34767. data = new Uint8Array(computedLength);
  34768. data.set(imgArray);
  34769. for (i = actualLength; i < computedLength; i++) {
  34770. data[i] = 0xff;
  34771. }
  34772. }
  34773. // If necessary, invert the original mask data (but not any extra we might
  34774. // have added above). It's safe to modify the array -- whether it's the
  34775. // original or a copy, we're about to transfer it anyway, so nothing else
  34776. // in this thread can be relying on its contents.
  34777. if (inverseDecode) {
  34778. for (i = 0; i < actualLength; i++) {
  34779. data[i] = ~data[i];
  34780. }
  34781. }
  34782. return {data: data, width: width, height: height};
  34783. };
  34784. PDFImage.prototype = {
  34785. get drawWidth() {
  34786. return Math.max(this.width,
  34787. this.smask && this.smask.width || 0,
  34788. this.mask && this.mask.width || 0);
  34789. },
  34790. get drawHeight() {
  34791. return Math.max(this.height,
  34792. this.smask && this.smask.height || 0,
  34793. this.mask && this.mask.height || 0);
  34794. },
  34795. decodeBuffer: function PDFImage_decodeBuffer(buffer) {
  34796. var bpc = this.bpc;
  34797. var numComps = this.numComps;
  34798. var decodeAddends = this.decodeAddends;
  34799. var decodeCoefficients = this.decodeCoefficients;
  34800. var max = (1 << bpc) - 1;
  34801. var i, ii;
  34802. if (bpc === 1) {
  34803. // If the buffer needed decode that means it just needs to be inverted.
  34804. for (i = 0, ii = buffer.length; i < ii; i++) {
  34805. buffer[i] = +!(buffer[i]);
  34806. }
  34807. return;
  34808. }
  34809. var index = 0;
  34810. for (i = 0, ii = this.width * this.height; i < ii; i++) {
  34811. for (var j = 0; j < numComps; j++) {
  34812. buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j],
  34813. decodeCoefficients[j], max);
  34814. index++;
  34815. }
  34816. }
  34817. },
  34818. getComponents: function PDFImage_getComponents(buffer) {
  34819. var bpc = this.bpc;
  34820. // This image doesn't require any extra work.
  34821. if (bpc === 8) {
  34822. return buffer;
  34823. }
  34824. var width = this.width;
  34825. var height = this.height;
  34826. var numComps = this.numComps;
  34827. var length = width * height * numComps;
  34828. var bufferPos = 0;
  34829. var output = (bpc <= 8 ? new Uint8Array(length) :
  34830. (bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length)));
  34831. var rowComps = width * numComps;
  34832. var max = (1 << bpc) - 1;
  34833. var i = 0, ii, buf;
  34834. if (bpc === 1) {
  34835. // Optimization for reading 1 bpc images.
  34836. var mask, loop1End, loop2End;
  34837. for (var j = 0; j < height; j++) {
  34838. loop1End = i + (rowComps & ~7);
  34839. loop2End = i + rowComps;
  34840. // unroll loop for all full bytes
  34841. while (i < loop1End) {
  34842. buf = buffer[bufferPos++];
  34843. output[i] = (buf >> 7) & 1;
  34844. output[i + 1] = (buf >> 6) & 1;
  34845. output[i + 2] = (buf >> 5) & 1;
  34846. output[i + 3] = (buf >> 4) & 1;
  34847. output[i + 4] = (buf >> 3) & 1;
  34848. output[i + 5] = (buf >> 2) & 1;
  34849. output[i + 6] = (buf >> 1) & 1;
  34850. output[i + 7] = buf & 1;
  34851. i += 8;
  34852. }
  34853. // handle remaing bits
  34854. if (i < loop2End) {
  34855. buf = buffer[bufferPos++];
  34856. mask = 128;
  34857. while (i < loop2End) {
  34858. output[i++] = +!!(buf & mask);
  34859. mask >>= 1;
  34860. }
  34861. }
  34862. }
  34863. } else {
  34864. // The general case that handles all other bpc values.
  34865. var bits = 0;
  34866. buf = 0;
  34867. for (i = 0, ii = length; i < ii; ++i) {
  34868. if (i % rowComps === 0) {
  34869. buf = 0;
  34870. bits = 0;
  34871. }
  34872. while (bits < bpc) {
  34873. buf = (buf << 8) | buffer[bufferPos++];
  34874. bits += 8;
  34875. }
  34876. var remainingBits = bits - bpc;
  34877. var value = buf >> remainingBits;
  34878. output[i] = (value < 0 ? 0 : (value > max ? max : value));
  34879. buf = buf & ((1 << remainingBits) - 1);
  34880. bits = remainingBits;
  34881. }
  34882. }
  34883. return output;
  34884. },
  34885. fillOpacity: function PDFImage_fillOpacity(rgbaBuf, width, height,
  34886. actualHeight, image) {
  34887. var smask = this.smask;
  34888. var mask = this.mask;
  34889. var alphaBuf, sw, sh, i, ii, j;
  34890. if (smask) {
  34891. sw = smask.width;
  34892. sh = smask.height;
  34893. alphaBuf = new Uint8Array(sw * sh);
  34894. smask.fillGrayBuffer(alphaBuf);
  34895. if (sw != width || sh != height) {
  34896. alphaBuf = PDFImage.resize(alphaBuf, smask.bpc, 1, sw, sh, width,
  34897. height);
  34898. }
  34899. } else if (mask) {
  34900. if (mask instanceof PDFImage) {
  34901. sw = mask.width;
  34902. sh = mask.height;
  34903. alphaBuf = new Uint8Array(sw * sh);
  34904. mask.numComps = 1;
  34905. mask.fillGrayBuffer(alphaBuf);
  34906. // Need to invert values in rgbaBuf
  34907. for (i = 0, ii = sw * sh; i < ii; ++i) {
  34908. alphaBuf[i] = 255 - alphaBuf[i];
  34909. }
  34910. if (sw != width || sh != height) {
  34911. alphaBuf = PDFImage.resize(alphaBuf, mask.bpc, 1, sw, sh, width,
  34912. height);
  34913. }
  34914. } else if (isArray(mask)) {
  34915. // Color key mask: if any of the compontents are outside the range
  34916. // then they should be painted.
  34917. alphaBuf = new Uint8Array(width * height);
  34918. var numComps = this.numComps;
  34919. for (i = 0, ii = width * height; i < ii; ++i) {
  34920. var opacity = 0;
  34921. var imageOffset = i * numComps;
  34922. for (j = 0; j < numComps; ++j) {
  34923. var color = image[imageOffset + j];
  34924. var maskOffset = j * 2;
  34925. if (color < mask[maskOffset] || color > mask[maskOffset + 1]) {
  34926. opacity = 255;
  34927. break;
  34928. }
  34929. }
  34930. alphaBuf[i] = opacity;
  34931. }
  34932. } else {
  34933. error('Unknown mask format.');
  34934. }
  34935. }
  34936. if (alphaBuf) {
  34937. for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) {
  34938. rgbaBuf[j] = alphaBuf[i];
  34939. }
  34940. } else {
  34941. // No mask.
  34942. for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) {
  34943. rgbaBuf[j] = 255;
  34944. }
  34945. }
  34946. },
  34947. undoPreblend: function PDFImage_undoPreblend(buffer, width, height) {
  34948. var matte = this.smask && this.smask.matte;
  34949. if (!matte) {
  34950. return;
  34951. }
  34952. var matteRgb = this.colorSpace.getRgb(matte, 0);
  34953. var matteR = matteRgb[0];
  34954. var matteG = matteRgb[1];
  34955. var matteB = matteRgb[2];
  34956. var length = width * height * 4;
  34957. var r, g, b;
  34958. for (var i = 0; i < length; i += 4) {
  34959. var alpha = buffer[i + 3];
  34960. if (alpha === 0) {
  34961. // according formula we have to get Infinity in all components
  34962. // making it white (typical paper color) should be okay
  34963. buffer[i] = 255;
  34964. buffer[i + 1] = 255;
  34965. buffer[i + 2] = 255;
  34966. continue;
  34967. }
  34968. var k = 255 / alpha;
  34969. r = (buffer[i] - matteR) * k + matteR;
  34970. g = (buffer[i + 1] - matteG) * k + matteG;
  34971. b = (buffer[i + 2] - matteB) * k + matteB;
  34972. buffer[i] = r <= 0 ? 0 : r >= 255 ? 255 : r | 0;
  34973. buffer[i + 1] = g <= 0 ? 0 : g >= 255 ? 255 : g | 0;
  34974. buffer[i + 2] = b <= 0 ? 0 : b >= 255 ? 255 : b | 0;
  34975. }
  34976. },
  34977. createImageData: function PDFImage_createImageData(forceRGBA) {
  34978. var drawWidth = this.drawWidth;
  34979. var drawHeight = this.drawHeight;
  34980. var imgData = { // other fields are filled in below
  34981. width: drawWidth,
  34982. height: drawHeight
  34983. };
  34984. var numComps = this.numComps;
  34985. var originalWidth = this.width;
  34986. var originalHeight = this.height;
  34987. var bpc = this.bpc;
  34988. // Rows start at byte boundary.
  34989. var rowBytes = (originalWidth * numComps * bpc + 7) >> 3;
  34990. var imgArray;
  34991. if (!forceRGBA) {
  34992. // If it is a 1-bit-per-pixel grayscale (i.e. black-and-white) image
  34993. // without any complications, we pass a same-sized copy to the main
  34994. // thread rather than expanding by 32x to RGBA form. This saves *lots*
  34995. // of memory for many scanned documents. It's also much faster.
  34996. //
  34997. // Similarly, if it is a 24-bit-per pixel RGB image without any
  34998. // complications, we avoid expanding by 1.333x to RGBA form.
  34999. var kind;
  35000. if (this.colorSpace.name === 'DeviceGray' && bpc === 1) {
  35001. kind = ImageKind.GRAYSCALE_1BPP;
  35002. } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8) {
  35003. kind = ImageKind.RGB_24BPP;
  35004. }
  35005. if (kind && !this.smask && !this.mask && !this.needsDecode &&
  35006. drawWidth === originalWidth && drawHeight === originalHeight) {
  35007. imgData.kind = kind;
  35008. imgArray = this.getImageBytes(originalHeight * rowBytes);
  35009. // If imgArray came from a DecodeStream, we're safe to transfer it
  35010. // (and thus neuter it) because it will constitute the entire
  35011. // DecodeStream's data. But if it came from a Stream, we need to
  35012. // copy it because it'll only be a portion of the Stream's data, and
  35013. // the rest will be read later on.
  35014. if (this.image instanceof DecodeStream) {
  35015. imgData.data = imgArray;
  35016. } else {
  35017. var newArray = new Uint8Array(imgArray.length);
  35018. newArray.set(imgArray);
  35019. imgData.data = newArray;
  35020. }
  35021. return imgData;
  35022. }
  35023. if (this.image instanceof JpegStream && !this.smask && !this.mask) {
  35024. imgData.kind = ImageKind.RGB_24BPP;
  35025. imgData.data = this.getImageBytes(originalHeight * rowBytes,
  35026. drawWidth, drawHeight, true);
  35027. return imgData;
  35028. }
  35029. }
  35030. imgArray = this.getImageBytes(originalHeight * rowBytes);
  35031. // imgArray can be incomplete (e.g. after CCITT fax encoding).
  35032. var actualHeight = 0 | (imgArray.length / rowBytes *
  35033. drawHeight / originalHeight);
  35034. var comps = this.getComponents(imgArray);
  35035. // If opacity data is present, use RGBA_32BPP form. Otherwise, use the
  35036. // more compact RGB_24BPP form if allowable.
  35037. var alpha01, maybeUndoPreblend;
  35038. if (!forceRGBA && !this.smask && !this.mask) {
  35039. imgData.kind = ImageKind.RGB_24BPP;
  35040. imgData.data = new Uint8Array(drawWidth * drawHeight * 3);
  35041. alpha01 = 0;
  35042. maybeUndoPreblend = false;
  35043. } else {
  35044. imgData.kind = ImageKind.RGBA_32BPP;
  35045. imgData.data = new Uint8Array(drawWidth * drawHeight * 4);
  35046. alpha01 = 1;
  35047. maybeUndoPreblend = true;
  35048. // Color key masking (opacity) must be performed before decoding.
  35049. this.fillOpacity(imgData.data, drawWidth, drawHeight, actualHeight,
  35050. comps);
  35051. }
  35052. if (this.needsDecode) {
  35053. this.decodeBuffer(comps);
  35054. }
  35055. this.colorSpace.fillRgb(imgData.data, originalWidth, originalHeight,
  35056. drawWidth, drawHeight, actualHeight, bpc, comps,
  35057. alpha01);
  35058. if (maybeUndoPreblend) {
  35059. this.undoPreblend(imgData.data, drawWidth, actualHeight);
  35060. }
  35061. return imgData;
  35062. },
  35063. fillGrayBuffer: function PDFImage_fillGrayBuffer(buffer) {
  35064. var numComps = this.numComps;
  35065. if (numComps != 1) {
  35066. error('Reading gray scale from a color image: ' + numComps);
  35067. }
  35068. var width = this.width;
  35069. var height = this.height;
  35070. var bpc = this.bpc;
  35071. // rows start at byte boundary
  35072. var rowBytes = (width * numComps * bpc + 7) >> 3;
  35073. var imgArray = this.getImageBytes(height * rowBytes);
  35074. var comps = this.getComponents(imgArray);
  35075. var i, length;
  35076. if (bpc === 1) {
  35077. // inline decoding (= inversion) for 1 bpc images
  35078. length = width * height;
  35079. if (this.needsDecode) {
  35080. // invert and scale to {0, 255}
  35081. for (i = 0; i < length; ++i) {
  35082. buffer[i] = (comps[i] - 1) & 255;
  35083. }
  35084. } else {
  35085. // scale to {0, 255}
  35086. for (i = 0; i < length; ++i) {
  35087. buffer[i] = (-comps[i]) & 255;
  35088. }
  35089. }
  35090. return;
  35091. }
  35092. if (this.needsDecode) {
  35093. this.decodeBuffer(comps);
  35094. }
  35095. length = width * height;
  35096. // we aren't using a colorspace so we need to scale the value
  35097. var scale = 255 / ((1 << bpc) - 1);
  35098. for (i = 0; i < length; ++i) {
  35099. buffer[i] = (scale * comps[i]) | 0;
  35100. }
  35101. },
  35102. getImageBytes: function PDFImage_getImageBytes(length,
  35103. drawWidth, drawHeight,
  35104. forceRGB) {
  35105. this.image.reset();
  35106. this.image.drawWidth = drawWidth || this.width;
  35107. this.image.drawHeight = drawHeight || this.height;
  35108. this.image.forceRGB = !!forceRGB;
  35109. return this.image.getBytes(length);
  35110. }
  35111. };
  35112. return PDFImage;
  35113. })();
  35114. // The Metrics object contains glyph widths (in glyph space units).
  35115. // As per PDF spec, for most fonts (Type 3 being an exception) a glyph
  35116. // space unit corresponds to 1/1000th of text space unit.
  35117. var Metrics = {
  35118. 'Courier': 600,
  35119. 'Courier-Bold': 600,
  35120. 'Courier-BoldOblique': 600,
  35121. 'Courier-Oblique': 600,
  35122. 'Helvetica' : {
  35123. 'space': 278,
  35124. 'exclam': 278,
  35125. 'quotedbl': 355,
  35126. 'numbersign': 556,
  35127. 'dollar': 556,
  35128. 'percent': 889,
  35129. 'ampersand': 667,
  35130. 'quoteright': 222,
  35131. 'parenleft': 333,
  35132. 'parenright': 333,
  35133. 'asterisk': 389,
  35134. 'plus': 584,
  35135. 'comma': 278,
  35136. 'hyphen': 333,
  35137. 'period': 278,
  35138. 'slash': 278,
  35139. 'zero': 556,
  35140. 'one': 556,
  35141. 'two': 556,
  35142. 'three': 556,
  35143. 'four': 556,
  35144. 'five': 556,
  35145. 'six': 556,
  35146. 'seven': 556,
  35147. 'eight': 556,
  35148. 'nine': 556,
  35149. 'colon': 278,
  35150. 'semicolon': 278,
  35151. 'less': 584,
  35152. 'equal': 584,
  35153. 'greater': 584,
  35154. 'question': 556,
  35155. 'at': 1015,
  35156. 'A': 667,
  35157. 'B': 667,
  35158. 'C': 722,
  35159. 'D': 722,
  35160. 'E': 667,
  35161. 'F': 611,
  35162. 'G': 778,
  35163. 'H': 722,
  35164. 'I': 278,
  35165. 'J': 500,
  35166. 'K': 667,
  35167. 'L': 556,
  35168. 'M': 833,
  35169. 'N': 722,
  35170. 'O': 778,
  35171. 'P': 667,
  35172. 'Q': 778,
  35173. 'R': 722,
  35174. 'S': 667,
  35175. 'T': 611,
  35176. 'U': 722,
  35177. 'V': 667,
  35178. 'W': 944,
  35179. 'X': 667,
  35180. 'Y': 667,
  35181. 'Z': 611,
  35182. 'bracketleft': 278,
  35183. 'backslash': 278,
  35184. 'bracketright': 278,
  35185. 'asciicircum': 469,
  35186. 'underscore': 556,
  35187. 'quoteleft': 222,
  35188. 'a': 556,
  35189. 'b': 556,
  35190. 'c': 500,
  35191. 'd': 556,
  35192. 'e': 556,
  35193. 'f': 278,
  35194. 'g': 556,
  35195. 'h': 556,
  35196. 'i': 222,
  35197. 'j': 222,
  35198. 'k': 500,
  35199. 'l': 222,
  35200. 'm': 833,
  35201. 'n': 556,
  35202. 'o': 556,
  35203. 'p': 556,
  35204. 'q': 556,
  35205. 'r': 333,
  35206. 's': 500,
  35207. 't': 278,
  35208. 'u': 556,
  35209. 'v': 500,
  35210. 'w': 722,
  35211. 'x': 500,
  35212. 'y': 500,
  35213. 'z': 500,
  35214. 'braceleft': 334,
  35215. 'bar': 260,
  35216. 'braceright': 334,
  35217. 'asciitilde': 584,
  35218. 'exclamdown': 333,
  35219. 'cent': 556,
  35220. 'sterling': 556,
  35221. 'fraction': 167,
  35222. 'yen': 556,
  35223. 'florin': 556,
  35224. 'section': 556,
  35225. 'currency': 556,
  35226. 'quotesingle': 191,
  35227. 'quotedblleft': 333,
  35228. 'guillemotleft': 556,
  35229. 'guilsinglleft': 333,
  35230. 'guilsinglright': 333,
  35231. 'fi': 500,
  35232. 'fl': 500,
  35233. 'endash': 556,
  35234. 'dagger': 556,
  35235. 'daggerdbl': 556,
  35236. 'periodcentered': 278,
  35237. 'paragraph': 537,
  35238. 'bullet': 350,
  35239. 'quotesinglbase': 222,
  35240. 'quotedblbase': 333,
  35241. 'quotedblright': 333,
  35242. 'guillemotright': 556,
  35243. 'ellipsis': 1000,
  35244. 'perthousand': 1000,
  35245. 'questiondown': 611,
  35246. 'grave': 333,
  35247. 'acute': 333,
  35248. 'circumflex': 333,
  35249. 'tilde': 333,
  35250. 'macron': 333,
  35251. 'breve': 333,
  35252. 'dotaccent': 333,
  35253. 'dieresis': 333,
  35254. 'ring': 333,
  35255. 'cedilla': 333,
  35256. 'hungarumlaut': 333,
  35257. 'ogonek': 333,
  35258. 'caron': 333,
  35259. 'emdash': 1000,
  35260. 'AE': 1000,
  35261. 'ordfeminine': 370,
  35262. 'Lslash': 556,
  35263. 'Oslash': 778,
  35264. 'OE': 1000,
  35265. 'ordmasculine': 365,
  35266. 'ae': 889,
  35267. 'dotlessi': 278,
  35268. 'lslash': 222,
  35269. 'oslash': 611,
  35270. 'oe': 944,
  35271. 'germandbls': 611,
  35272. 'Idieresis': 278,
  35273. 'eacute': 556,
  35274. 'abreve': 556,
  35275. 'uhungarumlaut': 556,
  35276. 'ecaron': 556,
  35277. 'Ydieresis': 667,
  35278. 'divide': 584,
  35279. 'Yacute': 667,
  35280. 'Acircumflex': 667,
  35281. 'aacute': 556,
  35282. 'Ucircumflex': 722,
  35283. 'yacute': 500,
  35284. 'scommaaccent': 500,
  35285. 'ecircumflex': 556,
  35286. 'Uring': 722,
  35287. 'Udieresis': 722,
  35288. 'aogonek': 556,
  35289. 'Uacute': 722,
  35290. 'uogonek': 556,
  35291. 'Edieresis': 667,
  35292. 'Dcroat': 722,
  35293. 'commaaccent': 250,
  35294. 'copyright': 737,
  35295. 'Emacron': 667,
  35296. 'ccaron': 500,
  35297. 'aring': 556,
  35298. 'Ncommaaccent': 722,
  35299. 'lacute': 222,
  35300. 'agrave': 556,
  35301. 'Tcommaaccent': 611,
  35302. 'Cacute': 722,
  35303. 'atilde': 556,
  35304. 'Edotaccent': 667,
  35305. 'scaron': 500,
  35306. 'scedilla': 500,
  35307. 'iacute': 278,
  35308. 'lozenge': 471,
  35309. 'Rcaron': 722,
  35310. 'Gcommaaccent': 778,
  35311. 'ucircumflex': 556,
  35312. 'acircumflex': 556,
  35313. 'Amacron': 667,
  35314. 'rcaron': 333,
  35315. 'ccedilla': 500,
  35316. 'Zdotaccent': 611,
  35317. 'Thorn': 667,
  35318. 'Omacron': 778,
  35319. 'Racute': 722,
  35320. 'Sacute': 667,
  35321. 'dcaron': 643,
  35322. 'Umacron': 722,
  35323. 'uring': 556,
  35324. 'threesuperior': 333,
  35325. 'Ograve': 778,
  35326. 'Agrave': 667,
  35327. 'Abreve': 667,
  35328. 'multiply': 584,
  35329. 'uacute': 556,
  35330. 'Tcaron': 611,
  35331. 'partialdiff': 476,
  35332. 'ydieresis': 500,
  35333. 'Nacute': 722,
  35334. 'icircumflex': 278,
  35335. 'Ecircumflex': 667,
  35336. 'adieresis': 556,
  35337. 'edieresis': 556,
  35338. 'cacute': 500,
  35339. 'nacute': 556,
  35340. 'umacron': 556,
  35341. 'Ncaron': 722,
  35342. 'Iacute': 278,
  35343. 'plusminus': 584,
  35344. 'brokenbar': 260,
  35345. 'registered': 737,
  35346. 'Gbreve': 778,
  35347. 'Idotaccent': 278,
  35348. 'summation': 600,
  35349. 'Egrave': 667,
  35350. 'racute': 333,
  35351. 'omacron': 556,
  35352. 'Zacute': 611,
  35353. 'Zcaron': 611,
  35354. 'greaterequal': 549,
  35355. 'Eth': 722,
  35356. 'Ccedilla': 722,
  35357. 'lcommaaccent': 222,
  35358. 'tcaron': 317,
  35359. 'eogonek': 556,
  35360. 'Uogonek': 722,
  35361. 'Aacute': 667,
  35362. 'Adieresis': 667,
  35363. 'egrave': 556,
  35364. 'zacute': 500,
  35365. 'iogonek': 222,
  35366. 'Oacute': 778,
  35367. 'oacute': 556,
  35368. 'amacron': 556,
  35369. 'sacute': 500,
  35370. 'idieresis': 278,
  35371. 'Ocircumflex': 778,
  35372. 'Ugrave': 722,
  35373. 'Delta': 612,
  35374. 'thorn': 556,
  35375. 'twosuperior': 333,
  35376. 'Odieresis': 778,
  35377. 'mu': 556,
  35378. 'igrave': 278,
  35379. 'ohungarumlaut': 556,
  35380. 'Eogonek': 667,
  35381. 'dcroat': 556,
  35382. 'threequarters': 834,
  35383. 'Scedilla': 667,
  35384. 'lcaron': 299,
  35385. 'Kcommaaccent': 667,
  35386. 'Lacute': 556,
  35387. 'trademark': 1000,
  35388. 'edotaccent': 556,
  35389. 'Igrave': 278,
  35390. 'Imacron': 278,
  35391. 'Lcaron': 556,
  35392. 'onehalf': 834,
  35393. 'lessequal': 549,
  35394. 'ocircumflex': 556,
  35395. 'ntilde': 556,
  35396. 'Uhungarumlaut': 722,
  35397. 'Eacute': 667,
  35398. 'emacron': 556,
  35399. 'gbreve': 556,
  35400. 'onequarter': 834,
  35401. 'Scaron': 667,
  35402. 'Scommaaccent': 667,
  35403. 'Ohungarumlaut': 778,
  35404. 'degree': 400,
  35405. 'ograve': 556,
  35406. 'Ccaron': 722,
  35407. 'ugrave': 556,
  35408. 'radical': 453,
  35409. 'Dcaron': 722,
  35410. 'rcommaaccent': 333,
  35411. 'Ntilde': 722,
  35412. 'otilde': 556,
  35413. 'Rcommaaccent': 722,
  35414. 'Lcommaaccent': 556,
  35415. 'Atilde': 667,
  35416. 'Aogonek': 667,
  35417. 'Aring': 667,
  35418. 'Otilde': 778,
  35419. 'zdotaccent': 500,
  35420. 'Ecaron': 667,
  35421. 'Iogonek': 278,
  35422. 'kcommaaccent': 500,
  35423. 'minus': 584,
  35424. 'Icircumflex': 278,
  35425. 'ncaron': 556,
  35426. 'tcommaaccent': 278,
  35427. 'logicalnot': 584,
  35428. 'odieresis': 556,
  35429. 'udieresis': 556,
  35430. 'notequal': 549,
  35431. 'gcommaaccent': 556,
  35432. 'eth': 556,
  35433. 'zcaron': 500,
  35434. 'ncommaaccent': 556,
  35435. 'onesuperior': 333,
  35436. 'imacron': 278,
  35437. 'Euro': 556
  35438. },
  35439. 'Helvetica-Bold': {
  35440. 'space': 278,
  35441. 'exclam': 333,
  35442. 'quotedbl': 474,
  35443. 'numbersign': 556,
  35444. 'dollar': 556,
  35445. 'percent': 889,
  35446. 'ampersand': 722,
  35447. 'quoteright': 278,
  35448. 'parenleft': 333,
  35449. 'parenright': 333,
  35450. 'asterisk': 389,
  35451. 'plus': 584,
  35452. 'comma': 278,
  35453. 'hyphen': 333,
  35454. 'period': 278,
  35455. 'slash': 278,
  35456. 'zero': 556,
  35457. 'one': 556,
  35458. 'two': 556,
  35459. 'three': 556,
  35460. 'four': 556,
  35461. 'five': 556,
  35462. 'six': 556,
  35463. 'seven': 556,
  35464. 'eight': 556,
  35465. 'nine': 556,
  35466. 'colon': 333,
  35467. 'semicolon': 333,
  35468. 'less': 584,
  35469. 'equal': 584,
  35470. 'greater': 584,
  35471. 'question': 611,
  35472. 'at': 975,
  35473. 'A': 722,
  35474. 'B': 722,
  35475. 'C': 722,
  35476. 'D': 722,
  35477. 'E': 667,
  35478. 'F': 611,
  35479. 'G': 778,
  35480. 'H': 722,
  35481. 'I': 278,
  35482. 'J': 556,
  35483. 'K': 722,
  35484. 'L': 611,
  35485. 'M': 833,
  35486. 'N': 722,
  35487. 'O': 778,
  35488. 'P': 667,
  35489. 'Q': 778,
  35490. 'R': 722,
  35491. 'S': 667,
  35492. 'T': 611,
  35493. 'U': 722,
  35494. 'V': 667,
  35495. 'W': 944,
  35496. 'X': 667,
  35497. 'Y': 667,
  35498. 'Z': 611,
  35499. 'bracketleft': 333,
  35500. 'backslash': 278,
  35501. 'bracketright': 333,
  35502. 'asciicircum': 584,
  35503. 'underscore': 556,
  35504. 'quoteleft': 278,
  35505. 'a': 556,
  35506. 'b': 611,
  35507. 'c': 556,
  35508. 'd': 611,
  35509. 'e': 556,
  35510. 'f': 333,
  35511. 'g': 611,
  35512. 'h': 611,
  35513. 'i': 278,
  35514. 'j': 278,
  35515. 'k': 556,
  35516. 'l': 278,
  35517. 'm': 889,
  35518. 'n': 611,
  35519. 'o': 611,
  35520. 'p': 611,
  35521. 'q': 611,
  35522. 'r': 389,
  35523. 's': 556,
  35524. 't': 333,
  35525. 'u': 611,
  35526. 'v': 556,
  35527. 'w': 778,
  35528. 'x': 556,
  35529. 'y': 556,
  35530. 'z': 500,
  35531. 'braceleft': 389,
  35532. 'bar': 280,
  35533. 'braceright': 389,
  35534. 'asciitilde': 584,
  35535. 'exclamdown': 333,
  35536. 'cent': 556,
  35537. 'sterling': 556,
  35538. 'fraction': 167,
  35539. 'yen': 556,
  35540. 'florin': 556,
  35541. 'section': 556,
  35542. 'currency': 556,
  35543. 'quotesingle': 238,
  35544. 'quotedblleft': 500,
  35545. 'guillemotleft': 556,
  35546. 'guilsinglleft': 333,
  35547. 'guilsinglright': 333,
  35548. 'fi': 611,
  35549. 'fl': 611,
  35550. 'endash': 556,
  35551. 'dagger': 556,
  35552. 'daggerdbl': 556,
  35553. 'periodcentered': 278,
  35554. 'paragraph': 556,
  35555. 'bullet': 350,
  35556. 'quotesinglbase': 278,
  35557. 'quotedblbase': 500,
  35558. 'quotedblright': 500,
  35559. 'guillemotright': 556,
  35560. 'ellipsis': 1000,
  35561. 'perthousand': 1000,
  35562. 'questiondown': 611,
  35563. 'grave': 333,
  35564. 'acute': 333,
  35565. 'circumflex': 333,
  35566. 'tilde': 333,
  35567. 'macron': 333,
  35568. 'breve': 333,
  35569. 'dotaccent': 333,
  35570. 'dieresis': 333,
  35571. 'ring': 333,
  35572. 'cedilla': 333,
  35573. 'hungarumlaut': 333,
  35574. 'ogonek': 333,
  35575. 'caron': 333,
  35576. 'emdash': 1000,
  35577. 'AE': 1000,
  35578. 'ordfeminine': 370,
  35579. 'Lslash': 611,
  35580. 'Oslash': 778,
  35581. 'OE': 1000,
  35582. 'ordmasculine': 365,
  35583. 'ae': 889,
  35584. 'dotlessi': 278,
  35585. 'lslash': 278,
  35586. 'oslash': 611,
  35587. 'oe': 944,
  35588. 'germandbls': 611,
  35589. 'Idieresis': 278,
  35590. 'eacute': 556,
  35591. 'abreve': 556,
  35592. 'uhungarumlaut': 611,
  35593. 'ecaron': 556,
  35594. 'Ydieresis': 667,
  35595. 'divide': 584,
  35596. 'Yacute': 667,
  35597. 'Acircumflex': 722,
  35598. 'aacute': 556,
  35599. 'Ucircumflex': 722,
  35600. 'yacute': 556,
  35601. 'scommaaccent': 556,
  35602. 'ecircumflex': 556,
  35603. 'Uring': 722,
  35604. 'Udieresis': 722,
  35605. 'aogonek': 556,
  35606. 'Uacute': 722,
  35607. 'uogonek': 611,
  35608. 'Edieresis': 667,
  35609. 'Dcroat': 722,
  35610. 'commaaccent': 250,
  35611. 'copyright': 737,
  35612. 'Emacron': 667,
  35613. 'ccaron': 556,
  35614. 'aring': 556,
  35615. 'Ncommaaccent': 722,
  35616. 'lacute': 278,
  35617. 'agrave': 556,
  35618. 'Tcommaaccent': 611,
  35619. 'Cacute': 722,
  35620. 'atilde': 556,
  35621. 'Edotaccent': 667,
  35622. 'scaron': 556,
  35623. 'scedilla': 556,
  35624. 'iacute': 278,
  35625. 'lozenge': 494,
  35626. 'Rcaron': 722,
  35627. 'Gcommaaccent': 778,
  35628. 'ucircumflex': 611,
  35629. 'acircumflex': 556,
  35630. 'Amacron': 722,
  35631. 'rcaron': 389,
  35632. 'ccedilla': 556,
  35633. 'Zdotaccent': 611,
  35634. 'Thorn': 667,
  35635. 'Omacron': 778,
  35636. 'Racute': 722,
  35637. 'Sacute': 667,
  35638. 'dcaron': 743,
  35639. 'Umacron': 722,
  35640. 'uring': 611,
  35641. 'threesuperior': 333,
  35642. 'Ograve': 778,
  35643. 'Agrave': 722,
  35644. 'Abreve': 722,
  35645. 'multiply': 584,
  35646. 'uacute': 611,
  35647. 'Tcaron': 611,
  35648. 'partialdiff': 494,
  35649. 'ydieresis': 556,
  35650. 'Nacute': 722,
  35651. 'icircumflex': 278,
  35652. 'Ecircumflex': 667,
  35653. 'adieresis': 556,
  35654. 'edieresis': 556,
  35655. 'cacute': 556,
  35656. 'nacute': 611,
  35657. 'umacron': 611,
  35658. 'Ncaron': 722,
  35659. 'Iacute': 278,
  35660. 'plusminus': 584,
  35661. 'brokenbar': 280,
  35662. 'registered': 737,
  35663. 'Gbreve': 778,
  35664. 'Idotaccent': 278,
  35665. 'summation': 600,
  35666. 'Egrave': 667,
  35667. 'racute': 389,
  35668. 'omacron': 611,
  35669. 'Zacute': 611,
  35670. 'Zcaron': 611,
  35671. 'greaterequal': 549,
  35672. 'Eth': 722,
  35673. 'Ccedilla': 722,
  35674. 'lcommaaccent': 278,
  35675. 'tcaron': 389,
  35676. 'eogonek': 556,
  35677. 'Uogonek': 722,
  35678. 'Aacute': 722,
  35679. 'Adieresis': 722,
  35680. 'egrave': 556,
  35681. 'zacute': 500,
  35682. 'iogonek': 278,
  35683. 'Oacute': 778,
  35684. 'oacute': 611,
  35685. 'amacron': 556,
  35686. 'sacute': 556,
  35687. 'idieresis': 278,
  35688. 'Ocircumflex': 778,
  35689. 'Ugrave': 722,
  35690. 'Delta': 612,
  35691. 'thorn': 611,
  35692. 'twosuperior': 333,
  35693. 'Odieresis': 778,
  35694. 'mu': 611,
  35695. 'igrave': 278,
  35696. 'ohungarumlaut': 611,
  35697. 'Eogonek': 667,
  35698. 'dcroat': 611,
  35699. 'threequarters': 834,
  35700. 'Scedilla': 667,
  35701. 'lcaron': 400,
  35702. 'Kcommaaccent': 722,
  35703. 'Lacute': 611,
  35704. 'trademark': 1000,
  35705. 'edotaccent': 556,
  35706. 'Igrave': 278,
  35707. 'Imacron': 278,
  35708. 'Lcaron': 611,
  35709. 'onehalf': 834,
  35710. 'lessequal': 549,
  35711. 'ocircumflex': 611,
  35712. 'ntilde': 611,
  35713. 'Uhungarumlaut': 722,
  35714. 'Eacute': 667,
  35715. 'emacron': 556,
  35716. 'gbreve': 611,
  35717. 'onequarter': 834,
  35718. 'Scaron': 667,
  35719. 'Scommaaccent': 667,
  35720. 'Ohungarumlaut': 778,
  35721. 'degree': 400,
  35722. 'ograve': 611,
  35723. 'Ccaron': 722,
  35724. 'ugrave': 611,
  35725. 'radical': 549,
  35726. 'Dcaron': 722,
  35727. 'rcommaaccent': 389,
  35728. 'Ntilde': 722,
  35729. 'otilde': 611,
  35730. 'Rcommaaccent': 722,
  35731. 'Lcommaaccent': 611,
  35732. 'Atilde': 722,
  35733. 'Aogonek': 722,
  35734. 'Aring': 722,
  35735. 'Otilde': 778,
  35736. 'zdotaccent': 500,
  35737. 'Ecaron': 667,
  35738. 'Iogonek': 278,
  35739. 'kcommaaccent': 556,
  35740. 'minus': 584,
  35741. 'Icircumflex': 278,
  35742. 'ncaron': 611,
  35743. 'tcommaaccent': 333,
  35744. 'logicalnot': 584,
  35745. 'odieresis': 611,
  35746. 'udieresis': 611,
  35747. 'notequal': 549,
  35748. 'gcommaaccent': 611,
  35749. 'eth': 611,
  35750. 'zcaron': 500,
  35751. 'ncommaaccent': 611,
  35752. 'onesuperior': 333,
  35753. 'imacron': 278,
  35754. 'Euro': 556
  35755. },
  35756. 'Helvetica-BoldOblique': {
  35757. 'space': 278,
  35758. 'exclam': 333,
  35759. 'quotedbl': 474,
  35760. 'numbersign': 556,
  35761. 'dollar': 556,
  35762. 'percent': 889,
  35763. 'ampersand': 722,
  35764. 'quoteright': 278,
  35765. 'parenleft': 333,
  35766. 'parenright': 333,
  35767. 'asterisk': 389,
  35768. 'plus': 584,
  35769. 'comma': 278,
  35770. 'hyphen': 333,
  35771. 'period': 278,
  35772. 'slash': 278,
  35773. 'zero': 556,
  35774. 'one': 556,
  35775. 'two': 556,
  35776. 'three': 556,
  35777. 'four': 556,
  35778. 'five': 556,
  35779. 'six': 556,
  35780. 'seven': 556,
  35781. 'eight': 556,
  35782. 'nine': 556,
  35783. 'colon': 333,
  35784. 'semicolon': 333,
  35785. 'less': 584,
  35786. 'equal': 584,
  35787. 'greater': 584,
  35788. 'question': 611,
  35789. 'at': 975,
  35790. 'A': 722,
  35791. 'B': 722,
  35792. 'C': 722,
  35793. 'D': 722,
  35794. 'E': 667,
  35795. 'F': 611,
  35796. 'G': 778,
  35797. 'H': 722,
  35798. 'I': 278,
  35799. 'J': 556,
  35800. 'K': 722,
  35801. 'L': 611,
  35802. 'M': 833,
  35803. 'N': 722,
  35804. 'O': 778,
  35805. 'P': 667,
  35806. 'Q': 778,
  35807. 'R': 722,
  35808. 'S': 667,
  35809. 'T': 611,
  35810. 'U': 722,
  35811. 'V': 667,
  35812. 'W': 944,
  35813. 'X': 667,
  35814. 'Y': 667,
  35815. 'Z': 611,
  35816. 'bracketleft': 333,
  35817. 'backslash': 278,
  35818. 'bracketright': 333,
  35819. 'asciicircum': 584,
  35820. 'underscore': 556,
  35821. 'quoteleft': 278,
  35822. 'a': 556,
  35823. 'b': 611,
  35824. 'c': 556,
  35825. 'd': 611,
  35826. 'e': 556,
  35827. 'f': 333,
  35828. 'g': 611,
  35829. 'h': 611,
  35830. 'i': 278,
  35831. 'j': 278,
  35832. 'k': 556,
  35833. 'l': 278,
  35834. 'm': 889,
  35835. 'n': 611,
  35836. 'o': 611,
  35837. 'p': 611,
  35838. 'q': 611,
  35839. 'r': 389,
  35840. 's': 556,
  35841. 't': 333,
  35842. 'u': 611,
  35843. 'v': 556,
  35844. 'w': 778,
  35845. 'x': 556,
  35846. 'y': 556,
  35847. 'z': 500,
  35848. 'braceleft': 389,
  35849. 'bar': 280,
  35850. 'braceright': 389,
  35851. 'asciitilde': 584,
  35852. 'exclamdown': 333,
  35853. 'cent': 556,
  35854. 'sterling': 556,
  35855. 'fraction': 167,
  35856. 'yen': 556,
  35857. 'florin': 556,
  35858. 'section': 556,
  35859. 'currency': 556,
  35860. 'quotesingle': 238,
  35861. 'quotedblleft': 500,
  35862. 'guillemotleft': 556,
  35863. 'guilsinglleft': 333,
  35864. 'guilsinglright': 333,
  35865. 'fi': 611,
  35866. 'fl': 611,
  35867. 'endash': 556,
  35868. 'dagger': 556,
  35869. 'daggerdbl': 556,
  35870. 'periodcentered': 278,
  35871. 'paragraph': 556,
  35872. 'bullet': 350,
  35873. 'quotesinglbase': 278,
  35874. 'quotedblbase': 500,
  35875. 'quotedblright': 500,
  35876. 'guillemotright': 556,
  35877. 'ellipsis': 1000,
  35878. 'perthousand': 1000,
  35879. 'questiondown': 611,
  35880. 'grave': 333,
  35881. 'acute': 333,
  35882. 'circumflex': 333,
  35883. 'tilde': 333,
  35884. 'macron': 333,
  35885. 'breve': 333,
  35886. 'dotaccent': 333,
  35887. 'dieresis': 333,
  35888. 'ring': 333,
  35889. 'cedilla': 333,
  35890. 'hungarumlaut': 333,
  35891. 'ogonek': 333,
  35892. 'caron': 333,
  35893. 'emdash': 1000,
  35894. 'AE': 1000,
  35895. 'ordfeminine': 370,
  35896. 'Lslash': 611,
  35897. 'Oslash': 778,
  35898. 'OE': 1000,
  35899. 'ordmasculine': 365,
  35900. 'ae': 889,
  35901. 'dotlessi': 278,
  35902. 'lslash': 278,
  35903. 'oslash': 611,
  35904. 'oe': 944,
  35905. 'germandbls': 611,
  35906. 'Idieresis': 278,
  35907. 'eacute': 556,
  35908. 'abreve': 556,
  35909. 'uhungarumlaut': 611,
  35910. 'ecaron': 556,
  35911. 'Ydieresis': 667,
  35912. 'divide': 584,
  35913. 'Yacute': 667,
  35914. 'Acircumflex': 722,
  35915. 'aacute': 556,
  35916. 'Ucircumflex': 722,
  35917. 'yacute': 556,
  35918. 'scommaaccent': 556,
  35919. 'ecircumflex': 556,
  35920. 'Uring': 722,
  35921. 'Udieresis': 722,
  35922. 'aogonek': 556,
  35923. 'Uacute': 722,
  35924. 'uogonek': 611,
  35925. 'Edieresis': 667,
  35926. 'Dcroat': 722,
  35927. 'commaaccent': 250,
  35928. 'copyright': 737,
  35929. 'Emacron': 667,
  35930. 'ccaron': 556,
  35931. 'aring': 556,
  35932. 'Ncommaaccent': 722,
  35933. 'lacute': 278,
  35934. 'agrave': 556,
  35935. 'Tcommaaccent': 611,
  35936. 'Cacute': 722,
  35937. 'atilde': 556,
  35938. 'Edotaccent': 667,
  35939. 'scaron': 556,
  35940. 'scedilla': 556,
  35941. 'iacute': 278,
  35942. 'lozenge': 494,
  35943. 'Rcaron': 722,
  35944. 'Gcommaaccent': 778,
  35945. 'ucircumflex': 611,
  35946. 'acircumflex': 556,
  35947. 'Amacron': 722,
  35948. 'rcaron': 389,
  35949. 'ccedilla': 556,
  35950. 'Zdotaccent': 611,
  35951. 'Thorn': 667,
  35952. 'Omacron': 778,
  35953. 'Racute': 722,
  35954. 'Sacute': 667,
  35955. 'dcaron': 743,
  35956. 'Umacron': 722,
  35957. 'uring': 611,
  35958. 'threesuperior': 333,
  35959. 'Ograve': 778,
  35960. 'Agrave': 722,
  35961. 'Abreve': 722,
  35962. 'multiply': 584,
  35963. 'uacute': 611,
  35964. 'Tcaron': 611,
  35965. 'partialdiff': 494,
  35966. 'ydieresis': 556,
  35967. 'Nacute': 722,
  35968. 'icircumflex': 278,
  35969. 'Ecircumflex': 667,
  35970. 'adieresis': 556,
  35971. 'edieresis': 556,
  35972. 'cacute': 556,
  35973. 'nacute': 611,
  35974. 'umacron': 611,
  35975. 'Ncaron': 722,
  35976. 'Iacute': 278,
  35977. 'plusminus': 584,
  35978. 'brokenbar': 280,
  35979. 'registered': 737,
  35980. 'Gbreve': 778,
  35981. 'Idotaccent': 278,
  35982. 'summation': 600,
  35983. 'Egrave': 667,
  35984. 'racute': 389,
  35985. 'omacron': 611,
  35986. 'Zacute': 611,
  35987. 'Zcaron': 611,
  35988. 'greaterequal': 549,
  35989. 'Eth': 722,
  35990. 'Ccedilla': 722,
  35991. 'lcommaaccent': 278,
  35992. 'tcaron': 389,
  35993. 'eogonek': 556,
  35994. 'Uogonek': 722,
  35995. 'Aacute': 722,
  35996. 'Adieresis': 722,
  35997. 'egrave': 556,
  35998. 'zacute': 500,
  35999. 'iogonek': 278,
  36000. 'Oacute': 778,
  36001. 'oacute': 611,
  36002. 'amacron': 556,
  36003. 'sacute': 556,
  36004. 'idieresis': 278,
  36005. 'Ocircumflex': 778,
  36006. 'Ugrave': 722,
  36007. 'Delta': 612,
  36008. 'thorn': 611,
  36009. 'twosuperior': 333,
  36010. 'Odieresis': 778,
  36011. 'mu': 611,
  36012. 'igrave': 278,
  36013. 'ohungarumlaut': 611,
  36014. 'Eogonek': 667,
  36015. 'dcroat': 611,
  36016. 'threequarters': 834,
  36017. 'Scedilla': 667,
  36018. 'lcaron': 400,
  36019. 'Kcommaaccent': 722,
  36020. 'Lacute': 611,
  36021. 'trademark': 1000,
  36022. 'edotaccent': 556,
  36023. 'Igrave': 278,
  36024. 'Imacron': 278,
  36025. 'Lcaron': 611,
  36026. 'onehalf': 834,
  36027. 'lessequal': 549,
  36028. 'ocircumflex': 611,
  36029. 'ntilde': 611,
  36030. 'Uhungarumlaut': 722,
  36031. 'Eacute': 667,
  36032. 'emacron': 556,
  36033. 'gbreve': 611,
  36034. 'onequarter': 834,
  36035. 'Scaron': 667,
  36036. 'Scommaaccent': 667,
  36037. 'Ohungarumlaut': 778,
  36038. 'degree': 400,
  36039. 'ograve': 611,
  36040. 'Ccaron': 722,
  36041. 'ugrave': 611,
  36042. 'radical': 549,
  36043. 'Dcaron': 722,
  36044. 'rcommaaccent': 389,
  36045. 'Ntilde': 722,
  36046. 'otilde': 611,
  36047. 'Rcommaaccent': 722,
  36048. 'Lcommaaccent': 611,
  36049. 'Atilde': 722,
  36050. 'Aogonek': 722,
  36051. 'Aring': 722,
  36052. 'Otilde': 778,
  36053. 'zdotaccent': 500,
  36054. 'Ecaron': 667,
  36055. 'Iogonek': 278,
  36056. 'kcommaaccent': 556,
  36057. 'minus': 584,
  36058. 'Icircumflex': 278,
  36059. 'ncaron': 611,
  36060. 'tcommaaccent': 333,
  36061. 'logicalnot': 584,
  36062. 'odieresis': 611,
  36063. 'udieresis': 611,
  36064. 'notequal': 549,
  36065. 'gcommaaccent': 611,
  36066. 'eth': 611,
  36067. 'zcaron': 500,
  36068. 'ncommaaccent': 611,
  36069. 'onesuperior': 333,
  36070. 'imacron': 278,
  36071. 'Euro': 556
  36072. },
  36073. 'Helvetica-Oblique' : {
  36074. 'space': 278,
  36075. 'exclam': 278,
  36076. 'quotedbl': 355,
  36077. 'numbersign': 556,
  36078. 'dollar': 556,
  36079. 'percent': 889,
  36080. 'ampersand': 667,
  36081. 'quoteright': 222,
  36082. 'parenleft': 333,
  36083. 'parenright': 333,
  36084. 'asterisk': 389,
  36085. 'plus': 584,
  36086. 'comma': 278,
  36087. 'hyphen': 333,
  36088. 'period': 278,
  36089. 'slash': 278,
  36090. 'zero': 556,
  36091. 'one': 556,
  36092. 'two': 556,
  36093. 'three': 556,
  36094. 'four': 556,
  36095. 'five': 556,
  36096. 'six': 556,
  36097. 'seven': 556,
  36098. 'eight': 556,
  36099. 'nine': 556,
  36100. 'colon': 278,
  36101. 'semicolon': 278,
  36102. 'less': 584,
  36103. 'equal': 584,
  36104. 'greater': 584,
  36105. 'question': 556,
  36106. 'at': 1015,
  36107. 'A': 667,
  36108. 'B': 667,
  36109. 'C': 722,
  36110. 'D': 722,
  36111. 'E': 667,
  36112. 'F': 611,
  36113. 'G': 778,
  36114. 'H': 722,
  36115. 'I': 278,
  36116. 'J': 500,
  36117. 'K': 667,
  36118. 'L': 556,
  36119. 'M': 833,
  36120. 'N': 722,
  36121. 'O': 778,
  36122. 'P': 667,
  36123. 'Q': 778,
  36124. 'R': 722,
  36125. 'S': 667,
  36126. 'T': 611,
  36127. 'U': 722,
  36128. 'V': 667,
  36129. 'W': 944,
  36130. 'X': 667,
  36131. 'Y': 667,
  36132. 'Z': 611,
  36133. 'bracketleft': 278,
  36134. 'backslash': 278,
  36135. 'bracketright': 278,
  36136. 'asciicircum': 469,
  36137. 'underscore': 556,
  36138. 'quoteleft': 222,
  36139. 'a': 556,
  36140. 'b': 556,
  36141. 'c': 500,
  36142. 'd': 556,
  36143. 'e': 556,
  36144. 'f': 278,
  36145. 'g': 556,
  36146. 'h': 556,
  36147. 'i': 222,
  36148. 'j': 222,
  36149. 'k': 500,
  36150. 'l': 222,
  36151. 'm': 833,
  36152. 'n': 556,
  36153. 'o': 556,
  36154. 'p': 556,
  36155. 'q': 556,
  36156. 'r': 333,
  36157. 's': 500,
  36158. 't': 278,
  36159. 'u': 556,
  36160. 'v': 500,
  36161. 'w': 722,
  36162. 'x': 500,
  36163. 'y': 500,
  36164. 'z': 500,
  36165. 'braceleft': 334,
  36166. 'bar': 260,
  36167. 'braceright': 334,
  36168. 'asciitilde': 584,
  36169. 'exclamdown': 333,
  36170. 'cent': 556,
  36171. 'sterling': 556,
  36172. 'fraction': 167,
  36173. 'yen': 556,
  36174. 'florin': 556,
  36175. 'section': 556,
  36176. 'currency': 556,
  36177. 'quotesingle': 191,
  36178. 'quotedblleft': 333,
  36179. 'guillemotleft': 556,
  36180. 'guilsinglleft': 333,
  36181. 'guilsinglright': 333,
  36182. 'fi': 500,
  36183. 'fl': 500,
  36184. 'endash': 556,
  36185. 'dagger': 556,
  36186. 'daggerdbl': 556,
  36187. 'periodcentered': 278,
  36188. 'paragraph': 537,
  36189. 'bullet': 350,
  36190. 'quotesinglbase': 222,
  36191. 'quotedblbase': 333,
  36192. 'quotedblright': 333,
  36193. 'guillemotright': 556,
  36194. 'ellipsis': 1000,
  36195. 'perthousand': 1000,
  36196. 'questiondown': 611,
  36197. 'grave': 333,
  36198. 'acute': 333,
  36199. 'circumflex': 333,
  36200. 'tilde': 333,
  36201. 'macron': 333,
  36202. 'breve': 333,
  36203. 'dotaccent': 333,
  36204. 'dieresis': 333,
  36205. 'ring': 333,
  36206. 'cedilla': 333,
  36207. 'hungarumlaut': 333,
  36208. 'ogonek': 333,
  36209. 'caron': 333,
  36210. 'emdash': 1000,
  36211. 'AE': 1000,
  36212. 'ordfeminine': 370,
  36213. 'Lslash': 556,
  36214. 'Oslash': 778,
  36215. 'OE': 1000,
  36216. 'ordmasculine': 365,
  36217. 'ae': 889,
  36218. 'dotlessi': 278,
  36219. 'lslash': 222,
  36220. 'oslash': 611,
  36221. 'oe': 944,
  36222. 'germandbls': 611,
  36223. 'Idieresis': 278,
  36224. 'eacute': 556,
  36225. 'abreve': 556,
  36226. 'uhungarumlaut': 556,
  36227. 'ecaron': 556,
  36228. 'Ydieresis': 667,
  36229. 'divide': 584,
  36230. 'Yacute': 667,
  36231. 'Acircumflex': 667,
  36232. 'aacute': 556,
  36233. 'Ucircumflex': 722,
  36234. 'yacute': 500,
  36235. 'scommaaccent': 500,
  36236. 'ecircumflex': 556,
  36237. 'Uring': 722,
  36238. 'Udieresis': 722,
  36239. 'aogonek': 556,
  36240. 'Uacute': 722,
  36241. 'uogonek': 556,
  36242. 'Edieresis': 667,
  36243. 'Dcroat': 722,
  36244. 'commaaccent': 250,
  36245. 'copyright': 737,
  36246. 'Emacron': 667,
  36247. 'ccaron': 500,
  36248. 'aring': 556,
  36249. 'Ncommaaccent': 722,
  36250. 'lacute': 222,
  36251. 'agrave': 556,
  36252. 'Tcommaaccent': 611,
  36253. 'Cacute': 722,
  36254. 'atilde': 556,
  36255. 'Edotaccent': 667,
  36256. 'scaron': 500,
  36257. 'scedilla': 500,
  36258. 'iacute': 278,
  36259. 'lozenge': 471,
  36260. 'Rcaron': 722,
  36261. 'Gcommaaccent': 778,
  36262. 'ucircumflex': 556,
  36263. 'acircumflex': 556,
  36264. 'Amacron': 667,
  36265. 'rcaron': 333,
  36266. 'ccedilla': 500,
  36267. 'Zdotaccent': 611,
  36268. 'Thorn': 667,
  36269. 'Omacron': 778,
  36270. 'Racute': 722,
  36271. 'Sacute': 667,
  36272. 'dcaron': 643,
  36273. 'Umacron': 722,
  36274. 'uring': 556,
  36275. 'threesuperior': 333,
  36276. 'Ograve': 778,
  36277. 'Agrave': 667,
  36278. 'Abreve': 667,
  36279. 'multiply': 584,
  36280. 'uacute': 556,
  36281. 'Tcaron': 611,
  36282. 'partialdiff': 476,
  36283. 'ydieresis': 500,
  36284. 'Nacute': 722,
  36285. 'icircumflex': 278,
  36286. 'Ecircumflex': 667,
  36287. 'adieresis': 556,
  36288. 'edieresis': 556,
  36289. 'cacute': 500,
  36290. 'nacute': 556,
  36291. 'umacron': 556,
  36292. 'Ncaron': 722,
  36293. 'Iacute': 278,
  36294. 'plusminus': 584,
  36295. 'brokenbar': 260,
  36296. 'registered': 737,
  36297. 'Gbreve': 778,
  36298. 'Idotaccent': 278,
  36299. 'summation': 600,
  36300. 'Egrave': 667,
  36301. 'racute': 333,
  36302. 'omacron': 556,
  36303. 'Zacute': 611,
  36304. 'Zcaron': 611,
  36305. 'greaterequal': 549,
  36306. 'Eth': 722,
  36307. 'Ccedilla': 722,
  36308. 'lcommaaccent': 222,
  36309. 'tcaron': 317,
  36310. 'eogonek': 556,
  36311. 'Uogonek': 722,
  36312. 'Aacute': 667,
  36313. 'Adieresis': 667,
  36314. 'egrave': 556,
  36315. 'zacute': 500,
  36316. 'iogonek': 222,
  36317. 'Oacute': 778,
  36318. 'oacute': 556,
  36319. 'amacron': 556,
  36320. 'sacute': 500,
  36321. 'idieresis': 278,
  36322. 'Ocircumflex': 778,
  36323. 'Ugrave': 722,
  36324. 'Delta': 612,
  36325. 'thorn': 556,
  36326. 'twosuperior': 333,
  36327. 'Odieresis': 778,
  36328. 'mu': 556,
  36329. 'igrave': 278,
  36330. 'ohungarumlaut': 556,
  36331. 'Eogonek': 667,
  36332. 'dcroat': 556,
  36333. 'threequarters': 834,
  36334. 'Scedilla': 667,
  36335. 'lcaron': 299,
  36336. 'Kcommaaccent': 667,
  36337. 'Lacute': 556,
  36338. 'trademark': 1000,
  36339. 'edotaccent': 556,
  36340. 'Igrave': 278,
  36341. 'Imacron': 278,
  36342. 'Lcaron': 556,
  36343. 'onehalf': 834,
  36344. 'lessequal': 549,
  36345. 'ocircumflex': 556,
  36346. 'ntilde': 556,
  36347. 'Uhungarumlaut': 722,
  36348. 'Eacute': 667,
  36349. 'emacron': 556,
  36350. 'gbreve': 556,
  36351. 'onequarter': 834,
  36352. 'Scaron': 667,
  36353. 'Scommaaccent': 667,
  36354. 'Ohungarumlaut': 778,
  36355. 'degree': 400,
  36356. 'ograve': 556,
  36357. 'Ccaron': 722,
  36358. 'ugrave': 556,
  36359. 'radical': 453,
  36360. 'Dcaron': 722,
  36361. 'rcommaaccent': 333,
  36362. 'Ntilde': 722,
  36363. 'otilde': 556,
  36364. 'Rcommaaccent': 722,
  36365. 'Lcommaaccent': 556,
  36366. 'Atilde': 667,
  36367. 'Aogonek': 667,
  36368. 'Aring': 667,
  36369. 'Otilde': 778,
  36370. 'zdotaccent': 500,
  36371. 'Ecaron': 667,
  36372. 'Iogonek': 278,
  36373. 'kcommaaccent': 500,
  36374. 'minus': 584,
  36375. 'Icircumflex': 278,
  36376. 'ncaron': 556,
  36377. 'tcommaaccent': 278,
  36378. 'logicalnot': 584,
  36379. 'odieresis': 556,
  36380. 'udieresis': 556,
  36381. 'notequal': 549,
  36382. 'gcommaaccent': 556,
  36383. 'eth': 556,
  36384. 'zcaron': 500,
  36385. 'ncommaaccent': 556,
  36386. 'onesuperior': 333,
  36387. 'imacron': 278,
  36388. 'Euro': 556
  36389. },
  36390. 'Symbol': {
  36391. 'space': 250,
  36392. 'exclam': 333,
  36393. 'universal': 713,
  36394. 'numbersign': 500,
  36395. 'existential': 549,
  36396. 'percent': 833,
  36397. 'ampersand': 778,
  36398. 'suchthat': 439,
  36399. 'parenleft': 333,
  36400. 'parenright': 333,
  36401. 'asteriskmath': 500,
  36402. 'plus': 549,
  36403. 'comma': 250,
  36404. 'minus': 549,
  36405. 'period': 250,
  36406. 'slash': 278,
  36407. 'zero': 500,
  36408. 'one': 500,
  36409. 'two': 500,
  36410. 'three': 500,
  36411. 'four': 500,
  36412. 'five': 500,
  36413. 'six': 500,
  36414. 'seven': 500,
  36415. 'eight': 500,
  36416. 'nine': 500,
  36417. 'colon': 278,
  36418. 'semicolon': 278,
  36419. 'less': 549,
  36420. 'equal': 549,
  36421. 'greater': 549,
  36422. 'question': 444,
  36423. 'congruent': 549,
  36424. 'Alpha': 722,
  36425. 'Beta': 667,
  36426. 'Chi': 722,
  36427. 'Delta': 612,
  36428. 'Epsilon': 611,
  36429. 'Phi': 763,
  36430. 'Gamma': 603,
  36431. 'Eta': 722,
  36432. 'Iota': 333,
  36433. 'theta1': 631,
  36434. 'Kappa': 722,
  36435. 'Lambda': 686,
  36436. 'Mu': 889,
  36437. 'Nu': 722,
  36438. 'Omicron': 722,
  36439. 'Pi': 768,
  36440. 'Theta': 741,
  36441. 'Rho': 556,
  36442. 'Sigma': 592,
  36443. 'Tau': 611,
  36444. 'Upsilon': 690,
  36445. 'sigma1': 439,
  36446. 'Omega': 768,
  36447. 'Xi': 645,
  36448. 'Psi': 795,
  36449. 'Zeta': 611,
  36450. 'bracketleft': 333,
  36451. 'therefore': 863,
  36452. 'bracketright': 333,
  36453. 'perpendicular': 658,
  36454. 'underscore': 500,
  36455. 'radicalex': 500,
  36456. 'alpha': 631,
  36457. 'beta': 549,
  36458. 'chi': 549,
  36459. 'delta': 494,
  36460. 'epsilon': 439,
  36461. 'phi': 521,
  36462. 'gamma': 411,
  36463. 'eta': 603,
  36464. 'iota': 329,
  36465. 'phi1': 603,
  36466. 'kappa': 549,
  36467. 'lambda': 549,
  36468. 'mu': 576,
  36469. 'nu': 521,
  36470. 'omicron': 549,
  36471. 'pi': 549,
  36472. 'theta': 521,
  36473. 'rho': 549,
  36474. 'sigma': 603,
  36475. 'tau': 439,
  36476. 'upsilon': 576,
  36477. 'omega1': 713,
  36478. 'omega': 686,
  36479. 'xi': 493,
  36480. 'psi': 686,
  36481. 'zeta': 494,
  36482. 'braceleft': 480,
  36483. 'bar': 200,
  36484. 'braceright': 480,
  36485. 'similar': 549,
  36486. 'Euro': 750,
  36487. 'Upsilon1': 620,
  36488. 'minute': 247,
  36489. 'lessequal': 549,
  36490. 'fraction': 167,
  36491. 'infinity': 713,
  36492. 'florin': 500,
  36493. 'club': 753,
  36494. 'diamond': 753,
  36495. 'heart': 753,
  36496. 'spade': 753,
  36497. 'arrowboth': 1042,
  36498. 'arrowleft': 987,
  36499. 'arrowup': 603,
  36500. 'arrowright': 987,
  36501. 'arrowdown': 603,
  36502. 'degree': 400,
  36503. 'plusminus': 549,
  36504. 'second': 411,
  36505. 'greaterequal': 549,
  36506. 'multiply': 549,
  36507. 'proportional': 713,
  36508. 'partialdiff': 494,
  36509. 'bullet': 460,
  36510. 'divide': 549,
  36511. 'notequal': 549,
  36512. 'equivalence': 549,
  36513. 'approxequal': 549,
  36514. 'ellipsis': 1000,
  36515. 'arrowvertex': 603,
  36516. 'arrowhorizex': 1000,
  36517. 'carriagereturn': 658,
  36518. 'aleph': 823,
  36519. 'Ifraktur': 686,
  36520. 'Rfraktur': 795,
  36521. 'weierstrass': 987,
  36522. 'circlemultiply': 768,
  36523. 'circleplus': 768,
  36524. 'emptyset': 823,
  36525. 'intersection': 768,
  36526. 'union': 768,
  36527. 'propersuperset': 713,
  36528. 'reflexsuperset': 713,
  36529. 'notsubset': 713,
  36530. 'propersubset': 713,
  36531. 'reflexsubset': 713,
  36532. 'element': 713,
  36533. 'notelement': 713,
  36534. 'angle': 768,
  36535. 'gradient': 713,
  36536. 'registerserif': 790,
  36537. 'copyrightserif': 790,
  36538. 'trademarkserif': 890,
  36539. 'product': 823,
  36540. 'radical': 549,
  36541. 'dotmath': 250,
  36542. 'logicalnot': 713,
  36543. 'logicaland': 603,
  36544. 'logicalor': 603,
  36545. 'arrowdblboth': 1042,
  36546. 'arrowdblleft': 987,
  36547. 'arrowdblup': 603,
  36548. 'arrowdblright': 987,
  36549. 'arrowdbldown': 603,
  36550. 'lozenge': 494,
  36551. 'angleleft': 329,
  36552. 'registersans': 790,
  36553. 'copyrightsans': 790,
  36554. 'trademarksans': 786,
  36555. 'summation': 713,
  36556. 'parenlefttp': 384,
  36557. 'parenleftex': 384,
  36558. 'parenleftbt': 384,
  36559. 'bracketlefttp': 384,
  36560. 'bracketleftex': 384,
  36561. 'bracketleftbt': 384,
  36562. 'bracelefttp': 494,
  36563. 'braceleftmid': 494,
  36564. 'braceleftbt': 494,
  36565. 'braceex': 494,
  36566. 'angleright': 329,
  36567. 'integral': 274,
  36568. 'integraltp': 686,
  36569. 'integralex': 686,
  36570. 'integralbt': 686,
  36571. 'parenrighttp': 384,
  36572. 'parenrightex': 384,
  36573. 'parenrightbt': 384,
  36574. 'bracketrighttp': 384,
  36575. 'bracketrightex': 384,
  36576. 'bracketrightbt': 384,
  36577. 'bracerighttp': 494,
  36578. 'bracerightmid': 494,
  36579. 'bracerightbt': 494,
  36580. 'apple': 790
  36581. },
  36582. 'Times-Roman': {
  36583. 'space': 250,
  36584. 'exclam': 333,
  36585. 'quotedbl': 408,
  36586. 'numbersign': 500,
  36587. 'dollar': 500,
  36588. 'percent': 833,
  36589. 'ampersand': 778,
  36590. 'quoteright': 333,
  36591. 'parenleft': 333,
  36592. 'parenright': 333,
  36593. 'asterisk': 500,
  36594. 'plus': 564,
  36595. 'comma': 250,
  36596. 'hyphen': 333,
  36597. 'period': 250,
  36598. 'slash': 278,
  36599. 'zero': 500,
  36600. 'one': 500,
  36601. 'two': 500,
  36602. 'three': 500,
  36603. 'four': 500,
  36604. 'five': 500,
  36605. 'six': 500,
  36606. 'seven': 500,
  36607. 'eight': 500,
  36608. 'nine': 500,
  36609. 'colon': 278,
  36610. 'semicolon': 278,
  36611. 'less': 564,
  36612. 'equal': 564,
  36613. 'greater': 564,
  36614. 'question': 444,
  36615. 'at': 921,
  36616. 'A': 722,
  36617. 'B': 667,
  36618. 'C': 667,
  36619. 'D': 722,
  36620. 'E': 611,
  36621. 'F': 556,
  36622. 'G': 722,
  36623. 'H': 722,
  36624. 'I': 333,
  36625. 'J': 389,
  36626. 'K': 722,
  36627. 'L': 611,
  36628. 'M': 889,
  36629. 'N': 722,
  36630. 'O': 722,
  36631. 'P': 556,
  36632. 'Q': 722,
  36633. 'R': 667,
  36634. 'S': 556,
  36635. 'T': 611,
  36636. 'U': 722,
  36637. 'V': 722,
  36638. 'W': 944,
  36639. 'X': 722,
  36640. 'Y': 722,
  36641. 'Z': 611,
  36642. 'bracketleft': 333,
  36643. 'backslash': 278,
  36644. 'bracketright': 333,
  36645. 'asciicircum': 469,
  36646. 'underscore': 500,
  36647. 'quoteleft': 333,
  36648. 'a': 444,
  36649. 'b': 500,
  36650. 'c': 444,
  36651. 'd': 500,
  36652. 'e': 444,
  36653. 'f': 333,
  36654. 'g': 500,
  36655. 'h': 500,
  36656. 'i': 278,
  36657. 'j': 278,
  36658. 'k': 500,
  36659. 'l': 278,
  36660. 'm': 778,
  36661. 'n': 500,
  36662. 'o': 500,
  36663. 'p': 500,
  36664. 'q': 500,
  36665. 'r': 333,
  36666. 's': 389,
  36667. 't': 278,
  36668. 'u': 500,
  36669. 'v': 500,
  36670. 'w': 722,
  36671. 'x': 500,
  36672. 'y': 500,
  36673. 'z': 444,
  36674. 'braceleft': 480,
  36675. 'bar': 200,
  36676. 'braceright': 480,
  36677. 'asciitilde': 541,
  36678. 'exclamdown': 333,
  36679. 'cent': 500,
  36680. 'sterling': 500,
  36681. 'fraction': 167,
  36682. 'yen': 500,
  36683. 'florin': 500,
  36684. 'section': 500,
  36685. 'currency': 500,
  36686. 'quotesingle': 180,
  36687. 'quotedblleft': 444,
  36688. 'guillemotleft': 500,
  36689. 'guilsinglleft': 333,
  36690. 'guilsinglright': 333,
  36691. 'fi': 556,
  36692. 'fl': 556,
  36693. 'endash': 500,
  36694. 'dagger': 500,
  36695. 'daggerdbl': 500,
  36696. 'periodcentered': 250,
  36697. 'paragraph': 453,
  36698. 'bullet': 350,
  36699. 'quotesinglbase': 333,
  36700. 'quotedblbase': 444,
  36701. 'quotedblright': 444,
  36702. 'guillemotright': 500,
  36703. 'ellipsis': 1000,
  36704. 'perthousand': 1000,
  36705. 'questiondown': 444,
  36706. 'grave': 333,
  36707. 'acute': 333,
  36708. 'circumflex': 333,
  36709. 'tilde': 333,
  36710. 'macron': 333,
  36711. 'breve': 333,
  36712. 'dotaccent': 333,
  36713. 'dieresis': 333,
  36714. 'ring': 333,
  36715. 'cedilla': 333,
  36716. 'hungarumlaut': 333,
  36717. 'ogonek': 333,
  36718. 'caron': 333,
  36719. 'emdash': 1000,
  36720. 'AE': 889,
  36721. 'ordfeminine': 276,
  36722. 'Lslash': 611,
  36723. 'Oslash': 722,
  36724. 'OE': 889,
  36725. 'ordmasculine': 310,
  36726. 'ae': 667,
  36727. 'dotlessi': 278,
  36728. 'lslash': 278,
  36729. 'oslash': 500,
  36730. 'oe': 722,
  36731. 'germandbls': 500,
  36732. 'Idieresis': 333,
  36733. 'eacute': 444,
  36734. 'abreve': 444,
  36735. 'uhungarumlaut': 500,
  36736. 'ecaron': 444,
  36737. 'Ydieresis': 722,
  36738. 'divide': 564,
  36739. 'Yacute': 722,
  36740. 'Acircumflex': 722,
  36741. 'aacute': 444,
  36742. 'Ucircumflex': 722,
  36743. 'yacute': 500,
  36744. 'scommaaccent': 389,
  36745. 'ecircumflex': 444,
  36746. 'Uring': 722,
  36747. 'Udieresis': 722,
  36748. 'aogonek': 444,
  36749. 'Uacute': 722,
  36750. 'uogonek': 500,
  36751. 'Edieresis': 611,
  36752. 'Dcroat': 722,
  36753. 'commaaccent': 250,
  36754. 'copyright': 760,
  36755. 'Emacron': 611,
  36756. 'ccaron': 444,
  36757. 'aring': 444,
  36758. 'Ncommaaccent': 722,
  36759. 'lacute': 278,
  36760. 'agrave': 444,
  36761. 'Tcommaaccent': 611,
  36762. 'Cacute': 667,
  36763. 'atilde': 444,
  36764. 'Edotaccent': 611,
  36765. 'scaron': 389,
  36766. 'scedilla': 389,
  36767. 'iacute': 278,
  36768. 'lozenge': 471,
  36769. 'Rcaron': 667,
  36770. 'Gcommaaccent': 722,
  36771. 'ucircumflex': 500,
  36772. 'acircumflex': 444,
  36773. 'Amacron': 722,
  36774. 'rcaron': 333,
  36775. 'ccedilla': 444,
  36776. 'Zdotaccent': 611,
  36777. 'Thorn': 556,
  36778. 'Omacron': 722,
  36779. 'Racute': 667,
  36780. 'Sacute': 556,
  36781. 'dcaron': 588,
  36782. 'Umacron': 722,
  36783. 'uring': 500,
  36784. 'threesuperior': 300,
  36785. 'Ograve': 722,
  36786. 'Agrave': 722,
  36787. 'Abreve': 722,
  36788. 'multiply': 564,
  36789. 'uacute': 500,
  36790. 'Tcaron': 611,
  36791. 'partialdiff': 476,
  36792. 'ydieresis': 500,
  36793. 'Nacute': 722,
  36794. 'icircumflex': 278,
  36795. 'Ecircumflex': 611,
  36796. 'adieresis': 444,
  36797. 'edieresis': 444,
  36798. 'cacute': 444,
  36799. 'nacute': 500,
  36800. 'umacron': 500,
  36801. 'Ncaron': 722,
  36802. 'Iacute': 333,
  36803. 'plusminus': 564,
  36804. 'brokenbar': 200,
  36805. 'registered': 760,
  36806. 'Gbreve': 722,
  36807. 'Idotaccent': 333,
  36808. 'summation': 600,
  36809. 'Egrave': 611,
  36810. 'racute': 333,
  36811. 'omacron': 500,
  36812. 'Zacute': 611,
  36813. 'Zcaron': 611,
  36814. 'greaterequal': 549,
  36815. 'Eth': 722,
  36816. 'Ccedilla': 667,
  36817. 'lcommaaccent': 278,
  36818. 'tcaron': 326,
  36819. 'eogonek': 444,
  36820. 'Uogonek': 722,
  36821. 'Aacute': 722,
  36822. 'Adieresis': 722,
  36823. 'egrave': 444,
  36824. 'zacute': 444,
  36825. 'iogonek': 278,
  36826. 'Oacute': 722,
  36827. 'oacute': 500,
  36828. 'amacron': 444,
  36829. 'sacute': 389,
  36830. 'idieresis': 278,
  36831. 'Ocircumflex': 722,
  36832. 'Ugrave': 722,
  36833. 'Delta': 612,
  36834. 'thorn': 500,
  36835. 'twosuperior': 300,
  36836. 'Odieresis': 722,
  36837. 'mu': 500,
  36838. 'igrave': 278,
  36839. 'ohungarumlaut': 500,
  36840. 'Eogonek': 611,
  36841. 'dcroat': 500,
  36842. 'threequarters': 750,
  36843. 'Scedilla': 556,
  36844. 'lcaron': 344,
  36845. 'Kcommaaccent': 722,
  36846. 'Lacute': 611,
  36847. 'trademark': 980,
  36848. 'edotaccent': 444,
  36849. 'Igrave': 333,
  36850. 'Imacron': 333,
  36851. 'Lcaron': 611,
  36852. 'onehalf': 750,
  36853. 'lessequal': 549,
  36854. 'ocircumflex': 500,
  36855. 'ntilde': 500,
  36856. 'Uhungarumlaut': 722,
  36857. 'Eacute': 611,
  36858. 'emacron': 444,
  36859. 'gbreve': 500,
  36860. 'onequarter': 750,
  36861. 'Scaron': 556,
  36862. 'Scommaaccent': 556,
  36863. 'Ohungarumlaut': 722,
  36864. 'degree': 400,
  36865. 'ograve': 500,
  36866. 'Ccaron': 667,
  36867. 'ugrave': 500,
  36868. 'radical': 453,
  36869. 'Dcaron': 722,
  36870. 'rcommaaccent': 333,
  36871. 'Ntilde': 722,
  36872. 'otilde': 500,
  36873. 'Rcommaaccent': 667,
  36874. 'Lcommaaccent': 611,
  36875. 'Atilde': 722,
  36876. 'Aogonek': 722,
  36877. 'Aring': 722,
  36878. 'Otilde': 722,
  36879. 'zdotaccent': 444,
  36880. 'Ecaron': 611,
  36881. 'Iogonek': 333,
  36882. 'kcommaaccent': 500,
  36883. 'minus': 564,
  36884. 'Icircumflex': 333,
  36885. 'ncaron': 500,
  36886. 'tcommaaccent': 278,
  36887. 'logicalnot': 564,
  36888. 'odieresis': 500,
  36889. 'udieresis': 500,
  36890. 'notequal': 549,
  36891. 'gcommaaccent': 500,
  36892. 'eth': 500,
  36893. 'zcaron': 444,
  36894. 'ncommaaccent': 500,
  36895. 'onesuperior': 300,
  36896. 'imacron': 278,
  36897. 'Euro': 500
  36898. },
  36899. 'Times-Bold': {
  36900. 'space': 250,
  36901. 'exclam': 333,
  36902. 'quotedbl': 555,
  36903. 'numbersign': 500,
  36904. 'dollar': 500,
  36905. 'percent': 1000,
  36906. 'ampersand': 833,
  36907. 'quoteright': 333,
  36908. 'parenleft': 333,
  36909. 'parenright': 333,
  36910. 'asterisk': 500,
  36911. 'plus': 570,
  36912. 'comma': 250,
  36913. 'hyphen': 333,
  36914. 'period': 250,
  36915. 'slash': 278,
  36916. 'zero': 500,
  36917. 'one': 500,
  36918. 'two': 500,
  36919. 'three': 500,
  36920. 'four': 500,
  36921. 'five': 500,
  36922. 'six': 500,
  36923. 'seven': 500,
  36924. 'eight': 500,
  36925. 'nine': 500,
  36926. 'colon': 333,
  36927. 'semicolon': 333,
  36928. 'less': 570,
  36929. 'equal': 570,
  36930. 'greater': 570,
  36931. 'question': 500,
  36932. 'at': 930,
  36933. 'A': 722,
  36934. 'B': 667,
  36935. 'C': 722,
  36936. 'D': 722,
  36937. 'E': 667,
  36938. 'F': 611,
  36939. 'G': 778,
  36940. 'H': 778,
  36941. 'I': 389,
  36942. 'J': 500,
  36943. 'K': 778,
  36944. 'L': 667,
  36945. 'M': 944,
  36946. 'N': 722,
  36947. 'O': 778,
  36948. 'P': 611,
  36949. 'Q': 778,
  36950. 'R': 722,
  36951. 'S': 556,
  36952. 'T': 667,
  36953. 'U': 722,
  36954. 'V': 722,
  36955. 'W': 1000,
  36956. 'X': 722,
  36957. 'Y': 722,
  36958. 'Z': 667,
  36959. 'bracketleft': 333,
  36960. 'backslash': 278,
  36961. 'bracketright': 333,
  36962. 'asciicircum': 581,
  36963. 'underscore': 500,
  36964. 'quoteleft': 333,
  36965. 'a': 500,
  36966. 'b': 556,
  36967. 'c': 444,
  36968. 'd': 556,
  36969. 'e': 444,
  36970. 'f': 333,
  36971. 'g': 500,
  36972. 'h': 556,
  36973. 'i': 278,
  36974. 'j': 333,
  36975. 'k': 556,
  36976. 'l': 278,
  36977. 'm': 833,
  36978. 'n': 556,
  36979. 'o': 500,
  36980. 'p': 556,
  36981. 'q': 556,
  36982. 'r': 444,
  36983. 's': 389,
  36984. 't': 333,
  36985. 'u': 556,
  36986. 'v': 500,
  36987. 'w': 722,
  36988. 'x': 500,
  36989. 'y': 500,
  36990. 'z': 444,
  36991. 'braceleft': 394,
  36992. 'bar': 220,
  36993. 'braceright': 394,
  36994. 'asciitilde': 520,
  36995. 'exclamdown': 333,
  36996. 'cent': 500,
  36997. 'sterling': 500,
  36998. 'fraction': 167,
  36999. 'yen': 500,
  37000. 'florin': 500,
  37001. 'section': 500,
  37002. 'currency': 500,
  37003. 'quotesingle': 278,
  37004. 'quotedblleft': 500,
  37005. 'guillemotleft': 500,
  37006. 'guilsinglleft': 333,
  37007. 'guilsinglright': 333,
  37008. 'fi': 556,
  37009. 'fl': 556,
  37010. 'endash': 500,
  37011. 'dagger': 500,
  37012. 'daggerdbl': 500,
  37013. 'periodcentered': 250,
  37014. 'paragraph': 540,
  37015. 'bullet': 350,
  37016. 'quotesinglbase': 333,
  37017. 'quotedblbase': 500,
  37018. 'quotedblright': 500,
  37019. 'guillemotright': 500,
  37020. 'ellipsis': 1000,
  37021. 'perthousand': 1000,
  37022. 'questiondown': 500,
  37023. 'grave': 333,
  37024. 'acute': 333,
  37025. 'circumflex': 333,
  37026. 'tilde': 333,
  37027. 'macron': 333,
  37028. 'breve': 333,
  37029. 'dotaccent': 333,
  37030. 'dieresis': 333,
  37031. 'ring': 333,
  37032. 'cedilla': 333,
  37033. 'hungarumlaut': 333,
  37034. 'ogonek': 333,
  37035. 'caron': 333,
  37036. 'emdash': 1000,
  37037. 'AE': 1000,
  37038. 'ordfeminine': 300,
  37039. 'Lslash': 667,
  37040. 'Oslash': 778,
  37041. 'OE': 1000,
  37042. 'ordmasculine': 330,
  37043. 'ae': 722,
  37044. 'dotlessi': 278,
  37045. 'lslash': 278,
  37046. 'oslash': 500,
  37047. 'oe': 722,
  37048. 'germandbls': 556,
  37049. 'Idieresis': 389,
  37050. 'eacute': 444,
  37051. 'abreve': 500,
  37052. 'uhungarumlaut': 556,
  37053. 'ecaron': 444,
  37054. 'Ydieresis': 722,
  37055. 'divide': 570,
  37056. 'Yacute': 722,
  37057. 'Acircumflex': 722,
  37058. 'aacute': 500,
  37059. 'Ucircumflex': 722,
  37060. 'yacute': 500,
  37061. 'scommaaccent': 389,
  37062. 'ecircumflex': 444,
  37063. 'Uring': 722,
  37064. 'Udieresis': 722,
  37065. 'aogonek': 500,
  37066. 'Uacute': 722,
  37067. 'uogonek': 556,
  37068. 'Edieresis': 667,
  37069. 'Dcroat': 722,
  37070. 'commaaccent': 250,
  37071. 'copyright': 747,
  37072. 'Emacron': 667,
  37073. 'ccaron': 444,
  37074. 'aring': 500,
  37075. 'Ncommaaccent': 722,
  37076. 'lacute': 278,
  37077. 'agrave': 500,
  37078. 'Tcommaaccent': 667,
  37079. 'Cacute': 722,
  37080. 'atilde': 500,
  37081. 'Edotaccent': 667,
  37082. 'scaron': 389,
  37083. 'scedilla': 389,
  37084. 'iacute': 278,
  37085. 'lozenge': 494,
  37086. 'Rcaron': 722,
  37087. 'Gcommaaccent': 778,
  37088. 'ucircumflex': 556,
  37089. 'acircumflex': 500,
  37090. 'Amacron': 722,
  37091. 'rcaron': 444,
  37092. 'ccedilla': 444,
  37093. 'Zdotaccent': 667,
  37094. 'Thorn': 611,
  37095. 'Omacron': 778,
  37096. 'Racute': 722,
  37097. 'Sacute': 556,
  37098. 'dcaron': 672,
  37099. 'Umacron': 722,
  37100. 'uring': 556,
  37101. 'threesuperior': 300,
  37102. 'Ograve': 778,
  37103. 'Agrave': 722,
  37104. 'Abreve': 722,
  37105. 'multiply': 570,
  37106. 'uacute': 556,
  37107. 'Tcaron': 667,
  37108. 'partialdiff': 494,
  37109. 'ydieresis': 500,
  37110. 'Nacute': 722,
  37111. 'icircumflex': 278,
  37112. 'Ecircumflex': 667,
  37113. 'adieresis': 500,
  37114. 'edieresis': 444,
  37115. 'cacute': 444,
  37116. 'nacute': 556,
  37117. 'umacron': 556,
  37118. 'Ncaron': 722,
  37119. 'Iacute': 389,
  37120. 'plusminus': 570,
  37121. 'brokenbar': 220,
  37122. 'registered': 747,
  37123. 'Gbreve': 778,
  37124. 'Idotaccent': 389,
  37125. 'summation': 600,
  37126. 'Egrave': 667,
  37127. 'racute': 444,
  37128. 'omacron': 500,
  37129. 'Zacute': 667,
  37130. 'Zcaron': 667,
  37131. 'greaterequal': 549,
  37132. 'Eth': 722,
  37133. 'Ccedilla': 722,
  37134. 'lcommaaccent': 278,
  37135. 'tcaron': 416,
  37136. 'eogonek': 444,
  37137. 'Uogonek': 722,
  37138. 'Aacute': 722,
  37139. 'Adieresis': 722,
  37140. 'egrave': 444,
  37141. 'zacute': 444,
  37142. 'iogonek': 278,
  37143. 'Oacute': 778,
  37144. 'oacute': 500,
  37145. 'amacron': 500,
  37146. 'sacute': 389,
  37147. 'idieresis': 278,
  37148. 'Ocircumflex': 778,
  37149. 'Ugrave': 722,
  37150. 'Delta': 612,
  37151. 'thorn': 556,
  37152. 'twosuperior': 300,
  37153. 'Odieresis': 778,
  37154. 'mu': 556,
  37155. 'igrave': 278,
  37156. 'ohungarumlaut': 500,
  37157. 'Eogonek': 667,
  37158. 'dcroat': 556,
  37159. 'threequarters': 750,
  37160. 'Scedilla': 556,
  37161. 'lcaron': 394,
  37162. 'Kcommaaccent': 778,
  37163. 'Lacute': 667,
  37164. 'trademark': 1000,
  37165. 'edotaccent': 444,
  37166. 'Igrave': 389,
  37167. 'Imacron': 389,
  37168. 'Lcaron': 667,
  37169. 'onehalf': 750,
  37170. 'lessequal': 549,
  37171. 'ocircumflex': 500,
  37172. 'ntilde': 556,
  37173. 'Uhungarumlaut': 722,
  37174. 'Eacute': 667,
  37175. 'emacron': 444,
  37176. 'gbreve': 500,
  37177. 'onequarter': 750,
  37178. 'Scaron': 556,
  37179. 'Scommaaccent': 556,
  37180. 'Ohungarumlaut': 778,
  37181. 'degree': 400,
  37182. 'ograve': 500,
  37183. 'Ccaron': 722,
  37184. 'ugrave': 556,
  37185. 'radical': 549,
  37186. 'Dcaron': 722,
  37187. 'rcommaaccent': 444,
  37188. 'Ntilde': 722,
  37189. 'otilde': 500,
  37190. 'Rcommaaccent': 722,
  37191. 'Lcommaaccent': 667,
  37192. 'Atilde': 722,
  37193. 'Aogonek': 722,
  37194. 'Aring': 722,
  37195. 'Otilde': 778,
  37196. 'zdotaccent': 444,
  37197. 'Ecaron': 667,
  37198. 'Iogonek': 389,
  37199. 'kcommaaccent': 556,
  37200. 'minus': 570,
  37201. 'Icircumflex': 389,
  37202. 'ncaron': 556,
  37203. 'tcommaaccent': 333,
  37204. 'logicalnot': 570,
  37205. 'odieresis': 500,
  37206. 'udieresis': 556,
  37207. 'notequal': 549,
  37208. 'gcommaaccent': 500,
  37209. 'eth': 500,
  37210. 'zcaron': 444,
  37211. 'ncommaaccent': 556,
  37212. 'onesuperior': 300,
  37213. 'imacron': 278,
  37214. 'Euro': 500
  37215. },
  37216. 'Times-BoldItalic': {
  37217. 'space': 250,
  37218. 'exclam': 389,
  37219. 'quotedbl': 555,
  37220. 'numbersign': 500,
  37221. 'dollar': 500,
  37222. 'percent': 833,
  37223. 'ampersand': 778,
  37224. 'quoteright': 333,
  37225. 'parenleft': 333,
  37226. 'parenright': 333,
  37227. 'asterisk': 500,
  37228. 'plus': 570,
  37229. 'comma': 250,
  37230. 'hyphen': 333,
  37231. 'period': 250,
  37232. 'slash': 278,
  37233. 'zero': 500,
  37234. 'one': 500,
  37235. 'two': 500,
  37236. 'three': 500,
  37237. 'four': 500,
  37238. 'five': 500,
  37239. 'six': 500,
  37240. 'seven': 500,
  37241. 'eight': 500,
  37242. 'nine': 500,
  37243. 'colon': 333,
  37244. 'semicolon': 333,
  37245. 'less': 570,
  37246. 'equal': 570,
  37247. 'greater': 570,
  37248. 'question': 500,
  37249. 'at': 832,
  37250. 'A': 667,
  37251. 'B': 667,
  37252. 'C': 667,
  37253. 'D': 722,
  37254. 'E': 667,
  37255. 'F': 667,
  37256. 'G': 722,
  37257. 'H': 778,
  37258. 'I': 389,
  37259. 'J': 500,
  37260. 'K': 667,
  37261. 'L': 611,
  37262. 'M': 889,
  37263. 'N': 722,
  37264. 'O': 722,
  37265. 'P': 611,
  37266. 'Q': 722,
  37267. 'R': 667,
  37268. 'S': 556,
  37269. 'T': 611,
  37270. 'U': 722,
  37271. 'V': 667,
  37272. 'W': 889,
  37273. 'X': 667,
  37274. 'Y': 611,
  37275. 'Z': 611,
  37276. 'bracketleft': 333,
  37277. 'backslash': 278,
  37278. 'bracketright': 333,
  37279. 'asciicircum': 570,
  37280. 'underscore': 500,
  37281. 'quoteleft': 333,
  37282. 'a': 500,
  37283. 'b': 500,
  37284. 'c': 444,
  37285. 'd': 500,
  37286. 'e': 444,
  37287. 'f': 333,
  37288. 'g': 500,
  37289. 'h': 556,
  37290. 'i': 278,
  37291. 'j': 278,
  37292. 'k': 500,
  37293. 'l': 278,
  37294. 'm': 778,
  37295. 'n': 556,
  37296. 'o': 500,
  37297. 'p': 500,
  37298. 'q': 500,
  37299. 'r': 389,
  37300. 's': 389,
  37301. 't': 278,
  37302. 'u': 556,
  37303. 'v': 444,
  37304. 'w': 667,
  37305. 'x': 500,
  37306. 'y': 444,
  37307. 'z': 389,
  37308. 'braceleft': 348,
  37309. 'bar': 220,
  37310. 'braceright': 348,
  37311. 'asciitilde': 570,
  37312. 'exclamdown': 389,
  37313. 'cent': 500,
  37314. 'sterling': 500,
  37315. 'fraction': 167,
  37316. 'yen': 500,
  37317. 'florin': 500,
  37318. 'section': 500,
  37319. 'currency': 500,
  37320. 'quotesingle': 278,
  37321. 'quotedblleft': 500,
  37322. 'guillemotleft': 500,
  37323. 'guilsinglleft': 333,
  37324. 'guilsinglright': 333,
  37325. 'fi': 556,
  37326. 'fl': 556,
  37327. 'endash': 500,
  37328. 'dagger': 500,
  37329. 'daggerdbl': 500,
  37330. 'periodcentered': 250,
  37331. 'paragraph': 500,
  37332. 'bullet': 350,
  37333. 'quotesinglbase': 333,
  37334. 'quotedblbase': 500,
  37335. 'quotedblright': 500,
  37336. 'guillemotright': 500,
  37337. 'ellipsis': 1000,
  37338. 'perthousand': 1000,
  37339. 'questiondown': 500,
  37340. 'grave': 333,
  37341. 'acute': 333,
  37342. 'circumflex': 333,
  37343. 'tilde': 333,
  37344. 'macron': 333,
  37345. 'breve': 333,
  37346. 'dotaccent': 333,
  37347. 'dieresis': 333,
  37348. 'ring': 333,
  37349. 'cedilla': 333,
  37350. 'hungarumlaut': 333,
  37351. 'ogonek': 333,
  37352. 'caron': 333,
  37353. 'emdash': 1000,
  37354. 'AE': 944,
  37355. 'ordfeminine': 266,
  37356. 'Lslash': 611,
  37357. 'Oslash': 722,
  37358. 'OE': 944,
  37359. 'ordmasculine': 300,
  37360. 'ae': 722,
  37361. 'dotlessi': 278,
  37362. 'lslash': 278,
  37363. 'oslash': 500,
  37364. 'oe': 722,
  37365. 'germandbls': 500,
  37366. 'Idieresis': 389,
  37367. 'eacute': 444,
  37368. 'abreve': 500,
  37369. 'uhungarumlaut': 556,
  37370. 'ecaron': 444,
  37371. 'Ydieresis': 611,
  37372. 'divide': 570,
  37373. 'Yacute': 611,
  37374. 'Acircumflex': 667,
  37375. 'aacute': 500,
  37376. 'Ucircumflex': 722,
  37377. 'yacute': 444,
  37378. 'scommaaccent': 389,
  37379. 'ecircumflex': 444,
  37380. 'Uring': 722,
  37381. 'Udieresis': 722,
  37382. 'aogonek': 500,
  37383. 'Uacute': 722,
  37384. 'uogonek': 556,
  37385. 'Edieresis': 667,
  37386. 'Dcroat': 722,
  37387. 'commaaccent': 250,
  37388. 'copyright': 747,
  37389. 'Emacron': 667,
  37390. 'ccaron': 444,
  37391. 'aring': 500,
  37392. 'Ncommaaccent': 722,
  37393. 'lacute': 278,
  37394. 'agrave': 500,
  37395. 'Tcommaaccent': 611,
  37396. 'Cacute': 667,
  37397. 'atilde': 500,
  37398. 'Edotaccent': 667,
  37399. 'scaron': 389,
  37400. 'scedilla': 389,
  37401. 'iacute': 278,
  37402. 'lozenge': 494,
  37403. 'Rcaron': 667,
  37404. 'Gcommaaccent': 722,
  37405. 'ucircumflex': 556,
  37406. 'acircumflex': 500,
  37407. 'Amacron': 667,
  37408. 'rcaron': 389,
  37409. 'ccedilla': 444,
  37410. 'Zdotaccent': 611,
  37411. 'Thorn': 611,
  37412. 'Omacron': 722,
  37413. 'Racute': 667,
  37414. 'Sacute': 556,
  37415. 'dcaron': 608,
  37416. 'Umacron': 722,
  37417. 'uring': 556,
  37418. 'threesuperior': 300,
  37419. 'Ograve': 722,
  37420. 'Agrave': 667,
  37421. 'Abreve': 667,
  37422. 'multiply': 570,
  37423. 'uacute': 556,
  37424. 'Tcaron': 611,
  37425. 'partialdiff': 494,
  37426. 'ydieresis': 444,
  37427. 'Nacute': 722,
  37428. 'icircumflex': 278,
  37429. 'Ecircumflex': 667,
  37430. 'adieresis': 500,
  37431. 'edieresis': 444,
  37432. 'cacute': 444,
  37433. 'nacute': 556,
  37434. 'umacron': 556,
  37435. 'Ncaron': 722,
  37436. 'Iacute': 389,
  37437. 'plusminus': 570,
  37438. 'brokenbar': 220,
  37439. 'registered': 747,
  37440. 'Gbreve': 722,
  37441. 'Idotaccent': 389,
  37442. 'summation': 600,
  37443. 'Egrave': 667,
  37444. 'racute': 389,
  37445. 'omacron': 500,
  37446. 'Zacute': 611,
  37447. 'Zcaron': 611,
  37448. 'greaterequal': 549,
  37449. 'Eth': 722,
  37450. 'Ccedilla': 667,
  37451. 'lcommaaccent': 278,
  37452. 'tcaron': 366,
  37453. 'eogonek': 444,
  37454. 'Uogonek': 722,
  37455. 'Aacute': 667,
  37456. 'Adieresis': 667,
  37457. 'egrave': 444,
  37458. 'zacute': 389,
  37459. 'iogonek': 278,
  37460. 'Oacute': 722,
  37461. 'oacute': 500,
  37462. 'amacron': 500,
  37463. 'sacute': 389,
  37464. 'idieresis': 278,
  37465. 'Ocircumflex': 722,
  37466. 'Ugrave': 722,
  37467. 'Delta': 612,
  37468. 'thorn': 500,
  37469. 'twosuperior': 300,
  37470. 'Odieresis': 722,
  37471. 'mu': 576,
  37472. 'igrave': 278,
  37473. 'ohungarumlaut': 500,
  37474. 'Eogonek': 667,
  37475. 'dcroat': 500,
  37476. 'threequarters': 750,
  37477. 'Scedilla': 556,
  37478. 'lcaron': 382,
  37479. 'Kcommaaccent': 667,
  37480. 'Lacute': 611,
  37481. 'trademark': 1000,
  37482. 'edotaccent': 444,
  37483. 'Igrave': 389,
  37484. 'Imacron': 389,
  37485. 'Lcaron': 611,
  37486. 'onehalf': 750,
  37487. 'lessequal': 549,
  37488. 'ocircumflex': 500,
  37489. 'ntilde': 556,
  37490. 'Uhungarumlaut': 722,
  37491. 'Eacute': 667,
  37492. 'emacron': 444,
  37493. 'gbreve': 500,
  37494. 'onequarter': 750,
  37495. 'Scaron': 556,
  37496. 'Scommaaccent': 556,
  37497. 'Ohungarumlaut': 722,
  37498. 'degree': 400,
  37499. 'ograve': 500,
  37500. 'Ccaron': 667,
  37501. 'ugrave': 556,
  37502. 'radical': 549,
  37503. 'Dcaron': 722,
  37504. 'rcommaaccent': 389,
  37505. 'Ntilde': 722,
  37506. 'otilde': 500,
  37507. 'Rcommaaccent': 667,
  37508. 'Lcommaaccent': 611,
  37509. 'Atilde': 667,
  37510. 'Aogonek': 667,
  37511. 'Aring': 667,
  37512. 'Otilde': 722,
  37513. 'zdotaccent': 389,
  37514. 'Ecaron': 667,
  37515. 'Iogonek': 389,
  37516. 'kcommaaccent': 500,
  37517. 'minus': 606,
  37518. 'Icircumflex': 389,
  37519. 'ncaron': 556,
  37520. 'tcommaaccent': 278,
  37521. 'logicalnot': 606,
  37522. 'odieresis': 500,
  37523. 'udieresis': 556,
  37524. 'notequal': 549,
  37525. 'gcommaaccent': 500,
  37526. 'eth': 500,
  37527. 'zcaron': 389,
  37528. 'ncommaaccent': 556,
  37529. 'onesuperior': 300,
  37530. 'imacron': 278,
  37531. 'Euro': 500
  37532. },
  37533. 'Times-Italic': {
  37534. 'space': 250,
  37535. 'exclam': 333,
  37536. 'quotedbl': 420,
  37537. 'numbersign': 500,
  37538. 'dollar': 500,
  37539. 'percent': 833,
  37540. 'ampersand': 778,
  37541. 'quoteright': 333,
  37542. 'parenleft': 333,
  37543. 'parenright': 333,
  37544. 'asterisk': 500,
  37545. 'plus': 675,
  37546. 'comma': 250,
  37547. 'hyphen': 333,
  37548. 'period': 250,
  37549. 'slash': 278,
  37550. 'zero': 500,
  37551. 'one': 500,
  37552. 'two': 500,
  37553. 'three': 500,
  37554. 'four': 500,
  37555. 'five': 500,
  37556. 'six': 500,
  37557. 'seven': 500,
  37558. 'eight': 500,
  37559. 'nine': 500,
  37560. 'colon': 333,
  37561. 'semicolon': 333,
  37562. 'less': 675,
  37563. 'equal': 675,
  37564. 'greater': 675,
  37565. 'question': 500,
  37566. 'at': 920,
  37567. 'A': 611,
  37568. 'B': 611,
  37569. 'C': 667,
  37570. 'D': 722,
  37571. 'E': 611,
  37572. 'F': 611,
  37573. 'G': 722,
  37574. 'H': 722,
  37575. 'I': 333,
  37576. 'J': 444,
  37577. 'K': 667,
  37578. 'L': 556,
  37579. 'M': 833,
  37580. 'N': 667,
  37581. 'O': 722,
  37582. 'P': 611,
  37583. 'Q': 722,
  37584. 'R': 611,
  37585. 'S': 500,
  37586. 'T': 556,
  37587. 'U': 722,
  37588. 'V': 611,
  37589. 'W': 833,
  37590. 'X': 611,
  37591. 'Y': 556,
  37592. 'Z': 556,
  37593. 'bracketleft': 389,
  37594. 'backslash': 278,
  37595. 'bracketright': 389,
  37596. 'asciicircum': 422,
  37597. 'underscore': 500,
  37598. 'quoteleft': 333,
  37599. 'a': 500,
  37600. 'b': 500,
  37601. 'c': 444,
  37602. 'd': 500,
  37603. 'e': 444,
  37604. 'f': 278,
  37605. 'g': 500,
  37606. 'h': 500,
  37607. 'i': 278,
  37608. 'j': 278,
  37609. 'k': 444,
  37610. 'l': 278,
  37611. 'm': 722,
  37612. 'n': 500,
  37613. 'o': 500,
  37614. 'p': 500,
  37615. 'q': 500,
  37616. 'r': 389,
  37617. 's': 389,
  37618. 't': 278,
  37619. 'u': 500,
  37620. 'v': 444,
  37621. 'w': 667,
  37622. 'x': 444,
  37623. 'y': 444,
  37624. 'z': 389,
  37625. 'braceleft': 400,
  37626. 'bar': 275,
  37627. 'braceright': 400,
  37628. 'asciitilde': 541,
  37629. 'exclamdown': 389,
  37630. 'cent': 500,
  37631. 'sterling': 500,
  37632. 'fraction': 167,
  37633. 'yen': 500,
  37634. 'florin': 500,
  37635. 'section': 500,
  37636. 'currency': 500,
  37637. 'quotesingle': 214,
  37638. 'quotedblleft': 556,
  37639. 'guillemotleft': 500,
  37640. 'guilsinglleft': 333,
  37641. 'guilsinglright': 333,
  37642. 'fi': 500,
  37643. 'fl': 500,
  37644. 'endash': 500,
  37645. 'dagger': 500,
  37646. 'daggerdbl': 500,
  37647. 'periodcentered': 250,
  37648. 'paragraph': 523,
  37649. 'bullet': 350,
  37650. 'quotesinglbase': 333,
  37651. 'quotedblbase': 556,
  37652. 'quotedblright': 556,
  37653. 'guillemotright': 500,
  37654. 'ellipsis': 889,
  37655. 'perthousand': 1000,
  37656. 'questiondown': 500,
  37657. 'grave': 333,
  37658. 'acute': 333,
  37659. 'circumflex': 333,
  37660. 'tilde': 333,
  37661. 'macron': 333,
  37662. 'breve': 333,
  37663. 'dotaccent': 333,
  37664. 'dieresis': 333,
  37665. 'ring': 333,
  37666. 'cedilla': 333,
  37667. 'hungarumlaut': 333,
  37668. 'ogonek': 333,
  37669. 'caron': 333,
  37670. 'emdash': 889,
  37671. 'AE': 889,
  37672. 'ordfeminine': 276,
  37673. 'Lslash': 556,
  37674. 'Oslash': 722,
  37675. 'OE': 944,
  37676. 'ordmasculine': 310,
  37677. 'ae': 667,
  37678. 'dotlessi': 278,
  37679. 'lslash': 278,
  37680. 'oslash': 500,
  37681. 'oe': 667,
  37682. 'germandbls': 500,
  37683. 'Idieresis': 333,
  37684. 'eacute': 444,
  37685. 'abreve': 500,
  37686. 'uhungarumlaut': 500,
  37687. 'ecaron': 444,
  37688. 'Ydieresis': 556,
  37689. 'divide': 675,
  37690. 'Yacute': 556,
  37691. 'Acircumflex': 611,
  37692. 'aacute': 500,
  37693. 'Ucircumflex': 722,
  37694. 'yacute': 444,
  37695. 'scommaaccent': 389,
  37696. 'ecircumflex': 444,
  37697. 'Uring': 722,
  37698. 'Udieresis': 722,
  37699. 'aogonek': 500,
  37700. 'Uacute': 722,
  37701. 'uogonek': 500,
  37702. 'Edieresis': 611,
  37703. 'Dcroat': 722,
  37704. 'commaaccent': 250,
  37705. 'copyright': 760,
  37706. 'Emacron': 611,
  37707. 'ccaron': 444,
  37708. 'aring': 500,
  37709. 'Ncommaaccent': 667,
  37710. 'lacute': 278,
  37711. 'agrave': 500,
  37712. 'Tcommaaccent': 556,
  37713. 'Cacute': 667,
  37714. 'atilde': 500,
  37715. 'Edotaccent': 611,
  37716. 'scaron': 389,
  37717. 'scedilla': 389,
  37718. 'iacute': 278,
  37719. 'lozenge': 471,
  37720. 'Rcaron': 611,
  37721. 'Gcommaaccent': 722,
  37722. 'ucircumflex': 500,
  37723. 'acircumflex': 500,
  37724. 'Amacron': 611,
  37725. 'rcaron': 389,
  37726. 'ccedilla': 444,
  37727. 'Zdotaccent': 556,
  37728. 'Thorn': 611,
  37729. 'Omacron': 722,
  37730. 'Racute': 611,
  37731. 'Sacute': 500,
  37732. 'dcaron': 544,
  37733. 'Umacron': 722,
  37734. 'uring': 500,
  37735. 'threesuperior': 300,
  37736. 'Ograve': 722,
  37737. 'Agrave': 611,
  37738. 'Abreve': 611,
  37739. 'multiply': 675,
  37740. 'uacute': 500,
  37741. 'Tcaron': 556,
  37742. 'partialdiff': 476,
  37743. 'ydieresis': 444,
  37744. 'Nacute': 667,
  37745. 'icircumflex': 278,
  37746. 'Ecircumflex': 611,
  37747. 'adieresis': 500,
  37748. 'edieresis': 444,
  37749. 'cacute': 444,
  37750. 'nacute': 500,
  37751. 'umacron': 500,
  37752. 'Ncaron': 667,
  37753. 'Iacute': 333,
  37754. 'plusminus': 675,
  37755. 'brokenbar': 275,
  37756. 'registered': 760,
  37757. 'Gbreve': 722,
  37758. 'Idotaccent': 333,
  37759. 'summation': 600,
  37760. 'Egrave': 611,
  37761. 'racute': 389,
  37762. 'omacron': 500,
  37763. 'Zacute': 556,
  37764. 'Zcaron': 556,
  37765. 'greaterequal': 549,
  37766. 'Eth': 722,
  37767. 'Ccedilla': 667,
  37768. 'lcommaaccent': 278,
  37769. 'tcaron': 300,
  37770. 'eogonek': 444,
  37771. 'Uogonek': 722,
  37772. 'Aacute': 611,
  37773. 'Adieresis': 611,
  37774. 'egrave': 444,
  37775. 'zacute': 389,
  37776. 'iogonek': 278,
  37777. 'Oacute': 722,
  37778. 'oacute': 500,
  37779. 'amacron': 500,
  37780. 'sacute': 389,
  37781. 'idieresis': 278,
  37782. 'Ocircumflex': 722,
  37783. 'Ugrave': 722,
  37784. 'Delta': 612,
  37785. 'thorn': 500,
  37786. 'twosuperior': 300,
  37787. 'Odieresis': 722,
  37788. 'mu': 500,
  37789. 'igrave': 278,
  37790. 'ohungarumlaut': 500,
  37791. 'Eogonek': 611,
  37792. 'dcroat': 500,
  37793. 'threequarters': 750,
  37794. 'Scedilla': 500,
  37795. 'lcaron': 300,
  37796. 'Kcommaaccent': 667,
  37797. 'Lacute': 556,
  37798. 'trademark': 980,
  37799. 'edotaccent': 444,
  37800. 'Igrave': 333,
  37801. 'Imacron': 333,
  37802. 'Lcaron': 611,
  37803. 'onehalf': 750,
  37804. 'lessequal': 549,
  37805. 'ocircumflex': 500,
  37806. 'ntilde': 500,
  37807. 'Uhungarumlaut': 722,
  37808. 'Eacute': 611,
  37809. 'emacron': 444,
  37810. 'gbreve': 500,
  37811. 'onequarter': 750,
  37812. 'Scaron': 500,
  37813. 'Scommaaccent': 500,
  37814. 'Ohungarumlaut': 722,
  37815. 'degree': 400,
  37816. 'ograve': 500,
  37817. 'Ccaron': 667,
  37818. 'ugrave': 500,
  37819. 'radical': 453,
  37820. 'Dcaron': 722,
  37821. 'rcommaaccent': 389,
  37822. 'Ntilde': 667,
  37823. 'otilde': 500,
  37824. 'Rcommaaccent': 611,
  37825. 'Lcommaaccent': 556,
  37826. 'Atilde': 611,
  37827. 'Aogonek': 611,
  37828. 'Aring': 611,
  37829. 'Otilde': 722,
  37830. 'zdotaccent': 389,
  37831. 'Ecaron': 611,
  37832. 'Iogonek': 333,
  37833. 'kcommaaccent': 444,
  37834. 'minus': 675,
  37835. 'Icircumflex': 333,
  37836. 'ncaron': 500,
  37837. 'tcommaaccent': 278,
  37838. 'logicalnot': 675,
  37839. 'odieresis': 500,
  37840. 'udieresis': 500,
  37841. 'notequal': 549,
  37842. 'gcommaaccent': 500,
  37843. 'eth': 500,
  37844. 'zcaron': 389,
  37845. 'ncommaaccent': 500,
  37846. 'onesuperior': 300,
  37847. 'imacron': 278,
  37848. 'Euro': 500
  37849. },
  37850. 'ZapfDingbats': {
  37851. 'space': 278,
  37852. 'a1': 974,
  37853. 'a2': 961,
  37854. 'a202': 974,
  37855. 'a3': 980,
  37856. 'a4': 719,
  37857. 'a5': 789,
  37858. 'a119': 790,
  37859. 'a118': 791,
  37860. 'a117': 690,
  37861. 'a11': 960,
  37862. 'a12': 939,
  37863. 'a13': 549,
  37864. 'a14': 855,
  37865. 'a15': 911,
  37866. 'a16': 933,
  37867. 'a105': 911,
  37868. 'a17': 945,
  37869. 'a18': 974,
  37870. 'a19': 755,
  37871. 'a20': 846,
  37872. 'a21': 762,
  37873. 'a22': 761,
  37874. 'a23': 571,
  37875. 'a24': 677,
  37876. 'a25': 763,
  37877. 'a26': 760,
  37878. 'a27': 759,
  37879. 'a28': 754,
  37880. 'a6': 494,
  37881. 'a7': 552,
  37882. 'a8': 537,
  37883. 'a9': 577,
  37884. 'a10': 692,
  37885. 'a29': 786,
  37886. 'a30': 788,
  37887. 'a31': 788,
  37888. 'a32': 790,
  37889. 'a33': 793,
  37890. 'a34': 794,
  37891. 'a35': 816,
  37892. 'a36': 823,
  37893. 'a37': 789,
  37894. 'a38': 841,
  37895. 'a39': 823,
  37896. 'a40': 833,
  37897. 'a41': 816,
  37898. 'a42': 831,
  37899. 'a43': 923,
  37900. 'a44': 744,
  37901. 'a45': 723,
  37902. 'a46': 749,
  37903. 'a47': 790,
  37904. 'a48': 792,
  37905. 'a49': 695,
  37906. 'a50': 776,
  37907. 'a51': 768,
  37908. 'a52': 792,
  37909. 'a53': 759,
  37910. 'a54': 707,
  37911. 'a55': 708,
  37912. 'a56': 682,
  37913. 'a57': 701,
  37914. 'a58': 826,
  37915. 'a59': 815,
  37916. 'a60': 789,
  37917. 'a61': 789,
  37918. 'a62': 707,
  37919. 'a63': 687,
  37920. 'a64': 696,
  37921. 'a65': 689,
  37922. 'a66': 786,
  37923. 'a67': 787,
  37924. 'a68': 713,
  37925. 'a69': 791,
  37926. 'a70': 785,
  37927. 'a71': 791,
  37928. 'a72': 873,
  37929. 'a73': 761,
  37930. 'a74': 762,
  37931. 'a203': 762,
  37932. 'a75': 759,
  37933. 'a204': 759,
  37934. 'a76': 892,
  37935. 'a77': 892,
  37936. 'a78': 788,
  37937. 'a79': 784,
  37938. 'a81': 438,
  37939. 'a82': 138,
  37940. 'a83': 277,
  37941. 'a84': 415,
  37942. 'a97': 392,
  37943. 'a98': 392,
  37944. 'a99': 668,
  37945. 'a100': 668,
  37946. 'a89': 390,
  37947. 'a90': 390,
  37948. 'a93': 317,
  37949. 'a94': 317,
  37950. 'a91': 276,
  37951. 'a92': 276,
  37952. 'a205': 509,
  37953. 'a85': 509,
  37954. 'a206': 410,
  37955. 'a86': 410,
  37956. 'a87': 234,
  37957. 'a88': 234,
  37958. 'a95': 334,
  37959. 'a96': 334,
  37960. 'a101': 732,
  37961. 'a102': 544,
  37962. 'a103': 544,
  37963. 'a104': 910,
  37964. 'a106': 667,
  37965. 'a107': 760,
  37966. 'a108': 760,
  37967. 'a112': 776,
  37968. 'a111': 595,
  37969. 'a110': 694,
  37970. 'a109': 626,
  37971. 'a120': 788,
  37972. 'a121': 788,
  37973. 'a122': 788,
  37974. 'a123': 788,
  37975. 'a124': 788,
  37976. 'a125': 788,
  37977. 'a126': 788,
  37978. 'a127': 788,
  37979. 'a128': 788,
  37980. 'a129': 788,
  37981. 'a130': 788,
  37982. 'a131': 788,
  37983. 'a132': 788,
  37984. 'a133': 788,
  37985. 'a134': 788,
  37986. 'a135': 788,
  37987. 'a136': 788,
  37988. 'a137': 788,
  37989. 'a138': 788,
  37990. 'a139': 788,
  37991. 'a140': 788,
  37992. 'a141': 788,
  37993. 'a142': 788,
  37994. 'a143': 788,
  37995. 'a144': 788,
  37996. 'a145': 788,
  37997. 'a146': 788,
  37998. 'a147': 788,
  37999. 'a148': 788,
  38000. 'a149': 788,
  38001. 'a150': 788,
  38002. 'a151': 788,
  38003. 'a152': 788,
  38004. 'a153': 788,
  38005. 'a154': 788,
  38006. 'a155': 788,
  38007. 'a156': 788,
  38008. 'a157': 788,
  38009. 'a158': 788,
  38010. 'a159': 788,
  38011. 'a160': 894,
  38012. 'a161': 838,
  38013. 'a163': 1016,
  38014. 'a164': 458,
  38015. 'a196': 748,
  38016. 'a165': 924,
  38017. 'a192': 748,
  38018. 'a166': 918,
  38019. 'a167': 927,
  38020. 'a168': 928,
  38021. 'a169': 928,
  38022. 'a170': 834,
  38023. 'a171': 873,
  38024. 'a172': 828,
  38025. 'a173': 924,
  38026. 'a162': 924,
  38027. 'a174': 917,
  38028. 'a175': 930,
  38029. 'a176': 931,
  38030. 'a177': 463,
  38031. 'a178': 883,
  38032. 'a179': 836,
  38033. 'a193': 836,
  38034. 'a180': 867,
  38035. 'a199': 867,
  38036. 'a181': 696,
  38037. 'a200': 696,
  38038. 'a182': 874,
  38039. 'a201': 874,
  38040. 'a183': 760,
  38041. 'a184': 946,
  38042. 'a197': 771,
  38043. 'a185': 865,
  38044. 'a194': 771,
  38045. 'a198': 888,
  38046. 'a186': 967,
  38047. 'a195': 888,
  38048. 'a187': 831,
  38049. 'a188': 873,
  38050. 'a189': 927,
  38051. 'a190': 970,
  38052. 'a191': 918
  38053. }
  38054. };
  38055. var EOF = {};
  38056. function isEOF(v) {
  38057. return (v === EOF);
  38058. }
  38059. var Parser = (function ParserClosure() {
  38060. function Parser(lexer, allowStreams, xref) {
  38061. this.lexer = lexer;
  38062. this.allowStreams = allowStreams;
  38063. this.xref = xref;
  38064. this.imageCache = {
  38065. length: 0,
  38066. adler32: 0,
  38067. stream: null
  38068. };
  38069. this.refill();
  38070. }
  38071. Parser.prototype = {
  38072. refill: function Parser_refill() {
  38073. this.buf1 = this.lexer.getObj();
  38074. this.buf2 = this.lexer.getObj();
  38075. },
  38076. shift: function Parser_shift() {
  38077. if (isCmd(this.buf2, 'ID')) {
  38078. this.buf1 = this.buf2;
  38079. this.buf2 = null;
  38080. } else {
  38081. this.buf1 = this.buf2;
  38082. this.buf2 = this.lexer.getObj();
  38083. }
  38084. },
  38085. getObj: function Parser_getObj(cipherTransform) {
  38086. var buf1 = this.buf1;
  38087. this.shift();
  38088. if (buf1 instanceof Cmd) {
  38089. switch (buf1.cmd) {
  38090. case 'BI': // inline image
  38091. return this.makeInlineImage(cipherTransform);
  38092. case '[': // array
  38093. var array = [];
  38094. while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
  38095. array.push(this.getObj(cipherTransform));
  38096. }
  38097. if (isEOF(this.buf1)) {
  38098. error('End of file inside array');
  38099. }
  38100. this.shift();
  38101. return array;
  38102. case '<<': // dictionary or stream
  38103. var dict = new Dict(this.xref);
  38104. while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
  38105. if (!isName(this.buf1)) {
  38106. info('Malformed dictionary: key must be a name object');
  38107. this.shift();
  38108. continue;
  38109. }
  38110. var key = this.buf1.name;
  38111. this.shift();
  38112. if (isEOF(this.buf1)) {
  38113. break;
  38114. }
  38115. dict.set(key, this.getObj(cipherTransform));
  38116. }
  38117. if (isEOF(this.buf1)) {
  38118. error('End of file inside dictionary');
  38119. }
  38120. // Stream objects are not allowed inside content streams or
  38121. // object streams.
  38122. if (isCmd(this.buf2, 'stream')) {
  38123. return (this.allowStreams ?
  38124. this.makeStream(dict, cipherTransform) : dict);
  38125. }
  38126. this.shift();
  38127. return dict;
  38128. default: // simple object
  38129. return buf1;
  38130. }
  38131. }
  38132. if (isInt(buf1)) { // indirect reference or integer
  38133. var num = buf1;
  38134. if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
  38135. var ref = new Ref(num, this.buf1);
  38136. this.shift();
  38137. this.shift();
  38138. return ref;
  38139. }
  38140. return num;
  38141. }
  38142. if (isString(buf1)) { // string
  38143. var str = buf1;
  38144. if (cipherTransform) {
  38145. str = cipherTransform.decryptString(str);
  38146. }
  38147. return str;
  38148. }
  38149. // simple object
  38150. return buf1;
  38151. },
  38152. makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
  38153. var lexer = this.lexer;
  38154. var stream = lexer.stream;
  38155. // parse dictionary
  38156. var dict = new Dict(null);
  38157. while (!isCmd(this.buf1, 'ID') && !isEOF(this.buf1)) {
  38158. if (!isName(this.buf1)) {
  38159. error('Dictionary key must be a name object');
  38160. }
  38161. var key = this.buf1.name;
  38162. this.shift();
  38163. if (isEOF(this.buf1)) {
  38164. break;
  38165. }
  38166. dict.set(key, this.getObj(cipherTransform));
  38167. }
  38168. // parse image stream
  38169. var startPos = stream.pos;
  38170. // searching for the /EI\s/
  38171. var state = 0, ch, i, ii;
  38172. while (state != 4 && (ch = stream.getByte()) !== -1) {
  38173. switch (ch | 0) {
  38174. case 0x20:
  38175. case 0x0D:
  38176. case 0x0A:
  38177. // let's check next five bytes to be ASCII... just be sure
  38178. var followingBytes = stream.peekBytes(5);
  38179. for (i = 0, ii = followingBytes.length; i < ii; i++) {
  38180. ch = followingBytes[i];
  38181. if (ch !== 0x0A && ch !== 0x0D && (ch < 0x20 || ch > 0x7F)) {
  38182. // not a LF, CR, SPACE or any visible ASCII character
  38183. state = 0;
  38184. break; // some binary stuff found, resetting the state
  38185. }
  38186. }
  38187. state = (state === 3 ? 4 : 0);
  38188. break;
  38189. case 0x45:
  38190. state = 2;
  38191. break;
  38192. case 0x49:
  38193. state = (state === 2 ? 3 : 0);
  38194. break;
  38195. default:
  38196. state = 0;
  38197. break;
  38198. }
  38199. }
  38200. var length = (stream.pos - 4) - startPos;
  38201. var imageStream = stream.makeSubStream(startPos, length, dict);
  38202. // trying to cache repeat images, first we are trying to "warm up" caching
  38203. // using length, then comparing adler32
  38204. var MAX_LENGTH_TO_CACHE = 1000;
  38205. var cacheImage = false, adler32;
  38206. if (length < MAX_LENGTH_TO_CACHE && this.imageCache.length === length) {
  38207. var imageBytes = imageStream.getBytes();
  38208. imageStream.reset();
  38209. var a = 1;
  38210. var b = 0;
  38211. for (i = 0, ii = imageBytes.length; i < ii; ++i) {
  38212. a = (a + (imageBytes[i] & 0xff)) % 65521;
  38213. b = (b + a) % 65521;
  38214. }
  38215. adler32 = (b << 16) | a;
  38216. if (this.imageCache.stream && this.imageCache.adler32 === adler32) {
  38217. this.buf2 = Cmd.get('EI');
  38218. this.shift();
  38219. this.imageCache.stream.reset();
  38220. return this.imageCache.stream;
  38221. }
  38222. cacheImage = true;
  38223. }
  38224. if (!cacheImage && !this.imageCache.stream) {
  38225. this.imageCache.length = length;
  38226. this.imageCache.stream = null;
  38227. }
  38228. if (cipherTransform) {
  38229. imageStream = cipherTransform.createStream(imageStream, length);
  38230. }
  38231. imageStream = this.filter(imageStream, dict, length);
  38232. imageStream.dict = dict;
  38233. if (cacheImage) {
  38234. imageStream.cacheKey = 'inline_' + length + '_' + adler32;
  38235. this.imageCache.adler32 = adler32;
  38236. this.imageCache.stream = imageStream;
  38237. }
  38238. this.buf2 = Cmd.get('EI');
  38239. this.shift();
  38240. return imageStream;
  38241. },
  38242. fetchIfRef: function Parser_fetchIfRef(obj) {
  38243. // not relying on the xref.fetchIfRef -- xref might not be set
  38244. return (isRef(obj) ? this.xref.fetch(obj) : obj);
  38245. },
  38246. makeStream: function Parser_makeStream(dict, cipherTransform) {
  38247. var lexer = this.lexer;
  38248. var stream = lexer.stream;
  38249. // get stream start position
  38250. lexer.skipToNextLine();
  38251. var pos = stream.pos - 1;
  38252. // get length
  38253. var length = this.fetchIfRef(dict.get('Length'));
  38254. if (!isInt(length)) {
  38255. info('Bad ' + length + ' attribute in stream');
  38256. length = 0;
  38257. }
  38258. // skip over the stream data
  38259. stream.pos = pos + length;
  38260. lexer.nextChar();
  38261. this.shift(); // '>>'
  38262. this.shift(); // 'stream'
  38263. if (!isCmd(this.buf1, 'endstream')) {
  38264. // bad stream length, scanning for endstream
  38265. stream.pos = pos;
  38266. var SCAN_BLOCK_SIZE = 2048;
  38267. var ENDSTREAM_SIGNATURE_LENGTH = 9;
  38268. var ENDSTREAM_SIGNATURE = [0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65,
  38269. 0x61, 0x6D];
  38270. var skipped = 0, found = false, i, j;
  38271. while (stream.pos < stream.end) {
  38272. var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE);
  38273. var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH;
  38274. if (scanLength <= 0) {
  38275. break;
  38276. }
  38277. found = false;
  38278. for (i = 0, j = 0; i < scanLength; i++) {
  38279. var b = scanBytes[i];
  38280. if (b !== ENDSTREAM_SIGNATURE[j]) {
  38281. i -= j;
  38282. j = 0;
  38283. } else {
  38284. j++;
  38285. if (j >= ENDSTREAM_SIGNATURE_LENGTH) {
  38286. i++;
  38287. found = true;
  38288. break;
  38289. }
  38290. }
  38291. }
  38292. if (found) {
  38293. skipped += i - ENDSTREAM_SIGNATURE_LENGTH;
  38294. stream.pos += i - ENDSTREAM_SIGNATURE_LENGTH;
  38295. break;
  38296. }
  38297. skipped += scanLength;
  38298. stream.pos += scanLength;
  38299. }
  38300. if (!found) {
  38301. error('Missing endstream');
  38302. }
  38303. length = skipped;
  38304. lexer.nextChar();
  38305. this.shift();
  38306. this.shift();
  38307. }
  38308. this.shift(); // 'endstream'
  38309. stream = stream.makeSubStream(pos, length, dict);
  38310. if (cipherTransform) {
  38311. stream = cipherTransform.createStream(stream, length);
  38312. }
  38313. stream = this.filter(stream, dict, length);
  38314. stream.dict = dict;
  38315. return stream;
  38316. },
  38317. filter: function Parser_filter(stream, dict, length) {
  38318. var filter = this.fetchIfRef(dict.get('Filter', 'F'));
  38319. var params = this.fetchIfRef(dict.get('DecodeParms', 'DP'));
  38320. if (isName(filter)) {
  38321. return this.makeFilter(stream, filter.name, length, params);
  38322. }
  38323. var maybeLength = length;
  38324. if (isArray(filter)) {
  38325. var filterArray = filter;
  38326. var paramsArray = params;
  38327. for (var i = 0, ii = filterArray.length; i < ii; ++i) {
  38328. filter = filterArray[i];
  38329. if (!isName(filter)) {
  38330. error('Bad filter name: ' + filter);
  38331. }
  38332. params = null;
  38333. if (isArray(paramsArray) && (i in paramsArray)) {
  38334. params = paramsArray[i];
  38335. }
  38336. stream = this.makeFilter(stream, filter.name, maybeLength, params);
  38337. // after the first stream the length variable is invalid
  38338. maybeLength = null;
  38339. }
  38340. }
  38341. return stream;
  38342. },
  38343. makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
  38344. if (stream.dict.get('Length') === 0) {
  38345. return new NullStream(stream);
  38346. }
  38347. try {
  38348. var xrefStreamStats = this.xref.stats.streamTypes;
  38349. if (name == 'FlateDecode' || name == 'Fl') {
  38350. xrefStreamStats[StreamType.FLATE] = true;
  38351. if (params) {
  38352. return new PredictorStream(new FlateStream(stream, maybeLength),
  38353. maybeLength, params);
  38354. }
  38355. return new FlateStream(stream, maybeLength);
  38356. }
  38357. if (name == 'LZWDecode' || name == 'LZW') {
  38358. xrefStreamStats[StreamType.LZW] = true;
  38359. var earlyChange = 1;
  38360. if (params) {
  38361. if (params.has('EarlyChange')) {
  38362. earlyChange = params.get('EarlyChange');
  38363. }
  38364. return new PredictorStream(
  38365. new LZWStream(stream, maybeLength, earlyChange),
  38366. maybeLength, params);
  38367. }
  38368. return new LZWStream(stream, maybeLength, earlyChange);
  38369. }
  38370. if (name == 'DCTDecode' || name == 'DCT') {
  38371. xrefStreamStats[StreamType.DCT] = true;
  38372. return new JpegStream(stream, maybeLength, stream.dict, this.xref);
  38373. }
  38374. if (name == 'JPXDecode' || name == 'JPX') {
  38375. xrefStreamStats[StreamType.JPX] = true;
  38376. return new JpxStream(stream, maybeLength, stream.dict);
  38377. }
  38378. if (name == 'ASCII85Decode' || name == 'A85') {
  38379. xrefStreamStats[StreamType.A85] = true;
  38380. return new Ascii85Stream(stream, maybeLength);
  38381. }
  38382. if (name == 'ASCIIHexDecode' || name == 'AHx') {
  38383. xrefStreamStats[StreamType.AHX] = true;
  38384. return new AsciiHexStream(stream, maybeLength);
  38385. }
  38386. if (name == 'CCITTFaxDecode' || name == 'CCF') {
  38387. xrefStreamStats[StreamType.CCF] = true;
  38388. return new CCITTFaxStream(stream, maybeLength, params);
  38389. }
  38390. if (name == 'RunLengthDecode' || name == 'RL') {
  38391. xrefStreamStats[StreamType.RL] = true;
  38392. return new RunLengthStream(stream, maybeLength);
  38393. }
  38394. if (name == 'JBIG2Decode') {
  38395. xrefStreamStats[StreamType.JBIG] = true;
  38396. return new Jbig2Stream(stream, maybeLength, stream.dict);
  38397. }
  38398. warn('filter "' + name + '" not supported yet');
  38399. return stream;
  38400. } catch (ex) {
  38401. if (ex instanceof MissingDataException) {
  38402. throw ex;
  38403. }
  38404. warn('Invalid stream: \"' + ex + '\"');
  38405. return new NullStream(stream);
  38406. }
  38407. }
  38408. };
  38409. return Parser;
  38410. })();
  38411. var Lexer = (function LexerClosure() {
  38412. function Lexer(stream, knownCommands) {
  38413. this.stream = stream;
  38414. this.nextChar();
  38415. // While lexing, we build up many strings one char at a time. Using += for
  38416. // this can result in lots of garbage strings. It's better to build an
  38417. // array of single-char strings and then join() them together at the end.
  38418. // And reusing a single array (i.e. |this.strBuf|) over and over for this
  38419. // purpose uses less memory than using a new array for each string.
  38420. this.strBuf = [];
  38421. // The PDFs might have "glued" commands with other commands, operands or
  38422. // literals, e.g. "q1". The knownCommands is a dictionary of the valid
  38423. // commands and their prefixes. The prefixes are built the following way:
  38424. // if there a command that is a prefix of the other valid command or
  38425. // literal (e.g. 'f' and 'false') the following prefixes must be included,
  38426. // 'fa', 'fal', 'fals'. The prefixes are not needed, if the command has no
  38427. // other commands or literals as a prefix. The knowCommands is optional.
  38428. this.knownCommands = knownCommands;
  38429. }
  38430. Lexer.isSpace = function Lexer_isSpace(ch) {
  38431. // Space is one of the following characters: SPACE, TAB, CR or LF.
  38432. return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A);
  38433. };
  38434. // A '1' in this array means the character is white space. A '1' or
  38435. // '2' means the character ends a name or command.
  38436. var specialChars = [
  38437. 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
  38438. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
  38439. 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
  38440. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
  38441. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
  38442. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
  38443. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
  38444. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
  38445. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
  38446. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
  38447. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
  38448. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
  38449. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
  38450. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
  38451. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
  38452. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx
  38453. ];
  38454. function toHexDigit(ch) {
  38455. if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
  38456. return ch & 0x0F;
  38457. }
  38458. if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
  38459. // 'A'-'F', 'a'-'f'
  38460. return (ch & 0x0F) + 9;
  38461. }
  38462. return -1;
  38463. }
  38464. Lexer.prototype = {
  38465. nextChar: function Lexer_nextChar() {
  38466. return (this.currentChar = this.stream.getByte());
  38467. },
  38468. peekChar: function Lexer_peekChar() {
  38469. return this.stream.peekBytes(1)[0];
  38470. },
  38471. getNumber: function Lexer_getNumber() {
  38472. var ch = this.currentChar;
  38473. var eNotation = false;
  38474. var divideBy = 0; // different from 0 if it's a floating point value
  38475. var sign = 1;
  38476. if (ch === 0x2D) { // '-'
  38477. sign = -1;
  38478. ch = this.nextChar();
  38479. } else if (ch === 0x2B) { // '+'
  38480. ch = this.nextChar();
  38481. }
  38482. if (ch === 0x2E) { // '.'
  38483. divideBy = 10;
  38484. ch = this.nextChar();
  38485. }
  38486. if (ch < 0x30 || ch > 0x39) { // '0' - '9'
  38487. error('Invalid number: ' + String.fromCharCode(ch));
  38488. return 0;
  38489. }
  38490. var baseValue = ch - 0x30; // '0'
  38491. var powerValue = 0;
  38492. var powerValueSign = 1;
  38493. while ((ch = this.nextChar()) >= 0) {
  38494. if (0x30 <= ch && ch <= 0x39) { // '0' - '9'
  38495. var currentDigit = ch - 0x30; // '0'
  38496. if (eNotation) { // We are after an 'e' or 'E'
  38497. powerValue = powerValue * 10 + currentDigit;
  38498. } else {
  38499. if (divideBy !== 0) { // We are after a point
  38500. divideBy *= 10;
  38501. }
  38502. baseValue = baseValue * 10 + currentDigit;
  38503. }
  38504. } else if (ch === 0x2E) { // '.'
  38505. if (divideBy === 0) {
  38506. divideBy = 1;
  38507. } else {
  38508. // A number can have only one '.'
  38509. break;
  38510. }
  38511. } else if (ch === 0x2D) { // '-'
  38512. // ignore minus signs in the middle of numbers to match
  38513. // Adobe's behavior
  38514. warn('Badly formated number');
  38515. } else if (ch === 0x45 || ch === 0x65) { // 'E', 'e'
  38516. // 'E' can be either a scientific notation or the beginning of a new
  38517. // operator
  38518. ch = this.peekChar();
  38519. if (ch === 0x2B || ch === 0x2D) { // '+', '-'
  38520. powerValueSign = (ch === 0x2D) ? -1 : 1;
  38521. this.nextChar(); // Consume the sign character
  38522. } else if (ch < 0x30 || ch > 0x39) { // '0' - '9'
  38523. // The 'E' must be the beginning of a new operator
  38524. break;
  38525. }
  38526. eNotation = true;
  38527. } else {
  38528. // the last character doesn't belong to us
  38529. break;
  38530. }
  38531. }
  38532. if (divideBy !== 0) {
  38533. baseValue /= divideBy;
  38534. }
  38535. if (eNotation) {
  38536. baseValue *= Math.pow(10, powerValueSign * powerValue);
  38537. }
  38538. return sign * baseValue;
  38539. },
  38540. getString: function Lexer_getString() {
  38541. var numParen = 1;
  38542. var done = false;
  38543. var strBuf = this.strBuf;
  38544. strBuf.length = 0;
  38545. var ch = this.nextChar();
  38546. while (true) {
  38547. var charBuffered = false;
  38548. switch (ch | 0) {
  38549. case -1:
  38550. warn('Unterminated string');
  38551. done = true;
  38552. break;
  38553. case 0x28: // '('
  38554. ++numParen;
  38555. strBuf.push('(');
  38556. break;
  38557. case 0x29: // ')'
  38558. if (--numParen === 0) {
  38559. this.nextChar(); // consume strings ')'
  38560. done = true;
  38561. } else {
  38562. strBuf.push(')');
  38563. }
  38564. break;
  38565. case 0x5C: // '\\'
  38566. ch = this.nextChar();
  38567. switch (ch) {
  38568. case -1:
  38569. warn('Unterminated string');
  38570. done = true;
  38571. break;
  38572. case 0x6E: // 'n'
  38573. strBuf.push('\n');
  38574. break;
  38575. case 0x72: // 'r'
  38576. strBuf.push('\r');
  38577. break;
  38578. case 0x74: // 't'
  38579. strBuf.push('\t');
  38580. break;
  38581. case 0x62: // 'b'
  38582. strBuf.push('\b');
  38583. break;
  38584. case 0x66: // 'f'
  38585. strBuf.push('\f');
  38586. break;
  38587. case 0x5C: // '\'
  38588. case 0x28: // '('
  38589. case 0x29: // ')'
  38590. strBuf.push(String.fromCharCode(ch));
  38591. break;
  38592. case 0x30: case 0x31: case 0x32: case 0x33: // '0'-'3'
  38593. case 0x34: case 0x35: case 0x36: case 0x37: // '4'-'7'
  38594. var x = ch & 0x0F;
  38595. ch = this.nextChar();
  38596. charBuffered = true;
  38597. if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
  38598. x = (x << 3) + (ch & 0x0F);
  38599. ch = this.nextChar();
  38600. if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
  38601. charBuffered = false;
  38602. x = (x << 3) + (ch & 0x0F);
  38603. }
  38604. }
  38605. strBuf.push(String.fromCharCode(x));
  38606. break;
  38607. case 0x0D: // CR
  38608. if (this.peekChar() === 0x0A) { // LF
  38609. this.nextChar();
  38610. }
  38611. break;
  38612. case 0x0A: // LF
  38613. break;
  38614. default:
  38615. strBuf.push(String.fromCharCode(ch));
  38616. break;
  38617. }
  38618. break;
  38619. default:
  38620. strBuf.push(String.fromCharCode(ch));
  38621. break;
  38622. }
  38623. if (done) {
  38624. break;
  38625. }
  38626. if (!charBuffered) {
  38627. ch = this.nextChar();
  38628. }
  38629. }
  38630. return strBuf.join('');
  38631. },
  38632. getName: function Lexer_getName() {
  38633. var ch;
  38634. var strBuf = this.strBuf;
  38635. strBuf.length = 0;
  38636. while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
  38637. if (ch === 0x23) { // '#'
  38638. ch = this.nextChar();
  38639. var x = toHexDigit(ch);
  38640. if (x != -1) {
  38641. var x2 = toHexDigit(this.nextChar());
  38642. if (x2 === -1) {
  38643. error('Illegal digit in hex char in name: ' + x2);
  38644. }
  38645. strBuf.push(String.fromCharCode((x << 4) | x2));
  38646. } else {
  38647. strBuf.push('#', String.fromCharCode(ch));
  38648. }
  38649. } else {
  38650. strBuf.push(String.fromCharCode(ch));
  38651. }
  38652. }
  38653. if (strBuf.length > 128) {
  38654. error('Warning: name token is longer than allowed by the spec: ' +
  38655. strBuf.length);
  38656. }
  38657. return Name.get(strBuf.join(''));
  38658. },
  38659. getHexString: function Lexer_getHexString() {
  38660. var strBuf = this.strBuf;
  38661. strBuf.length = 0;
  38662. var ch = this.currentChar;
  38663. var isFirstHex = true;
  38664. var firstDigit;
  38665. var secondDigit;
  38666. while (true) {
  38667. if (ch < 0) {
  38668. warn('Unterminated hex string');
  38669. break;
  38670. } else if (ch === 0x3E) { // '>'
  38671. this.nextChar();
  38672. break;
  38673. } else if (specialChars[ch] === 1) {
  38674. ch = this.nextChar();
  38675. continue;
  38676. } else {
  38677. if (isFirstHex) {
  38678. firstDigit = toHexDigit(ch);
  38679. if (firstDigit === -1) {
  38680. warn('Ignoring invalid character "' + ch + '" in hex string');
  38681. ch = this.nextChar();
  38682. continue;
  38683. }
  38684. } else {
  38685. secondDigit = toHexDigit(ch);
  38686. if (secondDigit === -1) {
  38687. warn('Ignoring invalid character "' + ch + '" in hex string');
  38688. ch = this.nextChar();
  38689. continue;
  38690. }
  38691. strBuf.push(String.fromCharCode((firstDigit << 4) | secondDigit));
  38692. }
  38693. isFirstHex = !isFirstHex;
  38694. ch = this.nextChar();
  38695. }
  38696. }
  38697. return strBuf.join('');
  38698. },
  38699. getObj: function Lexer_getObj() {
  38700. // skip whitespace and comments
  38701. var comment = false;
  38702. var ch = this.currentChar;
  38703. while (true) {
  38704. if (ch < 0) {
  38705. return EOF;
  38706. }
  38707. if (comment) {
  38708. if (ch === 0x0A || ch === 0x0D) { // LF, CR
  38709. comment = false;
  38710. }
  38711. } else if (ch === 0x25) { // '%'
  38712. comment = true;
  38713. } else if (specialChars[ch] !== 1) {
  38714. break;
  38715. }
  38716. ch = this.nextChar();
  38717. }
  38718. // start reading token
  38719. switch (ch | 0) {
  38720. case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
  38721. case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
  38722. case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
  38723. return this.getNumber();
  38724. case 0x28: // '('
  38725. return this.getString();
  38726. case 0x2F: // '/'
  38727. return this.getName();
  38728. // array punctuation
  38729. case 0x5B: // '['
  38730. this.nextChar();
  38731. return Cmd.get('[');
  38732. case 0x5D: // ']'
  38733. this.nextChar();
  38734. return Cmd.get(']');
  38735. // hex string or dict punctuation
  38736. case 0x3C: // '<'
  38737. ch = this.nextChar();
  38738. if (ch === 0x3C) {
  38739. // dict punctuation
  38740. this.nextChar();
  38741. return Cmd.get('<<');
  38742. }
  38743. return this.getHexString();
  38744. // dict punctuation
  38745. case 0x3E: // '>'
  38746. ch = this.nextChar();
  38747. if (ch === 0x3E) {
  38748. this.nextChar();
  38749. return Cmd.get('>>');
  38750. }
  38751. return Cmd.get('>');
  38752. case 0x7B: // '{'
  38753. this.nextChar();
  38754. return Cmd.get('{');
  38755. case 0x7D: // '}'
  38756. this.nextChar();
  38757. return Cmd.get('}');
  38758. case 0x29: // ')'
  38759. error('Illegal character: ' + ch);
  38760. break;
  38761. }
  38762. // command
  38763. var str = String.fromCharCode(ch);
  38764. var knownCommands = this.knownCommands;
  38765. var knownCommandFound = knownCommands && knownCommands[str] !== undefined;
  38766. while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
  38767. // stop if known command is found and next character does not make
  38768. // the str a command
  38769. var possibleCommand = str + String.fromCharCode(ch);
  38770. if (knownCommandFound && knownCommands[possibleCommand] === undefined) {
  38771. break;
  38772. }
  38773. if (str.length === 128) {
  38774. error('Command token too long: ' + str.length);
  38775. }
  38776. str = possibleCommand;
  38777. knownCommandFound = knownCommands && knownCommands[str] !== undefined;
  38778. }
  38779. if (str === 'true') {
  38780. return true;
  38781. }
  38782. if (str === 'false') {
  38783. return false;
  38784. }
  38785. if (str === 'null') {
  38786. return null;
  38787. }
  38788. return Cmd.get(str);
  38789. },
  38790. skipToNextLine: function Lexer_skipToNextLine() {
  38791. var ch = this.currentChar;
  38792. while (ch >= 0) {
  38793. if (ch === 0x0D) { // CR
  38794. ch = this.nextChar();
  38795. if (ch === 0x0A) { // LF
  38796. this.nextChar();
  38797. }
  38798. break;
  38799. } else if (ch === 0x0A) { // LF
  38800. this.nextChar();
  38801. break;
  38802. }
  38803. ch = this.nextChar();
  38804. }
  38805. }
  38806. };
  38807. return Lexer;
  38808. })();
  38809. var Linearization = (function LinearizationClosure() {
  38810. function Linearization(stream) {
  38811. this.parser = new Parser(new Lexer(stream), false, null);
  38812. var obj1 = this.parser.getObj();
  38813. var obj2 = this.parser.getObj();
  38814. var obj3 = this.parser.getObj();
  38815. this.linDict = this.parser.getObj();
  38816. if (isInt(obj1) && isInt(obj2) && isCmd(obj3, 'obj') &&
  38817. isDict(this.linDict)) {
  38818. var obj = this.linDict.get('Linearized');
  38819. if (!(isNum(obj) && obj > 0)) {
  38820. this.linDict = null;
  38821. }
  38822. }
  38823. }
  38824. Linearization.prototype = {
  38825. getInt: function Linearization_getInt(name) {
  38826. var linDict = this.linDict;
  38827. var obj;
  38828. if (isDict(linDict) && isInt(obj = linDict.get(name)) && obj > 0) {
  38829. return obj;
  38830. }
  38831. error('"' + name + '" field in linearization table is invalid');
  38832. },
  38833. getHint: function Linearization_getHint(index) {
  38834. var linDict = this.linDict;
  38835. var obj1, obj2;
  38836. if (isDict(linDict) && isArray(obj1 = linDict.get('H')) &&
  38837. obj1.length >= 2 && isInt(obj2 = obj1[index]) && obj2 > 0) {
  38838. return obj2;
  38839. }
  38840. error('Hints table in linearization table is invalid: ' + index);
  38841. },
  38842. get length() {
  38843. if (!isDict(this.linDict)) {
  38844. return 0;
  38845. }
  38846. return this.getInt('L');
  38847. },
  38848. get hintsOffset() {
  38849. return this.getHint(0);
  38850. },
  38851. get hintsLength() {
  38852. return this.getHint(1);
  38853. },
  38854. get hintsOffset2() {
  38855. return this.getHint(2);
  38856. },
  38857. get hintsLenth2() {
  38858. return this.getHint(3);
  38859. },
  38860. get objectNumberFirst() {
  38861. return this.getInt('O');
  38862. },
  38863. get endFirst() {
  38864. return this.getInt('E');
  38865. },
  38866. get numPages() {
  38867. return this.getInt('N');
  38868. },
  38869. get mainXRefEntriesOffset() {
  38870. return this.getInt('T');
  38871. },
  38872. get pageFirst() {
  38873. return this.getInt('P');
  38874. }
  38875. };
  38876. return Linearization;
  38877. })();
  38878. var PostScriptParser = (function PostScriptParserClosure() {
  38879. function PostScriptParser(lexer) {
  38880. this.lexer = lexer;
  38881. this.operators = [];
  38882. this.token = null;
  38883. this.prev = null;
  38884. }
  38885. PostScriptParser.prototype = {
  38886. nextToken: function PostScriptParser_nextToken() {
  38887. this.prev = this.token;
  38888. this.token = this.lexer.getToken();
  38889. },
  38890. accept: function PostScriptParser_accept(type) {
  38891. if (this.token.type == type) {
  38892. this.nextToken();
  38893. return true;
  38894. }
  38895. return false;
  38896. },
  38897. expect: function PostScriptParser_expect(type) {
  38898. if (this.accept(type)) {
  38899. return true;
  38900. }
  38901. error('Unexpected symbol: found ' + this.token.type + ' expected ' +
  38902. type + '.');
  38903. },
  38904. parse: function PostScriptParser_parse() {
  38905. this.nextToken();
  38906. this.expect(PostScriptTokenTypes.LBRACE);
  38907. this.parseBlock();
  38908. this.expect(PostScriptTokenTypes.RBRACE);
  38909. return this.operators;
  38910. },
  38911. parseBlock: function PostScriptParser_parseBlock() {
  38912. while (true) {
  38913. if (this.accept(PostScriptTokenTypes.NUMBER)) {
  38914. this.operators.push(this.prev.value);
  38915. } else if (this.accept(PostScriptTokenTypes.OPERATOR)) {
  38916. this.operators.push(this.prev.value);
  38917. } else if (this.accept(PostScriptTokenTypes.LBRACE)) {
  38918. this.parseCondition();
  38919. } else {
  38920. return;
  38921. }
  38922. }
  38923. },
  38924. parseCondition: function PostScriptParser_parseCondition() {
  38925. // Add two place holders that will be updated later
  38926. var conditionLocation = this.operators.length;
  38927. this.operators.push(null, null);
  38928. this.parseBlock();
  38929. this.expect(PostScriptTokenTypes.RBRACE);
  38930. if (this.accept(PostScriptTokenTypes.IF)) {
  38931. // The true block is right after the 'if' so it just falls through on
  38932. // true else it jumps and skips the true block.
  38933. this.operators[conditionLocation] = this.operators.length;
  38934. this.operators[conditionLocation + 1] = 'jz';
  38935. } else if (this.accept(PostScriptTokenTypes.LBRACE)) {
  38936. var jumpLocation = this.operators.length;
  38937. this.operators.push(null, null);
  38938. var endOfTrue = this.operators.length;
  38939. this.parseBlock();
  38940. this.expect(PostScriptTokenTypes.RBRACE);
  38941. this.expect(PostScriptTokenTypes.IFELSE);
  38942. // The jump is added at the end of the true block to skip the false
  38943. // block.
  38944. this.operators[jumpLocation] = this.operators.length;
  38945. this.operators[jumpLocation + 1] = 'j';
  38946. this.operators[conditionLocation] = endOfTrue;
  38947. this.operators[conditionLocation + 1] = 'jz';
  38948. } else {
  38949. error('PS Function: error parsing conditional.');
  38950. }
  38951. }
  38952. };
  38953. return PostScriptParser;
  38954. })();
  38955. var PostScriptTokenTypes = {
  38956. LBRACE: 0,
  38957. RBRACE: 1,
  38958. NUMBER: 2,
  38959. OPERATOR: 3,
  38960. IF: 4,
  38961. IFELSE: 5
  38962. };
  38963. var PostScriptToken = (function PostScriptTokenClosure() {
  38964. function PostScriptToken(type, value) {
  38965. this.type = type;
  38966. this.value = value;
  38967. }
  38968. var opCache = {};
  38969. PostScriptToken.getOperator = function PostScriptToken_getOperator(op) {
  38970. var opValue = opCache[op];
  38971. if (opValue) {
  38972. return opValue;
  38973. }
  38974. return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op);
  38975. };
  38976. PostScriptToken.LBRACE = new PostScriptToken(PostScriptTokenTypes.LBRACE,
  38977. '{');
  38978. PostScriptToken.RBRACE = new PostScriptToken(PostScriptTokenTypes.RBRACE,
  38979. '}');
  38980. PostScriptToken.IF = new PostScriptToken(PostScriptTokenTypes.IF, 'IF');
  38981. PostScriptToken.IFELSE = new PostScriptToken(PostScriptTokenTypes.IFELSE,
  38982. 'IFELSE');
  38983. return PostScriptToken;
  38984. })();
  38985. var PostScriptLexer = (function PostScriptLexerClosure() {
  38986. function PostScriptLexer(stream) {
  38987. this.stream = stream;
  38988. this.nextChar();
  38989. }
  38990. PostScriptLexer.prototype = {
  38991. nextChar: function PostScriptLexer_nextChar() {
  38992. return (this.currentChar = this.stream.getByte());
  38993. },
  38994. getToken: function PostScriptLexer_getToken() {
  38995. var comment = false;
  38996. var ch = this.currentChar;
  38997. // skip comments
  38998. while (true) {
  38999. if (ch < 0) {
  39000. return EOF;
  39001. }
  39002. if (comment) {
  39003. if (ch === 0x0A || ch === 0x0D) {
  39004. comment = false;
  39005. }
  39006. } else if (ch == 0x25) { // '%'
  39007. comment = true;
  39008. } else if (!Lexer.isSpace(ch)) {
  39009. break;
  39010. }
  39011. ch = this.nextChar();
  39012. }
  39013. switch (ch | 0) {
  39014. case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
  39015. case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
  39016. case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
  39017. return new PostScriptToken(PostScriptTokenTypes.NUMBER,
  39018. this.getNumber());
  39019. case 0x7B: // '{'
  39020. this.nextChar();
  39021. return PostScriptToken.LBRACE;
  39022. case 0x7D: // '}'
  39023. this.nextChar();
  39024. return PostScriptToken.RBRACE;
  39025. }
  39026. // operator
  39027. var str = String.fromCharCode(ch);
  39028. while ((ch = this.nextChar()) >= 0 && // and 'A'-'Z', 'a'-'z'
  39029. ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A))) {
  39030. str += String.fromCharCode(ch);
  39031. }
  39032. switch (str.toLowerCase()) {
  39033. case 'if':
  39034. return PostScriptToken.IF;
  39035. case 'ifelse':
  39036. return PostScriptToken.IFELSE;
  39037. default:
  39038. return PostScriptToken.getOperator(str);
  39039. }
  39040. },
  39041. getNumber: function PostScriptLexer_getNumber() {
  39042. var ch = this.currentChar;
  39043. var str = String.fromCharCode(ch);
  39044. while ((ch = this.nextChar()) >= 0) {
  39045. if ((ch >= 0x30 && ch <= 0x39) || // '0'-'9'
  39046. ch === 0x2D || ch === 0x2E) { // '-', '.'
  39047. str += String.fromCharCode(ch);
  39048. } else {
  39049. break;
  39050. }
  39051. }
  39052. var value = parseFloat(str);
  39053. if (isNaN(value)) {
  39054. error('Invalid floating point number: ' + value);
  39055. }
  39056. return value;
  39057. }
  39058. };
  39059. return PostScriptLexer;
  39060. })();
  39061. var Stream = (function StreamClosure() {
  39062. function Stream(arrayBuffer, start, length, dict) {
  39063. this.bytes = (arrayBuffer instanceof Uint8Array ?
  39064. arrayBuffer : new Uint8Array(arrayBuffer));
  39065. this.start = start || 0;
  39066. this.pos = this.start;
  39067. this.end = (start + length) || this.bytes.length;
  39068. this.dict = dict;
  39069. }
  39070. // required methods for a stream. if a particular stream does not
  39071. // implement these, an error should be thrown
  39072. Stream.prototype = {
  39073. get length() {
  39074. return this.end - this.start;
  39075. },
  39076. get isEmpty() {
  39077. return this.length === 0;
  39078. },
  39079. getByte: function Stream_getByte() {
  39080. if (this.pos >= this.end) {
  39081. return -1;
  39082. }
  39083. return this.bytes[this.pos++];
  39084. },
  39085. getUint16: function Stream_getUint16() {
  39086. var b0 = this.getByte();
  39087. var b1 = this.getByte();
  39088. return (b0 << 8) + b1;
  39089. },
  39090. getInt32: function Stream_getInt32() {
  39091. var b0 = this.getByte();
  39092. var b1 = this.getByte();
  39093. var b2 = this.getByte();
  39094. var b3 = this.getByte();
  39095. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  39096. },
  39097. // returns subarray of original buffer
  39098. // should only be read
  39099. getBytes: function Stream_getBytes(length) {
  39100. var bytes = this.bytes;
  39101. var pos = this.pos;
  39102. var strEnd = this.end;
  39103. if (!length) {
  39104. return bytes.subarray(pos, strEnd);
  39105. }
  39106. var end = pos + length;
  39107. if (end > strEnd) {
  39108. end = strEnd;
  39109. }
  39110. this.pos = end;
  39111. return bytes.subarray(pos, end);
  39112. },
  39113. peekBytes: function Stream_peekBytes(length) {
  39114. var bytes = this.getBytes(length);
  39115. this.pos -= bytes.length;
  39116. return bytes;
  39117. },
  39118. skip: function Stream_skip(n) {
  39119. if (!n) {
  39120. n = 1;
  39121. }
  39122. this.pos += n;
  39123. },
  39124. reset: function Stream_reset() {
  39125. this.pos = this.start;
  39126. },
  39127. moveStart: function Stream_moveStart() {
  39128. this.start = this.pos;
  39129. },
  39130. makeSubStream: function Stream_makeSubStream(start, length, dict) {
  39131. return new Stream(this.bytes.buffer, start, length, dict);
  39132. },
  39133. isStream: true
  39134. };
  39135. return Stream;
  39136. })();
  39137. var StringStream = (function StringStreamClosure() {
  39138. function StringStream(str) {
  39139. var length = str.length;
  39140. var bytes = new Uint8Array(length);
  39141. for (var n = 0; n < length; ++n) {
  39142. bytes[n] = str.charCodeAt(n);
  39143. }
  39144. Stream.call(this, bytes);
  39145. }
  39146. StringStream.prototype = Stream.prototype;
  39147. return StringStream;
  39148. })();
  39149. // super class for the decoding streams
  39150. var DecodeStream = (function DecodeStreamClosure() {
  39151. function DecodeStream(maybeMinBufferLength) {
  39152. this.pos = 0;
  39153. this.bufferLength = 0;
  39154. this.eof = false;
  39155. this.buffer = null;
  39156. this.minBufferLength = 512;
  39157. if (maybeMinBufferLength) {
  39158. // Compute the first power of two that is as big as maybeMinBufferLength.
  39159. while (this.minBufferLength < maybeMinBufferLength) {
  39160. this.minBufferLength *= 2;
  39161. }
  39162. }
  39163. }
  39164. DecodeStream.prototype = {
  39165. get isEmpty() {
  39166. while (!this.eof && this.bufferLength === 0) {
  39167. this.readBlock();
  39168. }
  39169. return this.bufferLength === 0;
  39170. },
  39171. ensureBuffer: function DecodeStream_ensureBuffer(requested) {
  39172. var buffer = this.buffer;
  39173. var current;
  39174. if (buffer) {
  39175. current = buffer.byteLength;
  39176. if (requested <= current) {
  39177. return buffer;
  39178. }
  39179. } else {
  39180. current = 0;
  39181. }
  39182. var size = this.minBufferLength;
  39183. while (size < requested) {
  39184. size *= 2;
  39185. }
  39186. var buffer2 = new Uint8Array(size);
  39187. if (buffer) {
  39188. buffer2.set(buffer);
  39189. }
  39190. return (this.buffer = buffer2);
  39191. },
  39192. getByte: function DecodeStream_getByte() {
  39193. var pos = this.pos;
  39194. while (this.bufferLength <= pos) {
  39195. if (this.eof) {
  39196. return -1;
  39197. }
  39198. this.readBlock();
  39199. }
  39200. return this.buffer[this.pos++];
  39201. },
  39202. getUint16: function DecodeStream_getUint16() {
  39203. var b0 = this.getByte();
  39204. var b1 = this.getByte();
  39205. return (b0 << 8) + b1;
  39206. },
  39207. getInt32: function DecodeStream_getInt32() {
  39208. var b0 = this.getByte();
  39209. var b1 = this.getByte();
  39210. var b2 = this.getByte();
  39211. var b3 = this.getByte();
  39212. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  39213. },
  39214. getBytes: function DecodeStream_getBytes(length) {
  39215. var end, pos = this.pos;
  39216. if (length) {
  39217. this.ensureBuffer(pos + length);
  39218. end = pos + length;
  39219. while (!this.eof && this.bufferLength < end) {
  39220. this.readBlock();
  39221. }
  39222. var bufEnd = this.bufferLength;
  39223. if (end > bufEnd) {
  39224. end = bufEnd;
  39225. }
  39226. } else {
  39227. while (!this.eof) {
  39228. this.readBlock();
  39229. }
  39230. end = this.bufferLength;
  39231. // checking if bufferLength is still 0 then
  39232. // the buffer has to be initialized
  39233. if (!end) {
  39234. this.buffer = new Uint8Array(0);
  39235. }
  39236. }
  39237. this.pos = end;
  39238. return this.buffer.subarray(pos, end);
  39239. },
  39240. peekBytes: function DecodeStream_peekBytes(length) {
  39241. var bytes = this.getBytes(length);
  39242. this.pos -= bytes.length;
  39243. return bytes;
  39244. },
  39245. makeSubStream: function DecodeStream_makeSubStream(start, length, dict) {
  39246. var end = start + length;
  39247. while (this.bufferLength <= end && !this.eof) {
  39248. this.readBlock();
  39249. }
  39250. return new Stream(this.buffer, start, length, dict);
  39251. },
  39252. skip: function DecodeStream_skip(n) {
  39253. if (!n) {
  39254. n = 1;
  39255. }
  39256. this.pos += n;
  39257. },
  39258. reset: function DecodeStream_reset() {
  39259. this.pos = 0;
  39260. },
  39261. getBaseStreams: function DecodeStream_getBaseStreams() {
  39262. if (this.str && this.str.getBaseStreams) {
  39263. return this.str.getBaseStreams();
  39264. }
  39265. return [];
  39266. }
  39267. };
  39268. return DecodeStream;
  39269. })();
  39270. var StreamsSequenceStream = (function StreamsSequenceStreamClosure() {
  39271. function StreamsSequenceStream(streams) {
  39272. this.streams = streams;
  39273. DecodeStream.call(this, /* maybeLength = */ null);
  39274. }
  39275. StreamsSequenceStream.prototype = Object.create(DecodeStream.prototype);
  39276. StreamsSequenceStream.prototype.readBlock =
  39277. function streamSequenceStreamReadBlock() {
  39278. var streams = this.streams;
  39279. if (streams.length === 0) {
  39280. this.eof = true;
  39281. return;
  39282. }
  39283. var stream = streams.shift();
  39284. var chunk = stream.getBytes();
  39285. var bufferLength = this.bufferLength;
  39286. var newLength = bufferLength + chunk.length;
  39287. var buffer = this.ensureBuffer(newLength);
  39288. buffer.set(chunk, bufferLength);
  39289. this.bufferLength = newLength;
  39290. };
  39291. StreamsSequenceStream.prototype.getBaseStreams =
  39292. function StreamsSequenceStream_getBaseStreams() {
  39293. var baseStreams = [];
  39294. for (var i = 0, ii = this.streams.length; i < ii; i++) {
  39295. var stream = this.streams[i];
  39296. if (stream.getBaseStreams) {
  39297. Util.appendToArray(baseStreams, stream.getBaseStreams());
  39298. }
  39299. }
  39300. return baseStreams;
  39301. };
  39302. return StreamsSequenceStream;
  39303. })();
  39304. var FlateStream = (function FlateStreamClosure() {
  39305. var codeLenCodeMap = new Uint32Array([
  39306. 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
  39307. ]);
  39308. var lengthDecode = new Uint32Array([
  39309. 0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a,
  39310. 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f,
  39311. 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073,
  39312. 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102
  39313. ]);
  39314. var distDecode = new Uint32Array([
  39315. 0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d,
  39316. 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1,
  39317. 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01,
  39318. 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001
  39319. ]);
  39320. var fixedLitCodeTab = [new Uint32Array([
  39321. 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0,
  39322. 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0,
  39323. 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0,
  39324. 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0,
  39325. 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8,
  39326. 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8,
  39327. 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8,
  39328. 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8,
  39329. 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4,
  39330. 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4,
  39331. 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4,
  39332. 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4,
  39333. 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc,
  39334. 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec,
  39335. 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc,
  39336. 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc,
  39337. 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2,
  39338. 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2,
  39339. 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2,
  39340. 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2,
  39341. 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca,
  39342. 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea,
  39343. 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da,
  39344. 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa,
  39345. 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6,
  39346. 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6,
  39347. 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6,
  39348. 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b, 0x900f6,
  39349. 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce,
  39350. 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee,
  39351. 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de,
  39352. 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe,
  39353. 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1,
  39354. 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1,
  39355. 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1,
  39356. 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1,
  39357. 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9,
  39358. 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9,
  39359. 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9,
  39360. 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9,
  39361. 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5,
  39362. 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5,
  39363. 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5,
  39364. 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5,
  39365. 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd,
  39366. 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed,
  39367. 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd,
  39368. 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd,
  39369. 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3,
  39370. 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3,
  39371. 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3,
  39372. 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3,
  39373. 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb,
  39374. 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb,
  39375. 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db,
  39376. 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb,
  39377. 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7,
  39378. 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7,
  39379. 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7,
  39380. 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7,
  39381. 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf,
  39382. 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef,
  39383. 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df,
  39384. 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff
  39385. ]), 9];
  39386. var fixedDistCodeTab = [new Uint32Array([
  39387. 0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c,
  39388. 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000,
  39389. 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d,
  39390. 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000
  39391. ]), 5];
  39392. function FlateStream(str, maybeLength) {
  39393. this.str = str;
  39394. this.dict = str.dict;
  39395. var cmf = str.getByte();
  39396. var flg = str.getByte();
  39397. if (cmf == -1 || flg == -1) {
  39398. error('Invalid header in flate stream: ' + cmf + ', ' + flg);
  39399. }
  39400. if ((cmf & 0x0f) != 0x08) {
  39401. error('Unknown compression method in flate stream: ' + cmf + ', ' + flg);
  39402. }
  39403. if ((((cmf << 8) + flg) % 31) !== 0) {
  39404. error('Bad FCHECK in flate stream: ' + cmf + ', ' + flg);
  39405. }
  39406. if (flg & 0x20) {
  39407. error('FDICT bit set in flate stream: ' + cmf + ', ' + flg);
  39408. }
  39409. this.codeSize = 0;
  39410. this.codeBuf = 0;
  39411. DecodeStream.call(this, maybeLength);
  39412. }
  39413. FlateStream.prototype = Object.create(DecodeStream.prototype);
  39414. FlateStream.prototype.getBits = function FlateStream_getBits(bits) {
  39415. var str = this.str;
  39416. var codeSize = this.codeSize;
  39417. var codeBuf = this.codeBuf;
  39418. var b;
  39419. while (codeSize < bits) {
  39420. if ((b = str.getByte()) === -1) {
  39421. error('Bad encoding in flate stream');
  39422. }
  39423. codeBuf |= b << codeSize;
  39424. codeSize += 8;
  39425. }
  39426. b = codeBuf & ((1 << bits) - 1);
  39427. this.codeBuf = codeBuf >> bits;
  39428. this.codeSize = codeSize -= bits;
  39429. return b;
  39430. };
  39431. FlateStream.prototype.getCode = function FlateStream_getCode(table) {
  39432. var str = this.str;
  39433. var codes = table[0];
  39434. var maxLen = table[1];
  39435. var codeSize = this.codeSize;
  39436. var codeBuf = this.codeBuf;
  39437. var b;
  39438. while (codeSize < maxLen) {
  39439. if ((b = str.getByte()) === -1) {
  39440. // premature end of stream. code might however still be valid.
  39441. // codeSize < codeLen check below guards against incomplete codeVal.
  39442. break;
  39443. }
  39444. codeBuf |= (b << codeSize);
  39445. codeSize += 8;
  39446. }
  39447. var code = codes[codeBuf & ((1 << maxLen) - 1)];
  39448. var codeLen = code >> 16;
  39449. var codeVal = code & 0xffff;
  39450. if (codeLen < 1 || codeSize < codeLen) {
  39451. error('Bad encoding in flate stream');
  39452. }
  39453. this.codeBuf = (codeBuf >> codeLen);
  39454. this.codeSize = (codeSize - codeLen);
  39455. return codeVal;
  39456. };
  39457. FlateStream.prototype.generateHuffmanTable =
  39458. function flateStreamGenerateHuffmanTable(lengths) {
  39459. var n = lengths.length;
  39460. // find max code length
  39461. var maxLen = 0;
  39462. var i;
  39463. for (i = 0; i < n; ++i) {
  39464. if (lengths[i] > maxLen) {
  39465. maxLen = lengths[i];
  39466. }
  39467. }
  39468. // build the table
  39469. var size = 1 << maxLen;
  39470. var codes = new Uint32Array(size);
  39471. for (var len = 1, code = 0, skip = 2;
  39472. len <= maxLen;
  39473. ++len, code <<= 1, skip <<= 1) {
  39474. for (var val = 0; val < n; ++val) {
  39475. if (lengths[val] == len) {
  39476. // bit-reverse the code
  39477. var code2 = 0;
  39478. var t = code;
  39479. for (i = 0; i < len; ++i) {
  39480. code2 = (code2 << 1) | (t & 1);
  39481. t >>= 1;
  39482. }
  39483. // fill the table entries
  39484. for (i = code2; i < size; i += skip) {
  39485. codes[i] = (len << 16) | val;
  39486. }
  39487. ++code;
  39488. }
  39489. }
  39490. }
  39491. return [codes, maxLen];
  39492. };
  39493. FlateStream.prototype.readBlock = function FlateStream_readBlock() {
  39494. var buffer, len;
  39495. var str = this.str;
  39496. // read block header
  39497. var hdr = this.getBits(3);
  39498. if (hdr & 1) {
  39499. this.eof = true;
  39500. }
  39501. hdr >>= 1;
  39502. if (hdr === 0) { // uncompressed block
  39503. var b;
  39504. if ((b = str.getByte()) === -1) {
  39505. error('Bad block header in flate stream');
  39506. }
  39507. var blockLen = b;
  39508. if ((b = str.getByte()) === -1) {
  39509. error('Bad block header in flate stream');
  39510. }
  39511. blockLen |= (b << 8);
  39512. if ((b = str.getByte()) === -1) {
  39513. error('Bad block header in flate stream');
  39514. }
  39515. var check = b;
  39516. if ((b = str.getByte()) === -1) {
  39517. error('Bad block header in flate stream');
  39518. }
  39519. check |= (b << 8);
  39520. if (check != (~blockLen & 0xffff) &&
  39521. (blockLen !== 0 || check !== 0)) {
  39522. // Ignoring error for bad "empty" block (see issue 1277)
  39523. error('Bad uncompressed block length in flate stream');
  39524. }
  39525. this.codeBuf = 0;
  39526. this.codeSize = 0;
  39527. var bufferLength = this.bufferLength;
  39528. buffer = this.ensureBuffer(bufferLength + blockLen);
  39529. var end = bufferLength + blockLen;
  39530. this.bufferLength = end;
  39531. if (blockLen === 0) {
  39532. if (str.peekBytes(1).length === 0) {
  39533. this.eof = true;
  39534. }
  39535. } else {
  39536. for (var n = bufferLength; n < end; ++n) {
  39537. if ((b = str.getByte()) === -1) {
  39538. this.eof = true;
  39539. break;
  39540. }
  39541. buffer[n] = b;
  39542. }
  39543. }
  39544. return;
  39545. }
  39546. var litCodeTable;
  39547. var distCodeTable;
  39548. if (hdr == 1) { // compressed block, fixed codes
  39549. litCodeTable = fixedLitCodeTab;
  39550. distCodeTable = fixedDistCodeTab;
  39551. } else if (hdr == 2) { // compressed block, dynamic codes
  39552. var numLitCodes = this.getBits(5) + 257;
  39553. var numDistCodes = this.getBits(5) + 1;
  39554. var numCodeLenCodes = this.getBits(4) + 4;
  39555. // build the code lengths code table
  39556. var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length);
  39557. var i;
  39558. for (i = 0; i < numCodeLenCodes; ++i) {
  39559. codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3);
  39560. }
  39561. var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths);
  39562. // build the literal and distance code tables
  39563. len = 0;
  39564. i = 0;
  39565. var codes = numLitCodes + numDistCodes;
  39566. var codeLengths = new Uint8Array(codes);
  39567. var bitsLength, bitsOffset, what;
  39568. while (i < codes) {
  39569. var code = this.getCode(codeLenCodeTab);
  39570. if (code == 16) {
  39571. bitsLength = 2; bitsOffset = 3; what = len;
  39572. } else if (code == 17) {
  39573. bitsLength = 3; bitsOffset = 3; what = (len = 0);
  39574. } else if (code == 18) {
  39575. bitsLength = 7; bitsOffset = 11; what = (len = 0);
  39576. } else {
  39577. codeLengths[i++] = len = code;
  39578. continue;
  39579. }
  39580. var repeatLength = this.getBits(bitsLength) + bitsOffset;
  39581. while (repeatLength-- > 0) {
  39582. codeLengths[i++] = what;
  39583. }
  39584. }
  39585. litCodeTable =
  39586. this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes));
  39587. distCodeTable =
  39588. this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes));
  39589. } else {
  39590. error('Unknown block type in flate stream');
  39591. }
  39592. buffer = this.buffer;
  39593. var limit = buffer ? buffer.length : 0;
  39594. var pos = this.bufferLength;
  39595. while (true) {
  39596. var code1 = this.getCode(litCodeTable);
  39597. if (code1 < 256) {
  39598. if (pos + 1 >= limit) {
  39599. buffer = this.ensureBuffer(pos + 1);
  39600. limit = buffer.length;
  39601. }
  39602. buffer[pos++] = code1;
  39603. continue;
  39604. }
  39605. if (code1 == 256) {
  39606. this.bufferLength = pos;
  39607. return;
  39608. }
  39609. code1 -= 257;
  39610. code1 = lengthDecode[code1];
  39611. var code2 = code1 >> 16;
  39612. if (code2 > 0) {
  39613. code2 = this.getBits(code2);
  39614. }
  39615. len = (code1 & 0xffff) + code2;
  39616. code1 = this.getCode(distCodeTable);
  39617. code1 = distDecode[code1];
  39618. code2 = code1 >> 16;
  39619. if (code2 > 0) {
  39620. code2 = this.getBits(code2);
  39621. }
  39622. var dist = (code1 & 0xffff) + code2;
  39623. if (pos + len >= limit) {
  39624. buffer = this.ensureBuffer(pos + len);
  39625. limit = buffer.length;
  39626. }
  39627. for (var k = 0; k < len; ++k, ++pos) {
  39628. buffer[pos] = buffer[pos - dist];
  39629. }
  39630. }
  39631. };
  39632. return FlateStream;
  39633. })();
  39634. var PredictorStream = (function PredictorStreamClosure() {
  39635. function PredictorStream(str, maybeLength, params) {
  39636. var predictor = this.predictor = params.get('Predictor') || 1;
  39637. if (predictor <= 1) {
  39638. return str; // no prediction
  39639. }
  39640. if (predictor !== 2 && (predictor < 10 || predictor > 15)) {
  39641. error('Unsupported predictor: ' + predictor);
  39642. }
  39643. if (predictor === 2) {
  39644. this.readBlock = this.readBlockTiff;
  39645. } else {
  39646. this.readBlock = this.readBlockPng;
  39647. }
  39648. this.str = str;
  39649. this.dict = str.dict;
  39650. var colors = this.colors = params.get('Colors') || 1;
  39651. var bits = this.bits = params.get('BitsPerComponent') || 8;
  39652. var columns = this.columns = params.get('Columns') || 1;
  39653. this.pixBytes = (colors * bits + 7) >> 3;
  39654. this.rowBytes = (columns * colors * bits + 7) >> 3;
  39655. DecodeStream.call(this, maybeLength);
  39656. return this;
  39657. }
  39658. PredictorStream.prototype = Object.create(DecodeStream.prototype);
  39659. PredictorStream.prototype.readBlockTiff =
  39660. function predictorStreamReadBlockTiff() {
  39661. var rowBytes = this.rowBytes;
  39662. var bufferLength = this.bufferLength;
  39663. var buffer = this.ensureBuffer(bufferLength + rowBytes);
  39664. var bits = this.bits;
  39665. var colors = this.colors;
  39666. var rawBytes = this.str.getBytes(rowBytes);
  39667. this.eof = !rawBytes.length;
  39668. if (this.eof) {
  39669. return;
  39670. }
  39671. var inbuf = 0, outbuf = 0;
  39672. var inbits = 0, outbits = 0;
  39673. var pos = bufferLength;
  39674. var i;
  39675. if (bits === 1) {
  39676. for (i = 0; i < rowBytes; ++i) {
  39677. var c = rawBytes[i];
  39678. inbuf = (inbuf << 8) | c;
  39679. // bitwise addition is exclusive or
  39680. // first shift inbuf and then add
  39681. buffer[pos++] = (c ^ (inbuf >> colors)) & 0xFF;
  39682. // truncate inbuf (assumes colors < 16)
  39683. inbuf &= 0xFFFF;
  39684. }
  39685. } else if (bits === 8) {
  39686. for (i = 0; i < colors; ++i) {
  39687. buffer[pos++] = rawBytes[i];
  39688. }
  39689. for (; i < rowBytes; ++i) {
  39690. buffer[pos] = buffer[pos - colors] + rawBytes[i];
  39691. pos++;
  39692. }
  39693. } else {
  39694. var compArray = new Uint8Array(colors + 1);
  39695. var bitMask = (1 << bits) - 1;
  39696. var j = 0, k = bufferLength;
  39697. var columns = this.columns;
  39698. for (i = 0; i < columns; ++i) {
  39699. for (var kk = 0; kk < colors; ++kk) {
  39700. if (inbits < bits) {
  39701. inbuf = (inbuf << 8) | (rawBytes[j++] & 0xFF);
  39702. inbits += 8;
  39703. }
  39704. compArray[kk] = (compArray[kk] +
  39705. (inbuf >> (inbits - bits))) & bitMask;
  39706. inbits -= bits;
  39707. outbuf = (outbuf << bits) | compArray[kk];
  39708. outbits += bits;
  39709. if (outbits >= 8) {
  39710. buffer[k++] = (outbuf >> (outbits - 8)) & 0xFF;
  39711. outbits -= 8;
  39712. }
  39713. }
  39714. }
  39715. if (outbits > 0) {
  39716. buffer[k++] = (outbuf << (8 - outbits)) +
  39717. (inbuf & ((1 << (8 - outbits)) - 1));
  39718. }
  39719. }
  39720. this.bufferLength += rowBytes;
  39721. };
  39722. PredictorStream.prototype.readBlockPng =
  39723. function predictorStreamReadBlockPng() {
  39724. var rowBytes = this.rowBytes;
  39725. var pixBytes = this.pixBytes;
  39726. var predictor = this.str.getByte();
  39727. var rawBytes = this.str.getBytes(rowBytes);
  39728. this.eof = !rawBytes.length;
  39729. if (this.eof) {
  39730. return;
  39731. }
  39732. var bufferLength = this.bufferLength;
  39733. var buffer = this.ensureBuffer(bufferLength + rowBytes);
  39734. var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength);
  39735. if (prevRow.length === 0) {
  39736. prevRow = new Uint8Array(rowBytes);
  39737. }
  39738. var i, j = bufferLength, up, c;
  39739. switch (predictor) {
  39740. case 0:
  39741. for (i = 0; i < rowBytes; ++i) {
  39742. buffer[j++] = rawBytes[i];
  39743. }
  39744. break;
  39745. case 1:
  39746. for (i = 0; i < pixBytes; ++i) {
  39747. buffer[j++] = rawBytes[i];
  39748. }
  39749. for (; i < rowBytes; ++i) {
  39750. buffer[j] = (buffer[j - pixBytes] + rawBytes[i]) & 0xFF;
  39751. j++;
  39752. }
  39753. break;
  39754. case 2:
  39755. for (i = 0; i < rowBytes; ++i) {
  39756. buffer[j++] = (prevRow[i] + rawBytes[i]) & 0xFF;
  39757. }
  39758. break;
  39759. case 3:
  39760. for (i = 0; i < pixBytes; ++i) {
  39761. buffer[j++] = (prevRow[i] >> 1) + rawBytes[i];
  39762. }
  39763. for (; i < rowBytes; ++i) {
  39764. buffer[j] = (((prevRow[i] + buffer[j - pixBytes]) >> 1) +
  39765. rawBytes[i]) & 0xFF;
  39766. j++;
  39767. }
  39768. break;
  39769. case 4:
  39770. // we need to save the up left pixels values. the simplest way
  39771. // is to create a new buffer
  39772. for (i = 0; i < pixBytes; ++i) {
  39773. up = prevRow[i];
  39774. c = rawBytes[i];
  39775. buffer[j++] = up + c;
  39776. }
  39777. for (; i < rowBytes; ++i) {
  39778. up = prevRow[i];
  39779. var upLeft = prevRow[i - pixBytes];
  39780. var left = buffer[j - pixBytes];
  39781. var p = left + up - upLeft;
  39782. var pa = p - left;
  39783. if (pa < 0) {
  39784. pa = -pa;
  39785. }
  39786. var pb = p - up;
  39787. if (pb < 0) {
  39788. pb = -pb;
  39789. }
  39790. var pc = p - upLeft;
  39791. if (pc < 0) {
  39792. pc = -pc;
  39793. }
  39794. c = rawBytes[i];
  39795. if (pa <= pb && pa <= pc) {
  39796. buffer[j++] = left + c;
  39797. } else if (pb <= pc) {
  39798. buffer[j++] = up + c;
  39799. } else {
  39800. buffer[j++] = upLeft + c;
  39801. }
  39802. }
  39803. break;
  39804. default:
  39805. error('Unsupported predictor: ' + predictor);
  39806. }
  39807. this.bufferLength += rowBytes;
  39808. };
  39809. return PredictorStream;
  39810. })();
  39811. /**
  39812. * Depending on the type of JPEG a JpegStream is handled in different ways. For
  39813. * JPEG's that are supported natively such as DeviceGray and DeviceRGB the image
  39814. * data is stored and then loaded by the browser. For unsupported JPEG's we use
  39815. * a library to decode these images and the stream behaves like all the other
  39816. * DecodeStreams.
  39817. */
  39818. var JpegStream = (function JpegStreamClosure() {
  39819. function JpegStream(stream, maybeLength, dict, xref) {
  39820. // TODO: per poppler, some images may have 'junk' before that
  39821. // need to be removed
  39822. this.stream = stream;
  39823. this.maybeLength = maybeLength;
  39824. this.dict = dict;
  39825. DecodeStream.call(this, maybeLength);
  39826. }
  39827. JpegStream.prototype = Object.create(DecodeStream.prototype);
  39828. Object.defineProperty(JpegStream.prototype, 'bytes', {
  39829. get: function JpegStream_bytes() {
  39830. // If this.maybeLength is null, we'll get the entire stream.
  39831. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  39832. },
  39833. configurable: true
  39834. });
  39835. JpegStream.prototype.ensureBuffer = function JpegStream_ensureBuffer(req) {
  39836. if (this.bufferLength) {
  39837. return;
  39838. }
  39839. try {
  39840. var jpegImage = new JpegImage();
  39841. // checking if values needs to be transformed before conversion
  39842. if (this.dict && isArray(this.dict.get('Decode'))) {
  39843. var decodeArr = this.dict.get('Decode');
  39844. var bitsPerComponent = this.dict.get('BitsPerComponent') || 8;
  39845. var decodeArrLength = decodeArr.length;
  39846. var transform = new Int32Array(decodeArrLength);
  39847. var transformNeeded = false;
  39848. var maxValue = (1 << bitsPerComponent) - 1;
  39849. for (var i = 0; i < decodeArrLength; i += 2) {
  39850. transform[i] = ((decodeArr[i + 1] - decodeArr[i]) * 256) | 0;
  39851. transform[i + 1] = (decodeArr[i] * maxValue) | 0;
  39852. if (transform[i] !== 256 || transform[i + 1] !== 0) {
  39853. transformNeeded = true;
  39854. }
  39855. }
  39856. if (transformNeeded) {
  39857. jpegImage.decodeTransform = transform;
  39858. }
  39859. }
  39860. jpegImage.parse(this.bytes);
  39861. var data = jpegImage.getData(this.drawWidth, this.drawHeight,
  39862. this.forceRGB);
  39863. this.buffer = data;
  39864. this.bufferLength = data.length;
  39865. this.eof = true;
  39866. } catch (e) {
  39867. error('JPEG error: ' + e);
  39868. }
  39869. };
  39870. JpegStream.prototype.getBytes = function JpegStream_getBytes(length) {
  39871. this.ensureBuffer();
  39872. return this.buffer;
  39873. };
  39874. JpegStream.prototype.getIR = function JpegStream_getIR() {
  39875. return PDFJS.createObjectURL(this.bytes, 'image/jpeg');
  39876. };
  39877. /**
  39878. * Checks if the image can be decoded and displayed by the browser without any
  39879. * further processing such as color space conversions.
  39880. */
  39881. JpegStream.prototype.isNativelySupported =
  39882. function JpegStream_isNativelySupported(xref, res) {
  39883. var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
  39884. return cs.name === 'DeviceGray' || cs.name === 'DeviceRGB';
  39885. };
  39886. /**
  39887. * Checks if the image can be decoded by the browser.
  39888. */
  39889. JpegStream.prototype.isNativelyDecodable =
  39890. function JpegStream_isNativelyDecodable(xref, res) {
  39891. var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
  39892. var numComps = cs.numComps;
  39893. return numComps == 1 || numComps == 3;
  39894. };
  39895. return JpegStream;
  39896. })();
  39897. /**
  39898. * For JPEG 2000's we use a library to decode these images and
  39899. * the stream behaves like all the other DecodeStreams.
  39900. */
  39901. var JpxStream = (function JpxStreamClosure() {
  39902. function JpxStream(stream, maybeLength, dict) {
  39903. this.stream = stream;
  39904. this.maybeLength = maybeLength;
  39905. this.dict = dict;
  39906. DecodeStream.call(this, maybeLength);
  39907. }
  39908. JpxStream.prototype = Object.create(DecodeStream.prototype);
  39909. Object.defineProperty(JpxStream.prototype, 'bytes', {
  39910. get: function JpxStream_bytes() {
  39911. // If this.maybeLength is null, we'll get the entire stream.
  39912. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  39913. },
  39914. configurable: true
  39915. });
  39916. JpxStream.prototype.ensureBuffer = function JpxStream_ensureBuffer(req) {
  39917. if (this.bufferLength) {
  39918. return;
  39919. }
  39920. var jpxImage = new JpxImage();
  39921. jpxImage.parse(this.bytes);
  39922. var width = jpxImage.width;
  39923. var height = jpxImage.height;
  39924. var componentsCount = jpxImage.componentsCount;
  39925. var tileCount = jpxImage.tiles.length;
  39926. if (tileCount === 1) {
  39927. this.buffer = jpxImage.tiles[0].items;
  39928. } else {
  39929. var data = new Uint8Array(width * height * componentsCount);
  39930. for (var k = 0; k < tileCount; k++) {
  39931. var tileComponents = jpxImage.tiles[k];
  39932. var tileWidth = tileComponents.width;
  39933. var tileHeight = tileComponents.height;
  39934. var tileLeft = tileComponents.left;
  39935. var tileTop = tileComponents.top;
  39936. var src = tileComponents.items;
  39937. var srcPosition = 0;
  39938. var dataPosition = (width * tileTop + tileLeft) * componentsCount;
  39939. var imgRowSize = width * componentsCount;
  39940. var tileRowSize = tileWidth * componentsCount;
  39941. for (var j = 0; j < tileHeight; j++) {
  39942. var rowBytes = src.subarray(srcPosition, srcPosition + tileRowSize);
  39943. data.set(rowBytes, dataPosition);
  39944. srcPosition += tileRowSize;
  39945. dataPosition += imgRowSize;
  39946. }
  39947. }
  39948. this.buffer = data;
  39949. }
  39950. this.bufferLength = this.buffer.length;
  39951. this.eof = true;
  39952. };
  39953. return JpxStream;
  39954. })();
  39955. /**
  39956. * For JBIG2's we use a library to decode these images and
  39957. * the stream behaves like all the other DecodeStreams.
  39958. */
  39959. var Jbig2Stream = (function Jbig2StreamClosure() {
  39960. function Jbig2Stream(stream, maybeLength, dict) {
  39961. this.stream = stream;
  39962. this.maybeLength = maybeLength;
  39963. this.dict = dict;
  39964. DecodeStream.call(this, maybeLength);
  39965. }
  39966. Jbig2Stream.prototype = Object.create(DecodeStream.prototype);
  39967. Object.defineProperty(Jbig2Stream.prototype, 'bytes', {
  39968. get: function Jbig2Stream_bytes() {
  39969. // If this.maybeLength is null, we'll get the entire stream.
  39970. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  39971. },
  39972. configurable: true
  39973. });
  39974. Jbig2Stream.prototype.ensureBuffer = function Jbig2Stream_ensureBuffer(req) {
  39975. if (this.bufferLength) {
  39976. return;
  39977. }
  39978. var jbig2Image = new Jbig2Image();
  39979. var chunks = [], decodeParams = this.dict.get('DecodeParms');
  39980. // According to the PDF specification, DecodeParms can be either
  39981. // a dictionary, or an array whose elements are dictionaries.
  39982. if (isArray(decodeParams)) {
  39983. if (decodeParams.length > 1) {
  39984. warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
  39985. 'not supported.');
  39986. }
  39987. decodeParams = decodeParams[0];
  39988. }
  39989. if (decodeParams && decodeParams.has('JBIG2Globals')) {
  39990. var globalsStream = decodeParams.get('JBIG2Globals');
  39991. var globals = globalsStream.getBytes();
  39992. chunks.push({data: globals, start: 0, end: globals.length});
  39993. }
  39994. chunks.push({data: this.bytes, start: 0, end: this.bytes.length});
  39995. var data = jbig2Image.parseChunks(chunks);
  39996. var dataLength = data.length;
  39997. // JBIG2 had black as 1 and white as 0, inverting the colors
  39998. for (var i = 0; i < dataLength; i++) {
  39999. data[i] ^= 0xFF;
  40000. }
  40001. this.buffer = data;
  40002. this.bufferLength = dataLength;
  40003. this.eof = true;
  40004. };
  40005. return Jbig2Stream;
  40006. })();
  40007. var DecryptStream = (function DecryptStreamClosure() {
  40008. function DecryptStream(str, maybeLength, decrypt) {
  40009. this.str = str;
  40010. this.dict = str.dict;
  40011. this.decrypt = decrypt;
  40012. this.nextChunk = null;
  40013. this.initialized = false;
  40014. DecodeStream.call(this, maybeLength);
  40015. }
  40016. var chunkSize = 512;
  40017. DecryptStream.prototype = Object.create(DecodeStream.prototype);
  40018. DecryptStream.prototype.readBlock = function DecryptStream_readBlock() {
  40019. var chunk;
  40020. if (this.initialized) {
  40021. chunk = this.nextChunk;
  40022. } else {
  40023. chunk = this.str.getBytes(chunkSize);
  40024. this.initialized = true;
  40025. }
  40026. if (!chunk || chunk.length === 0) {
  40027. this.eof = true;
  40028. return;
  40029. }
  40030. this.nextChunk = this.str.getBytes(chunkSize);
  40031. var hasMoreData = this.nextChunk && this.nextChunk.length > 0;
  40032. var decrypt = this.decrypt;
  40033. chunk = decrypt(chunk, !hasMoreData);
  40034. var bufferLength = this.bufferLength;
  40035. var i, n = chunk.length;
  40036. var buffer = this.ensureBuffer(bufferLength + n);
  40037. for (i = 0; i < n; i++) {
  40038. buffer[bufferLength++] = chunk[i];
  40039. }
  40040. this.bufferLength = bufferLength;
  40041. };
  40042. return DecryptStream;
  40043. })();
  40044. var Ascii85Stream = (function Ascii85StreamClosure() {
  40045. function Ascii85Stream(str, maybeLength) {
  40046. this.str = str;
  40047. this.dict = str.dict;
  40048. this.input = new Uint8Array(5);
  40049. // Most streams increase in size when decoded, but Ascii85 streams
  40050. // typically shrink by ~20%.
  40051. if (maybeLength) {
  40052. maybeLength = 0.8 * maybeLength;
  40053. }
  40054. DecodeStream.call(this, maybeLength);
  40055. }
  40056. Ascii85Stream.prototype = Object.create(DecodeStream.prototype);
  40057. Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() {
  40058. var TILDA_CHAR = 0x7E; // '~'
  40059. var Z_LOWER_CHAR = 0x7A; // 'z'
  40060. var EOF = -1;
  40061. var str = this.str;
  40062. var c = str.getByte();
  40063. while (Lexer.isSpace(c)) {
  40064. c = str.getByte();
  40065. }
  40066. if (c === EOF || c === TILDA_CHAR) {
  40067. this.eof = true;
  40068. return;
  40069. }
  40070. var bufferLength = this.bufferLength, buffer;
  40071. var i;
  40072. // special code for z
  40073. if (c == Z_LOWER_CHAR) {
  40074. buffer = this.ensureBuffer(bufferLength + 4);
  40075. for (i = 0; i < 4; ++i) {
  40076. buffer[bufferLength + i] = 0;
  40077. }
  40078. this.bufferLength += 4;
  40079. } else {
  40080. var input = this.input;
  40081. input[0] = c;
  40082. for (i = 1; i < 5; ++i) {
  40083. c = str.getByte();
  40084. while (Lexer.isSpace(c)) {
  40085. c = str.getByte();
  40086. }
  40087. input[i] = c;
  40088. if (c === EOF || c == TILDA_CHAR) {
  40089. break;
  40090. }
  40091. }
  40092. buffer = this.ensureBuffer(bufferLength + i - 1);
  40093. this.bufferLength += i - 1;
  40094. // partial ending;
  40095. if (i < 5) {
  40096. for (; i < 5; ++i) {
  40097. input[i] = 0x21 + 84;
  40098. }
  40099. this.eof = true;
  40100. }
  40101. var t = 0;
  40102. for (i = 0; i < 5; ++i) {
  40103. t = t * 85 + (input[i] - 0x21);
  40104. }
  40105. for (i = 3; i >= 0; --i) {
  40106. buffer[bufferLength + i] = t & 0xFF;
  40107. t >>= 8;
  40108. }
  40109. }
  40110. };
  40111. return Ascii85Stream;
  40112. })();
  40113. var AsciiHexStream = (function AsciiHexStreamClosure() {
  40114. function AsciiHexStream(str, maybeLength) {
  40115. this.str = str;
  40116. this.dict = str.dict;
  40117. this.firstDigit = -1;
  40118. // Most streams increase in size when decoded, but AsciiHex streams shrink
  40119. // by 50%.
  40120. if (maybeLength) {
  40121. maybeLength = 0.5 * maybeLength;
  40122. }
  40123. DecodeStream.call(this, maybeLength);
  40124. }
  40125. AsciiHexStream.prototype = Object.create(DecodeStream.prototype);
  40126. AsciiHexStream.prototype.readBlock = function AsciiHexStream_readBlock() {
  40127. var UPSTREAM_BLOCK_SIZE = 8000;
  40128. var bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE);
  40129. if (!bytes.length) {
  40130. this.eof = true;
  40131. return;
  40132. }
  40133. var maxDecodeLength = (bytes.length + 1) >> 1;
  40134. var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength);
  40135. var bufferLength = this.bufferLength;
  40136. var firstDigit = this.firstDigit;
  40137. for (var i = 0, ii = bytes.length; i < ii; i++) {
  40138. var ch = bytes[i], digit;
  40139. if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
  40140. digit = ch & 0x0F;
  40141. } else if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
  40142. // 'A'-'Z', 'a'-'z'
  40143. digit = (ch & 0x0F) + 9;
  40144. } else if (ch === 0x3E) { // '>'
  40145. this.eof = true;
  40146. break;
  40147. } else { // probably whitespace
  40148. continue; // ignoring
  40149. }
  40150. if (firstDigit < 0) {
  40151. firstDigit = digit;
  40152. } else {
  40153. buffer[bufferLength++] = (firstDigit << 4) | digit;
  40154. firstDigit = -1;
  40155. }
  40156. }
  40157. if (firstDigit >= 0 && this.eof) {
  40158. // incomplete byte
  40159. buffer[bufferLength++] = (firstDigit << 4);
  40160. firstDigit = -1;
  40161. }
  40162. this.firstDigit = firstDigit;
  40163. this.bufferLength = bufferLength;
  40164. };
  40165. return AsciiHexStream;
  40166. })();
  40167. var RunLengthStream = (function RunLengthStreamClosure() {
  40168. function RunLengthStream(str, maybeLength) {
  40169. this.str = str;
  40170. this.dict = str.dict;
  40171. DecodeStream.call(this, maybeLength);
  40172. }
  40173. RunLengthStream.prototype = Object.create(DecodeStream.prototype);
  40174. RunLengthStream.prototype.readBlock = function RunLengthStream_readBlock() {
  40175. // The repeatHeader has following format. The first byte defines type of run
  40176. // and amount of bytes to repeat/copy: n = 0 through 127 - copy next n bytes
  40177. // (in addition to the second byte from the header), n = 129 through 255 -
  40178. // duplicate the second byte from the header (257 - n) times, n = 128 - end.
  40179. var repeatHeader = this.str.getBytes(2);
  40180. if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] == 128) {
  40181. this.eof = true;
  40182. return;
  40183. }
  40184. var buffer;
  40185. var bufferLength = this.bufferLength;
  40186. var n = repeatHeader[0];
  40187. if (n < 128) {
  40188. // copy n bytes
  40189. buffer = this.ensureBuffer(bufferLength + n + 1);
  40190. buffer[bufferLength++] = repeatHeader[1];
  40191. if (n > 0) {
  40192. var source = this.str.getBytes(n);
  40193. buffer.set(source, bufferLength);
  40194. bufferLength += n;
  40195. }
  40196. } else {
  40197. n = 257 - n;
  40198. var b = repeatHeader[1];
  40199. buffer = this.ensureBuffer(bufferLength + n + 1);
  40200. for (var i = 0; i < n; i++) {
  40201. buffer[bufferLength++] = b;
  40202. }
  40203. }
  40204. this.bufferLength = bufferLength;
  40205. };
  40206. return RunLengthStream;
  40207. })();
  40208. var CCITTFaxStream = (function CCITTFaxStreamClosure() {
  40209. var ccittEOL = -2;
  40210. var twoDimPass = 0;
  40211. var twoDimHoriz = 1;
  40212. var twoDimVert0 = 2;
  40213. var twoDimVertR1 = 3;
  40214. var twoDimVertL1 = 4;
  40215. var twoDimVertR2 = 5;
  40216. var twoDimVertL2 = 6;
  40217. var twoDimVertR3 = 7;
  40218. var twoDimVertL3 = 8;
  40219. var twoDimTable = [
  40220. [-1, -1], [-1, -1], // 000000x
  40221. [7, twoDimVertL3], // 0000010
  40222. [7, twoDimVertR3], // 0000011
  40223. [6, twoDimVertL2], [6, twoDimVertL2], // 000010x
  40224. [6, twoDimVertR2], [6, twoDimVertR2], // 000011x
  40225. [4, twoDimPass], [4, twoDimPass], // 0001xxx
  40226. [4, twoDimPass], [4, twoDimPass],
  40227. [4, twoDimPass], [4, twoDimPass],
  40228. [4, twoDimPass], [4, twoDimPass],
  40229. [3, twoDimHoriz], [3, twoDimHoriz], // 001xxxx
  40230. [3, twoDimHoriz], [3, twoDimHoriz],
  40231. [3, twoDimHoriz], [3, twoDimHoriz],
  40232. [3, twoDimHoriz], [3, twoDimHoriz],
  40233. [3, twoDimHoriz], [3, twoDimHoriz],
  40234. [3, twoDimHoriz], [3, twoDimHoriz],
  40235. [3, twoDimHoriz], [3, twoDimHoriz],
  40236. [3, twoDimHoriz], [3, twoDimHoriz],
  40237. [3, twoDimVertL1], [3, twoDimVertL1], // 010xxxx
  40238. [3, twoDimVertL1], [3, twoDimVertL1],
  40239. [3, twoDimVertL1], [3, twoDimVertL1],
  40240. [3, twoDimVertL1], [3, twoDimVertL1],
  40241. [3, twoDimVertL1], [3, twoDimVertL1],
  40242. [3, twoDimVertL1], [3, twoDimVertL1],
  40243. [3, twoDimVertL1], [3, twoDimVertL1],
  40244. [3, twoDimVertL1], [3, twoDimVertL1],
  40245. [3, twoDimVertR1], [3, twoDimVertR1], // 011xxxx
  40246. [3, twoDimVertR1], [3, twoDimVertR1],
  40247. [3, twoDimVertR1], [3, twoDimVertR1],
  40248. [3, twoDimVertR1], [3, twoDimVertR1],
  40249. [3, twoDimVertR1], [3, twoDimVertR1],
  40250. [3, twoDimVertR1], [3, twoDimVertR1],
  40251. [3, twoDimVertR1], [3, twoDimVertR1],
  40252. [3, twoDimVertR1], [3, twoDimVertR1],
  40253. [1, twoDimVert0], [1, twoDimVert0], // 1xxxxxx
  40254. [1, twoDimVert0], [1, twoDimVert0],
  40255. [1, twoDimVert0], [1, twoDimVert0],
  40256. [1, twoDimVert0], [1, twoDimVert0],
  40257. [1, twoDimVert0], [1, twoDimVert0],
  40258. [1, twoDimVert0], [1, twoDimVert0],
  40259. [1, twoDimVert0], [1, twoDimVert0],
  40260. [1, twoDimVert0], [1, twoDimVert0],
  40261. [1, twoDimVert0], [1, twoDimVert0],
  40262. [1, twoDimVert0], [1, twoDimVert0],
  40263. [1, twoDimVert0], [1, twoDimVert0],
  40264. [1, twoDimVert0], [1, twoDimVert0],
  40265. [1, twoDimVert0], [1, twoDimVert0],
  40266. [1, twoDimVert0], [1, twoDimVert0],
  40267. [1, twoDimVert0], [1, twoDimVert0],
  40268. [1, twoDimVert0], [1, twoDimVert0],
  40269. [1, twoDimVert0], [1, twoDimVert0],
  40270. [1, twoDimVert0], [1, twoDimVert0],
  40271. [1, twoDimVert0], [1, twoDimVert0],
  40272. [1, twoDimVert0], [1, twoDimVert0],
  40273. [1, twoDimVert0], [1, twoDimVert0],
  40274. [1, twoDimVert0], [1, twoDimVert0],
  40275. [1, twoDimVert0], [1, twoDimVert0],
  40276. [1, twoDimVert0], [1, twoDimVert0],
  40277. [1, twoDimVert0], [1, twoDimVert0],
  40278. [1, twoDimVert0], [1, twoDimVert0],
  40279. [1, twoDimVert0], [1, twoDimVert0],
  40280. [1, twoDimVert0], [1, twoDimVert0],
  40281. [1, twoDimVert0], [1, twoDimVert0],
  40282. [1, twoDimVert0], [1, twoDimVert0],
  40283. [1, twoDimVert0], [1, twoDimVert0],
  40284. [1, twoDimVert0], [1, twoDimVert0]
  40285. ];
  40286. var whiteTable1 = [
  40287. [-1, -1], // 00000
  40288. [12, ccittEOL], // 00001
  40289. [-1, -1], [-1, -1], // 0001x
  40290. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 001xx
  40291. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 010xx
  40292. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 011xx
  40293. [11, 1792], [11, 1792], // 1000x
  40294. [12, 1984], // 10010
  40295. [12, 2048], // 10011
  40296. [12, 2112], // 10100
  40297. [12, 2176], // 10101
  40298. [12, 2240], // 10110
  40299. [12, 2304], // 10111
  40300. [11, 1856], [11, 1856], // 1100x
  40301. [11, 1920], [11, 1920], // 1101x
  40302. [12, 2368], // 11100
  40303. [12, 2432], // 11101
  40304. [12, 2496], // 11110
  40305. [12, 2560] // 11111
  40306. ];
  40307. var whiteTable2 = [
  40308. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx
  40309. [8, 29], [8, 29], // 00000010x
  40310. [8, 30], [8, 30], // 00000011x
  40311. [8, 45], [8, 45], // 00000100x
  40312. [8, 46], [8, 46], // 00000101x
  40313. [7, 22], [7, 22], [7, 22], [7, 22], // 0000011xx
  40314. [7, 23], [7, 23], [7, 23], [7, 23], // 0000100xx
  40315. [8, 47], [8, 47], // 00001010x
  40316. [8, 48], [8, 48], // 00001011x
  40317. [6, 13], [6, 13], [6, 13], [6, 13], // 000011xxx
  40318. [6, 13], [6, 13], [6, 13], [6, 13],
  40319. [7, 20], [7, 20], [7, 20], [7, 20], // 0001000xx
  40320. [8, 33], [8, 33], // 00010010x
  40321. [8, 34], [8, 34], // 00010011x
  40322. [8, 35], [8, 35], // 00010100x
  40323. [8, 36], [8, 36], // 00010101x
  40324. [8, 37], [8, 37], // 00010110x
  40325. [8, 38], [8, 38], // 00010111x
  40326. [7, 19], [7, 19], [7, 19], [7, 19], // 0001100xx
  40327. [8, 31], [8, 31], // 00011010x
  40328. [8, 32], [8, 32], // 00011011x
  40329. [6, 1], [6, 1], [6, 1], [6, 1], // 000111xxx
  40330. [6, 1], [6, 1], [6, 1], [6, 1],
  40331. [6, 12], [6, 12], [6, 12], [6, 12], // 001000xxx
  40332. [6, 12], [6, 12], [6, 12], [6, 12],
  40333. [8, 53], [8, 53], // 00100100x
  40334. [8, 54], [8, 54], // 00100101x
  40335. [7, 26], [7, 26], [7, 26], [7, 26], // 0010011xx
  40336. [8, 39], [8, 39], // 00101000x
  40337. [8, 40], [8, 40], // 00101001x
  40338. [8, 41], [8, 41], // 00101010x
  40339. [8, 42], [8, 42], // 00101011x
  40340. [8, 43], [8, 43], // 00101100x
  40341. [8, 44], [8, 44], // 00101101x
  40342. [7, 21], [7, 21], [7, 21], [7, 21], // 0010111xx
  40343. [7, 28], [7, 28], [7, 28], [7, 28], // 0011000xx
  40344. [8, 61], [8, 61], // 00110010x
  40345. [8, 62], [8, 62], // 00110011x
  40346. [8, 63], [8, 63], // 00110100x
  40347. [8, 0], [8, 0], // 00110101x
  40348. [8, 320], [8, 320], // 00110110x
  40349. [8, 384], [8, 384], // 00110111x
  40350. [5, 10], [5, 10], [5, 10], [5, 10], // 00111xxxx
  40351. [5, 10], [5, 10], [5, 10], [5, 10],
  40352. [5, 10], [5, 10], [5, 10], [5, 10],
  40353. [5, 10], [5, 10], [5, 10], [5, 10],
  40354. [5, 11], [5, 11], [5, 11], [5, 11], // 01000xxxx
  40355. [5, 11], [5, 11], [5, 11], [5, 11],
  40356. [5, 11], [5, 11], [5, 11], [5, 11],
  40357. [5, 11], [5, 11], [5, 11], [5, 11],
  40358. [7, 27], [7, 27], [7, 27], [7, 27], // 0100100xx
  40359. [8, 59], [8, 59], // 01001010x
  40360. [8, 60], [8, 60], // 01001011x
  40361. [9, 1472], // 010011000
  40362. [9, 1536], // 010011001
  40363. [9, 1600], // 010011010
  40364. [9, 1728], // 010011011
  40365. [7, 18], [7, 18], [7, 18], [7, 18], // 0100111xx
  40366. [7, 24], [7, 24], [7, 24], [7, 24], // 0101000xx
  40367. [8, 49], [8, 49], // 01010010x
  40368. [8, 50], [8, 50], // 01010011x
  40369. [8, 51], [8, 51], // 01010100x
  40370. [8, 52], [8, 52], // 01010101x
  40371. [7, 25], [7, 25], [7, 25], [7, 25], // 0101011xx
  40372. [8, 55], [8, 55], // 01011000x
  40373. [8, 56], [8, 56], // 01011001x
  40374. [8, 57], [8, 57], // 01011010x
  40375. [8, 58], [8, 58], // 01011011x
  40376. [6, 192], [6, 192], [6, 192], [6, 192], // 010111xxx
  40377. [6, 192], [6, 192], [6, 192], [6, 192],
  40378. [6, 1664], [6, 1664], [6, 1664], [6, 1664], // 011000xxx
  40379. [6, 1664], [6, 1664], [6, 1664], [6, 1664],
  40380. [8, 448], [8, 448], // 01100100x
  40381. [8, 512], [8, 512], // 01100101x
  40382. [9, 704], // 011001100
  40383. [9, 768], // 011001101
  40384. [8, 640], [8, 640], // 01100111x
  40385. [8, 576], [8, 576], // 01101000x
  40386. [9, 832], // 011010010
  40387. [9, 896], // 011010011
  40388. [9, 960], // 011010100
  40389. [9, 1024], // 011010101
  40390. [9, 1088], // 011010110
  40391. [9, 1152], // 011010111
  40392. [9, 1216], // 011011000
  40393. [9, 1280], // 011011001
  40394. [9, 1344], // 011011010
  40395. [9, 1408], // 011011011
  40396. [7, 256], [7, 256], [7, 256], [7, 256], // 0110111xx
  40397. [4, 2], [4, 2], [4, 2], [4, 2], // 0111xxxxx
  40398. [4, 2], [4, 2], [4, 2], [4, 2],
  40399. [4, 2], [4, 2], [4, 2], [4, 2],
  40400. [4, 2], [4, 2], [4, 2], [4, 2],
  40401. [4, 2], [4, 2], [4, 2], [4, 2],
  40402. [4, 2], [4, 2], [4, 2], [4, 2],
  40403. [4, 2], [4, 2], [4, 2], [4, 2],
  40404. [4, 2], [4, 2], [4, 2], [4, 2],
  40405. [4, 3], [4, 3], [4, 3], [4, 3], // 1000xxxxx
  40406. [4, 3], [4, 3], [4, 3], [4, 3],
  40407. [4, 3], [4, 3], [4, 3], [4, 3],
  40408. [4, 3], [4, 3], [4, 3], [4, 3],
  40409. [4, 3], [4, 3], [4, 3], [4, 3],
  40410. [4, 3], [4, 3], [4, 3], [4, 3],
  40411. [4, 3], [4, 3], [4, 3], [4, 3],
  40412. [4, 3], [4, 3], [4, 3], [4, 3],
  40413. [5, 128], [5, 128], [5, 128], [5, 128], // 10010xxxx
  40414. [5, 128], [5, 128], [5, 128], [5, 128],
  40415. [5, 128], [5, 128], [5, 128], [5, 128],
  40416. [5, 128], [5, 128], [5, 128], [5, 128],
  40417. [5, 8], [5, 8], [5, 8], [5, 8], // 10011xxxx
  40418. [5, 8], [5, 8], [5, 8], [5, 8],
  40419. [5, 8], [5, 8], [5, 8], [5, 8],
  40420. [5, 8], [5, 8], [5, 8], [5, 8],
  40421. [5, 9], [5, 9], [5, 9], [5, 9], // 10100xxxx
  40422. [5, 9], [5, 9], [5, 9], [5, 9],
  40423. [5, 9], [5, 9], [5, 9], [5, 9],
  40424. [5, 9], [5, 9], [5, 9], [5, 9],
  40425. [6, 16], [6, 16], [6, 16], [6, 16], // 101010xxx
  40426. [6, 16], [6, 16], [6, 16], [6, 16],
  40427. [6, 17], [6, 17], [6, 17], [6, 17], // 101011xxx
  40428. [6, 17], [6, 17], [6, 17], [6, 17],
  40429. [4, 4], [4, 4], [4, 4], [4, 4], // 1011xxxxx
  40430. [4, 4], [4, 4], [4, 4], [4, 4],
  40431. [4, 4], [4, 4], [4, 4], [4, 4],
  40432. [4, 4], [4, 4], [4, 4], [4, 4],
  40433. [4, 4], [4, 4], [4, 4], [4, 4],
  40434. [4, 4], [4, 4], [4, 4], [4, 4],
  40435. [4, 4], [4, 4], [4, 4], [4, 4],
  40436. [4, 4], [4, 4], [4, 4], [4, 4],
  40437. [4, 5], [4, 5], [4, 5], [4, 5], // 1100xxxxx
  40438. [4, 5], [4, 5], [4, 5], [4, 5],
  40439. [4, 5], [4, 5], [4, 5], [4, 5],
  40440. [4, 5], [4, 5], [4, 5], [4, 5],
  40441. [4, 5], [4, 5], [4, 5], [4, 5],
  40442. [4, 5], [4, 5], [4, 5], [4, 5],
  40443. [4, 5], [4, 5], [4, 5], [4, 5],
  40444. [4, 5], [4, 5], [4, 5], [4, 5],
  40445. [6, 14], [6, 14], [6, 14], [6, 14], // 110100xxx
  40446. [6, 14], [6, 14], [6, 14], [6, 14],
  40447. [6, 15], [6, 15], [6, 15], [6, 15], // 110101xxx
  40448. [6, 15], [6, 15], [6, 15], [6, 15],
  40449. [5, 64], [5, 64], [5, 64], [5, 64], // 11011xxxx
  40450. [5, 64], [5, 64], [5, 64], [5, 64],
  40451. [5, 64], [5, 64], [5, 64], [5, 64],
  40452. [5, 64], [5, 64], [5, 64], [5, 64],
  40453. [4, 6], [4, 6], [4, 6], [4, 6], // 1110xxxxx
  40454. [4, 6], [4, 6], [4, 6], [4, 6],
  40455. [4, 6], [4, 6], [4, 6], [4, 6],
  40456. [4, 6], [4, 6], [4, 6], [4, 6],
  40457. [4, 6], [4, 6], [4, 6], [4, 6],
  40458. [4, 6], [4, 6], [4, 6], [4, 6],
  40459. [4, 6], [4, 6], [4, 6], [4, 6],
  40460. [4, 6], [4, 6], [4, 6], [4, 6],
  40461. [4, 7], [4, 7], [4, 7], [4, 7], // 1111xxxxx
  40462. [4, 7], [4, 7], [4, 7], [4, 7],
  40463. [4, 7], [4, 7], [4, 7], [4, 7],
  40464. [4, 7], [4, 7], [4, 7], [4, 7],
  40465. [4, 7], [4, 7], [4, 7], [4, 7],
  40466. [4, 7], [4, 7], [4, 7], [4, 7],
  40467. [4, 7], [4, 7], [4, 7], [4, 7],
  40468. [4, 7], [4, 7], [4, 7], [4, 7]
  40469. ];
  40470. var blackTable1 = [
  40471. [-1, -1], [-1, -1], // 000000000000x
  40472. [12, ccittEOL], [12, ccittEOL], // 000000000001x
  40473. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000001xx
  40474. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000010xx
  40475. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000011xx
  40476. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000100xx
  40477. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000101xx
  40478. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000110xx
  40479. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000111xx
  40480. [11, 1792], [11, 1792], [11, 1792], [11, 1792], // 00000001000xx
  40481. [12, 1984], [12, 1984], // 000000010010x
  40482. [12, 2048], [12, 2048], // 000000010011x
  40483. [12, 2112], [12, 2112], // 000000010100x
  40484. [12, 2176], [12, 2176], // 000000010101x
  40485. [12, 2240], [12, 2240], // 000000010110x
  40486. [12, 2304], [12, 2304], // 000000010111x
  40487. [11, 1856], [11, 1856], [11, 1856], [11, 1856], // 00000001100xx
  40488. [11, 1920], [11, 1920], [11, 1920], [11, 1920], // 00000001101xx
  40489. [12, 2368], [12, 2368], // 000000011100x
  40490. [12, 2432], [12, 2432], // 000000011101x
  40491. [12, 2496], [12, 2496], // 000000011110x
  40492. [12, 2560], [12, 2560], // 000000011111x
  40493. [10, 18], [10, 18], [10, 18], [10, 18], // 0000001000xxx
  40494. [10, 18], [10, 18], [10, 18], [10, 18],
  40495. [12, 52], [12, 52], // 000000100100x
  40496. [13, 640], // 0000001001010
  40497. [13, 704], // 0000001001011
  40498. [13, 768], // 0000001001100
  40499. [13, 832], // 0000001001101
  40500. [12, 55], [12, 55], // 000000100111x
  40501. [12, 56], [12, 56], // 000000101000x
  40502. [13, 1280], // 0000001010010
  40503. [13, 1344], // 0000001010011
  40504. [13, 1408], // 0000001010100
  40505. [13, 1472], // 0000001010101
  40506. [12, 59], [12, 59], // 000000101011x
  40507. [12, 60], [12, 60], // 000000101100x
  40508. [13, 1536], // 0000001011010
  40509. [13, 1600], // 0000001011011
  40510. [11, 24], [11, 24], [11, 24], [11, 24], // 00000010111xx
  40511. [11, 25], [11, 25], [11, 25], [11, 25], // 00000011000xx
  40512. [13, 1664], // 0000001100100
  40513. [13, 1728], // 0000001100101
  40514. [12, 320], [12, 320], // 000000110011x
  40515. [12, 384], [12, 384], // 000000110100x
  40516. [12, 448], [12, 448], // 000000110101x
  40517. [13, 512], // 0000001101100
  40518. [13, 576], // 0000001101101
  40519. [12, 53], [12, 53], // 000000110111x
  40520. [12, 54], [12, 54], // 000000111000x
  40521. [13, 896], // 0000001110010
  40522. [13, 960], // 0000001110011
  40523. [13, 1024], // 0000001110100
  40524. [13, 1088], // 0000001110101
  40525. [13, 1152], // 0000001110110
  40526. [13, 1216], // 0000001110111
  40527. [10, 64], [10, 64], [10, 64], [10, 64], // 0000001111xxx
  40528. [10, 64], [10, 64], [10, 64], [10, 64]
  40529. ];
  40530. var blackTable2 = [
  40531. [8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx
  40532. [8, 13], [8, 13], [8, 13], [8, 13],
  40533. [8, 13], [8, 13], [8, 13], [8, 13],
  40534. [8, 13], [8, 13], [8, 13], [8, 13],
  40535. [11, 23], [11, 23], // 00000101000x
  40536. [12, 50], // 000001010010
  40537. [12, 51], // 000001010011
  40538. [12, 44], // 000001010100
  40539. [12, 45], // 000001010101
  40540. [12, 46], // 000001010110
  40541. [12, 47], // 000001010111
  40542. [12, 57], // 000001011000
  40543. [12, 58], // 000001011001
  40544. [12, 61], // 000001011010
  40545. [12, 256], // 000001011011
  40546. [10, 16], [10, 16], [10, 16], [10, 16], // 0000010111xx
  40547. [10, 17], [10, 17], [10, 17], [10, 17], // 0000011000xx
  40548. [12, 48], // 000001100100
  40549. [12, 49], // 000001100101
  40550. [12, 62], // 000001100110
  40551. [12, 63], // 000001100111
  40552. [12, 30], // 000001101000
  40553. [12, 31], // 000001101001
  40554. [12, 32], // 000001101010
  40555. [12, 33], // 000001101011
  40556. [12, 40], // 000001101100
  40557. [12, 41], // 000001101101
  40558. [11, 22], [11, 22], // 00000110111x
  40559. [8, 14], [8, 14], [8, 14], [8, 14], // 00000111xxxx
  40560. [8, 14], [8, 14], [8, 14], [8, 14],
  40561. [8, 14], [8, 14], [8, 14], [8, 14],
  40562. [8, 14], [8, 14], [8, 14], [8, 14],
  40563. [7, 10], [7, 10], [7, 10], [7, 10], // 0000100xxxxx
  40564. [7, 10], [7, 10], [7, 10], [7, 10],
  40565. [7, 10], [7, 10], [7, 10], [7, 10],
  40566. [7, 10], [7, 10], [7, 10], [7, 10],
  40567. [7, 10], [7, 10], [7, 10], [7, 10],
  40568. [7, 10], [7, 10], [7, 10], [7, 10],
  40569. [7, 10], [7, 10], [7, 10], [7, 10],
  40570. [7, 10], [7, 10], [7, 10], [7, 10],
  40571. [7, 11], [7, 11], [7, 11], [7, 11], // 0000101xxxxx
  40572. [7, 11], [7, 11], [7, 11], [7, 11],
  40573. [7, 11], [7, 11], [7, 11], [7, 11],
  40574. [7, 11], [7, 11], [7, 11], [7, 11],
  40575. [7, 11], [7, 11], [7, 11], [7, 11],
  40576. [7, 11], [7, 11], [7, 11], [7, 11],
  40577. [7, 11], [7, 11], [7, 11], [7, 11],
  40578. [7, 11], [7, 11], [7, 11], [7, 11],
  40579. [9, 15], [9, 15], [9, 15], [9, 15], // 000011000xxx
  40580. [9, 15], [9, 15], [9, 15], [9, 15],
  40581. [12, 128], // 000011001000
  40582. [12, 192], // 000011001001
  40583. [12, 26], // 000011001010
  40584. [12, 27], // 000011001011
  40585. [12, 28], // 000011001100
  40586. [12, 29], // 000011001101
  40587. [11, 19], [11, 19], // 00001100111x
  40588. [11, 20], [11, 20], // 00001101000x
  40589. [12, 34], // 000011010010
  40590. [12, 35], // 000011010011
  40591. [12, 36], // 000011010100
  40592. [12, 37], // 000011010101
  40593. [12, 38], // 000011010110
  40594. [12, 39], // 000011010111
  40595. [11, 21], [11, 21], // 00001101100x
  40596. [12, 42], // 000011011010
  40597. [12, 43], // 000011011011
  40598. [10, 0], [10, 0], [10, 0], [10, 0], // 0000110111xx
  40599. [7, 12], [7, 12], [7, 12], [7, 12], // 0000111xxxxx
  40600. [7, 12], [7, 12], [7, 12], [7, 12],
  40601. [7, 12], [7, 12], [7, 12], [7, 12],
  40602. [7, 12], [7, 12], [7, 12], [7, 12],
  40603. [7, 12], [7, 12], [7, 12], [7, 12],
  40604. [7, 12], [7, 12], [7, 12], [7, 12],
  40605. [7, 12], [7, 12], [7, 12], [7, 12],
  40606. [7, 12], [7, 12], [7, 12], [7, 12]
  40607. ];
  40608. var blackTable3 = [
  40609. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx
  40610. [6, 9], // 000100
  40611. [6, 8], // 000101
  40612. [5, 7], [5, 7], // 00011x
  40613. [4, 6], [4, 6], [4, 6], [4, 6], // 0010xx
  40614. [4, 5], [4, 5], [4, 5], [4, 5], // 0011xx
  40615. [3, 1], [3, 1], [3, 1], [3, 1], // 010xxx
  40616. [3, 1], [3, 1], [3, 1], [3, 1],
  40617. [3, 4], [3, 4], [3, 4], [3, 4], // 011xxx
  40618. [3, 4], [3, 4], [3, 4], [3, 4],
  40619. [2, 3], [2, 3], [2, 3], [2, 3], // 10xxxx
  40620. [2, 3], [2, 3], [2, 3], [2, 3],
  40621. [2, 3], [2, 3], [2, 3], [2, 3],
  40622. [2, 3], [2, 3], [2, 3], [2, 3],
  40623. [2, 2], [2, 2], [2, 2], [2, 2], // 11xxxx
  40624. [2, 2], [2, 2], [2, 2], [2, 2],
  40625. [2, 2], [2, 2], [2, 2], [2, 2],
  40626. [2, 2], [2, 2], [2, 2], [2, 2]
  40627. ];
  40628. function CCITTFaxStream(str, maybeLength, params) {
  40629. this.str = str;
  40630. this.dict = str.dict;
  40631. params = params || Dict.empty;
  40632. this.encoding = params.get('K') || 0;
  40633. this.eoline = params.get('EndOfLine') || false;
  40634. this.byteAlign = params.get('EncodedByteAlign') || false;
  40635. this.columns = params.get('Columns') || 1728;
  40636. this.rows = params.get('Rows') || 0;
  40637. var eoblock = params.get('EndOfBlock');
  40638. if (eoblock === null || eoblock === undefined) {
  40639. eoblock = true;
  40640. }
  40641. this.eoblock = eoblock;
  40642. this.black = params.get('BlackIs1') || false;
  40643. this.codingLine = new Uint32Array(this.columns + 1);
  40644. this.refLine = new Uint32Array(this.columns + 2);
  40645. this.codingLine[0] = this.columns;
  40646. this.codingPos = 0;
  40647. this.row = 0;
  40648. this.nextLine2D = this.encoding < 0;
  40649. this.inputBits = 0;
  40650. this.inputBuf = 0;
  40651. this.outputBits = 0;
  40652. var code1;
  40653. while ((code1 = this.lookBits(12)) === 0) {
  40654. this.eatBits(1);
  40655. }
  40656. if (code1 == 1) {
  40657. this.eatBits(12);
  40658. }
  40659. if (this.encoding > 0) {
  40660. this.nextLine2D = !this.lookBits(1);
  40661. this.eatBits(1);
  40662. }
  40663. DecodeStream.call(this, maybeLength);
  40664. }
  40665. CCITTFaxStream.prototype = Object.create(DecodeStream.prototype);
  40666. CCITTFaxStream.prototype.readBlock = function CCITTFaxStream_readBlock() {
  40667. while (!this.eof) {
  40668. var c = this.lookChar();
  40669. this.ensureBuffer(this.bufferLength + 1);
  40670. this.buffer[this.bufferLength++] = c;
  40671. }
  40672. };
  40673. CCITTFaxStream.prototype.addPixels =
  40674. function ccittFaxStreamAddPixels(a1, blackPixels) {
  40675. var codingLine = this.codingLine;
  40676. var codingPos = this.codingPos;
  40677. if (a1 > codingLine[codingPos]) {
  40678. if (a1 > this.columns) {
  40679. info('row is wrong length');
  40680. this.err = true;
  40681. a1 = this.columns;
  40682. }
  40683. if ((codingPos & 1) ^ blackPixels) {
  40684. ++codingPos;
  40685. }
  40686. codingLine[codingPos] = a1;
  40687. }
  40688. this.codingPos = codingPos;
  40689. };
  40690. CCITTFaxStream.prototype.addPixelsNeg =
  40691. function ccittFaxStreamAddPixelsNeg(a1, blackPixels) {
  40692. var codingLine = this.codingLine;
  40693. var codingPos = this.codingPos;
  40694. if (a1 > codingLine[codingPos]) {
  40695. if (a1 > this.columns) {
  40696. info('row is wrong length');
  40697. this.err = true;
  40698. a1 = this.columns;
  40699. }
  40700. if ((codingPos & 1) ^ blackPixels) {
  40701. ++codingPos;
  40702. }
  40703. codingLine[codingPos] = a1;
  40704. } else if (a1 < codingLine[codingPos]) {
  40705. if (a1 < 0) {
  40706. info('invalid code');
  40707. this.err = true;
  40708. a1 = 0;
  40709. }
  40710. while (codingPos > 0 && a1 < codingLine[codingPos - 1]) {
  40711. --codingPos;
  40712. }
  40713. codingLine[codingPos] = a1;
  40714. }
  40715. this.codingPos = codingPos;
  40716. };
  40717. CCITTFaxStream.prototype.lookChar = function CCITTFaxStream_lookChar() {
  40718. var refLine = this.refLine;
  40719. var codingLine = this.codingLine;
  40720. var columns = this.columns;
  40721. var refPos, blackPixels, bits, i;
  40722. if (this.outputBits === 0) {
  40723. if (this.eof) {
  40724. return null;
  40725. }
  40726. this.err = false;
  40727. var code1, code2, code3;
  40728. if (this.nextLine2D) {
  40729. for (i = 0; codingLine[i] < columns; ++i) {
  40730. refLine[i] = codingLine[i];
  40731. }
  40732. refLine[i++] = columns;
  40733. refLine[i] = columns;
  40734. codingLine[0] = 0;
  40735. this.codingPos = 0;
  40736. refPos = 0;
  40737. blackPixels = 0;
  40738. while (codingLine[this.codingPos] < columns) {
  40739. code1 = this.getTwoDimCode();
  40740. switch (code1) {
  40741. case twoDimPass:
  40742. this.addPixels(refLine[refPos + 1], blackPixels);
  40743. if (refLine[refPos + 1] < columns) {
  40744. refPos += 2;
  40745. }
  40746. break;
  40747. case twoDimHoriz:
  40748. code1 = code2 = 0;
  40749. if (blackPixels) {
  40750. do {
  40751. code1 += (code3 = this.getBlackCode());
  40752. } while (code3 >= 64);
  40753. do {
  40754. code2 += (code3 = this.getWhiteCode());
  40755. } while (code3 >= 64);
  40756. } else {
  40757. do {
  40758. code1 += (code3 = this.getWhiteCode());
  40759. } while (code3 >= 64);
  40760. do {
  40761. code2 += (code3 = this.getBlackCode());
  40762. } while (code3 >= 64);
  40763. }
  40764. this.addPixels(codingLine[this.codingPos] +
  40765. code1, blackPixels);
  40766. if (codingLine[this.codingPos] < columns) {
  40767. this.addPixels(codingLine[this.codingPos] + code2,
  40768. blackPixels ^ 1);
  40769. }
  40770. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40771. refLine[refPos] < columns) {
  40772. refPos += 2;
  40773. }
  40774. break;
  40775. case twoDimVertR3:
  40776. this.addPixels(refLine[refPos] + 3, blackPixels);
  40777. blackPixels ^= 1;
  40778. if (codingLine[this.codingPos] < columns) {
  40779. ++refPos;
  40780. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40781. refLine[refPos] < columns) {
  40782. refPos += 2;
  40783. }
  40784. }
  40785. break;
  40786. case twoDimVertR2:
  40787. this.addPixels(refLine[refPos] + 2, blackPixels);
  40788. blackPixels ^= 1;
  40789. if (codingLine[this.codingPos] < columns) {
  40790. ++refPos;
  40791. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40792. refLine[refPos] < columns) {
  40793. refPos += 2;
  40794. }
  40795. }
  40796. break;
  40797. case twoDimVertR1:
  40798. this.addPixels(refLine[refPos] + 1, blackPixels);
  40799. blackPixels ^= 1;
  40800. if (codingLine[this.codingPos] < columns) {
  40801. ++refPos;
  40802. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40803. refLine[refPos] < columns) {
  40804. refPos += 2;
  40805. }
  40806. }
  40807. break;
  40808. case twoDimVert0:
  40809. this.addPixels(refLine[refPos], blackPixels);
  40810. blackPixels ^= 1;
  40811. if (codingLine[this.codingPos] < columns) {
  40812. ++refPos;
  40813. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40814. refLine[refPos] < columns) {
  40815. refPos += 2;
  40816. }
  40817. }
  40818. break;
  40819. case twoDimVertL3:
  40820. this.addPixelsNeg(refLine[refPos] - 3, blackPixels);
  40821. blackPixels ^= 1;
  40822. if (codingLine[this.codingPos] < columns) {
  40823. if (refPos > 0) {
  40824. --refPos;
  40825. } else {
  40826. ++refPos;
  40827. }
  40828. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40829. refLine[refPos] < columns) {
  40830. refPos += 2;
  40831. }
  40832. }
  40833. break;
  40834. case twoDimVertL2:
  40835. this.addPixelsNeg(refLine[refPos] - 2, blackPixels);
  40836. blackPixels ^= 1;
  40837. if (codingLine[this.codingPos] < columns) {
  40838. if (refPos > 0) {
  40839. --refPos;
  40840. } else {
  40841. ++refPos;
  40842. }
  40843. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40844. refLine[refPos] < columns) {
  40845. refPos += 2;
  40846. }
  40847. }
  40848. break;
  40849. case twoDimVertL1:
  40850. this.addPixelsNeg(refLine[refPos] - 1, blackPixels);
  40851. blackPixels ^= 1;
  40852. if (codingLine[this.codingPos] < columns) {
  40853. if (refPos > 0) {
  40854. --refPos;
  40855. } else {
  40856. ++refPos;
  40857. }
  40858. while (refLine[refPos] <= codingLine[this.codingPos] &&
  40859. refLine[refPos] < columns) {
  40860. refPos += 2;
  40861. }
  40862. }
  40863. break;
  40864. case EOF:
  40865. this.addPixels(columns, 0);
  40866. this.eof = true;
  40867. break;
  40868. default:
  40869. info('bad 2d code');
  40870. this.addPixels(columns, 0);
  40871. this.err = true;
  40872. }
  40873. }
  40874. } else {
  40875. codingLine[0] = 0;
  40876. this.codingPos = 0;
  40877. blackPixels = 0;
  40878. while (codingLine[this.codingPos] < columns) {
  40879. code1 = 0;
  40880. if (blackPixels) {
  40881. do {
  40882. code1 += (code3 = this.getBlackCode());
  40883. } while (code3 >= 64);
  40884. } else {
  40885. do {
  40886. code1 += (code3 = this.getWhiteCode());
  40887. } while (code3 >= 64);
  40888. }
  40889. this.addPixels(codingLine[this.codingPos] + code1, blackPixels);
  40890. blackPixels ^= 1;
  40891. }
  40892. }
  40893. if (this.byteAlign) {
  40894. this.inputBits &= ~7;
  40895. }
  40896. var gotEOL = false;
  40897. if (!this.eoblock && this.row == this.rows - 1) {
  40898. this.eof = true;
  40899. } else {
  40900. code1 = this.lookBits(12);
  40901. while (code1 === 0) {
  40902. this.eatBits(1);
  40903. code1 = this.lookBits(12);
  40904. }
  40905. if (code1 == 1) {
  40906. this.eatBits(12);
  40907. gotEOL = true;
  40908. } else if (code1 == EOF) {
  40909. this.eof = true;
  40910. }
  40911. }
  40912. if (!this.eof && this.encoding > 0) {
  40913. this.nextLine2D = !this.lookBits(1);
  40914. this.eatBits(1);
  40915. }
  40916. if (this.eoblock && gotEOL) {
  40917. code1 = this.lookBits(12);
  40918. if (code1 == 1) {
  40919. this.eatBits(12);
  40920. if (this.encoding > 0) {
  40921. this.lookBits(1);
  40922. this.eatBits(1);
  40923. }
  40924. if (this.encoding >= 0) {
  40925. for (i = 0; i < 4; ++i) {
  40926. code1 = this.lookBits(12);
  40927. if (code1 != 1) {
  40928. info('bad rtc code: ' + code1);
  40929. }
  40930. this.eatBits(12);
  40931. if (this.encoding > 0) {
  40932. this.lookBits(1);
  40933. this.eatBits(1);
  40934. }
  40935. }
  40936. }
  40937. this.eof = true;
  40938. }
  40939. } else if (this.err && this.eoline) {
  40940. while (true) {
  40941. code1 = this.lookBits(13);
  40942. if (code1 == EOF) {
  40943. this.eof = true;
  40944. return null;
  40945. }
  40946. if ((code1 >> 1) == 1) {
  40947. break;
  40948. }
  40949. this.eatBits(1);
  40950. }
  40951. this.eatBits(12);
  40952. if (this.encoding > 0) {
  40953. this.eatBits(1);
  40954. this.nextLine2D = !(code1 & 1);
  40955. }
  40956. }
  40957. if (codingLine[0] > 0) {
  40958. this.outputBits = codingLine[this.codingPos = 0];
  40959. } else {
  40960. this.outputBits = codingLine[this.codingPos = 1];
  40961. }
  40962. this.row++;
  40963. }
  40964. var c;
  40965. if (this.outputBits >= 8) {
  40966. c = (this.codingPos & 1) ? 0 : 0xFF;
  40967. this.outputBits -= 8;
  40968. if (this.outputBits === 0 && codingLine[this.codingPos] < columns) {
  40969. this.codingPos++;
  40970. this.outputBits = (codingLine[this.codingPos] -
  40971. codingLine[this.codingPos - 1]);
  40972. }
  40973. } else {
  40974. bits = 8;
  40975. c = 0;
  40976. do {
  40977. if (this.outputBits > bits) {
  40978. c <<= bits;
  40979. if (!(this.codingPos & 1)) {
  40980. c |= 0xFF >> (8 - bits);
  40981. }
  40982. this.outputBits -= bits;
  40983. bits = 0;
  40984. } else {
  40985. c <<= this.outputBits;
  40986. if (!(this.codingPos & 1)) {
  40987. c |= 0xFF >> (8 - this.outputBits);
  40988. }
  40989. bits -= this.outputBits;
  40990. this.outputBits = 0;
  40991. if (codingLine[this.codingPos] < columns) {
  40992. this.codingPos++;
  40993. this.outputBits = (codingLine[this.codingPos] -
  40994. codingLine[this.codingPos - 1]);
  40995. } else if (bits > 0) {
  40996. c <<= bits;
  40997. bits = 0;
  40998. }
  40999. }
  41000. } while (bits);
  41001. }
  41002. if (this.black) {
  41003. c ^= 0xFF;
  41004. }
  41005. return c;
  41006. };
  41007. // This functions returns the code found from the table.
  41008. // The start and end parameters set the boundaries for searching the table.
  41009. // The limit parameter is optional. Function returns an array with three
  41010. // values. The first array element indicates whether a valid code is being
  41011. // returned. The second array element is the actual code. The third array
  41012. // element indicates whether EOF was reached.
  41013. CCITTFaxStream.prototype.findTableCode =
  41014. function ccittFaxStreamFindTableCode(start, end, table, limit) {
  41015. var limitValue = limit || 0;
  41016. for (var i = start; i <= end; ++i) {
  41017. var code = this.lookBits(i);
  41018. if (code == EOF) {
  41019. return [true, 1, false];
  41020. }
  41021. if (i < end) {
  41022. code <<= end - i;
  41023. }
  41024. if (!limitValue || code >= limitValue) {
  41025. var p = table[code - limitValue];
  41026. if (p[0] == i) {
  41027. this.eatBits(i);
  41028. return [true, p[1], true];
  41029. }
  41030. }
  41031. }
  41032. return [false, 0, false];
  41033. };
  41034. CCITTFaxStream.prototype.getTwoDimCode =
  41035. function ccittFaxStreamGetTwoDimCode() {
  41036. var code = 0;
  41037. var p;
  41038. if (this.eoblock) {
  41039. code = this.lookBits(7);
  41040. p = twoDimTable[code];
  41041. if (p && p[0] > 0) {
  41042. this.eatBits(p[0]);
  41043. return p[1];
  41044. }
  41045. } else {
  41046. var result = this.findTableCode(1, 7, twoDimTable);
  41047. if (result[0] && result[2]) {
  41048. return result[1];
  41049. }
  41050. }
  41051. info('Bad two dim code');
  41052. return EOF;
  41053. };
  41054. CCITTFaxStream.prototype.getWhiteCode =
  41055. function ccittFaxStreamGetWhiteCode() {
  41056. var code = 0;
  41057. var p;
  41058. if (this.eoblock) {
  41059. code = this.lookBits(12);
  41060. if (code == EOF) {
  41061. return 1;
  41062. }
  41063. if ((code >> 5) === 0) {
  41064. p = whiteTable1[code];
  41065. } else {
  41066. p = whiteTable2[code >> 3];
  41067. }
  41068. if (p[0] > 0) {
  41069. this.eatBits(p[0]);
  41070. return p[1];
  41071. }
  41072. } else {
  41073. var result = this.findTableCode(1, 9, whiteTable2);
  41074. if (result[0]) {
  41075. return result[1];
  41076. }
  41077. result = this.findTableCode(11, 12, whiteTable1);
  41078. if (result[0]) {
  41079. return result[1];
  41080. }
  41081. }
  41082. info('bad white code');
  41083. this.eatBits(1);
  41084. return 1;
  41085. };
  41086. CCITTFaxStream.prototype.getBlackCode =
  41087. function ccittFaxStreamGetBlackCode() {
  41088. var code, p;
  41089. if (this.eoblock) {
  41090. code = this.lookBits(13);
  41091. if (code == EOF) {
  41092. return 1;
  41093. }
  41094. if ((code >> 7) === 0) {
  41095. p = blackTable1[code];
  41096. } else if ((code >> 9) === 0 && (code >> 7) !== 0) {
  41097. p = blackTable2[(code >> 1) - 64];
  41098. } else {
  41099. p = blackTable3[code >> 7];
  41100. }
  41101. if (p[0] > 0) {
  41102. this.eatBits(p[0]);
  41103. return p[1];
  41104. }
  41105. } else {
  41106. var result = this.findTableCode(2, 6, blackTable3);
  41107. if (result[0]) {
  41108. return result[1];
  41109. }
  41110. result = this.findTableCode(7, 12, blackTable2, 64);
  41111. if (result[0]) {
  41112. return result[1];
  41113. }
  41114. result = this.findTableCode(10, 13, blackTable1);
  41115. if (result[0]) {
  41116. return result[1];
  41117. }
  41118. }
  41119. info('bad black code');
  41120. this.eatBits(1);
  41121. return 1;
  41122. };
  41123. CCITTFaxStream.prototype.lookBits = function CCITTFaxStream_lookBits(n) {
  41124. var c;
  41125. while (this.inputBits < n) {
  41126. if ((c = this.str.getByte()) === -1) {
  41127. if (this.inputBits === 0) {
  41128. return EOF;
  41129. }
  41130. return ((this.inputBuf << (n - this.inputBits)) &
  41131. (0xFFFF >> (16 - n)));
  41132. }
  41133. this.inputBuf = (this.inputBuf << 8) + c;
  41134. this.inputBits += 8;
  41135. }
  41136. return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n));
  41137. };
  41138. CCITTFaxStream.prototype.eatBits = function CCITTFaxStream_eatBits(n) {
  41139. if ((this.inputBits -= n) < 0) {
  41140. this.inputBits = 0;
  41141. }
  41142. };
  41143. return CCITTFaxStream;
  41144. })();
  41145. var LZWStream = (function LZWStreamClosure() {
  41146. function LZWStream(str, maybeLength, earlyChange) {
  41147. this.str = str;
  41148. this.dict = str.dict;
  41149. this.cachedData = 0;
  41150. this.bitsCached = 0;
  41151. var maxLzwDictionarySize = 4096;
  41152. var lzwState = {
  41153. earlyChange: earlyChange,
  41154. codeLength: 9,
  41155. nextCode: 258,
  41156. dictionaryValues: new Uint8Array(maxLzwDictionarySize),
  41157. dictionaryLengths: new Uint16Array(maxLzwDictionarySize),
  41158. dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize),
  41159. currentSequence: new Uint8Array(maxLzwDictionarySize),
  41160. currentSequenceLength: 0
  41161. };
  41162. for (var i = 0; i < 256; ++i) {
  41163. lzwState.dictionaryValues[i] = i;
  41164. lzwState.dictionaryLengths[i] = 1;
  41165. }
  41166. this.lzwState = lzwState;
  41167. DecodeStream.call(this, maybeLength);
  41168. }
  41169. LZWStream.prototype = Object.create(DecodeStream.prototype);
  41170. LZWStream.prototype.readBits = function LZWStream_readBits(n) {
  41171. var bitsCached = this.bitsCached;
  41172. var cachedData = this.cachedData;
  41173. while (bitsCached < n) {
  41174. var c = this.str.getByte();
  41175. if (c === -1) {
  41176. this.eof = true;
  41177. return null;
  41178. }
  41179. cachedData = (cachedData << 8) | c;
  41180. bitsCached += 8;
  41181. }
  41182. this.bitsCached = (bitsCached -= n);
  41183. this.cachedData = cachedData;
  41184. this.lastCode = null;
  41185. return (cachedData >>> bitsCached) & ((1 << n) - 1);
  41186. };
  41187. LZWStream.prototype.readBlock = function LZWStream_readBlock() {
  41188. var blockSize = 512;
  41189. var estimatedDecodedSize = blockSize * 2, decodedSizeDelta = blockSize;
  41190. var i, j, q;
  41191. var lzwState = this.lzwState;
  41192. if (!lzwState) {
  41193. return; // eof was found
  41194. }
  41195. var earlyChange = lzwState.earlyChange;
  41196. var nextCode = lzwState.nextCode;
  41197. var dictionaryValues = lzwState.dictionaryValues;
  41198. var dictionaryLengths = lzwState.dictionaryLengths;
  41199. var dictionaryPrevCodes = lzwState.dictionaryPrevCodes;
  41200. var codeLength = lzwState.codeLength;
  41201. var prevCode = lzwState.prevCode;
  41202. var currentSequence = lzwState.currentSequence;
  41203. var currentSequenceLength = lzwState.currentSequenceLength;
  41204. var decodedLength = 0;
  41205. var currentBufferLength = this.bufferLength;
  41206. var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);
  41207. for (i = 0; i < blockSize; i++) {
  41208. var code = this.readBits(codeLength);
  41209. var hasPrev = currentSequenceLength > 0;
  41210. if (code < 256) {
  41211. currentSequence[0] = code;
  41212. currentSequenceLength = 1;
  41213. } else if (code >= 258) {
  41214. if (code < nextCode) {
  41215. currentSequenceLength = dictionaryLengths[code];
  41216. for (j = currentSequenceLength - 1, q = code; j >= 0; j--) {
  41217. currentSequence[j] = dictionaryValues[q];
  41218. q = dictionaryPrevCodes[q];
  41219. }
  41220. } else {
  41221. currentSequence[currentSequenceLength++] = currentSequence[0];
  41222. }
  41223. } else if (code == 256) {
  41224. codeLength = 9;
  41225. nextCode = 258;
  41226. currentSequenceLength = 0;
  41227. continue;
  41228. } else {
  41229. this.eof = true;
  41230. delete this.lzwState;
  41231. break;
  41232. }
  41233. if (hasPrev) {
  41234. dictionaryPrevCodes[nextCode] = prevCode;
  41235. dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1;
  41236. dictionaryValues[nextCode] = currentSequence[0];
  41237. nextCode++;
  41238. codeLength = (nextCode + earlyChange) & (nextCode + earlyChange - 1) ?
  41239. codeLength : Math.min(Math.log(nextCode + earlyChange) /
  41240. 0.6931471805599453 + 1, 12) | 0;
  41241. }
  41242. prevCode = code;
  41243. decodedLength += currentSequenceLength;
  41244. if (estimatedDecodedSize < decodedLength) {
  41245. do {
  41246. estimatedDecodedSize += decodedSizeDelta;
  41247. } while (estimatedDecodedSize < decodedLength);
  41248. buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);
  41249. }
  41250. for (j = 0; j < currentSequenceLength; j++) {
  41251. buffer[currentBufferLength++] = currentSequence[j];
  41252. }
  41253. }
  41254. lzwState.nextCode = nextCode;
  41255. lzwState.codeLength = codeLength;
  41256. lzwState.prevCode = prevCode;
  41257. lzwState.currentSequenceLength = currentSequenceLength;
  41258. this.bufferLength = currentBufferLength;
  41259. };
  41260. return LZWStream;
  41261. })();
  41262. var NullStream = (function NullStreamClosure() {
  41263. function NullStream() {
  41264. Stream.call(this, new Uint8Array(0));
  41265. }
  41266. NullStream.prototype = Stream.prototype;
  41267. return NullStream;
  41268. })();
  41269. var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
  41270. setup: function wphSetup(handler) {
  41271. var pdfManager;
  41272. function loadDocument(recoveryMode) {
  41273. var loadDocumentCapability = createPromiseCapability();
  41274. var parseSuccess = function parseSuccess() {
  41275. var numPagesPromise = pdfManager.ensureDoc('numPages');
  41276. var fingerprintPromise = pdfManager.ensureDoc('fingerprint');
  41277. var encryptedPromise = pdfManager.ensureXRef('encrypt');
  41278. Promise.all([numPagesPromise, fingerprintPromise,
  41279. encryptedPromise]).then(function onDocReady(results) {
  41280. var doc = {
  41281. numPages: results[0],
  41282. fingerprint: results[1],
  41283. encrypted: !!results[2],
  41284. };
  41285. loadDocumentCapability.resolve(doc);
  41286. },
  41287. parseFailure);
  41288. };
  41289. var parseFailure = function parseFailure(e) {
  41290. loadDocumentCapability.reject(e);
  41291. };
  41292. pdfManager.ensureDoc('checkHeader', []).then(function() {
  41293. pdfManager.ensureDoc('parseStartXRef', []).then(function() {
  41294. pdfManager.ensureDoc('parse', [recoveryMode]).then(
  41295. parseSuccess, parseFailure);
  41296. }, parseFailure);
  41297. }, parseFailure);
  41298. return loadDocumentCapability.promise;
  41299. }
  41300. function getPdfManager(data) {
  41301. var pdfManagerCapability = createPromiseCapability();
  41302. var source = data.source;
  41303. var disableRange = data.disableRange;
  41304. if (source.data) {
  41305. try {
  41306. pdfManager = new LocalPdfManager(source.data, source.password);
  41307. pdfManagerCapability.resolve();
  41308. } catch (ex) {
  41309. pdfManagerCapability.reject(ex);
  41310. }
  41311. return pdfManagerCapability.promise;
  41312. } else if (source.chunkedViewerLoading) {
  41313. try {
  41314. pdfManager = new NetworkPdfManager(source, handler);
  41315. pdfManagerCapability.resolve();
  41316. } catch (ex) {
  41317. pdfManagerCapability.reject(ex);
  41318. }
  41319. return pdfManagerCapability.promise;
  41320. }
  41321. var networkManager = new NetworkManager(source.url, {
  41322. httpHeaders: source.httpHeaders,
  41323. withCredentials: source.withCredentials
  41324. });
  41325. var fullRequestXhrId = networkManager.requestFull({
  41326. onHeadersReceived: function onHeadersReceived() {
  41327. if (disableRange) {
  41328. return;
  41329. }
  41330. var fullRequestXhr = networkManager.getRequestXhr(fullRequestXhrId);
  41331. if (fullRequestXhr.getResponseHeader('Accept-Ranges') !== 'bytes') {
  41332. return;
  41333. }
  41334. var contentEncoding =
  41335. fullRequestXhr.getResponseHeader('Content-Encoding') || 'identity';
  41336. if (contentEncoding !== 'identity') {
  41337. return;
  41338. }
  41339. var length = fullRequestXhr.getResponseHeader('Content-Length');
  41340. length = parseInt(length, 10);
  41341. if (!isInt(length)) {
  41342. return;
  41343. }
  41344. source.length = length;
  41345. if (length <= 2 * RANGE_CHUNK_SIZE) {
  41346. // The file size is smaller than the size of two chunks, so it does
  41347. // not make any sense to abort the request and retry with a range
  41348. // request.
  41349. return;
  41350. }
  41351. // NOTE: by cancelling the full request, and then issuing range
  41352. // requests, there will be an issue for sites where you can only
  41353. // request the pdf once. However, if this is the case, then the
  41354. // server should not be returning that it can support range requests.
  41355. networkManager.abortRequest(fullRequestXhrId);
  41356. try {
  41357. pdfManager = new NetworkPdfManager(source, handler);
  41358. pdfManagerCapability.resolve(pdfManager);
  41359. } catch (ex) {
  41360. pdfManagerCapability.reject(ex);
  41361. }
  41362. },
  41363. onDone: function onDone(args) {
  41364. // the data is array, instantiating directly from it
  41365. try {
  41366. pdfManager = new LocalPdfManager(args.chunk, source.password);
  41367. pdfManagerCapability.resolve();
  41368. } catch (ex) {
  41369. pdfManagerCapability.reject(ex);
  41370. }
  41371. },
  41372. onError: function onError(status) {
  41373. if (status == 404) {
  41374. var exception = new MissingPDFException('Missing PDF "' +
  41375. source.url + '".');
  41376. handler.send('MissingPDF', { exception: exception });
  41377. } else {
  41378. handler.send('DocError', 'Unexpected server response (' +
  41379. status + ') while retrieving PDF "' +
  41380. source.url + '".');
  41381. }
  41382. },
  41383. onProgress: function onProgress(evt) {
  41384. handler.send('DocProgress', {
  41385. loaded: evt.loaded,
  41386. total: evt.lengthComputable ? evt.total : source.length
  41387. });
  41388. }
  41389. });
  41390. return pdfManagerCapability.promise;
  41391. }
  41392. handler.on('test', function wphSetupTest(data) {
  41393. // check if Uint8Array can be sent to worker
  41394. if (!(data instanceof Uint8Array)) {
  41395. handler.send('test', false);
  41396. return;
  41397. }
  41398. // making sure postMessage transfers are working
  41399. var supportTransfers = data[0] === 255;
  41400. handler.postMessageTransfers = supportTransfers;
  41401. // check if the response property is supported by xhr
  41402. var xhr = new XMLHttpRequest();
  41403. var responseExists = 'response' in xhr;
  41404. // check if the property is actually implemented
  41405. try {
  41406. var dummy = xhr.responseType;
  41407. } catch (e) {
  41408. responseExists = false;
  41409. }
  41410. if (!responseExists) {
  41411. handler.send('test', false);
  41412. return;
  41413. }
  41414. handler.send('test', {
  41415. supportTypedArray: true,
  41416. supportTransfers: supportTransfers
  41417. });
  41418. });
  41419. handler.on('GetDocRequest', function wphSetupDoc(data) {
  41420. var onSuccess = function(doc) {
  41421. handler.send('GetDoc', { pdfInfo: doc });
  41422. };
  41423. var onFailure = function(e) {
  41424. if (e instanceof PasswordException) {
  41425. if (e.code === PasswordResponses.NEED_PASSWORD) {
  41426. handler.send('NeedPassword', {
  41427. exception: e
  41428. });
  41429. } else if (e.code === PasswordResponses.INCORRECT_PASSWORD) {
  41430. handler.send('IncorrectPassword', {
  41431. exception: e
  41432. });
  41433. }
  41434. } else if (e instanceof InvalidPDFException) {
  41435. handler.send('InvalidPDF', {
  41436. exception: e
  41437. });
  41438. } else if (e instanceof MissingPDFException) {
  41439. handler.send('MissingPDF', {
  41440. exception: e
  41441. });
  41442. } else {
  41443. handler.send('UnknownError', {
  41444. exception: new UnknownErrorException(e.message, e.toString())
  41445. });
  41446. }
  41447. };
  41448. PDFJS.maxImageSize = data.maxImageSize === undefined ?
  41449. -1 : data.maxImageSize;
  41450. PDFJS.disableFontFace = data.disableFontFace;
  41451. PDFJS.disableCreateObjectURL = data.disableCreateObjectURL;
  41452. PDFJS.verbosity = data.verbosity;
  41453. PDFJS.cMapUrl = data.cMapUrl === undefined ?
  41454. null : data.cMapUrl;
  41455. PDFJS.cMapPacked = data.cMapPacked === true;
  41456. getPdfManager(data).then(function () {
  41457. pdfManager.onLoadedStream().then(function(stream) {
  41458. handler.send('DataLoaded', { length: stream.bytes.byteLength });
  41459. });
  41460. }).then(function pdfManagerReady() {
  41461. loadDocument(false).then(onSuccess, function loadFailure(ex) {
  41462. // Try again with recoveryMode == true
  41463. if (!(ex instanceof XRefParseException)) {
  41464. if (ex instanceof PasswordException) {
  41465. // after password exception prepare to receive a new password
  41466. // to repeat loading
  41467. pdfManager.passwordChanged().then(pdfManagerReady);
  41468. }
  41469. onFailure(ex);
  41470. return;
  41471. }
  41472. pdfManager.requestLoadedStream();
  41473. pdfManager.onLoadedStream().then(function() {
  41474. loadDocument(true).then(onSuccess, onFailure);
  41475. });
  41476. }, onFailure);
  41477. }, onFailure);
  41478. });
  41479. handler.on('GetPage', function wphSetupGetPage(data) {
  41480. return pdfManager.getPage(data.pageIndex).then(function(page) {
  41481. var rotatePromise = pdfManager.ensure(page, 'rotate');
  41482. var refPromise = pdfManager.ensure(page, 'ref');
  41483. var viewPromise = pdfManager.ensure(page, 'view');
  41484. return Promise.all([rotatePromise, refPromise, viewPromise]).then(
  41485. function(results) {
  41486. return {
  41487. rotate: results[0],
  41488. ref: results[1],
  41489. view: results[2]
  41490. };
  41491. });
  41492. });
  41493. });
  41494. handler.on('GetPageIndex', function wphSetupGetPageIndex(data) {
  41495. var ref = new Ref(data.ref.num, data.ref.gen);
  41496. var catalog = pdfManager.pdfDocument.catalog;
  41497. return catalog.getPageIndex(ref);
  41498. });
  41499. handler.on('GetDestinations',
  41500. function wphSetupGetDestinations(data) {
  41501. return pdfManager.ensureCatalog('destinations');
  41502. }
  41503. );
  41504. handler.on('GetAttachments',
  41505. function wphSetupGetAttachments(data) {
  41506. return pdfManager.ensureCatalog('attachments');
  41507. }
  41508. );
  41509. handler.on('GetJavaScript',
  41510. function wphSetupGetJavaScript(data) {
  41511. return pdfManager.ensureCatalog('javaScript');
  41512. }
  41513. );
  41514. handler.on('GetOutline',
  41515. function wphSetupGetOutline(data) {
  41516. return pdfManager.ensureCatalog('documentOutline');
  41517. }
  41518. );
  41519. handler.on('GetMetadata',
  41520. function wphSetupGetMetadata(data) {
  41521. return Promise.all([pdfManager.ensureDoc('documentInfo'),
  41522. pdfManager.ensureCatalog('metadata')]);
  41523. }
  41524. );
  41525. handler.on('GetData', function wphSetupGetData(data) {
  41526. pdfManager.requestLoadedStream();
  41527. return pdfManager.onLoadedStream().then(function(stream) {
  41528. return stream.bytes;
  41529. });
  41530. });
  41531. handler.on('GetStats',
  41532. function wphSetupGetStats(data) {
  41533. return pdfManager.pdfDocument.xref.stats;
  41534. }
  41535. );
  41536. handler.on('UpdatePassword', function wphSetupUpdatePassword(data) {
  41537. pdfManager.updatePassword(data);
  41538. });
  41539. handler.on('GetAnnotations', function wphSetupGetAnnotations(data) {
  41540. return pdfManager.getPage(data.pageIndex).then(function(page) {
  41541. return pdfManager.ensure(page, 'getAnnotationsData', []);
  41542. });
  41543. });
  41544. handler.on('RenderPageRequest', function wphSetupRenderPage(data) {
  41545. pdfManager.getPage(data.pageIndex).then(function(page) {
  41546. var pageNum = data.pageIndex + 1;
  41547. var start = Date.now();
  41548. // Pre compile the pdf page and fetch the fonts/images.
  41549. page.getOperatorList(handler, data.intent).then(function(operatorList) {
  41550. info('page=' + pageNum + ' - getOperatorList: time=' +
  41551. (Date.now() - start) + 'ms, len=' + operatorList.fnArray.length);
  41552. }, function(e) {
  41553. var minimumStackMessage =
  41554. 'worker.js: while trying to getPage() and getOperatorList()';
  41555. var wrappedException;
  41556. // Turn the error into an obj that can be serialized
  41557. if (typeof e === 'string') {
  41558. wrappedException = {
  41559. message: e,
  41560. stack: minimumStackMessage
  41561. };
  41562. } else if (typeof e === 'object') {
  41563. wrappedException = {
  41564. message: e.message || e.toString(),
  41565. stack: e.stack || minimumStackMessage
  41566. };
  41567. } else {
  41568. wrappedException = {
  41569. message: 'Unknown exception type: ' + (typeof e),
  41570. stack: minimumStackMessage
  41571. };
  41572. }
  41573. handler.send('PageError', {
  41574. pageNum: pageNum,
  41575. error: wrappedException,
  41576. intent: data.intent
  41577. });
  41578. });
  41579. });
  41580. }, this);
  41581. handler.on('GetTextContent', function wphExtractText(data) {
  41582. return pdfManager.getPage(data.pageIndex).then(function(page) {
  41583. var pageNum = data.pageIndex + 1;
  41584. var start = Date.now();
  41585. return page.extractTextContent().then(function(textContent) {
  41586. info('text indexing: page=' + pageNum + ' - time=' +
  41587. (Date.now() - start) + 'ms');
  41588. return textContent;
  41589. });
  41590. });
  41591. });
  41592. handler.on('Cleanup', function wphCleanup(data) {
  41593. return pdfManager.cleanup();
  41594. });
  41595. handler.on('Terminate', function wphTerminate(data) {
  41596. pdfManager.terminate();
  41597. });
  41598. }
  41599. };
  41600. var consoleTimer = {};
  41601. var workerConsole = {
  41602. log: function log() {
  41603. var args = Array.prototype.slice.call(arguments);
  41604. globalScope.postMessage({
  41605. action: 'console_log',
  41606. data: args
  41607. });
  41608. },
  41609. error: function error() {
  41610. var args = Array.prototype.slice.call(arguments);
  41611. globalScope.postMessage({
  41612. action: 'console_error',
  41613. data: args
  41614. });
  41615. throw 'pdf.js execution error';
  41616. },
  41617. time: function time(name) {
  41618. consoleTimer[name] = Date.now();
  41619. },
  41620. timeEnd: function timeEnd(name) {
  41621. var time = consoleTimer[name];
  41622. if (!time) {
  41623. error('Unknown timer name ' + name);
  41624. }
  41625. this.log('Timer:', name, Date.now() - time);
  41626. }
  41627. };
  41628. // Worker thread?
  41629. if (typeof window === 'undefined') {
  41630. if (!('console' in globalScope)) {
  41631. globalScope.console = workerConsole;
  41632. }
  41633. // Listen for unsupported features so we can pass them on to the main thread.
  41634. PDFJS.UnsupportedManager.listen(function (msg) {
  41635. globalScope.postMessage({
  41636. action: '_unsupported_feature',
  41637. data: msg
  41638. });
  41639. });
  41640. var handler = new MessageHandler('worker_processor', this);
  41641. WorkerMessageHandler.setup(handler);
  41642. }
  41643. /* This class implements the QM Coder decoding as defined in
  41644. * JPEG 2000 Part I Final Committee Draft Version 1.0
  41645. * Annex C.3 Arithmetic decoding procedure
  41646. * available at http://www.jpeg.org/public/fcd15444-1.pdf
  41647. *
  41648. * The arithmetic decoder is used in conjunction with context models to decode
  41649. * JPEG2000 and JBIG2 streams.
  41650. */
  41651. var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
  41652. // Table C-2
  41653. var QeTable = [
  41654. {qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1},
  41655. {qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0},
  41656. {qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0},
  41657. {qe: 0x0AC1, nmps: 4, nlps: 12, switchFlag: 0},
  41658. {qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0},
  41659. {qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0},
  41660. {qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1},
  41661. {qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0},
  41662. {qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0},
  41663. {qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0},
  41664. {qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0},
  41665. {qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0},
  41666. {qe: 0x1C01, nmps: 13, nlps: 20, switchFlag: 0},
  41667. {qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0},
  41668. {qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1},
  41669. {qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0},
  41670. {qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0},
  41671. {qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0},
  41672. {qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0},
  41673. {qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0},
  41674. {qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0},
  41675. {qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0},
  41676. {qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0},
  41677. {qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0},
  41678. {qe: 0x1C01, nmps: 25, nlps: 22, switchFlag: 0},
  41679. {qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0},
  41680. {qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0},
  41681. {qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0},
  41682. {qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0},
  41683. {qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0},
  41684. {qe: 0x0AC1, nmps: 31, nlps: 28, switchFlag: 0},
  41685. {qe: 0x09C1, nmps: 32, nlps: 29, switchFlag: 0},
  41686. {qe: 0x08A1, nmps: 33, nlps: 30, switchFlag: 0},
  41687. {qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0},
  41688. {qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0},
  41689. {qe: 0x02A1, nmps: 36, nlps: 33, switchFlag: 0},
  41690. {qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0},
  41691. {qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0},
  41692. {qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0},
  41693. {qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0},
  41694. {qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0},
  41695. {qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0},
  41696. {qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0},
  41697. {qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0},
  41698. {qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0},
  41699. {qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0},
  41700. {qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0}
  41701. ];
  41702. // C.3.5 Initialisation of the decoder (INITDEC)
  41703. function ArithmeticDecoder(data, start, end) {
  41704. this.data = data;
  41705. this.bp = start;
  41706. this.dataEnd = end;
  41707. this.chigh = data[start];
  41708. this.clow = 0;
  41709. this.byteIn();
  41710. this.chigh = ((this.chigh << 7) & 0xFFFF) | ((this.clow >> 9) & 0x7F);
  41711. this.clow = (this.clow << 7) & 0xFFFF;
  41712. this.ct -= 7;
  41713. this.a = 0x8000;
  41714. }
  41715. ArithmeticDecoder.prototype = {
  41716. // C.3.4 Compressed data input (BYTEIN)
  41717. byteIn: function ArithmeticDecoder_byteIn() {
  41718. var data = this.data;
  41719. var bp = this.bp;
  41720. if (data[bp] == 0xFF) {
  41721. var b1 = data[bp + 1];
  41722. if (b1 > 0x8F) {
  41723. this.clow += 0xFF00;
  41724. this.ct = 8;
  41725. } else {
  41726. bp++;
  41727. this.clow += (data[bp] << 9);
  41728. this.ct = 7;
  41729. this.bp = bp;
  41730. }
  41731. } else {
  41732. bp++;
  41733. this.clow += bp < this.dataEnd ? (data[bp] << 8) : 0xFF00;
  41734. this.ct = 8;
  41735. this.bp = bp;
  41736. }
  41737. if (this.clow > 0xFFFF) {
  41738. this.chigh += (this.clow >> 16);
  41739. this.clow &= 0xFFFF;
  41740. }
  41741. },
  41742. // C.3.2 Decoding a decision (DECODE)
  41743. readBit: function ArithmeticDecoder_readBit(contexts, pos) {
  41744. // contexts are packed into 1 byte:
  41745. // highest 7 bits carry cx.index, lowest bit carries cx.mps
  41746. var cx_index = contexts[pos] >> 1, cx_mps = contexts[pos] & 1;
  41747. var qeTableIcx = QeTable[cx_index];
  41748. var qeIcx = qeTableIcx.qe;
  41749. var d;
  41750. var a = this.a - qeIcx;
  41751. if (this.chigh < qeIcx) {
  41752. // exchangeLps
  41753. if (a < qeIcx) {
  41754. a = qeIcx;
  41755. d = cx_mps;
  41756. cx_index = qeTableIcx.nmps;
  41757. } else {
  41758. a = qeIcx;
  41759. d = 1 ^ cx_mps;
  41760. if (qeTableIcx.switchFlag === 1) {
  41761. cx_mps = d;
  41762. }
  41763. cx_index = qeTableIcx.nlps;
  41764. }
  41765. } else {
  41766. this.chigh -= qeIcx;
  41767. if ((a & 0x8000) !== 0) {
  41768. this.a = a;
  41769. return cx_mps;
  41770. }
  41771. // exchangeMps
  41772. if (a < qeIcx) {
  41773. d = 1 ^ cx_mps;
  41774. if (qeTableIcx.switchFlag === 1) {
  41775. cx_mps = d;
  41776. }
  41777. cx_index = qeTableIcx.nlps;
  41778. } else {
  41779. d = cx_mps;
  41780. cx_index = qeTableIcx.nmps;
  41781. }
  41782. }
  41783. // C.3.3 renormD;
  41784. do {
  41785. if (this.ct === 0) {
  41786. this.byteIn();
  41787. }
  41788. a <<= 1;
  41789. this.chigh = ((this.chigh << 1) & 0xFFFF) | ((this.clow >> 15) & 1);
  41790. this.clow = (this.clow << 1) & 0xFFFF;
  41791. this.ct--;
  41792. } while ((a & 0x8000) === 0);
  41793. this.a = a;
  41794. contexts[pos] = cx_index << 1 | cx_mps;
  41795. return d;
  41796. }
  41797. };
  41798. return ArithmeticDecoder;
  41799. })();
  41800. var JpegImage = (function jpegImage() {
  41801. var dctZigZag = new Uint8Array([
  41802. 0,
  41803. 1, 8,
  41804. 16, 9, 2,
  41805. 3, 10, 17, 24,
  41806. 32, 25, 18, 11, 4,
  41807. 5, 12, 19, 26, 33, 40,
  41808. 48, 41, 34, 27, 20, 13, 6,
  41809. 7, 14, 21, 28, 35, 42, 49, 56,
  41810. 57, 50, 43, 36, 29, 22, 15,
  41811. 23, 30, 37, 44, 51, 58,
  41812. 59, 52, 45, 38, 31,
  41813. 39, 46, 53, 60,
  41814. 61, 54, 47,
  41815. 55, 62,
  41816. 63
  41817. ]);
  41818. var dctCos1 = 4017; // cos(pi/16)
  41819. var dctSin1 = 799; // sin(pi/16)
  41820. var dctCos3 = 3406; // cos(3*pi/16)
  41821. var dctSin3 = 2276; // sin(3*pi/16)
  41822. var dctCos6 = 1567; // cos(6*pi/16)
  41823. var dctSin6 = 3784; // sin(6*pi/16)
  41824. var dctSqrt2 = 5793; // sqrt(2)
  41825. var dctSqrt1d2 = 2896; // sqrt(2) / 2
  41826. function constructor() {
  41827. }
  41828. function buildHuffmanTable(codeLengths, values) {
  41829. var k = 0, code = [], i, j, length = 16;
  41830. while (length > 0 && !codeLengths[length - 1]) {
  41831. length--;
  41832. }
  41833. code.push({children: [], index: 0});
  41834. var p = code[0], q;
  41835. for (i = 0; i < length; i++) {
  41836. for (j = 0; j < codeLengths[i]; j++) {
  41837. p = code.pop();
  41838. p.children[p.index] = values[k];
  41839. while (p.index > 0) {
  41840. p = code.pop();
  41841. }
  41842. p.index++;
  41843. code.push(p);
  41844. while (code.length <= i) {
  41845. code.push(q = {children: [], index: 0});
  41846. p.children[p.index] = q.children;
  41847. p = q;
  41848. }
  41849. k++;
  41850. }
  41851. if (i + 1 < length) {
  41852. // p here points to last code
  41853. code.push(q = {children: [], index: 0});
  41854. p.children[p.index] = q.children;
  41855. p = q;
  41856. }
  41857. }
  41858. return code[0].children;
  41859. }
  41860. function getBlockBufferOffset(component, row, col) {
  41861. return 64 * ((component.blocksPerLine + 1) * row + col);
  41862. }
  41863. function decodeScan(data, offset, frame, components, resetInterval,
  41864. spectralStart, spectralEnd, successivePrev, successive) {
  41865. var precision = frame.precision;
  41866. var samplesPerLine = frame.samplesPerLine;
  41867. var scanLines = frame.scanLines;
  41868. var mcusPerLine = frame.mcusPerLine;
  41869. var progressive = frame.progressive;
  41870. var maxH = frame.maxH, maxV = frame.maxV;
  41871. var startOffset = offset, bitsData = 0, bitsCount = 0;
  41872. function readBit() {
  41873. if (bitsCount > 0) {
  41874. bitsCount--;
  41875. return (bitsData >> bitsCount) & 1;
  41876. }
  41877. bitsData = data[offset++];
  41878. if (bitsData == 0xFF) {
  41879. var nextByte = data[offset++];
  41880. if (nextByte) {
  41881. throw 'unexpected marker: ' +
  41882. ((bitsData << 8) | nextByte).toString(16);
  41883. }
  41884. // unstuff 0
  41885. }
  41886. bitsCount = 7;
  41887. return bitsData >>> 7;
  41888. }
  41889. function decodeHuffman(tree) {
  41890. var node = tree;
  41891. var bit;
  41892. while ((bit = readBit()) !== null) {
  41893. node = node[bit];
  41894. if (typeof node === 'number') {
  41895. return node;
  41896. }
  41897. if (typeof node !== 'object') {
  41898. throw 'invalid huffman sequence';
  41899. }
  41900. }
  41901. return null;
  41902. }
  41903. function receive(length) {
  41904. var n = 0;
  41905. while (length > 0) {
  41906. var bit = readBit();
  41907. if (bit === null) {
  41908. return;
  41909. }
  41910. n = (n << 1) | bit;
  41911. length--;
  41912. }
  41913. return n;
  41914. }
  41915. function receiveAndExtend(length) {
  41916. if (length === 1) {
  41917. return readBit() === 1 ? 1 : -1;
  41918. }
  41919. var n = receive(length);
  41920. if (n >= 1 << (length - 1)) {
  41921. return n;
  41922. }
  41923. return n + (-1 << length) + 1;
  41924. }
  41925. function decodeBaseline(component, offset) {
  41926. var t = decodeHuffman(component.huffmanTableDC);
  41927. var diff = t === 0 ? 0 : receiveAndExtend(t);
  41928. component.blockData[offset] = (component.pred += diff);
  41929. var k = 1;
  41930. while (k < 64) {
  41931. var rs = decodeHuffman(component.huffmanTableAC);
  41932. var s = rs & 15, r = rs >> 4;
  41933. if (s === 0) {
  41934. if (r < 15) {
  41935. break;
  41936. }
  41937. k += 16;
  41938. continue;
  41939. }
  41940. k += r;
  41941. var z = dctZigZag[k];
  41942. component.blockData[offset + z] = receiveAndExtend(s);
  41943. k++;
  41944. }
  41945. }
  41946. function decodeDCFirst(component, offset) {
  41947. var t = decodeHuffman(component.huffmanTableDC);
  41948. var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);
  41949. component.blockData[offset] = (component.pred += diff);
  41950. }
  41951. function decodeDCSuccessive(component, offset) {
  41952. component.blockData[offset] |= readBit() << successive;
  41953. }
  41954. var eobrun = 0;
  41955. function decodeACFirst(component, offset) {
  41956. if (eobrun > 0) {
  41957. eobrun--;
  41958. return;
  41959. }
  41960. var k = spectralStart, e = spectralEnd;
  41961. while (k <= e) {
  41962. var rs = decodeHuffman(component.huffmanTableAC);
  41963. var s = rs & 15, r = rs >> 4;
  41964. if (s === 0) {
  41965. if (r < 15) {
  41966. eobrun = receive(r) + (1 << r) - 1;
  41967. break;
  41968. }
  41969. k += 16;
  41970. continue;
  41971. }
  41972. k += r;
  41973. var z = dctZigZag[k];
  41974. component.blockData[offset + z] =
  41975. receiveAndExtend(s) * (1 << successive);
  41976. k++;
  41977. }
  41978. }
  41979. var successiveACState = 0, successiveACNextValue;
  41980. function decodeACSuccessive(component, offset) {
  41981. var k = spectralStart;
  41982. var e = spectralEnd;
  41983. var r = 0;
  41984. var s;
  41985. var rs;
  41986. while (k <= e) {
  41987. var z = dctZigZag[k];
  41988. switch (successiveACState) {
  41989. case 0: // initial state
  41990. rs = decodeHuffman(component.huffmanTableAC);
  41991. s = rs & 15;
  41992. r = rs >> 4;
  41993. if (s === 0) {
  41994. if (r < 15) {
  41995. eobrun = receive(r) + (1 << r);
  41996. successiveACState = 4;
  41997. } else {
  41998. r = 16;
  41999. successiveACState = 1;
  42000. }
  42001. } else {
  42002. if (s !== 1) {
  42003. throw 'invalid ACn encoding';
  42004. }
  42005. successiveACNextValue = receiveAndExtend(s);
  42006. successiveACState = r ? 2 : 3;
  42007. }
  42008. continue;
  42009. case 1: // skipping r zero items
  42010. case 2:
  42011. if (component.blockData[offset + z]) {
  42012. component.blockData[offset + z] += (readBit() << successive);
  42013. } else {
  42014. r--;
  42015. if (r === 0) {
  42016. successiveACState = successiveACState == 2 ? 3 : 0;
  42017. }
  42018. }
  42019. break;
  42020. case 3: // set value for a zero item
  42021. if (component.blockData[offset + z]) {
  42022. component.blockData[offset + z] += (readBit() << successive);
  42023. } else {
  42024. component.blockData[offset + z] =
  42025. successiveACNextValue << successive;
  42026. successiveACState = 0;
  42027. }
  42028. break;
  42029. case 4: // eob
  42030. if (component.blockData[offset + z]) {
  42031. component.blockData[offset + z] += (readBit() << successive);
  42032. }
  42033. break;
  42034. }
  42035. k++;
  42036. }
  42037. if (successiveACState === 4) {
  42038. eobrun--;
  42039. if (eobrun === 0) {
  42040. successiveACState = 0;
  42041. }
  42042. }
  42043. }
  42044. function decodeMcu(component, decode, mcu, row, col) {
  42045. var mcuRow = (mcu / mcusPerLine) | 0;
  42046. var mcuCol = mcu % mcusPerLine;
  42047. var blockRow = mcuRow * component.v + row;
  42048. var blockCol = mcuCol * component.h + col;
  42049. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  42050. decode(component, offset);
  42051. }
  42052. function decodeBlock(component, decode, mcu) {
  42053. var blockRow = (mcu / component.blocksPerLine) | 0;
  42054. var blockCol = mcu % component.blocksPerLine;
  42055. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  42056. decode(component, offset);
  42057. }
  42058. var componentsLength = components.length;
  42059. var component, i, j, k, n;
  42060. var decodeFn;
  42061. if (progressive) {
  42062. if (spectralStart === 0) {
  42063. decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;
  42064. } else {
  42065. decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;
  42066. }
  42067. } else {
  42068. decodeFn = decodeBaseline;
  42069. }
  42070. var mcu = 0, marker;
  42071. var mcuExpected;
  42072. if (componentsLength == 1) {
  42073. mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;
  42074. } else {
  42075. mcuExpected = mcusPerLine * frame.mcusPerColumn;
  42076. }
  42077. if (!resetInterval) {
  42078. resetInterval = mcuExpected;
  42079. }
  42080. var h, v;
  42081. while (mcu < mcuExpected) {
  42082. // reset interval stuff
  42083. for (i = 0; i < componentsLength; i++) {
  42084. components[i].pred = 0;
  42085. }
  42086. eobrun = 0;
  42087. if (componentsLength == 1) {
  42088. component = components[0];
  42089. for (n = 0; n < resetInterval; n++) {
  42090. decodeBlock(component, decodeFn, mcu);
  42091. mcu++;
  42092. }
  42093. } else {
  42094. for (n = 0; n < resetInterval; n++) {
  42095. for (i = 0; i < componentsLength; i++) {
  42096. component = components[i];
  42097. h = component.h;
  42098. v = component.v;
  42099. for (j = 0; j < v; j++) {
  42100. for (k = 0; k < h; k++) {
  42101. decodeMcu(component, decodeFn, mcu, j, k);
  42102. }
  42103. }
  42104. }
  42105. mcu++;
  42106. }
  42107. }
  42108. // find marker
  42109. bitsCount = 0;
  42110. marker = (data[offset] << 8) | data[offset + 1];
  42111. if (marker <= 0xFF00) {
  42112. throw 'marker was not found';
  42113. }
  42114. if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx
  42115. offset += 2;
  42116. } else {
  42117. break;
  42118. }
  42119. }
  42120. return offset - startOffset;
  42121. }
  42122. // A port of poppler's IDCT method which in turn is taken from:
  42123. // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,
  42124. // 'Practical Fast 1-D DCT Algorithms with 11 Multiplications',
  42125. // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,
  42126. // 988-991.
  42127. function quantizeAndInverse(component, blockBufferOffset, p) {
  42128. var qt = component.quantizationTable, blockData = component.blockData;
  42129. var v0, v1, v2, v3, v4, v5, v6, v7;
  42130. var p0, p1, p2, p3, p4, p5, p6, p7;
  42131. var t;
  42132. // inverse DCT on rows
  42133. for (var row = 0; row < 64; row += 8) {
  42134. // gather block data
  42135. p0 = blockData[blockBufferOffset + row];
  42136. p1 = blockData[blockBufferOffset + row + 1];
  42137. p2 = blockData[blockBufferOffset + row + 2];
  42138. p3 = blockData[blockBufferOffset + row + 3];
  42139. p4 = blockData[blockBufferOffset + row + 4];
  42140. p5 = blockData[blockBufferOffset + row + 5];
  42141. p6 = blockData[blockBufferOffset + row + 6];
  42142. p7 = blockData[blockBufferOffset + row + 7];
  42143. // dequant p0
  42144. p0 *= qt[row];
  42145. // check for all-zero AC coefficients
  42146. if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) {
  42147. t = (dctSqrt2 * p0 + 512) >> 10;
  42148. p[row] = t;
  42149. p[row + 1] = t;
  42150. p[row + 2] = t;
  42151. p[row + 3] = t;
  42152. p[row + 4] = t;
  42153. p[row + 5] = t;
  42154. p[row + 6] = t;
  42155. p[row + 7] = t;
  42156. continue;
  42157. }
  42158. // dequant p1 ... p7
  42159. p1 *= qt[row + 1];
  42160. p2 *= qt[row + 2];
  42161. p3 *= qt[row + 3];
  42162. p4 *= qt[row + 4];
  42163. p5 *= qt[row + 5];
  42164. p6 *= qt[row + 6];
  42165. p7 *= qt[row + 7];
  42166. // stage 4
  42167. v0 = (dctSqrt2 * p0 + 128) >> 8;
  42168. v1 = (dctSqrt2 * p4 + 128) >> 8;
  42169. v2 = p2;
  42170. v3 = p6;
  42171. v4 = (dctSqrt1d2 * (p1 - p7) + 128) >> 8;
  42172. v7 = (dctSqrt1d2 * (p1 + p7) + 128) >> 8;
  42173. v5 = p3 << 4;
  42174. v6 = p5 << 4;
  42175. // stage 3
  42176. v0 = (v0 + v1 + 1) >> 1;
  42177. v1 = v0 - v1;
  42178. t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8;
  42179. v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8;
  42180. v3 = t;
  42181. v4 = (v4 + v6 + 1) >> 1;
  42182. v6 = v4 - v6;
  42183. v7 = (v7 + v5 + 1) >> 1;
  42184. v5 = v7 - v5;
  42185. // stage 2
  42186. v0 = (v0 + v3 + 1) >> 1;
  42187. v3 = v0 - v3;
  42188. v1 = (v1 + v2 + 1) >> 1;
  42189. v2 = v1 - v2;
  42190. t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
  42191. v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
  42192. v7 = t;
  42193. t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
  42194. v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
  42195. v6 = t;
  42196. // stage 1
  42197. p[row] = v0 + v7;
  42198. p[row + 7] = v0 - v7;
  42199. p[row + 1] = v1 + v6;
  42200. p[row + 6] = v1 - v6;
  42201. p[row + 2] = v2 + v5;
  42202. p[row + 5] = v2 - v5;
  42203. p[row + 3] = v3 + v4;
  42204. p[row + 4] = v3 - v4;
  42205. }
  42206. // inverse DCT on columns
  42207. for (var col = 0; col < 8; ++col) {
  42208. p0 = p[col];
  42209. p1 = p[col + 8];
  42210. p2 = p[col + 16];
  42211. p3 = p[col + 24];
  42212. p4 = p[col + 32];
  42213. p5 = p[col + 40];
  42214. p6 = p[col + 48];
  42215. p7 = p[col + 56];
  42216. // check for all-zero AC coefficients
  42217. if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) {
  42218. t = (dctSqrt2 * p0 + 8192) >> 14;
  42219. // convert to 8 bit
  42220. t = (t < -2040) ? 0 : (t >= 2024) ? 255 : (t + 2056) >> 4;
  42221. blockData[blockBufferOffset + col] = t;
  42222. blockData[blockBufferOffset + col + 8] = t;
  42223. blockData[blockBufferOffset + col + 16] = t;
  42224. blockData[blockBufferOffset + col + 24] = t;
  42225. blockData[blockBufferOffset + col + 32] = t;
  42226. blockData[blockBufferOffset + col + 40] = t;
  42227. blockData[blockBufferOffset + col + 48] = t;
  42228. blockData[blockBufferOffset + col + 56] = t;
  42229. continue;
  42230. }
  42231. // stage 4
  42232. v0 = (dctSqrt2 * p0 + 2048) >> 12;
  42233. v1 = (dctSqrt2 * p4 + 2048) >> 12;
  42234. v2 = p2;
  42235. v3 = p6;
  42236. v4 = (dctSqrt1d2 * (p1 - p7) + 2048) >> 12;
  42237. v7 = (dctSqrt1d2 * (p1 + p7) + 2048) >> 12;
  42238. v5 = p3;
  42239. v6 = p5;
  42240. // stage 3
  42241. // Shift v0 by 128.5 << 5 here, so we don't need to shift p0...p7 when
  42242. // converting to UInt8 range later.
  42243. v0 = ((v0 + v1 + 1) >> 1) + 4112;
  42244. v1 = v0 - v1;
  42245. t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12;
  42246. v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12;
  42247. v3 = t;
  42248. v4 = (v4 + v6 + 1) >> 1;
  42249. v6 = v4 - v6;
  42250. v7 = (v7 + v5 + 1) >> 1;
  42251. v5 = v7 - v5;
  42252. // stage 2
  42253. v0 = (v0 + v3 + 1) >> 1;
  42254. v3 = v0 - v3;
  42255. v1 = (v1 + v2 + 1) >> 1;
  42256. v2 = v1 - v2;
  42257. t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
  42258. v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
  42259. v7 = t;
  42260. t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
  42261. v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
  42262. v6 = t;
  42263. // stage 1
  42264. p0 = v0 + v7;
  42265. p7 = v0 - v7;
  42266. p1 = v1 + v6;
  42267. p6 = v1 - v6;
  42268. p2 = v2 + v5;
  42269. p5 = v2 - v5;
  42270. p3 = v3 + v4;
  42271. p4 = v3 - v4;
  42272. // convert to 8-bit integers
  42273. p0 = (p0 < 16) ? 0 : (p0 >= 4080) ? 255 : p0 >> 4;
  42274. p1 = (p1 < 16) ? 0 : (p1 >= 4080) ? 255 : p1 >> 4;
  42275. p2 = (p2 < 16) ? 0 : (p2 >= 4080) ? 255 : p2 >> 4;
  42276. p3 = (p3 < 16) ? 0 : (p3 >= 4080) ? 255 : p3 >> 4;
  42277. p4 = (p4 < 16) ? 0 : (p4 >= 4080) ? 255 : p4 >> 4;
  42278. p5 = (p5 < 16) ? 0 : (p5 >= 4080) ? 255 : p5 >> 4;
  42279. p6 = (p6 < 16) ? 0 : (p6 >= 4080) ? 255 : p6 >> 4;
  42280. p7 = (p7 < 16) ? 0 : (p7 >= 4080) ? 255 : p7 >> 4;
  42281. // store block data
  42282. blockData[blockBufferOffset + col] = p0;
  42283. blockData[blockBufferOffset + col + 8] = p1;
  42284. blockData[blockBufferOffset + col + 16] = p2;
  42285. blockData[blockBufferOffset + col + 24] = p3;
  42286. blockData[blockBufferOffset + col + 32] = p4;
  42287. blockData[blockBufferOffset + col + 40] = p5;
  42288. blockData[blockBufferOffset + col + 48] = p6;
  42289. blockData[blockBufferOffset + col + 56] = p7;
  42290. }
  42291. }
  42292. function buildComponentData(frame, component) {
  42293. var blocksPerLine = component.blocksPerLine;
  42294. var blocksPerColumn = component.blocksPerColumn;
  42295. var computationBuffer = new Int16Array(64);
  42296. for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) {
  42297. for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) {
  42298. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  42299. quantizeAndInverse(component, offset, computationBuffer);
  42300. }
  42301. }
  42302. return component.blockData;
  42303. }
  42304. function clamp0to255(a) {
  42305. return a <= 0 ? 0 : a >= 255 ? 255 : a;
  42306. }
  42307. constructor.prototype = {
  42308. parse: function parse(data) {
  42309. function readUint16() {
  42310. var value = (data[offset] << 8) | data[offset + 1];
  42311. offset += 2;
  42312. return value;
  42313. }
  42314. function readDataBlock() {
  42315. var length = readUint16();
  42316. var array = data.subarray(offset, offset + length - 2);
  42317. offset += array.length;
  42318. return array;
  42319. }
  42320. function prepareComponents(frame) {
  42321. var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH);
  42322. var mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV);
  42323. for (var i = 0; i < frame.components.length; i++) {
  42324. component = frame.components[i];
  42325. var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) *
  42326. component.h / frame.maxH);
  42327. var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) *
  42328. component.v / frame.maxV);
  42329. var blocksPerLineForMcu = mcusPerLine * component.h;
  42330. var blocksPerColumnForMcu = mcusPerColumn * component.v;
  42331. var blocksBufferSize = 64 * blocksPerColumnForMcu *
  42332. (blocksPerLineForMcu + 1);
  42333. component.blockData = new Int16Array(blocksBufferSize);
  42334. component.blocksPerLine = blocksPerLine;
  42335. component.blocksPerColumn = blocksPerColumn;
  42336. }
  42337. frame.mcusPerLine = mcusPerLine;
  42338. frame.mcusPerColumn = mcusPerColumn;
  42339. }
  42340. var offset = 0, length = data.length;
  42341. var jfif = null;
  42342. var adobe = null;
  42343. var pixels = null;
  42344. var frame, resetInterval;
  42345. var quantizationTables = [];
  42346. var huffmanTablesAC = [], huffmanTablesDC = [];
  42347. var fileMarker = readUint16();
  42348. if (fileMarker != 0xFFD8) { // SOI (Start of Image)
  42349. throw 'SOI not found';
  42350. }
  42351. fileMarker = readUint16();
  42352. while (fileMarker != 0xFFD9) { // EOI (End of image)
  42353. var i, j, l;
  42354. switch(fileMarker) {
  42355. case 0xFFE0: // APP0 (Application Specific)
  42356. case 0xFFE1: // APP1
  42357. case 0xFFE2: // APP2
  42358. case 0xFFE3: // APP3
  42359. case 0xFFE4: // APP4
  42360. case 0xFFE5: // APP5
  42361. case 0xFFE6: // APP6
  42362. case 0xFFE7: // APP7
  42363. case 0xFFE8: // APP8
  42364. case 0xFFE9: // APP9
  42365. case 0xFFEA: // APP10
  42366. case 0xFFEB: // APP11
  42367. case 0xFFEC: // APP12
  42368. case 0xFFED: // APP13
  42369. case 0xFFEE: // APP14
  42370. case 0xFFEF: // APP15
  42371. case 0xFFFE: // COM (Comment)
  42372. var appData = readDataBlock();
  42373. if (fileMarker === 0xFFE0) {
  42374. if (appData[0] === 0x4A && appData[1] === 0x46 &&
  42375. appData[2] === 0x49 && appData[3] === 0x46 &&
  42376. appData[4] === 0) { // 'JFIF\x00'
  42377. jfif = {
  42378. version: { major: appData[5], minor: appData[6] },
  42379. densityUnits: appData[7],
  42380. xDensity: (appData[8] << 8) | appData[9],
  42381. yDensity: (appData[10] << 8) | appData[11],
  42382. thumbWidth: appData[12],
  42383. thumbHeight: appData[13],
  42384. thumbData: appData.subarray(14, 14 +
  42385. 3 * appData[12] * appData[13])
  42386. };
  42387. }
  42388. }
  42389. // TODO APP1 - Exif
  42390. if (fileMarker === 0xFFEE) {
  42391. if (appData[0] === 0x41 && appData[1] === 0x64 &&
  42392. appData[2] === 0x6F && appData[3] === 0x62 &&
  42393. appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00'
  42394. adobe = {
  42395. version: appData[6],
  42396. flags0: (appData[7] << 8) | appData[8],
  42397. flags1: (appData[9] << 8) | appData[10],
  42398. transformCode: appData[11]
  42399. };
  42400. }
  42401. }
  42402. break;
  42403. case 0xFFDB: // DQT (Define Quantization Tables)
  42404. var quantizationTablesLength = readUint16();
  42405. var quantizationTablesEnd = quantizationTablesLength + offset - 2;
  42406. var z;
  42407. while (offset < quantizationTablesEnd) {
  42408. var quantizationTableSpec = data[offset++];
  42409. var tableData = new Uint16Array(64);
  42410. if ((quantizationTableSpec >> 4) === 0) { // 8 bit values
  42411. for (j = 0; j < 64; j++) {
  42412. z = dctZigZag[j];
  42413. tableData[z] = data[offset++];
  42414. }
  42415. } else if ((quantizationTableSpec >> 4) === 1) { //16 bit
  42416. for (j = 0; j < 64; j++) {
  42417. z = dctZigZag[j];
  42418. tableData[z] = readUint16();
  42419. }
  42420. } else {
  42421. throw 'DQT: invalid table spec';
  42422. }
  42423. quantizationTables[quantizationTableSpec & 15] = tableData;
  42424. }
  42425. break;
  42426. case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)
  42427. case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)
  42428. case 0xFFC2: // SOF2 (Start of Frame, Progressive DCT)
  42429. if (frame) {
  42430. throw 'Only single frame JPEGs supported';
  42431. }
  42432. readUint16(); // skip data length
  42433. frame = {};
  42434. frame.extended = (fileMarker === 0xFFC1);
  42435. frame.progressive = (fileMarker === 0xFFC2);
  42436. frame.precision = data[offset++];
  42437. frame.scanLines = readUint16();
  42438. frame.samplesPerLine = readUint16();
  42439. frame.components = [];
  42440. frame.componentIds = {};
  42441. var componentsCount = data[offset++], componentId;
  42442. var maxH = 0, maxV = 0;
  42443. for (i = 0; i < componentsCount; i++) {
  42444. componentId = data[offset];
  42445. var h = data[offset + 1] >> 4;
  42446. var v = data[offset + 1] & 15;
  42447. if (maxH < h) {
  42448. maxH = h;
  42449. }
  42450. if (maxV < v) {
  42451. maxV = v;
  42452. }
  42453. var qId = data[offset + 2];
  42454. l = frame.components.push({
  42455. h: h,
  42456. v: v,
  42457. quantizationTable: quantizationTables[qId]
  42458. });
  42459. frame.componentIds[componentId] = l - 1;
  42460. offset += 3;
  42461. }
  42462. frame.maxH = maxH;
  42463. frame.maxV = maxV;
  42464. prepareComponents(frame);
  42465. break;
  42466. case 0xFFC4: // DHT (Define Huffman Tables)
  42467. var huffmanLength = readUint16();
  42468. for (i = 2; i < huffmanLength;) {
  42469. var huffmanTableSpec = data[offset++];
  42470. var codeLengths = new Uint8Array(16);
  42471. var codeLengthSum = 0;
  42472. for (j = 0; j < 16; j++, offset++) {
  42473. codeLengthSum += (codeLengths[j] = data[offset]);
  42474. }
  42475. var huffmanValues = new Uint8Array(codeLengthSum);
  42476. for (j = 0; j < codeLengthSum; j++, offset++) {
  42477. huffmanValues[j] = data[offset];
  42478. }
  42479. i += 17 + codeLengthSum;
  42480. ((huffmanTableSpec >> 4) === 0 ?
  42481. huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] =
  42482. buildHuffmanTable(codeLengths, huffmanValues);
  42483. }
  42484. break;
  42485. case 0xFFDD: // DRI (Define Restart Interval)
  42486. readUint16(); // skip data length
  42487. resetInterval = readUint16();
  42488. break;
  42489. case 0xFFDA: // SOS (Start of Scan)
  42490. var scanLength = readUint16();
  42491. var selectorsCount = data[offset++];
  42492. var components = [], component;
  42493. for (i = 0; i < selectorsCount; i++) {
  42494. var componentIndex = frame.componentIds[data[offset++]];
  42495. component = frame.components[componentIndex];
  42496. var tableSpec = data[offset++];
  42497. component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4];
  42498. component.huffmanTableAC = huffmanTablesAC[tableSpec & 15];
  42499. components.push(component);
  42500. }
  42501. var spectralStart = data[offset++];
  42502. var spectralEnd = data[offset++];
  42503. var successiveApproximation = data[offset++];
  42504. var processed = decodeScan(data, offset,
  42505. frame, components, resetInterval,
  42506. spectralStart, spectralEnd,
  42507. successiveApproximation >> 4, successiveApproximation & 15);
  42508. offset += processed;
  42509. break;
  42510. default:
  42511. if (data[offset - 3] == 0xFF &&
  42512. data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {
  42513. // could be incorrect encoding -- last 0xFF byte of the previous
  42514. // block was eaten by the encoder
  42515. offset -= 3;
  42516. break;
  42517. }
  42518. throw 'unknown JPEG marker ' + fileMarker.toString(16);
  42519. }
  42520. fileMarker = readUint16();
  42521. }
  42522. this.width = frame.samplesPerLine;
  42523. this.height = frame.scanLines;
  42524. this.jfif = jfif;
  42525. this.adobe = adobe;
  42526. this.components = [];
  42527. for (i = 0; i < frame.components.length; i++) {
  42528. component = frame.components[i];
  42529. this.components.push({
  42530. output: buildComponentData(frame, component),
  42531. scaleX: component.h / frame.maxH,
  42532. scaleY: component.v / frame.maxV,
  42533. blocksPerLine: component.blocksPerLine,
  42534. blocksPerColumn: component.blocksPerColumn
  42535. });
  42536. }
  42537. this.numComponents = this.components.length;
  42538. },
  42539. _getLinearizedBlockData: function getLinearizedBlockData(width, height) {
  42540. var scaleX = this.width / width, scaleY = this.height / height;
  42541. var component, componentScaleX, componentScaleY, blocksPerScanline;
  42542. var x, y, i, j, k;
  42543. var index;
  42544. var offset = 0;
  42545. var output;
  42546. var numComponents = this.components.length;
  42547. var dataLength = width * height * numComponents;
  42548. var data = new Uint8Array(dataLength);
  42549. var xScaleBlockOffset = new Uint32Array(width);
  42550. var mask3LSB = 0xfffffff8; // used to clear the 3 LSBs
  42551. for (i = 0; i < numComponents; i++) {
  42552. component = this.components[i];
  42553. componentScaleX = component.scaleX * scaleX;
  42554. componentScaleY = component.scaleY * scaleY;
  42555. offset = i;
  42556. output = component.output;
  42557. blocksPerScanline = (component.blocksPerLine + 1) << 3;
  42558. // precalculate the xScaleBlockOffset
  42559. for (x = 0; x < width; x++) {
  42560. j = 0 | (x * componentScaleX);
  42561. xScaleBlockOffset[x] = ((j & mask3LSB) << 3) | (j & 7);
  42562. }
  42563. // linearize the blocks of the component
  42564. for (y = 0; y < height; y++) {
  42565. j = 0 | (y * componentScaleY);
  42566. index = blocksPerScanline * (j & mask3LSB) | ((j & 7) << 3);
  42567. for (x = 0; x < width; x++) {
  42568. data[offset] = output[index + xScaleBlockOffset[x]];
  42569. offset += numComponents;
  42570. }
  42571. }
  42572. }
  42573. // decodeTransform will contains pairs of multiplier (-256..256) and
  42574. // additive
  42575. var transform = this.decodeTransform;
  42576. if (transform) {
  42577. for (i = 0; i < dataLength;) {
  42578. for (j = 0, k = 0; j < numComponents; j++, i++, k += 2) {
  42579. data[i] = ((data[i] * transform[k]) >> 8) + transform[k + 1];
  42580. }
  42581. }
  42582. }
  42583. return data;
  42584. },
  42585. _isColorConversionNeeded: function isColorConversionNeeded() {
  42586. if (this.adobe && this.adobe.transformCode) {
  42587. // The adobe transform marker overrides any previous setting
  42588. return true;
  42589. } else if (this.numComponents == 3) {
  42590. return true;
  42591. } else {
  42592. return false;
  42593. }
  42594. },
  42595. _convertYccToRgb: function convertYccToRgb(data) {
  42596. var Y, Cb, Cr;
  42597. for (var i = 0, length = data.length; i < length; i += 3) {
  42598. Y = data[i ];
  42599. Cb = data[i + 1];
  42600. Cr = data[i + 2];
  42601. data[i ] = clamp0to255(Y - 179.456 + 1.402 * Cr);
  42602. data[i + 1] = clamp0to255(Y + 135.459 - 0.344 * Cb - 0.714 * Cr);
  42603. data[i + 2] = clamp0to255(Y - 226.816 + 1.772 * Cb);
  42604. }
  42605. return data;
  42606. },
  42607. _convertYcckToRgb: function convertYcckToRgb(data) {
  42608. var Y, Cb, Cr, k, CbCb, CbCr, CbY, Cbk, CrCr, Crk, CrY, YY, Yk, kk;
  42609. var offset = 0;
  42610. for (var i = 0, length = data.length; i < length; i += 4) {
  42611. Y = data[i];
  42612. Cb = data[i + 1];
  42613. Cr = data[i + 2];
  42614. k = data[i + 3];
  42615. CbCb = Cb * Cb;
  42616. CbCr = Cb * Cr;
  42617. CbY = Cb * Y;
  42618. Cbk = Cb * k;
  42619. CrCr = Cr * Cr;
  42620. Crk = Cr * k;
  42621. CrY = Cr * Y;
  42622. YY = Y * Y;
  42623. Yk = Y * k;
  42624. kk = k * k;
  42625. var r = - 122.67195406894 -
  42626. 6.60635669420364e-5 * CbCb + 0.000437130475926232 * CbCr -
  42627. 5.4080610064599e-5* CbY + 0.00048449797120281* Cbk -
  42628. 0.154362151871126 * Cb - 0.000957964378445773 * CrCr +
  42629. 0.000817076911346625 * CrY - 0.00477271405408747 * Crk +
  42630. 1.53380253221734 * Cr + 0.000961250184130688 * YY -
  42631. 0.00266257332283933 * Yk + 0.48357088451265 * Y -
  42632. 0.000336197177618394 * kk + 0.484791561490776 * k;
  42633. var g = 107.268039397724 +
  42634. 2.19927104525741e-5 * CbCb - 0.000640992018297945 * CbCr +
  42635. 0.000659397001245577* CbY + 0.000426105652938837* Cbk -
  42636. 0.176491792462875 * Cb - 0.000778269941513683 * CrCr +
  42637. 0.00130872261408275 * CrY + 0.000770482631801132 * Crk -
  42638. 0.151051492775562 * Cr + 0.00126935368114843 * YY -
  42639. 0.00265090189010898 * Yk + 0.25802910206845 * Y -
  42640. 0.000318913117588328 * kk - 0.213742400323665 * k;
  42641. var b = - 20.810012546947 -
  42642. 0.000570115196973677 * CbCb - 2.63409051004589e-5 * CbCr +
  42643. 0.0020741088115012* CbY - 0.00288260236853442* Cbk +
  42644. 0.814272968359295 * Cb - 1.53496057440975e-5 * CrCr -
  42645. 0.000132689043961446 * CrY + 0.000560833691242812 * Crk -
  42646. 0.195152027534049 * Cr + 0.00174418132927582 * YY -
  42647. 0.00255243321439347 * Yk + 0.116935020465145 * Y -
  42648. 0.000343531996510555 * kk + 0.24165260232407 * k;
  42649. data[offset++] = clamp0to255(r);
  42650. data[offset++] = clamp0to255(g);
  42651. data[offset++] = clamp0to255(b);
  42652. }
  42653. return data;
  42654. },
  42655. _convertYcckToCmyk: function convertYcckToCmyk(data) {
  42656. var Y, Cb, Cr;
  42657. for (var i = 0, length = data.length; i < length; i += 4) {
  42658. Y = data[i];
  42659. Cb = data[i + 1];
  42660. Cr = data[i + 2];
  42661. data[i ] = clamp0to255(434.456 - Y - 1.402 * Cr);
  42662. data[i + 1] = clamp0to255(119.541 - Y + 0.344 * Cb + 0.714 * Cr);
  42663. data[i + 2] = clamp0to255(481.816 - Y - 1.772 * Cb);
  42664. // K in data[i + 3] is unchanged
  42665. }
  42666. return data;
  42667. },
  42668. _convertCmykToRgb: function convertCmykToRgb(data) {
  42669. var c, m, y, k;
  42670. var offset = 0;
  42671. var min = -255 * 255 * 255;
  42672. var scale = 1 / 255 / 255;
  42673. for (var i = 0, length = data.length; i < length; i += 4) {
  42674. c = data[i];
  42675. m = data[i + 1];
  42676. y = data[i + 2];
  42677. k = data[i + 3];
  42678. var r =
  42679. c * (-4.387332384609988 * c + 54.48615194189176 * m +
  42680. 18.82290502165302 * y + 212.25662451639585 * k -
  42681. 72734.4411664936) +
  42682. m * (1.7149763477362134 * m - 5.6096736904047315 * y -
  42683. 17.873870861415444 * k - 1401.7366389350734) +
  42684. y * (-2.5217340131683033 * y - 21.248923337353073 * k +
  42685. 4465.541406466231) -
  42686. k * (21.86122147463605 * k + 48317.86113160301);
  42687. var g =
  42688. c * (8.841041422036149 * c + 60.118027045597366 * m +
  42689. 6.871425592049007 * y + 31.159100130055922 * k -
  42690. 20220.756542821975) +
  42691. m * (-15.310361306967817 * m + 17.575251261109482 * y +
  42692. 131.35250912493976 * k - 48691.05921601825) +
  42693. y * (4.444339102852739 * y + 9.8632861493405 * k -
  42694. 6341.191035517494) -
  42695. k * (20.737325471181034 * k + 47890.15695978492);
  42696. var b =
  42697. c * (0.8842522430003296 * c + 8.078677503112928 * m +
  42698. 30.89978309703729 * y - 0.23883238689178934 * k -
  42699. 3616.812083916688) +
  42700. m * (10.49593273432072 * m + 63.02378494754052 * y +
  42701. 50.606957656360734 * k - 28620.90484698408) +
  42702. y * (0.03296041114873217 * y + 115.60384449646641 * k -
  42703. 49363.43385999684) -
  42704. k * (22.33816807309886 * k + 45932.16563550634);
  42705. data[offset++] = r >= 0 ? 255 : r <= min ? 0 : 255 + r * scale | 0;
  42706. data[offset++] = g >= 0 ? 255 : g <= min ? 0 : 255 + g * scale | 0;
  42707. data[offset++] = b >= 0 ? 255 : b <= min ? 0 : 255 + b * scale | 0;
  42708. }
  42709. return data;
  42710. },
  42711. getData: function getData(width, height, forceRGBoutput) {
  42712. if (this.numComponents > 4) {
  42713. throw 'Unsupported color mode';
  42714. }
  42715. // type of data: Uint8Array(width * height * numComponents)
  42716. var data = this._getLinearizedBlockData(width, height);
  42717. if (this.numComponents === 3) {
  42718. return this._convertYccToRgb(data);
  42719. } else if (this.numComponents === 4) {
  42720. if (this._isColorConversionNeeded()) {
  42721. if (forceRGBoutput) {
  42722. return this._convertYcckToRgb(data);
  42723. } else {
  42724. return this._convertYcckToCmyk(data);
  42725. }
  42726. } else if (forceRGBoutput) {
  42727. return this._convertCmykToRgb(data);
  42728. }
  42729. }
  42730. return data;
  42731. }
  42732. };
  42733. return constructor;
  42734. })();
  42735. var JpxImage = (function JpxImageClosure() {
  42736. // Table E.1
  42737. var SubbandsGainLog2 = {
  42738. 'LL': 0,
  42739. 'LH': 1,
  42740. 'HL': 1,
  42741. 'HH': 2
  42742. };
  42743. function JpxImage() {
  42744. this.failOnCorruptedImage = false;
  42745. }
  42746. JpxImage.prototype = {
  42747. parse: function JpxImage_parse(data) {
  42748. var head = readUint16(data, 0);
  42749. // No box header, immediate start of codestream (SOC)
  42750. if (head === 0xFF4F) {
  42751. this.parseCodestream(data, 0, data.length);
  42752. return;
  42753. }
  42754. var position = 0, length = data.length;
  42755. while (position < length) {
  42756. var headerSize = 8;
  42757. var lbox = readUint32(data, position);
  42758. var tbox = readUint32(data, position + 4);
  42759. position += headerSize;
  42760. if (lbox === 1) {
  42761. // XLBox: read UInt64 according to spec.
  42762. // JavaScript's int precision of 53 bit should be sufficient here.
  42763. lbox = readUint32(data, position) * 4294967296 +
  42764. readUint32(data, position + 4);
  42765. position += 8;
  42766. headerSize += 8;
  42767. }
  42768. if (lbox === 0) {
  42769. lbox = length - position + headerSize;
  42770. }
  42771. if (lbox < headerSize) {
  42772. throw new Error('JPX Error: Invalid box field size');
  42773. }
  42774. var dataLength = lbox - headerSize;
  42775. var jumpDataLength = true;
  42776. switch (tbox) {
  42777. case 0x6A501A1A: // 'jP\032\032'
  42778. // TODO
  42779. break;
  42780. case 0x6A703268: // 'jp2h'
  42781. jumpDataLength = false; // parsing child boxes
  42782. break;
  42783. case 0x636F6C72: // 'colr'
  42784. // TODO
  42785. break;
  42786. case 0x6A703263: // 'jp2c'
  42787. this.parseCodestream(data, position, position + dataLength);
  42788. break;
  42789. }
  42790. if (jumpDataLength) {
  42791. position += dataLength;
  42792. }
  42793. }
  42794. },
  42795. parseImageProperties: function JpxImage_parseImageProperties(stream) {
  42796. var newByte = stream.getByte();
  42797. while (newByte >= 0) {
  42798. var oldByte = newByte;
  42799. newByte = stream.getByte();
  42800. var code = (oldByte << 8) | newByte;
  42801. // Image and tile size (SIZ)
  42802. if (code == 0xFF51) {
  42803. stream.skip(4);
  42804. var Xsiz = stream.getInt32() >>> 0; // Byte 4
  42805. var Ysiz = stream.getInt32() >>> 0; // Byte 8
  42806. var XOsiz = stream.getInt32() >>> 0; // Byte 12
  42807. var YOsiz = stream.getInt32() >>> 0; // Byte 16
  42808. stream.skip(16);
  42809. var Csiz = stream.getUint16(); // Byte 36
  42810. this.width = Xsiz - XOsiz;
  42811. this.height = Ysiz - YOsiz;
  42812. this.componentsCount = Csiz;
  42813. // Results are always returned as Uint8Arrays
  42814. this.bitsPerComponent = 8;
  42815. return;
  42816. }
  42817. }
  42818. throw new Error('JPX Error: No size marker found in JPX stream');
  42819. },
  42820. parseCodestream: function JpxImage_parseCodestream(data, start, end) {
  42821. var context = {};
  42822. try {
  42823. var doNotRecover = false;
  42824. var position = start;
  42825. while (position + 1 < end) {
  42826. var code = readUint16(data, position);
  42827. position += 2;
  42828. var length = 0, j, sqcd, spqcds, spqcdSize, scalarExpounded, tile;
  42829. switch (code) {
  42830. case 0xFF4F: // Start of codestream (SOC)
  42831. context.mainHeader = true;
  42832. break;
  42833. case 0xFFD9: // End of codestream (EOC)
  42834. break;
  42835. case 0xFF51: // Image and tile size (SIZ)
  42836. length = readUint16(data, position);
  42837. var siz = {};
  42838. siz.Xsiz = readUint32(data, position + 4);
  42839. siz.Ysiz = readUint32(data, position + 8);
  42840. siz.XOsiz = readUint32(data, position + 12);
  42841. siz.YOsiz = readUint32(data, position + 16);
  42842. siz.XTsiz = readUint32(data, position + 20);
  42843. siz.YTsiz = readUint32(data, position + 24);
  42844. siz.XTOsiz = readUint32(data, position + 28);
  42845. siz.YTOsiz = readUint32(data, position + 32);
  42846. var componentsCount = readUint16(data, position + 36);
  42847. siz.Csiz = componentsCount;
  42848. var components = [];
  42849. j = position + 38;
  42850. for (var i = 0; i < componentsCount; i++) {
  42851. var component = {
  42852. precision: (data[j] & 0x7F) + 1,
  42853. isSigned: !!(data[j] & 0x80),
  42854. XRsiz: data[j + 1],
  42855. YRsiz: data[j + 1]
  42856. };
  42857. calculateComponentDimensions(component, siz);
  42858. components.push(component);
  42859. }
  42860. context.SIZ = siz;
  42861. context.components = components;
  42862. calculateTileGrids(context, components);
  42863. context.QCC = [];
  42864. context.COC = [];
  42865. break;
  42866. case 0xFF55: // Tile-part lengths, main header (TLM)
  42867. var Ltlm = readUint16(data, position); // Marker segment length
  42868. // Skip tile length markers
  42869. position += Ltlm;
  42870. break;
  42871. case 0xFF5C: // Quantization default (QCD)
  42872. length = readUint16(data, position);
  42873. var qcd = {};
  42874. j = position + 2;
  42875. sqcd = data[j++];
  42876. switch (sqcd & 0x1F) {
  42877. case 0:
  42878. spqcdSize = 8;
  42879. scalarExpounded = true;
  42880. break;
  42881. case 1:
  42882. spqcdSize = 16;
  42883. scalarExpounded = false;
  42884. break;
  42885. case 2:
  42886. spqcdSize = 16;
  42887. scalarExpounded = true;
  42888. break;
  42889. default:
  42890. throw new Error('JPX Error: Invalid SQcd value ' + sqcd);
  42891. }
  42892. qcd.noQuantization = (spqcdSize == 8);
  42893. qcd.scalarExpounded = scalarExpounded;
  42894. qcd.guardBits = sqcd >> 5;
  42895. spqcds = [];
  42896. while (j < length + position) {
  42897. var spqcd = {};
  42898. if (spqcdSize == 8) {
  42899. spqcd.epsilon = data[j++] >> 3;
  42900. spqcd.mu = 0;
  42901. } else {
  42902. spqcd.epsilon = data[j] >> 3;
  42903. spqcd.mu = ((data[j] & 0x7) << 8) | data[j + 1];
  42904. j += 2;
  42905. }
  42906. spqcds.push(spqcd);
  42907. }
  42908. qcd.SPqcds = spqcds;
  42909. if (context.mainHeader) {
  42910. context.QCD = qcd;
  42911. } else {
  42912. context.currentTile.QCD = qcd;
  42913. context.currentTile.QCC = [];
  42914. }
  42915. break;
  42916. case 0xFF5D: // Quantization component (QCC)
  42917. length = readUint16(data, position);
  42918. var qcc = {};
  42919. j = position + 2;
  42920. var cqcc;
  42921. if (context.SIZ.Csiz < 257) {
  42922. cqcc = data[j++];
  42923. } else {
  42924. cqcc = readUint16(data, j);
  42925. j += 2;
  42926. }
  42927. sqcd = data[j++];
  42928. switch (sqcd & 0x1F) {
  42929. case 0:
  42930. spqcdSize = 8;
  42931. scalarExpounded = true;
  42932. break;
  42933. case 1:
  42934. spqcdSize = 16;
  42935. scalarExpounded = false;
  42936. break;
  42937. case 2:
  42938. spqcdSize = 16;
  42939. scalarExpounded = true;
  42940. break;
  42941. default:
  42942. throw new Error('JPX Error: Invalid SQcd value ' + sqcd);
  42943. }
  42944. qcc.noQuantization = (spqcdSize == 8);
  42945. qcc.scalarExpounded = scalarExpounded;
  42946. qcc.guardBits = sqcd >> 5;
  42947. spqcds = [];
  42948. while (j < (length + position)) {
  42949. spqcd = {};
  42950. if (spqcdSize == 8) {
  42951. spqcd.epsilon = data[j++] >> 3;
  42952. spqcd.mu = 0;
  42953. } else {
  42954. spqcd.epsilon = data[j] >> 3;
  42955. spqcd.mu = ((data[j] & 0x7) << 8) | data[j + 1];
  42956. j += 2;
  42957. }
  42958. spqcds.push(spqcd);
  42959. }
  42960. qcc.SPqcds = spqcds;
  42961. if (context.mainHeader) {
  42962. context.QCC[cqcc] = qcc;
  42963. } else {
  42964. context.currentTile.QCC[cqcc] = qcc;
  42965. }
  42966. break;
  42967. case 0xFF52: // Coding style default (COD)
  42968. length = readUint16(data, position);
  42969. var cod = {};
  42970. j = position + 2;
  42971. var scod = data[j++];
  42972. cod.entropyCoderWithCustomPrecincts = !!(scod & 1);
  42973. cod.sopMarkerUsed = !!(scod & 2);
  42974. cod.ephMarkerUsed = !!(scod & 4);
  42975. cod.progressionOrder = data[j++];
  42976. cod.layersCount = readUint16(data, j);
  42977. j += 2;
  42978. cod.multipleComponentTransform = data[j++];
  42979. cod.decompositionLevelsCount = data[j++];
  42980. cod.xcb = (data[j++] & 0xF) + 2;
  42981. cod.ycb = (data[j++] & 0xF) + 2;
  42982. var blockStyle = data[j++];
  42983. cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1);
  42984. cod.resetContextProbabilities = !!(blockStyle & 2);
  42985. cod.terminationOnEachCodingPass = !!(blockStyle & 4);
  42986. cod.verticalyStripe = !!(blockStyle & 8);
  42987. cod.predictableTermination = !!(blockStyle & 16);
  42988. cod.segmentationSymbolUsed = !!(blockStyle & 32);
  42989. cod.reversibleTransformation = data[j++];
  42990. if (cod.entropyCoderWithCustomPrecincts) {
  42991. var precinctsSizes = [];
  42992. while (j < length + position) {
  42993. var precinctsSize = data[j++];
  42994. precinctsSizes.push({
  42995. PPx: precinctsSize & 0xF,
  42996. PPy: precinctsSize >> 4
  42997. });
  42998. }
  42999. cod.precinctsSizes = precinctsSizes;
  43000. }
  43001. var unsupported = [];
  43002. if (cod.sopMarkerUsed) {
  43003. unsupported.push('sopMarkerUsed');
  43004. }
  43005. if (cod.ephMarkerUsed) {
  43006. unsupported.push('ephMarkerUsed');
  43007. }
  43008. if (cod.selectiveArithmeticCodingBypass) {
  43009. unsupported.push('selectiveArithmeticCodingBypass');
  43010. }
  43011. if (cod.resetContextProbabilities) {
  43012. unsupported.push('resetContextProbabilities');
  43013. }
  43014. if (cod.terminationOnEachCodingPass) {
  43015. unsupported.push('terminationOnEachCodingPass');
  43016. }
  43017. if (cod.verticalyStripe) {
  43018. unsupported.push('verticalyStripe');
  43019. }
  43020. if (cod.predictableTermination) {
  43021. unsupported.push('predictableTermination');
  43022. }
  43023. if (unsupported.length > 0) {
  43024. doNotRecover = true;
  43025. throw new Error('JPX Error: Unsupported COD options (' +
  43026. unsupported.join(', ') + ')');
  43027. }
  43028. if (context.mainHeader) {
  43029. context.COD = cod;
  43030. } else {
  43031. context.currentTile.COD = cod;
  43032. context.currentTile.COC = [];
  43033. }
  43034. break;
  43035. case 0xFF90: // Start of tile-part (SOT)
  43036. length = readUint16(data, position);
  43037. tile = {};
  43038. tile.index = readUint16(data, position + 2);
  43039. tile.length = readUint32(data, position + 4);
  43040. tile.dataEnd = tile.length + position - 2;
  43041. tile.partIndex = data[position + 8];
  43042. tile.partsCount = data[position + 9];
  43043. context.mainHeader = false;
  43044. if (tile.partIndex === 0) {
  43045. // reset component specific settings
  43046. tile.COD = context.COD;
  43047. tile.COC = context.COC.slice(0); // clone of the global COC
  43048. tile.QCD = context.QCD;
  43049. tile.QCC = context.QCC.slice(0); // clone of the global COC
  43050. }
  43051. context.currentTile = tile;
  43052. break;
  43053. case 0xFF93: // Start of data (SOD)
  43054. tile = context.currentTile;
  43055. if (tile.partIndex === 0) {
  43056. initializeTile(context, tile.index);
  43057. buildPackets(context);
  43058. }
  43059. // moving to the end of the data
  43060. length = tile.dataEnd - position;
  43061. parseTilePackets(context, data, position, length);
  43062. break;
  43063. case 0xFF64: // Comment (COM)
  43064. length = readUint16(data, position);
  43065. // skipping content
  43066. break;
  43067. case 0xFF53: // Coding style component (COC)
  43068. throw new Error('JPX Error: Codestream code 0xFF53 (COC) is ' +
  43069. 'not implemented');
  43070. default:
  43071. throw new Error('JPX Error: Unknown codestream code: ' +
  43072. code.toString(16));
  43073. }
  43074. position += length;
  43075. }
  43076. } catch (e) {
  43077. if (doNotRecover || this.failOnCorruptedImage) {
  43078. throw e;
  43079. } else {
  43080. warn('Trying to recover from ' + e.message);
  43081. }
  43082. }
  43083. this.tiles = transformComponents(context);
  43084. this.width = context.SIZ.Xsiz - context.SIZ.XOsiz;
  43085. this.height = context.SIZ.Ysiz - context.SIZ.YOsiz;
  43086. this.componentsCount = context.SIZ.Csiz;
  43087. }
  43088. };
  43089. function calculateComponentDimensions(component, siz) {
  43090. // Section B.2 Component mapping
  43091. component.x0 = Math.ceil(siz.XOsiz / component.XRsiz);
  43092. component.x1 = Math.ceil(siz.Xsiz / component.XRsiz);
  43093. component.y0 = Math.ceil(siz.YOsiz / component.YRsiz);
  43094. component.y1 = Math.ceil(siz.Ysiz / component.YRsiz);
  43095. component.width = component.x1 - component.x0;
  43096. component.height = component.y1 - component.y0;
  43097. }
  43098. function calculateTileGrids(context, components) {
  43099. var siz = context.SIZ;
  43100. // Section B.3 Division into tile and tile-components
  43101. var tile, tiles = [];
  43102. var numXtiles = Math.ceil((siz.Xsiz - siz.XTOsiz) / siz.XTsiz);
  43103. var numYtiles = Math.ceil((siz.Ysiz - siz.YTOsiz) / siz.YTsiz);
  43104. for (var q = 0; q < numYtiles; q++) {
  43105. for (var p = 0; p < numXtiles; p++) {
  43106. tile = {};
  43107. tile.tx0 = Math.max(siz.XTOsiz + p * siz.XTsiz, siz.XOsiz);
  43108. tile.ty0 = Math.max(siz.YTOsiz + q * siz.YTsiz, siz.YOsiz);
  43109. tile.tx1 = Math.min(siz.XTOsiz + (p + 1) * siz.XTsiz, siz.Xsiz);
  43110. tile.ty1 = Math.min(siz.YTOsiz + (q + 1) * siz.YTsiz, siz.Ysiz);
  43111. tile.width = tile.tx1 - tile.tx0;
  43112. tile.height = tile.ty1 - tile.ty0;
  43113. tile.components = [];
  43114. tiles.push(tile);
  43115. }
  43116. }
  43117. context.tiles = tiles;
  43118. var componentsCount = siz.Csiz;
  43119. for (var i = 0, ii = componentsCount; i < ii; i++) {
  43120. var component = components[i];
  43121. for (var j = 0, jj = tiles.length; j < jj; j++) {
  43122. var tileComponent = {};
  43123. tile = tiles[j];
  43124. tileComponent.tcx0 = Math.ceil(tile.tx0 / component.XRsiz);
  43125. tileComponent.tcy0 = Math.ceil(tile.ty0 / component.YRsiz);
  43126. tileComponent.tcx1 = Math.ceil(tile.tx1 / component.XRsiz);
  43127. tileComponent.tcy1 = Math.ceil(tile.ty1 / component.YRsiz);
  43128. tileComponent.width = tileComponent.tcx1 - tileComponent.tcx0;
  43129. tileComponent.height = tileComponent.tcy1 - tileComponent.tcy0;
  43130. tile.components[i] = tileComponent;
  43131. }
  43132. }
  43133. }
  43134. function getBlocksDimensions(context, component, r) {
  43135. var codOrCoc = component.codingStyleParameters;
  43136. var result = {};
  43137. if (!codOrCoc.entropyCoderWithCustomPrecincts) {
  43138. result.PPx = 15;
  43139. result.PPy = 15;
  43140. } else {
  43141. result.PPx = codOrCoc.precinctsSizes[r].PPx;
  43142. result.PPy = codOrCoc.precinctsSizes[r].PPy;
  43143. }
  43144. // calculate codeblock size as described in section B.7
  43145. result.xcb_ = (r > 0 ? Math.min(codOrCoc.xcb, result.PPx - 1) :
  43146. Math.min(codOrCoc.xcb, result.PPx));
  43147. result.ycb_ = (r > 0 ? Math.min(codOrCoc.ycb, result.PPy - 1) :
  43148. Math.min(codOrCoc.ycb, result.PPy));
  43149. return result;
  43150. }
  43151. function buildPrecincts(context, resolution, dimensions) {
  43152. // Section B.6 Division resolution to precincts
  43153. var precinctWidth = 1 << dimensions.PPx;
  43154. var precinctHeight = 1 << dimensions.PPy;
  43155. var numprecinctswide = (resolution.trx1 > resolution.trx0 ?
  43156. Math.ceil(resolution.trx1 / precinctWidth) -
  43157. Math.floor(resolution.trx0 / precinctWidth) : 0);
  43158. var numprecinctshigh = (resolution.try1 > resolution.try0 ?
  43159. Math.ceil(resolution.try1 / precinctHeight) -
  43160. Math.floor(resolution.try0 / precinctHeight) : 0);
  43161. var numprecincts = numprecinctswide * numprecinctshigh;
  43162. var precinctXOffset = Math.floor(resolution.trx0 / precinctWidth) *
  43163. precinctWidth;
  43164. var precinctYOffset = Math.floor(resolution.try0 / precinctHeight) *
  43165. precinctHeight;
  43166. resolution.precinctParameters = {
  43167. precinctXOffset: precinctXOffset,
  43168. precinctYOffset: precinctYOffset,
  43169. precinctWidth: precinctWidth,
  43170. precinctHeight: precinctHeight,
  43171. numprecinctswide: numprecinctswide,
  43172. numprecinctshigh: numprecinctshigh,
  43173. numprecincts: numprecincts
  43174. };
  43175. }
  43176. function buildCodeblocks(context, subband, dimensions) {
  43177. // Section B.7 Division sub-band into code-blocks
  43178. var xcb_ = dimensions.xcb_;
  43179. var ycb_ = dimensions.ycb_;
  43180. var codeblockWidth = 1 << xcb_;
  43181. var codeblockHeight = 1 << ycb_;
  43182. var cbx0 = subband.tbx0 >> xcb_;
  43183. var cby0 = subband.tby0 >> ycb_;
  43184. var cbx1 = (subband.tbx1 + codeblockWidth - 1) >> xcb_;
  43185. var cby1 = (subband.tby1 + codeblockHeight - 1) >> ycb_;
  43186. var precinctParameters = subband.resolution.precinctParameters;
  43187. var codeblocks = [];
  43188. var precincts = [];
  43189. var i, j, codeblock, precinctNumber;
  43190. for (j = cby0; j < cby1; j++) {
  43191. for (i = cbx0; i < cbx1; i++) {
  43192. codeblock = {
  43193. cbx: i,
  43194. cby: j,
  43195. tbx0: codeblockWidth * i,
  43196. tby0: codeblockHeight * j,
  43197. tbx1: codeblockWidth * (i + 1),
  43198. tby1: codeblockHeight * (j + 1)
  43199. };
  43200. // calculate precinct number
  43201. var pi = Math.floor((codeblock.tbx0 -
  43202. precinctParameters.precinctXOffset) /
  43203. precinctParameters.precinctWidth);
  43204. var pj = Math.floor((codeblock.tby0 -
  43205. precinctParameters.precinctYOffset) /
  43206. precinctParameters.precinctHeight);
  43207. precinctNumber = pj + pi * precinctParameters.numprecinctswide;
  43208. codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0);
  43209. codeblock.tby0_ = Math.max(subband.tby0, codeblock.tby0);
  43210. codeblock.tbx1_ = Math.min(subband.tbx1, codeblock.tbx1);
  43211. codeblock.tby1_ = Math.min(subband.tby1, codeblock.tby1);
  43212. codeblock.precinctNumber = precinctNumber;
  43213. codeblock.subbandType = subband.type;
  43214. codeblock.Lblock = 3;
  43215. codeblocks.push(codeblock);
  43216. // building precinct for the sub-band
  43217. var precinct = precincts[precinctNumber];
  43218. if (precinct !== undefined) {
  43219. if (i < precinct.cbxMin) {
  43220. precinct.cbxMin = i;
  43221. } else if (i > precinct.cbxMax) {
  43222. precinct.cbxMax = i;
  43223. }
  43224. if (j < precinct.cbyMin) {
  43225. precinct.cbxMin = j;
  43226. } else if (j > precinct.cbyMax) {
  43227. precinct.cbyMax = j;
  43228. }
  43229. } else {
  43230. precincts[precinctNumber] = precinct = {
  43231. cbxMin: i,
  43232. cbyMin: j,
  43233. cbxMax: i,
  43234. cbyMax: j
  43235. };
  43236. }
  43237. codeblock.precinct = precinct;
  43238. }
  43239. }
  43240. subband.codeblockParameters = {
  43241. codeblockWidth: xcb_,
  43242. codeblockHeight: ycb_,
  43243. numcodeblockwide: cbx1 - cbx0 + 1,
  43244. numcodeblockhigh: cby1 - cby1 + 1
  43245. };
  43246. subband.codeblocks = codeblocks;
  43247. subband.precincts = precincts;
  43248. }
  43249. function createPacket(resolution, precinctNumber, layerNumber) {
  43250. var precinctCodeblocks = [];
  43251. // Section B.10.8 Order of info in packet
  43252. var subbands = resolution.subbands;
  43253. // sub-bands already ordered in 'LL', 'HL', 'LH', and 'HH' sequence
  43254. for (var i = 0, ii = subbands.length; i < ii; i++) {
  43255. var subband = subbands[i];
  43256. var codeblocks = subband.codeblocks;
  43257. for (var j = 0, jj = codeblocks.length; j < jj; j++) {
  43258. var codeblock = codeblocks[j];
  43259. if (codeblock.precinctNumber != precinctNumber) {
  43260. continue;
  43261. }
  43262. precinctCodeblocks.push(codeblock);
  43263. }
  43264. }
  43265. return {
  43266. layerNumber: layerNumber,
  43267. codeblocks: precinctCodeblocks
  43268. };
  43269. }
  43270. function LayerResolutionComponentPositionIterator(context) {
  43271. var siz = context.SIZ;
  43272. var tileIndex = context.currentTile.index;
  43273. var tile = context.tiles[tileIndex];
  43274. var layersCount = tile.codingStyleDefaultParameters.layersCount;
  43275. var componentsCount = siz.Csiz;
  43276. var maxDecompositionLevelsCount = 0;
  43277. for (var q = 0; q < componentsCount; q++) {
  43278. maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
  43279. tile.components[q].codingStyleParameters.decompositionLevelsCount);
  43280. }
  43281. var l = 0, r = 0, i = 0, k = 0;
  43282. this.nextPacket = function JpxImage_nextPacket() {
  43283. // Section B.12.1.1 Layer-resolution-component-position
  43284. for (; l < layersCount; l++) {
  43285. for (; r <= maxDecompositionLevelsCount; r++) {
  43286. for (; i < componentsCount; i++) {
  43287. var component = tile.components[i];
  43288. if (r > component.codingStyleParameters.decompositionLevelsCount) {
  43289. continue;
  43290. }
  43291. var resolution = component.resolutions[r];
  43292. var numprecincts = resolution.precinctParameters.numprecincts;
  43293. for (; k < numprecincts;) {
  43294. var packet = createPacket(resolution, k, l);
  43295. k++;
  43296. return packet;
  43297. }
  43298. k = 0;
  43299. }
  43300. i = 0;
  43301. }
  43302. r = 0;
  43303. }
  43304. throw new Error('JPX Error: Out of packets');
  43305. };
  43306. }
  43307. function ResolutionLayerComponentPositionIterator(context) {
  43308. var siz = context.SIZ;
  43309. var tileIndex = context.currentTile.index;
  43310. var tile = context.tiles[tileIndex];
  43311. var layersCount = tile.codingStyleDefaultParameters.layersCount;
  43312. var componentsCount = siz.Csiz;
  43313. var maxDecompositionLevelsCount = 0;
  43314. for (var q = 0; q < componentsCount; q++) {
  43315. maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
  43316. tile.components[q].codingStyleParameters.decompositionLevelsCount);
  43317. }
  43318. var r = 0, l = 0, i = 0, k = 0;
  43319. this.nextPacket = function JpxImage_nextPacket() {
  43320. // Section B.12.1.2 Resolution-layer-component-position
  43321. for (; r <= maxDecompositionLevelsCount; r++) {
  43322. for (; l < layersCount; l++) {
  43323. for (; i < componentsCount; i++) {
  43324. var component = tile.components[i];
  43325. if (r > component.codingStyleParameters.decompositionLevelsCount) {
  43326. continue;
  43327. }
  43328. var resolution = component.resolutions[r];
  43329. var numprecincts = resolution.precinctParameters.numprecincts;
  43330. for (; k < numprecincts;) {
  43331. var packet = createPacket(resolution, k, l);
  43332. k++;
  43333. return packet;
  43334. }
  43335. k = 0;
  43336. }
  43337. i = 0;
  43338. }
  43339. l = 0;
  43340. }
  43341. throw new Error('JPX Error: Out of packets');
  43342. };
  43343. }
  43344. function buildPackets(context) {
  43345. var siz = context.SIZ;
  43346. var tileIndex = context.currentTile.index;
  43347. var tile = context.tiles[tileIndex];
  43348. var componentsCount = siz.Csiz;
  43349. // Creating resolutions and sub-bands for each component
  43350. for (var c = 0; c < componentsCount; c++) {
  43351. var component = tile.components[c];
  43352. var decompositionLevelsCount =
  43353. component.codingStyleParameters.decompositionLevelsCount;
  43354. // Section B.5 Resolution levels and sub-bands
  43355. var resolutions = [];
  43356. var subbands = [];
  43357. for (var r = 0; r <= decompositionLevelsCount; r++) {
  43358. var blocksDimensions = getBlocksDimensions(context, component, r);
  43359. var resolution = {};
  43360. var scale = 1 << (decompositionLevelsCount - r);
  43361. resolution.trx0 = Math.ceil(component.tcx0 / scale);
  43362. resolution.try0 = Math.ceil(component.tcy0 / scale);
  43363. resolution.trx1 = Math.ceil(component.tcx1 / scale);
  43364. resolution.try1 = Math.ceil(component.tcy1 / scale);
  43365. buildPrecincts(context, resolution, blocksDimensions);
  43366. resolutions.push(resolution);
  43367. var subband;
  43368. if (r === 0) {
  43369. // one sub-band (LL) with last decomposition
  43370. subband = {};
  43371. subband.type = 'LL';
  43372. subband.tbx0 = Math.ceil(component.tcx0 / scale);
  43373. subband.tby0 = Math.ceil(component.tcy0 / scale);
  43374. subband.tbx1 = Math.ceil(component.tcx1 / scale);
  43375. subband.tby1 = Math.ceil(component.tcy1 / scale);
  43376. subband.resolution = resolution;
  43377. buildCodeblocks(context, subband, blocksDimensions);
  43378. subbands.push(subband);
  43379. resolution.subbands = [subband];
  43380. } else {
  43381. var bscale = 1 << (decompositionLevelsCount - r + 1);
  43382. var resolutionSubbands = [];
  43383. // three sub-bands (HL, LH and HH) with rest of decompositions
  43384. subband = {};
  43385. subband.type = 'HL';
  43386. subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5);
  43387. subband.tby0 = Math.ceil(component.tcy0 / bscale);
  43388. subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5);
  43389. subband.tby1 = Math.ceil(component.tcy1 / bscale);
  43390. subband.resolution = resolution;
  43391. buildCodeblocks(context, subband, blocksDimensions);
  43392. subbands.push(subband);
  43393. resolutionSubbands.push(subband);
  43394. subband = {};
  43395. subband.type = 'LH';
  43396. subband.tbx0 = Math.ceil(component.tcx0 / bscale);
  43397. subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5);
  43398. subband.tbx1 = Math.ceil(component.tcx1 / bscale);
  43399. subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5);
  43400. subband.resolution = resolution;
  43401. buildCodeblocks(context, subband, blocksDimensions);
  43402. subbands.push(subband);
  43403. resolutionSubbands.push(subband);
  43404. subband = {};
  43405. subband.type = 'HH';
  43406. subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5);
  43407. subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5);
  43408. subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5);
  43409. subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5);
  43410. subband.resolution = resolution;
  43411. buildCodeblocks(context, subband, blocksDimensions);
  43412. subbands.push(subband);
  43413. resolutionSubbands.push(subband);
  43414. resolution.subbands = resolutionSubbands;
  43415. }
  43416. }
  43417. component.resolutions = resolutions;
  43418. component.subbands = subbands;
  43419. }
  43420. // Generate the packets sequence
  43421. var progressionOrder = tile.codingStyleDefaultParameters.progressionOrder;
  43422. switch (progressionOrder) {
  43423. case 0:
  43424. tile.packetsIterator =
  43425. new LayerResolutionComponentPositionIterator(context);
  43426. break;
  43427. case 1:
  43428. tile.packetsIterator =
  43429. new ResolutionLayerComponentPositionIterator(context);
  43430. break;
  43431. default:
  43432. throw new Error('JPX Error: Unsupported progression order ' +
  43433. progressionOrder);
  43434. }
  43435. }
  43436. function parseTilePackets(context, data, offset, dataLength) {
  43437. var position = 0;
  43438. var buffer, bufferSize = 0, skipNextBit = false;
  43439. function readBits(count) {
  43440. while (bufferSize < count) {
  43441. var b = data[offset + position];
  43442. position++;
  43443. if (skipNextBit) {
  43444. buffer = (buffer << 7) | b;
  43445. bufferSize += 7;
  43446. skipNextBit = false;
  43447. } else {
  43448. buffer = (buffer << 8) | b;
  43449. bufferSize += 8;
  43450. }
  43451. if (b == 0xFF) {
  43452. skipNextBit = true;
  43453. }
  43454. }
  43455. bufferSize -= count;
  43456. return (buffer >>> bufferSize) & ((1 << count) - 1);
  43457. }
  43458. function alignToByte() {
  43459. bufferSize = 0;
  43460. if (skipNextBit) {
  43461. position++;
  43462. skipNextBit = false;
  43463. }
  43464. }
  43465. function readCodingpasses() {
  43466. if (readBits(1) === 0) {
  43467. return 1;
  43468. }
  43469. if (readBits(1) === 0) {
  43470. return 2;
  43471. }
  43472. var value = readBits(2);
  43473. if (value < 3) {
  43474. return value + 3;
  43475. }
  43476. value = readBits(5);
  43477. if (value < 31) {
  43478. return value + 6;
  43479. }
  43480. value = readBits(7);
  43481. return value + 37;
  43482. }
  43483. var tileIndex = context.currentTile.index;
  43484. var tile = context.tiles[tileIndex];
  43485. var packetsIterator = tile.packetsIterator;
  43486. while (position < dataLength) {
  43487. var packet = packetsIterator.nextPacket();
  43488. if (!readBits(1)) {
  43489. alignToByte();
  43490. continue;
  43491. }
  43492. var layerNumber = packet.layerNumber;
  43493. var queue = [], codeblock;
  43494. for (var i = 0, ii = packet.codeblocks.length; i < ii; i++) {
  43495. codeblock = packet.codeblocks[i];
  43496. var precinct = codeblock.precinct;
  43497. var codeblockColumn = codeblock.cbx - precinct.cbxMin;
  43498. var codeblockRow = codeblock.cby - precinct.cbyMin;
  43499. var codeblockIncluded = false;
  43500. var firstTimeInclusion = false;
  43501. var valueReady;
  43502. if ('included' in codeblock) {
  43503. codeblockIncluded = !!readBits(1);
  43504. } else {
  43505. // reading inclusion tree
  43506. precinct = codeblock.precinct;
  43507. var inclusionTree, zeroBitPlanesTree;
  43508. if ('inclusionTree' in precinct) {
  43509. inclusionTree = precinct.inclusionTree;
  43510. } else {
  43511. // building inclusion and zero bit-planes trees
  43512. var width = precinct.cbxMax - precinct.cbxMin + 1;
  43513. var height = precinct.cbyMax - precinct.cbyMin + 1;
  43514. inclusionTree = new InclusionTree(width, height, layerNumber);
  43515. zeroBitPlanesTree = new TagTree(width, height);
  43516. precinct.inclusionTree = inclusionTree;
  43517. precinct.zeroBitPlanesTree = zeroBitPlanesTree;
  43518. }
  43519. if (inclusionTree.reset(codeblockColumn, codeblockRow, layerNumber)) {
  43520. while (true) {
  43521. if (readBits(1)) {
  43522. valueReady = !inclusionTree.nextLevel();
  43523. if (valueReady) {
  43524. codeblock.included = true;
  43525. codeblockIncluded = firstTimeInclusion = true;
  43526. break;
  43527. }
  43528. } else {
  43529. inclusionTree.incrementValue(layerNumber);
  43530. break;
  43531. }
  43532. }
  43533. }
  43534. }
  43535. if (!codeblockIncluded) {
  43536. continue;
  43537. }
  43538. if (firstTimeInclusion) {
  43539. zeroBitPlanesTree = precinct.zeroBitPlanesTree;
  43540. zeroBitPlanesTree.reset(codeblockColumn, codeblockRow);
  43541. while (true) {
  43542. if (readBits(1)) {
  43543. valueReady = !zeroBitPlanesTree.nextLevel();
  43544. if (valueReady) {
  43545. break;
  43546. }
  43547. } else {
  43548. zeroBitPlanesTree.incrementValue();
  43549. }
  43550. }
  43551. codeblock.zeroBitPlanes = zeroBitPlanesTree.value;
  43552. }
  43553. var codingpasses = readCodingpasses();
  43554. while (readBits(1)) {
  43555. codeblock.Lblock++;
  43556. }
  43557. var codingpassesLog2 = log2(codingpasses);
  43558. // rounding down log2
  43559. var bits = ((codingpasses < (1 << codingpassesLog2)) ?
  43560. codingpassesLog2 - 1 : codingpassesLog2) + codeblock.Lblock;
  43561. var codedDataLength = readBits(bits);
  43562. queue.push({
  43563. codeblock: codeblock,
  43564. codingpasses: codingpasses,
  43565. dataLength: codedDataLength
  43566. });
  43567. }
  43568. alignToByte();
  43569. while (queue.length > 0) {
  43570. var packetItem = queue.shift();
  43571. codeblock = packetItem.codeblock;
  43572. if (!('data' in codeblock)) {
  43573. codeblock.data = [];
  43574. }
  43575. codeblock.data.push({
  43576. data: data,
  43577. start: offset + position,
  43578. end: offset + position + packetItem.dataLength,
  43579. codingpasses: packetItem.codingpasses
  43580. });
  43581. position += packetItem.dataLength;
  43582. }
  43583. }
  43584. return position;
  43585. }
  43586. function copyCoefficients(coefficients, levelWidth, levelHeight, subband,
  43587. delta, mb, reversible, segmentationSymbolUsed) {
  43588. var x0 = subband.tbx0;
  43589. var y0 = subband.tby0;
  43590. var width = subband.tbx1 - subband.tbx0;
  43591. var codeblocks = subband.codeblocks;
  43592. var right = subband.type.charAt(0) === 'H' ? 1 : 0;
  43593. var bottom = subband.type.charAt(1) === 'H' ? levelWidth : 0;
  43594. for (var i = 0, ii = codeblocks.length; i < ii; ++i) {
  43595. var codeblock = codeblocks[i];
  43596. var blockWidth = codeblock.tbx1_ - codeblock.tbx0_;
  43597. var blockHeight = codeblock.tby1_ - codeblock.tby0_;
  43598. if (blockWidth === 0 || blockHeight === 0) {
  43599. continue;
  43600. }
  43601. if (!('data' in codeblock)) {
  43602. continue;
  43603. }
  43604. var bitModel, currentCodingpassType;
  43605. bitModel = new BitModel(blockWidth, blockHeight, codeblock.subbandType,
  43606. codeblock.zeroBitPlanes, mb);
  43607. currentCodingpassType = 2; // first bit plane starts from cleanup
  43608. // collect data
  43609. var data = codeblock.data, totalLength = 0, codingpasses = 0;
  43610. var j, jj, dataItem;
  43611. for (j = 0, jj = data.length; j < jj; j++) {
  43612. dataItem = data[j];
  43613. totalLength += dataItem.end - dataItem.start;
  43614. codingpasses += dataItem.codingpasses;
  43615. }
  43616. var encodedData = new Uint8Array(totalLength);
  43617. var position = 0;
  43618. for (j = 0, jj = data.length; j < jj; j++) {
  43619. dataItem = data[j];
  43620. var chunk = dataItem.data.subarray(dataItem.start, dataItem.end);
  43621. encodedData.set(chunk, position);
  43622. position += chunk.length;
  43623. }
  43624. // decoding the item
  43625. var decoder = new ArithmeticDecoder(encodedData, 0, totalLength);
  43626. bitModel.setDecoder(decoder);
  43627. for (j = 0; j < codingpasses; j++) {
  43628. switch (currentCodingpassType) {
  43629. case 0:
  43630. bitModel.runSignificancePropogationPass();
  43631. break;
  43632. case 1:
  43633. bitModel.runMagnitudeRefinementPass();
  43634. break;
  43635. case 2:
  43636. bitModel.runCleanupPass();
  43637. if (segmentationSymbolUsed) {
  43638. bitModel.checkSegmentationSymbol();
  43639. }
  43640. break;
  43641. }
  43642. currentCodingpassType = (currentCodingpassType + 1) % 3;
  43643. }
  43644. var offset = (codeblock.tbx0_ - x0) + (codeblock.tby0_ - y0) * width;
  43645. var sign = bitModel.coefficentsSign;
  43646. var magnitude = bitModel.coefficentsMagnitude;
  43647. var bitsDecoded = bitModel.bitsDecoded;
  43648. var magnitudeCorrection = reversible ? 0 : 0.5;
  43649. var k, n, nb;
  43650. position = 0;
  43651. // Do the interleaving of Section F.3.3 here, so we do not need
  43652. // to copy later. LL level is not interleaved, just copied.
  43653. var interleave = (subband.type !== 'LL');
  43654. for (j = 0; j < blockHeight; j++) {
  43655. var row = (offset / width) | 0; // row in the non-interleaved subband
  43656. var levelOffset = 2 * row * (levelWidth - width) + right + bottom;
  43657. for (k = 0; k < blockWidth; k++) {
  43658. n = magnitude[position];
  43659. if (n !== 0) {
  43660. n = (n + magnitudeCorrection) * delta;
  43661. if (sign[position] !== 0) {
  43662. n = -n;
  43663. }
  43664. nb = bitsDecoded[position];
  43665. var pos = interleave ? (levelOffset + (offset << 1)) : offset;
  43666. if (reversible && (nb >= mb)) {
  43667. coefficients[pos] = n;
  43668. } else {
  43669. coefficients[pos] = n * (1 << (mb - nb));
  43670. }
  43671. }
  43672. offset++;
  43673. position++;
  43674. }
  43675. offset += width - blockWidth;
  43676. }
  43677. }
  43678. }
  43679. function transformTile(context, tile, c) {
  43680. var component = tile.components[c];
  43681. var codingStyleParameters = component.codingStyleParameters;
  43682. var quantizationParameters = component.quantizationParameters;
  43683. var decompositionLevelsCount =
  43684. codingStyleParameters.decompositionLevelsCount;
  43685. var spqcds = quantizationParameters.SPqcds;
  43686. var scalarExpounded = quantizationParameters.scalarExpounded;
  43687. var guardBits = quantizationParameters.guardBits;
  43688. var segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed;
  43689. var precision = context.components[c].precision;
  43690. var reversible = codingStyleParameters.reversibleTransformation;
  43691. var transform = (reversible ? new ReversibleTransform() :
  43692. new IrreversibleTransform());
  43693. var subbandCoefficients = [];
  43694. var b = 0;
  43695. for (var i = 0; i <= decompositionLevelsCount; i++) {
  43696. var resolution = component.resolutions[i];
  43697. var width = resolution.trx1 - resolution.trx0;
  43698. var height = resolution.try1 - resolution.try0;
  43699. // Allocate space for the whole sublevel.
  43700. var coefficients = new Float32Array(width * height);
  43701. for (var j = 0, jj = resolution.subbands.length; j < jj; j++) {
  43702. var mu, epsilon;
  43703. if (!scalarExpounded) {
  43704. // formula E-5
  43705. mu = spqcds[0].mu;
  43706. epsilon = spqcds[0].epsilon + (i > 0 ? 1 - i : 0);
  43707. } else {
  43708. mu = spqcds[b].mu;
  43709. epsilon = spqcds[b].epsilon;
  43710. b++;
  43711. }
  43712. var subband = resolution.subbands[j];
  43713. var gainLog2 = SubbandsGainLog2[subband.type];
  43714. // calulate quantization coefficient (Section E.1.1.1)
  43715. var delta = (reversible ? 1 :
  43716. Math.pow(2, precision + gainLog2 - epsilon) * (1 + mu / 2048));
  43717. var mb = (guardBits + epsilon - 1);
  43718. // In the first resolution level, copyCoefficients will fill the
  43719. // whole array with coefficients. In the succeding passes,
  43720. // copyCoefficients will consecutively fill in the values that belong
  43721. // to the interleaved positions of the HL, LH, and HH coefficients.
  43722. // The LL coefficients will then be interleaved in Transform.iterate().
  43723. copyCoefficients(coefficients, width, height, subband, delta, mb,
  43724. reversible, segmentationSymbolUsed);
  43725. }
  43726. subbandCoefficients.push({
  43727. width: width,
  43728. height: height,
  43729. items: coefficients
  43730. });
  43731. }
  43732. var result = transform.calculate(subbandCoefficients,
  43733. component.tcx0, component.tcy0);
  43734. return {
  43735. left: component.tcx0,
  43736. top: component.tcy0,
  43737. width: result.width,
  43738. height: result.height,
  43739. items: result.items
  43740. };
  43741. }
  43742. function transformComponents(context) {
  43743. var siz = context.SIZ;
  43744. var components = context.components;
  43745. var componentsCount = siz.Csiz;
  43746. var resultImages = [];
  43747. for (var i = 0, ii = context.tiles.length; i < ii; i++) {
  43748. var tile = context.tiles[i];
  43749. var transformedTiles = [];
  43750. var c;
  43751. for (c = 0; c < componentsCount; c++) {
  43752. transformedTiles[c] = transformTile(context, tile, c);
  43753. }
  43754. var tile0 = transformedTiles[0];
  43755. var out = new Uint8Array(tile0.items.length * componentsCount);
  43756. var result = {
  43757. left: tile0.left,
  43758. top: tile0.top,
  43759. width: tile0.width,
  43760. height: tile0.height,
  43761. items: out
  43762. };
  43763. // Section G.2.2 Inverse multi component transform
  43764. var shift, offset, max, min, maxK;
  43765. var pos = 0, j, jj, y0, y1, y2, r, g, b, k, val;
  43766. if (tile.codingStyleDefaultParameters.multipleComponentTransform) {
  43767. var fourComponents = componentsCount === 4;
  43768. var y0items = transformedTiles[0].items;
  43769. var y1items = transformedTiles[1].items;
  43770. var y2items = transformedTiles[2].items;
  43771. var y3items = fourComponents ? transformedTiles[3].items : null;
  43772. // HACK: The multiple component transform formulas below assume that
  43773. // all components have the same precision. With this in mind, we
  43774. // compute shift and offset only once.
  43775. shift = components[0].precision - 8;
  43776. offset = (128 << shift) + 0.5;
  43777. max = 255 * (1 << shift);
  43778. maxK = max * 0.5;
  43779. min = -maxK;
  43780. var component0 = tile.components[0];
  43781. var alpha01 = componentsCount - 3;
  43782. jj = y0items.length;
  43783. if (!component0.codingStyleParameters.reversibleTransformation) {
  43784. // inverse irreversible multiple component transform
  43785. for (j = 0; j < jj; j++, pos += alpha01) {
  43786. y0 = y0items[j] + offset;
  43787. y1 = y1items[j];
  43788. y2 = y2items[j];
  43789. r = y0 + 1.402 * y2;
  43790. g = y0 - 0.34413 * y1 - 0.71414 * y2;
  43791. b = y0 + 1.772 * y1;
  43792. out[pos++] = r <= 0 ? 0 : r >= max ? 255 : r >> shift;
  43793. out[pos++] = g <= 0 ? 0 : g >= max ? 255 : g >> shift;
  43794. out[pos++] = b <= 0 ? 0 : b >= max ? 255 : b >> shift;
  43795. }
  43796. } else {
  43797. // inverse reversible multiple component transform
  43798. for (j = 0; j < jj; j++, pos += alpha01) {
  43799. y0 = y0items[j] + offset;
  43800. y1 = y1items[j];
  43801. y2 = y2items[j];
  43802. g = y0 - ((y2 + y1) >> 2);
  43803. r = g + y2;
  43804. b = g + y1;
  43805. out[pos++] = r <= 0 ? 0 : r >= max ? 255 : r >> shift;
  43806. out[pos++] = g <= 0 ? 0 : g >= max ? 255 : g >> shift;
  43807. out[pos++] = b <= 0 ? 0 : b >= max ? 255 : b >> shift;
  43808. }
  43809. }
  43810. if (fourComponents) {
  43811. for (j = 0, pos = 3; j < jj; j++, pos += 4) {
  43812. k = y3items[j];
  43813. out[pos] = k <= min ? 0 : k >= maxK ? 255 : (k + offset) >> shift;
  43814. }
  43815. }
  43816. } else { // no multi-component transform
  43817. for (c = 0; c < componentsCount; c++) {
  43818. var items = transformedTiles[c].items;
  43819. shift = components[c].precision - 8;
  43820. offset = (128 << shift) + 0.5;
  43821. max = (127.5 * (1 << shift));
  43822. min = -max;
  43823. for (pos = c, j = 0, jj = items.length; j < jj; j++) {
  43824. val = items[j];
  43825. out[pos] = val <= min ? 0 :
  43826. val >= max ? 255 : (val + offset) >> shift;
  43827. pos += componentsCount;
  43828. }
  43829. }
  43830. }
  43831. resultImages.push(result);
  43832. }
  43833. return resultImages;
  43834. }
  43835. function initializeTile(context, tileIndex) {
  43836. var siz = context.SIZ;
  43837. var componentsCount = siz.Csiz;
  43838. var tile = context.tiles[tileIndex];
  43839. for (var c = 0; c < componentsCount; c++) {
  43840. var component = tile.components[c];
  43841. var qcdOrQcc = (c in context.currentTile.QCC ?
  43842. context.currentTile.QCC[c] : context.currentTile.QCD);
  43843. component.quantizationParameters = qcdOrQcc;
  43844. var codOrCoc = (c in context.currentTile.COC ?
  43845. context.currentTile.COC[c] : context.currentTile.COD);
  43846. component.codingStyleParameters = codOrCoc;
  43847. }
  43848. tile.codingStyleDefaultParameters = context.currentTile.COD;
  43849. }
  43850. // Section B.10.2 Tag trees
  43851. var TagTree = (function TagTreeClosure() {
  43852. function TagTree(width, height) {
  43853. var levelsLength = log2(Math.max(width, height)) + 1;
  43854. this.levels = [];
  43855. for (var i = 0; i < levelsLength; i++) {
  43856. var level = {
  43857. width: width,
  43858. height: height,
  43859. items: []
  43860. };
  43861. this.levels.push(level);
  43862. width = Math.ceil(width / 2);
  43863. height = Math.ceil(height / 2);
  43864. }
  43865. }
  43866. TagTree.prototype = {
  43867. reset: function TagTree_reset(i, j) {
  43868. var currentLevel = 0, value = 0, level;
  43869. while (currentLevel < this.levels.length) {
  43870. level = this.levels[currentLevel];
  43871. var index = i + j * level.width;
  43872. if (index in level.items) {
  43873. value = level.items[index];
  43874. break;
  43875. }
  43876. level.index = index;
  43877. i >>= 1;
  43878. j >>= 1;
  43879. currentLevel++;
  43880. }
  43881. currentLevel--;
  43882. level = this.levels[currentLevel];
  43883. level.items[level.index] = value;
  43884. this.currentLevel = currentLevel;
  43885. delete this.value;
  43886. },
  43887. incrementValue: function TagTree_incrementValue() {
  43888. var level = this.levels[this.currentLevel];
  43889. level.items[level.index]++;
  43890. },
  43891. nextLevel: function TagTree_nextLevel() {
  43892. var currentLevel = this.currentLevel;
  43893. var level = this.levels[currentLevel];
  43894. var value = level.items[level.index];
  43895. currentLevel--;
  43896. if (currentLevel < 0) {
  43897. this.value = value;
  43898. return false;
  43899. }
  43900. this.currentLevel = currentLevel;
  43901. level = this.levels[currentLevel];
  43902. level.items[level.index] = value;
  43903. return true;
  43904. }
  43905. };
  43906. return TagTree;
  43907. })();
  43908. var InclusionTree = (function InclusionTreeClosure() {
  43909. function InclusionTree(width, height, defaultValue) {
  43910. var levelsLength = log2(Math.max(width, height)) + 1;
  43911. this.levels = [];
  43912. for (var i = 0; i < levelsLength; i++) {
  43913. var items = new Uint8Array(width * height);
  43914. for (var j = 0, jj = items.length; j < jj; j++) {
  43915. items[j] = defaultValue;
  43916. }
  43917. var level = {
  43918. width: width,
  43919. height: height,
  43920. items: items
  43921. };
  43922. this.levels.push(level);
  43923. width = Math.ceil(width / 2);
  43924. height = Math.ceil(height / 2);
  43925. }
  43926. }
  43927. InclusionTree.prototype = {
  43928. reset: function InclusionTree_reset(i, j, stopValue) {
  43929. var currentLevel = 0;
  43930. while (currentLevel < this.levels.length) {
  43931. var level = this.levels[currentLevel];
  43932. var index = i + j * level.width;
  43933. level.index = index;
  43934. var value = level.items[index];
  43935. if (value == 0xFF) {
  43936. break;
  43937. }
  43938. if (value > stopValue) {
  43939. this.currentLevel = currentLevel;
  43940. // already know about this one, propagating the value to top levels
  43941. this.propagateValues();
  43942. return false;
  43943. }
  43944. i >>= 1;
  43945. j >>= 1;
  43946. currentLevel++;
  43947. }
  43948. this.currentLevel = currentLevel - 1;
  43949. return true;
  43950. },
  43951. incrementValue: function InclusionTree_incrementValue(stopValue) {
  43952. var level = this.levels[this.currentLevel];
  43953. level.items[level.index] = stopValue + 1;
  43954. this.propagateValues();
  43955. },
  43956. propagateValues: function InclusionTree_propagateValues() {
  43957. var levelIndex = this.currentLevel;
  43958. var level = this.levels[levelIndex];
  43959. var currentValue = level.items[level.index];
  43960. while (--levelIndex >= 0) {
  43961. level = this.levels[levelIndex];
  43962. level.items[level.index] = currentValue;
  43963. }
  43964. },
  43965. nextLevel: function InclusionTree_nextLevel() {
  43966. var currentLevel = this.currentLevel;
  43967. var level = this.levels[currentLevel];
  43968. var value = level.items[level.index];
  43969. level.items[level.index] = 0xFF;
  43970. currentLevel--;
  43971. if (currentLevel < 0) {
  43972. return false;
  43973. }
  43974. this.currentLevel = currentLevel;
  43975. level = this.levels[currentLevel];
  43976. level.items[level.index] = value;
  43977. return true;
  43978. }
  43979. };
  43980. return InclusionTree;
  43981. })();
  43982. // Section D. Coefficient bit modeling
  43983. var BitModel = (function BitModelClosure() {
  43984. var UNIFORM_CONTEXT = 17;
  43985. var RUNLENGTH_CONTEXT = 18;
  43986. // Table D-1
  43987. // The index is binary presentation: 0dddvvhh, ddd - sum of Di (0..4),
  43988. // vv - sum of Vi (0..2), and hh - sum of Hi (0..2)
  43989. var LLAndLHContextsLabel = new Uint8Array([
  43990. 0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, 8, 0, 4,
  43991. 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6,
  43992. 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8
  43993. ]);
  43994. var HLContextLabel = new Uint8Array([
  43995. 0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, 7, 0, 8,
  43996. 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3,
  43997. 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8
  43998. ]);
  43999. var HHContextLabel = new Uint8Array([
  44000. 0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, 5, 0, 5,
  44001. 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 8, 8,
  44002. 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8
  44003. ]);
  44004. function BitModel(width, height, subband, zeroBitPlanes, mb) {
  44005. this.width = width;
  44006. this.height = height;
  44007. this.contextLabelTable = (subband == 'HH' ? HHContextLabel :
  44008. (subband == 'HL' ? HLContextLabel : LLAndLHContextsLabel));
  44009. var coefficientCount = width * height;
  44010. // coefficients outside the encoding region treated as insignificant
  44011. // add border state cells for significanceState
  44012. this.neighborsSignificance = new Uint8Array(coefficientCount);
  44013. this.coefficentsSign = new Uint8Array(coefficientCount);
  44014. this.coefficentsMagnitude = mb > 14 ? new Uint32Array(coefficientCount) :
  44015. mb > 6 ? new Uint16Array(coefficientCount) :
  44016. new Uint8Array(coefficientCount);
  44017. this.processingFlags = new Uint8Array(coefficientCount);
  44018. var bitsDecoded = new Uint8Array(coefficientCount);
  44019. if (zeroBitPlanes !== 0) {
  44020. for (var i = 0; i < coefficientCount; i++) {
  44021. bitsDecoded[i] = zeroBitPlanes;
  44022. }
  44023. }
  44024. this.bitsDecoded = bitsDecoded;
  44025. this.reset();
  44026. }
  44027. BitModel.prototype = {
  44028. setDecoder: function BitModel_setDecoder(decoder) {
  44029. this.decoder = decoder;
  44030. },
  44031. reset: function BitModel_reset() {
  44032. // We have 17 contexts that are accessed via context labels,
  44033. // plus the uniform and runlength context.
  44034. this.contexts = new Int8Array(19);
  44035. // Contexts are packed into 1 byte:
  44036. // highest 7 bits carry the index, lowest bit carries mps
  44037. this.contexts[0] = (4 << 1) | 0;
  44038. this.contexts[UNIFORM_CONTEXT] = (46 << 1) | 0;
  44039. this.contexts[RUNLENGTH_CONTEXT] = (3 << 1) | 0;
  44040. },
  44041. setNeighborsSignificance:
  44042. function BitModel_setNeighborsSignificance(row, column, index) {
  44043. var neighborsSignificance = this.neighborsSignificance;
  44044. var width = this.width, height = this.height;
  44045. var left = (column > 0);
  44046. var right = (column + 1 < width);
  44047. var i;
  44048. if (row > 0) {
  44049. i = index - width;
  44050. if (left) {
  44051. neighborsSignificance[i - 1] += 0x10;
  44052. }
  44053. if (right) {
  44054. neighborsSignificance[i + 1] += 0x10;
  44055. }
  44056. neighborsSignificance[i] += 0x04;
  44057. }
  44058. if (row + 1 < height) {
  44059. i = index + width;
  44060. if (left) {
  44061. neighborsSignificance[i - 1] += 0x10;
  44062. }
  44063. if (right) {
  44064. neighborsSignificance[i + 1] += 0x10;
  44065. }
  44066. neighborsSignificance[i] += 0x04;
  44067. }
  44068. if (left) {
  44069. neighborsSignificance[index - 1] += 0x01;
  44070. }
  44071. if (right) {
  44072. neighborsSignificance[index + 1] += 0x01;
  44073. }
  44074. neighborsSignificance[index] |= 0x80;
  44075. },
  44076. runSignificancePropogationPass:
  44077. function BitModel_runSignificancePropogationPass() {
  44078. var decoder = this.decoder;
  44079. var width = this.width, height = this.height;
  44080. var coefficentsMagnitude = this.coefficentsMagnitude;
  44081. var coefficentsSign = this.coefficentsSign;
  44082. var neighborsSignificance = this.neighborsSignificance;
  44083. var processingFlags = this.processingFlags;
  44084. var contexts = this.contexts;
  44085. var labels = this.contextLabelTable;
  44086. var bitsDecoded = this.bitsDecoded;
  44087. var processedInverseMask = ~1;
  44088. var processedMask = 1;
  44089. var firstMagnitudeBitMask = 2;
  44090. for (var i0 = 0; i0 < height; i0 += 4) {
  44091. for (var j = 0; j < width; j++) {
  44092. var index = i0 * width + j;
  44093. for (var i1 = 0; i1 < 4; i1++, index += width) {
  44094. var i = i0 + i1;
  44095. if (i >= height) {
  44096. break;
  44097. }
  44098. // clear processed flag first
  44099. processingFlags[index] &= processedInverseMask;
  44100. if (coefficentsMagnitude[index] ||
  44101. !neighborsSignificance[index]) {
  44102. continue;
  44103. }
  44104. var contextLabel = labels[neighborsSignificance[index]];
  44105. var decision = decoder.readBit(contexts, contextLabel);
  44106. if (decision) {
  44107. var sign = this.decodeSignBit(i, j, index);
  44108. coefficentsSign[index] = sign;
  44109. coefficentsMagnitude[index] = 1;
  44110. this.setNeighborsSignificance(i, j, index);
  44111. processingFlags[index] |= firstMagnitudeBitMask;
  44112. }
  44113. bitsDecoded[index]++;
  44114. processingFlags[index] |= processedMask;
  44115. }
  44116. }
  44117. }
  44118. },
  44119. decodeSignBit: function BitModel_decodeSignBit(row, column, index) {
  44120. var width = this.width, height = this.height;
  44121. var coefficentsMagnitude = this.coefficentsMagnitude;
  44122. var coefficentsSign = this.coefficentsSign;
  44123. var contribution, sign0, sign1, significance1;
  44124. var contextLabel, decoded;
  44125. // calculate horizontal contribution
  44126. significance1 = (column > 0 && coefficentsMagnitude[index - 1] !== 0);
  44127. if (column + 1 < width && coefficentsMagnitude[index + 1] !== 0) {
  44128. sign1 = coefficentsSign[index + 1];
  44129. if (significance1) {
  44130. sign0 = coefficentsSign[index - 1];
  44131. contribution = 1 - sign1 - sign0;
  44132. } else {
  44133. contribution = 1 - sign1 - sign1;
  44134. }
  44135. } else if (significance1) {
  44136. sign0 = coefficentsSign[index - 1];
  44137. contribution = 1 - sign0 - sign0;
  44138. } else {
  44139. contribution = 0;
  44140. }
  44141. var horizontalContribution = 3 * contribution;
  44142. // calculate vertical contribution and combine with the horizontal
  44143. significance1 = (row > 0 && coefficentsMagnitude[index - width] !== 0);
  44144. if (row + 1 < height && coefficentsMagnitude[index + width] !== 0) {
  44145. sign1 = coefficentsSign[index + width];
  44146. if (significance1) {
  44147. sign0 = coefficentsSign[index - width];
  44148. contribution = 1 - sign1 - sign0 + horizontalContribution;
  44149. } else {
  44150. contribution = 1 - sign1 - sign1 + horizontalContribution;
  44151. }
  44152. } else if (significance1) {
  44153. sign0 = coefficentsSign[index - width];
  44154. contribution = 1 - sign0 - sign0 + horizontalContribution;
  44155. } else {
  44156. contribution = horizontalContribution;
  44157. }
  44158. if (contribution >= 0) {
  44159. contextLabel = 9 + contribution;
  44160. decoded = this.decoder.readBit(this.contexts, contextLabel);
  44161. } else {
  44162. contextLabel = 9 - contribution;
  44163. decoded = this.decoder.readBit(this.contexts, contextLabel) ^ 1;
  44164. }
  44165. return decoded;
  44166. },
  44167. runMagnitudeRefinementPass:
  44168. function BitModel_runMagnitudeRefinementPass() {
  44169. var decoder = this.decoder;
  44170. var width = this.width, height = this.height;
  44171. var coefficentsMagnitude = this.coefficentsMagnitude;
  44172. var neighborsSignificance = this.neighborsSignificance;
  44173. var contexts = this.contexts;
  44174. var bitsDecoded = this.bitsDecoded;
  44175. var processingFlags = this.processingFlags;
  44176. var processedMask = 1;
  44177. var firstMagnitudeBitMask = 2;
  44178. var length = width * height;
  44179. var width4 = width * 4;
  44180. for (var index0 = 0, indexNext; index0 < length; index0 = indexNext) {
  44181. indexNext = Math.min(length, index0 + width4);
  44182. for (var j = 0; j < width; j++) {
  44183. for (var index = index0 + j; index < indexNext; index += width) {
  44184. // significant but not those that have just become
  44185. if (!coefficentsMagnitude[index] ||
  44186. (processingFlags[index] & processedMask) !== 0) {
  44187. continue;
  44188. }
  44189. var contextLabel = 16;
  44190. if ((processingFlags[index] & firstMagnitudeBitMask) !== 0) {
  44191. processingFlags[index] ^= firstMagnitudeBitMask;
  44192. // first refinement
  44193. var significance = neighborsSignificance[index] & 127;
  44194. contextLabel = significance === 0 ? 15 : 14;
  44195. }
  44196. var bit = decoder.readBit(contexts, contextLabel);
  44197. coefficentsMagnitude[index] =
  44198. (coefficentsMagnitude[index] << 1) | bit;
  44199. bitsDecoded[index]++;
  44200. processingFlags[index] |= processedMask;
  44201. }
  44202. }
  44203. }
  44204. },
  44205. runCleanupPass: function BitModel_runCleanupPass() {
  44206. var decoder = this.decoder;
  44207. var width = this.width, height = this.height;
  44208. var neighborsSignificance = this.neighborsSignificance;
  44209. var coefficentsMagnitude = this.coefficentsMagnitude;
  44210. var coefficentsSign = this.coefficentsSign;
  44211. var contexts = this.contexts;
  44212. var labels = this.contextLabelTable;
  44213. var bitsDecoded = this.bitsDecoded;
  44214. var processingFlags = this.processingFlags;
  44215. var processedMask = 1;
  44216. var firstMagnitudeBitMask = 2;
  44217. var oneRowDown = width;
  44218. var twoRowsDown = width * 2;
  44219. var threeRowsDown = width * 3;
  44220. var iNext;
  44221. for (var i0 = 0; i0 < height; i0 = iNext) {
  44222. iNext = Math.min(i0 + 4, height);
  44223. var indexBase = i0 * width;
  44224. var checkAllEmpty = i0 + 3 < height;
  44225. for (var j = 0; j < width; j++) {
  44226. var index0 = indexBase + j;
  44227. // using the property: labels[neighborsSignificance[index]] == 0
  44228. // when neighborsSignificance[index] == 0
  44229. var allEmpty = (checkAllEmpty &&
  44230. processingFlags[index0] === 0 &&
  44231. processingFlags[index0 + oneRowDown] === 0 &&
  44232. processingFlags[index0 + twoRowsDown] === 0 &&
  44233. processingFlags[index0 + threeRowsDown] === 0 &&
  44234. neighborsSignificance[index0] === 0 &&
  44235. neighborsSignificance[index0 + oneRowDown] === 0 &&
  44236. neighborsSignificance[index0 + twoRowsDown] === 0 &&
  44237. neighborsSignificance[index0 + threeRowsDown] === 0);
  44238. var i1 = 0, index = index0;
  44239. var i = i0, sign;
  44240. if (allEmpty) {
  44241. var hasSignificantCoefficent =
  44242. decoder.readBit(contexts, RUNLENGTH_CONTEXT);
  44243. if (!hasSignificantCoefficent) {
  44244. bitsDecoded[index0]++;
  44245. bitsDecoded[index0 + oneRowDown]++;
  44246. bitsDecoded[index0 + twoRowsDown]++;
  44247. bitsDecoded[index0 + threeRowsDown]++;
  44248. continue; // next column
  44249. }
  44250. i1 = (decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
  44251. decoder.readBit(contexts, UNIFORM_CONTEXT);
  44252. if (i1 !== 0) {
  44253. i = i0 + i1;
  44254. index += i1 * width;
  44255. }
  44256. sign = this.decodeSignBit(i, j, index);
  44257. coefficentsSign[index] = sign;
  44258. coefficentsMagnitude[index] = 1;
  44259. this.setNeighborsSignificance(i, j, index);
  44260. processingFlags[index] |= firstMagnitudeBitMask;
  44261. index = index0;
  44262. for (var i2 = i0; i2 <= i; i2++, index += width) {
  44263. bitsDecoded[index]++;
  44264. }
  44265. i1++;
  44266. }
  44267. for (i = i0 + i1; i < iNext; i++, index += width) {
  44268. if (coefficentsMagnitude[index] ||
  44269. (processingFlags[index] & processedMask) !== 0) {
  44270. continue;
  44271. }
  44272. var contextLabel = labels[neighborsSignificance[index]];
  44273. var decision = decoder.readBit(contexts, contextLabel);
  44274. if (decision === 1) {
  44275. sign = this.decodeSignBit(i, j, index);
  44276. coefficentsSign[index] = sign;
  44277. coefficentsMagnitude[index] = 1;
  44278. this.setNeighborsSignificance(i, j, index);
  44279. processingFlags[index] |= firstMagnitudeBitMask;
  44280. }
  44281. bitsDecoded[index]++;
  44282. }
  44283. }
  44284. }
  44285. },
  44286. checkSegmentationSymbol: function BitModel_checkSegmentationSymbol() {
  44287. var decoder = this.decoder;
  44288. var contexts = this.contexts;
  44289. var symbol = (decoder.readBit(contexts, UNIFORM_CONTEXT) << 3) |
  44290. (decoder.readBit(contexts, UNIFORM_CONTEXT) << 2) |
  44291. (decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
  44292. decoder.readBit(contexts, UNIFORM_CONTEXT);
  44293. if (symbol != 0xA) {
  44294. throw new Error('JPX Error: Invalid segmentation symbol');
  44295. }
  44296. }
  44297. };
  44298. return BitModel;
  44299. })();
  44300. // Section F, Discrete wavelet transformation
  44301. var Transform = (function TransformClosure() {
  44302. function Transform() {}
  44303. Transform.prototype.calculate =
  44304. function transformCalculate(subbands, u0, v0) {
  44305. var ll = subbands[0];
  44306. for (var i = 1, ii = subbands.length; i < ii; i++) {
  44307. ll = this.iterate(ll, subbands[i], u0, v0);
  44308. }
  44309. return ll;
  44310. };
  44311. Transform.prototype.extend = function extend(buffer, offset, size) {
  44312. // Section F.3.7 extending... using max extension of 4
  44313. var i1 = offset - 1, j1 = offset + 1;
  44314. var i2 = offset + size - 2, j2 = offset + size;
  44315. buffer[i1--] = buffer[j1++];
  44316. buffer[j2++] = buffer[i2--];
  44317. buffer[i1--] = buffer[j1++];
  44318. buffer[j2++] = buffer[i2--];
  44319. buffer[i1--] = buffer[j1++];
  44320. buffer[j2++] = buffer[i2--];
  44321. buffer[i1] = buffer[j1];
  44322. buffer[j2] = buffer[i2];
  44323. };
  44324. Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh,
  44325. u0, v0) {
  44326. var llWidth = ll.width, llHeight = ll.height, llItems = ll.items;
  44327. var width = hl_lh_hh.width;
  44328. var height = hl_lh_hh.height;
  44329. var items = hl_lh_hh.items;
  44330. var i, j, k, l, u, v;
  44331. // Interleave LL according to Section F.3.3
  44332. for (k = 0, i = 0; i < llHeight; i++) {
  44333. l = i * 2 * width;
  44334. for (j = 0; j < llWidth; j++, k++, l += 2) {
  44335. items[l] = llItems[k];
  44336. }
  44337. }
  44338. // The LL band is not needed anymore.
  44339. llItems = ll.items = null;
  44340. var bufferPadding = 4;
  44341. var rowBuffer = new Float32Array(width + 2 * bufferPadding);
  44342. // Section F.3.4 HOR_SR
  44343. if (width === 1) {
  44344. // if width = 1, when u0 even keep items as is, when odd divide by 2
  44345. if ((u0 & 1) !== 0) {
  44346. for (v = 0, k = 0; v < height; v++, k += width) {
  44347. items[k] *= 0.5;
  44348. }
  44349. }
  44350. } else {
  44351. for (v = 0, k = 0; v < height; v++, k += width) {
  44352. rowBuffer.set(items.subarray(k, k + width), bufferPadding);
  44353. this.extend(rowBuffer, bufferPadding, width);
  44354. this.filter(rowBuffer, bufferPadding, width);
  44355. items.set(
  44356. rowBuffer.subarray(bufferPadding, bufferPadding + width),
  44357. k);
  44358. }
  44359. }
  44360. // Accesses to the items array can take long, because it may not fit into
  44361. // CPU cache and has to be fetched from main memory. Since subsequent
  44362. // accesses to the items array are not local when reading columns, we
  44363. // have a cache miss every time. To reduce cache misses, get up to
  44364. // 'numBuffers' items at a time and store them into the individual
  44365. // buffers. The colBuffers should be small enough to fit into CPU cache.
  44366. var numBuffers = 16;
  44367. var colBuffers = [];
  44368. for (i = 0; i < numBuffers; i++) {
  44369. colBuffers.push(new Float32Array(height + 2 * bufferPadding));
  44370. }
  44371. var b, currentBuffer = 0;
  44372. ll = bufferPadding + height;
  44373. // Section F.3.5 VER_SR
  44374. if (height === 1) {
  44375. // if height = 1, when v0 even keep items as is, when odd divide by 2
  44376. if ((v0 & 1) !== 0) {
  44377. for (u = 0; u < width; u++) {
  44378. items[u] *= 0.5;
  44379. }
  44380. }
  44381. } else {
  44382. for (u = 0; u < width; u++) {
  44383. // if we ran out of buffers, copy several image columns at once
  44384. if (currentBuffer === 0) {
  44385. numBuffers = Math.min(width - u, numBuffers);
  44386. for (k = u, l = bufferPadding; l < ll; k += width, l++) {
  44387. for (b = 0; b < numBuffers; b++) {
  44388. colBuffers[b][l] = items[k + b];
  44389. }
  44390. }
  44391. currentBuffer = numBuffers;
  44392. }
  44393. currentBuffer--;
  44394. var buffer = colBuffers[currentBuffer];
  44395. this.extend(buffer, bufferPadding, height);
  44396. this.filter(buffer, bufferPadding, height);
  44397. // If this is last buffer in this group of buffers, flush all buffers.
  44398. if (currentBuffer === 0) {
  44399. k = u - numBuffers + 1;
  44400. for (l = bufferPadding; l < ll; k += width, l++) {
  44401. for (b = 0; b < numBuffers; b++) {
  44402. items[k + b] = colBuffers[b][l];
  44403. }
  44404. }
  44405. }
  44406. }
  44407. }
  44408. return {
  44409. width: width,
  44410. height: height,
  44411. items: items
  44412. };
  44413. };
  44414. return Transform;
  44415. })();
  44416. // Section 3.8.2 Irreversible 9-7 filter
  44417. var IrreversibleTransform = (function IrreversibleTransformClosure() {
  44418. function IrreversibleTransform() {
  44419. Transform.call(this);
  44420. }
  44421. IrreversibleTransform.prototype = Object.create(Transform.prototype);
  44422. IrreversibleTransform.prototype.filter =
  44423. function irreversibleTransformFilter(x, offset, length) {
  44424. var len = length >> 1;
  44425. offset = offset | 0;
  44426. var j, n, current, next;
  44427. var alpha = -1.586134342059924;
  44428. var beta = -0.052980118572961;
  44429. var gamma = 0.882911075530934;
  44430. var delta = 0.443506852043971;
  44431. var K = 1.230174104914001;
  44432. var K_ = 1 / K;
  44433. // step 1 is combined with step 3
  44434. // step 2
  44435. j = offset - 3;
  44436. for (n = len + 4; n--; j += 2) {
  44437. x[j] *= K_;
  44438. }
  44439. // step 1 & 3
  44440. j = offset - 2;
  44441. current = delta * x[j -1];
  44442. for (n = len + 3; n--; j += 2) {
  44443. next = delta * x[j + 1];
  44444. x[j] = K * x[j] - current - next;
  44445. if (n--) {
  44446. j += 2;
  44447. current = delta * x[j + 1];
  44448. x[j] = K * x[j] - current - next;
  44449. } else {
  44450. break;
  44451. }
  44452. }
  44453. // step 4
  44454. j = offset - 1;
  44455. current = gamma * x[j - 1];
  44456. for (n = len + 2; n--; j += 2) {
  44457. next = gamma * x[j + 1];
  44458. x[j] -= current + next;
  44459. if (n--) {
  44460. j += 2;
  44461. current = gamma * x[j + 1];
  44462. x[j] -= current + next;
  44463. } else {
  44464. break;
  44465. }
  44466. }
  44467. // step 5
  44468. j = offset;
  44469. current = beta * x[j - 1];
  44470. for (n = len + 1; n--; j += 2) {
  44471. next = beta * x[j + 1];
  44472. x[j] -= current + next;
  44473. if (n--) {
  44474. j += 2;
  44475. current = beta * x[j + 1];
  44476. x[j] -= current + next;
  44477. } else {
  44478. break;
  44479. }
  44480. }
  44481. // step 6
  44482. if (len !== 0) {
  44483. j = offset + 1;
  44484. current = alpha * x[j - 1];
  44485. for (n = len; n--; j += 2) {
  44486. next = alpha * x[j + 1];
  44487. x[j] -= current + next;
  44488. if (n--) {
  44489. j += 2;
  44490. current = alpha * x[j + 1];
  44491. x[j] -= current + next;
  44492. } else {
  44493. break;
  44494. }
  44495. }
  44496. }
  44497. };
  44498. return IrreversibleTransform;
  44499. })();
  44500. // Section 3.8.1 Reversible 5-3 filter
  44501. var ReversibleTransform = (function ReversibleTransformClosure() {
  44502. function ReversibleTransform() {
  44503. Transform.call(this);
  44504. }
  44505. ReversibleTransform.prototype = Object.create(Transform.prototype);
  44506. ReversibleTransform.prototype.filter =
  44507. function reversibleTransformFilter(x, offset, length) {
  44508. var len = length >> 1;
  44509. offset = offset | 0;
  44510. var j, n;
  44511. for (j = offset, n = len + 1; n--; j += 2) {
  44512. x[j] -= (x[j - 1] + x[j + 1] + 2) >> 2;
  44513. }
  44514. for (j = offset + 1, n = len; n--; j += 2) {
  44515. x[j] += (x[j - 1] + x[j + 1]) >> 1;
  44516. }
  44517. };
  44518. return ReversibleTransform;
  44519. })();
  44520. return JpxImage;
  44521. })();
  44522. var Jbig2Image = (function Jbig2ImageClosure() {
  44523. // Utility data structures
  44524. function ContextCache() {}
  44525. ContextCache.prototype = {
  44526. getContexts: function(id) {
  44527. if (id in this) {
  44528. return this[id];
  44529. }
  44530. return (this[id] = new Int8Array(1 << 16));
  44531. }
  44532. };
  44533. function DecodingContext(data, start, end) {
  44534. this.data = data;
  44535. this.start = start;
  44536. this.end = end;
  44537. }
  44538. DecodingContext.prototype = {
  44539. get decoder() {
  44540. var decoder = new ArithmeticDecoder(this.data, this.start, this.end);
  44541. return shadow(this, 'decoder', decoder);
  44542. },
  44543. get contextCache() {
  44544. var cache = new ContextCache();
  44545. return shadow(this, 'contextCache', cache);
  44546. }
  44547. };
  44548. // Annex A. Arithmetic Integer Decoding Procedure
  44549. // A.2 Procedure for decoding values
  44550. function decodeInteger(contextCache, procedure, decoder) {
  44551. var contexts = contextCache.getContexts(procedure);
  44552. var prev = 1;
  44553. function readBits(length) {
  44554. var v = 0;
  44555. for (var i = 0; i < length; i++) {
  44556. var bit = decoder.readBit(contexts, prev);
  44557. prev = (prev < 256 ? (prev << 1) | bit :
  44558. (((prev << 1) | bit) & 511) | 256);
  44559. v = (v << 1) | bit;
  44560. }
  44561. return v >>> 0;
  44562. }
  44563. var sign = readBits(1);
  44564. var value = readBits(1) ?
  44565. (readBits(1) ?
  44566. (readBits(1) ?
  44567. (readBits(1) ?
  44568. (readBits(1) ?
  44569. (readBits(32) + 4436) :
  44570. readBits(12) + 340) :
  44571. readBits(8) + 84) :
  44572. readBits(6) + 20) :
  44573. readBits(4) + 4) :
  44574. readBits(2);
  44575. return (sign === 0 ? value : (value > 0 ? -value : null));
  44576. }
  44577. // A.3 The IAID decoding procedure
  44578. function decodeIAID(contextCache, decoder, codeLength) {
  44579. var contexts = contextCache.getContexts('IAID');
  44580. var prev = 1;
  44581. for (var i = 0; i < codeLength; i++) {
  44582. var bit = decoder.readBit(contexts, prev);
  44583. prev = (prev << 1) | bit;
  44584. }
  44585. if (codeLength < 31) {
  44586. return prev & ((1 << codeLength) - 1);
  44587. }
  44588. return prev & 0x7FFFFFFF;
  44589. }
  44590. // 7.3 Segment types
  44591. var SegmentTypes = [
  44592. 'SymbolDictionary', null, null, null, 'IntermediateTextRegion', null,
  44593. 'ImmediateTextRegion', 'ImmediateLosslessTextRegion', null, null, null,
  44594. null, null, null, null, null, 'patternDictionary', null, null, null,
  44595. 'IntermediateHalftoneRegion', null, 'ImmediateHalftoneRegion',
  44596. 'ImmediateLosslessHalftoneRegion', null, null, null, null, null, null, null,
  44597. null, null, null, null, null, 'IntermediateGenericRegion', null,
  44598. 'ImmediateGenericRegion', 'ImmediateLosslessGenericRegion',
  44599. 'IntermediateGenericRefinementRegion', null,
  44600. 'ImmediateGenericRefinementRegion',
  44601. 'ImmediateLosslessGenericRefinementRegion', null, null, null, null,
  44602. 'PageInformation', 'EndOfPage', 'EndOfStripe', 'EndOfFile', 'Profiles',
  44603. 'Tables', null, null, null, null, null, null, null, null,
  44604. 'Extension'
  44605. ];
  44606. var CodingTemplates = [
  44607. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
  44608. {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 2, y: -1},
  44609. {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
  44610. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: 2, y: -2},
  44611. {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1},
  44612. {x: 2, y: -1}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
  44613. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
  44614. {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -2, y: 0},
  44615. {x: -1, y: 0}],
  44616. [{x: -3, y: -1}, {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1},
  44617. {x: 1, y: -1}, {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}]
  44618. ];
  44619. var RefinementTemplates = [
  44620. {
  44621. coding: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
  44622. reference: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}, {x: 0, y: 0},
  44623. {x: 1, y: 0}, {x: -1, y: 1}, {x: 0, y: 1}, {x: 1, y: 1}]
  44624. },
  44625. {
  44626. coding: [{x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
  44627. reference: [{x: 0, y: -1}, {x: -1, y: 0}, {x: 0, y: 0}, {x: 1, y: 0},
  44628. {x: 0, y: 1}, {x: 1, y: 1}]
  44629. }
  44630. ];
  44631. var ReusedContexts = [
  44632. 0x1CD3, // '00111001101' (template) + '0011' (at),
  44633. 0x079A, // '001111001101' + '0',
  44634. 0x00E3, // '001110001' + '1',
  44635. 0x018B // '011000101' + '1'
  44636. ];
  44637. var RefinementReusedContexts = [
  44638. 0x0020, // '000' + '0' (coding) + '00010000' + '0' (reference)
  44639. 0x0008 // '0000' + '001000'
  44640. ];
  44641. // 6.2 Generic Region Decoding Procedure
  44642. function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at,
  44643. decodingContext) {
  44644. if (mmr) {
  44645. error('JBIG2 error: MMR encoding is not supported');
  44646. }
  44647. var useskip = !!skip;
  44648. var template = CodingTemplates[templateIndex].concat(at);
  44649. // Sorting is non-standard, and it is not required. But sorting increases
  44650. // the number of template bits that can be reused from the previous
  44651. // contextLabel in the main loop.
  44652. template.sort(function (a, b) {
  44653. return (a.y - b.y) || (a.x - b.x);
  44654. });
  44655. var templateLength = template.length;
  44656. var templateX = new Int8Array(templateLength);
  44657. var templateY = new Int8Array(templateLength);
  44658. var changingTemplateEntries = [];
  44659. var reuseMask = 0, minX = 0, maxX = 0, minY = 0;
  44660. var c, k;
  44661. for (k = 0; k < templateLength; k++) {
  44662. templateX[k] = template[k].x;
  44663. templateY[k] = template[k].y;
  44664. minX = Math.min(minX, template[k].x);
  44665. maxX = Math.max(maxX, template[k].x);
  44666. minY = Math.min(minY, template[k].y);
  44667. // Check if the template pixel appears in two consecutive context labels,
  44668. // so it can be reused. Otherwise, we add it to the list of changing
  44669. // template entries.
  44670. if (k < templateLength - 1 &&
  44671. template[k].y === template[k + 1].y &&
  44672. template[k].x === template[k + 1].x - 1) {
  44673. reuseMask |= 1 << (templateLength - 1 - k);
  44674. } else {
  44675. changingTemplateEntries.push(k);
  44676. }
  44677. }
  44678. var changingEntriesLength = changingTemplateEntries.length;
  44679. var changingTemplateX = new Int8Array(changingEntriesLength);
  44680. var changingTemplateY = new Int8Array(changingEntriesLength);
  44681. var changingTemplateBit = new Uint16Array(changingEntriesLength);
  44682. for (c = 0; c < changingEntriesLength; c++) {
  44683. k = changingTemplateEntries[c];
  44684. changingTemplateX[c] = template[k].x;
  44685. changingTemplateY[c] = template[k].y;
  44686. changingTemplateBit[c] = 1 << (templateLength - 1 - k);
  44687. }
  44688. // Get the safe bounding box edges from the width, height, minX, maxX, minY
  44689. var sbb_left = -minX;
  44690. var sbb_top = -minY;
  44691. var sbb_right = width - maxX;
  44692. var pseudoPixelContext = ReusedContexts[templateIndex];
  44693. var row = new Uint8Array(width);
  44694. var bitmap = [];
  44695. var decoder = decodingContext.decoder;
  44696. var contexts = decodingContext.contextCache.getContexts('GB');
  44697. var ltp = 0, j, i0, j0, contextLabel = 0, bit, shift;
  44698. for (var i = 0; i < height; i++) {
  44699. if (prediction) {
  44700. var sltp = decoder.readBit(contexts, pseudoPixelContext);
  44701. ltp ^= sltp;
  44702. if (ltp) {
  44703. bitmap.push(row); // duplicate previous row
  44704. continue;
  44705. }
  44706. }
  44707. row = new Uint8Array(row);
  44708. bitmap.push(row);
  44709. for (j = 0; j < width; j++) {
  44710. if (useskip && skip[i][j]) {
  44711. row[j] = 0;
  44712. continue;
  44713. }
  44714. // Are we in the middle of a scanline, so we can reuse contextLabel
  44715. // bits?
  44716. if (j >= sbb_left && j < sbb_right && i >= sbb_top) {
  44717. // If yes, we can just shift the bits that are reusable and only
  44718. // fetch the remaining ones.
  44719. contextLabel = (contextLabel << 1) & reuseMask;
  44720. for (k = 0; k < changingEntriesLength; k++) {
  44721. i0 = i + changingTemplateY[k];
  44722. j0 = j + changingTemplateX[k];
  44723. bit = bitmap[i0][j0];
  44724. if (bit) {
  44725. bit = changingTemplateBit[k];
  44726. contextLabel |= bit;
  44727. }
  44728. }
  44729. } else {
  44730. // compute the contextLabel from scratch
  44731. contextLabel = 0;
  44732. shift = templateLength - 1;
  44733. for (k = 0; k < templateLength; k++, shift--) {
  44734. j0 = j + templateX[k];
  44735. if (j0 >= 0 && j0 < width) {
  44736. i0 = i + templateY[k];
  44737. if (i0 >= 0) {
  44738. bit = bitmap[i0][j0];
  44739. if (bit) {
  44740. contextLabel |= bit << shift;
  44741. }
  44742. }
  44743. }
  44744. }
  44745. }
  44746. var pixel = decoder.readBit(contexts, contextLabel);
  44747. row[j] = pixel;
  44748. }
  44749. }
  44750. return bitmap;
  44751. }
  44752. // 6.3.2 Generic Refinement Region Decoding Procedure
  44753. function decodeRefinement(width, height, templateIndex, referenceBitmap,
  44754. offsetX, offsetY, prediction, at,
  44755. decodingContext) {
  44756. var codingTemplate = RefinementTemplates[templateIndex].coding;
  44757. if (templateIndex === 0) {
  44758. codingTemplate = codingTemplate.concat([at[0]]);
  44759. }
  44760. var codingTemplateLength = codingTemplate.length;
  44761. var codingTemplateX = new Int32Array(codingTemplateLength);
  44762. var codingTemplateY = new Int32Array(codingTemplateLength);
  44763. var k;
  44764. for (k = 0; k < codingTemplateLength; k++) {
  44765. codingTemplateX[k] = codingTemplate[k].x;
  44766. codingTemplateY[k] = codingTemplate[k].y;
  44767. }
  44768. var referenceTemplate = RefinementTemplates[templateIndex].reference;
  44769. if (templateIndex === 0) {
  44770. referenceTemplate = referenceTemplate.concat([at[1]]);
  44771. }
  44772. var referenceTemplateLength = referenceTemplate.length;
  44773. var referenceTemplateX = new Int32Array(referenceTemplateLength);
  44774. var referenceTemplateY = new Int32Array(referenceTemplateLength);
  44775. for (k = 0; k < referenceTemplateLength; k++) {
  44776. referenceTemplateX[k] = referenceTemplate[k].x;
  44777. referenceTemplateY[k] = referenceTemplate[k].y;
  44778. }
  44779. var referenceWidth = referenceBitmap[0].length;
  44780. var referenceHeight = referenceBitmap.length;
  44781. var pseudoPixelContext = RefinementReusedContexts[templateIndex];
  44782. var bitmap = [];
  44783. var decoder = decodingContext.decoder;
  44784. var contexts = decodingContext.contextCache.getContexts('GR');
  44785. var ltp = 0;
  44786. for (var i = 0; i < height; i++) {
  44787. if (prediction) {
  44788. var sltp = decoder.readBit(contexts, pseudoPixelContext);
  44789. ltp ^= sltp;
  44790. if (ltp) {
  44791. error('JBIG2 error: prediction is not supported');
  44792. }
  44793. }
  44794. var row = new Uint8Array(width);
  44795. bitmap.push(row);
  44796. for (var j = 0; j < width; j++) {
  44797. var i0, j0;
  44798. var contextLabel = 0;
  44799. for (k = 0; k < codingTemplateLength; k++) {
  44800. i0 = i + codingTemplateY[k];
  44801. j0 = j + codingTemplateX[k];
  44802. if (i0 < 0 || j0 < 0 || j0 >= width) {
  44803. contextLabel <<= 1; // out of bound pixel
  44804. } else {
  44805. contextLabel = (contextLabel << 1) | bitmap[i0][j0];
  44806. }
  44807. }
  44808. for (k = 0; k < referenceTemplateLength; k++) {
  44809. i0 = i + referenceTemplateY[k] + offsetY;
  44810. j0 = j + referenceTemplateX[k] + offsetX;
  44811. if (i0 < 0 || i0 >= referenceHeight || j0 < 0 ||
  44812. j0 >= referenceWidth) {
  44813. contextLabel <<= 1; // out of bound pixel
  44814. } else {
  44815. contextLabel = (contextLabel << 1) | referenceBitmap[i0][j0];
  44816. }
  44817. }
  44818. var pixel = decoder.readBit(contexts, contextLabel);
  44819. row[j] = pixel;
  44820. }
  44821. }
  44822. return bitmap;
  44823. }
  44824. // 6.5.5 Decoding the symbol dictionary
  44825. function decodeSymbolDictionary(huffman, refinement, symbols,
  44826. numberOfNewSymbols, numberOfExportedSymbols,
  44827. huffmanTables, templateIndex, at,
  44828. refinementTemplateIndex, refinementAt,
  44829. decodingContext) {
  44830. if (huffman) {
  44831. error('JBIG2 error: huffman is not supported');
  44832. }
  44833. var newSymbols = [];
  44834. var currentHeight = 0;
  44835. var symbolCodeLength = log2(symbols.length + numberOfNewSymbols);
  44836. var decoder = decodingContext.decoder;
  44837. var contextCache = decodingContext.contextCache;
  44838. while (newSymbols.length < numberOfNewSymbols) {
  44839. var deltaHeight = decodeInteger(contextCache, 'IADH', decoder); // 6.5.6
  44840. currentHeight += deltaHeight;
  44841. var currentWidth = 0;
  44842. var totalWidth = 0;
  44843. while (true) {
  44844. var deltaWidth = decodeInteger(contextCache, 'IADW', decoder); // 6.5.7
  44845. if (deltaWidth === null) {
  44846. break; // OOB
  44847. }
  44848. currentWidth += deltaWidth;
  44849. totalWidth += currentWidth;
  44850. var bitmap;
  44851. if (refinement) {
  44852. // 6.5.8.2 Refinement/aggregate-coded symbol bitmap
  44853. var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder);
  44854. if (numberOfInstances > 1) {
  44855. bitmap = decodeTextRegion(huffman, refinement,
  44856. currentWidth, currentHeight, 0,
  44857. numberOfInstances, 1, //strip size
  44858. symbols.concat(newSymbols),
  44859. symbolCodeLength,
  44860. 0, //transposed
  44861. 0, //ds offset
  44862. 1, //top left 7.4.3.1.1
  44863. 0, //OR operator
  44864. huffmanTables,
  44865. refinementTemplateIndex, refinementAt,
  44866. decodingContext);
  44867. } else {
  44868. var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
  44869. var rdx = decodeInteger(contextCache, 'IARDX', decoder); // 6.4.11.3
  44870. var rdy = decodeInteger(contextCache, 'IARDY', decoder); // 6.4.11.4
  44871. var symbol = (symbolId < symbols.length ? symbols[symbolId] :
  44872. newSymbols[symbolId - symbols.length]);
  44873. bitmap = decodeRefinement(currentWidth, currentHeight,
  44874. refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt,
  44875. decodingContext);
  44876. }
  44877. } else {
  44878. // 6.5.8.1 Direct-coded symbol bitmap
  44879. bitmap = decodeBitmap(false, currentWidth, currentHeight,
  44880. templateIndex, false, null, at, decodingContext);
  44881. }
  44882. newSymbols.push(bitmap);
  44883. }
  44884. }
  44885. // 6.5.10 Exported symbols
  44886. var exportedSymbols = [];
  44887. var flags = [], currentFlag = false;
  44888. var totalSymbolsLength = symbols.length + numberOfNewSymbols;
  44889. while (flags.length < totalSymbolsLength) {
  44890. var runLength = decodeInteger(contextCache, 'IAEX', decoder);
  44891. while (runLength--) {
  44892. flags.push(currentFlag);
  44893. }
  44894. currentFlag = !currentFlag;
  44895. }
  44896. for (var i = 0, ii = symbols.length; i < ii; i++) {
  44897. if (flags[i]) {
  44898. exportedSymbols.push(symbols[i]);
  44899. }
  44900. }
  44901. for (var j = 0; j < numberOfNewSymbols; i++, j++) {
  44902. if (flags[i]) {
  44903. exportedSymbols.push(newSymbols[j]);
  44904. }
  44905. }
  44906. return exportedSymbols;
  44907. }
  44908. function decodeTextRegion(huffman, refinement, width, height,
  44909. defaultPixelValue, numberOfSymbolInstances,
  44910. stripSize, inputSymbols, symbolCodeLength,
  44911. transposed, dsOffset, referenceCorner,
  44912. combinationOperator, huffmanTables,
  44913. refinementTemplateIndex, refinementAt,
  44914. decodingContext) {
  44915. if (huffman) {
  44916. error('JBIG2 error: huffman is not supported');
  44917. }
  44918. // Prepare bitmap
  44919. var bitmap = [];
  44920. var i, row;
  44921. for (i = 0; i < height; i++) {
  44922. row = new Uint8Array(width);
  44923. if (defaultPixelValue) {
  44924. for (var j = 0; j < width; j++) {
  44925. row[j] = defaultPixelValue;
  44926. }
  44927. }
  44928. bitmap.push(row);
  44929. }
  44930. var decoder = decodingContext.decoder;
  44931. var contextCache = decodingContext.contextCache;
  44932. var stripT = -decodeInteger(contextCache, 'IADT', decoder); // 6.4.6
  44933. var firstS = 0;
  44934. i = 0;
  44935. while (i < numberOfSymbolInstances) {
  44936. var deltaT = decodeInteger(contextCache, 'IADT', decoder); // 6.4.6
  44937. stripT += deltaT;
  44938. var deltaFirstS = decodeInteger(contextCache, 'IAFS', decoder); // 6.4.7
  44939. firstS += deltaFirstS;
  44940. var currentS = firstS;
  44941. do {
  44942. var currentT = (stripSize == 1 ? 0 :
  44943. decodeInteger(contextCache, 'IAIT', decoder)); // 6.4.9
  44944. var t = stripSize * stripT + currentT;
  44945. var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
  44946. var applyRefinement = (refinement &&
  44947. decodeInteger(contextCache, 'IARI', decoder));
  44948. var symbolBitmap = inputSymbols[symbolId];
  44949. var symbolWidth = symbolBitmap[0].length;
  44950. var symbolHeight = symbolBitmap.length;
  44951. if (applyRefinement) {
  44952. var rdw = decodeInteger(contextCache, 'IARDW', decoder); // 6.4.11.1
  44953. var rdh = decodeInteger(contextCache, 'IARDH', decoder); // 6.4.11.2
  44954. var rdx = decodeInteger(contextCache, 'IARDX', decoder); // 6.4.11.3
  44955. var rdy = decodeInteger(contextCache, 'IARDY', decoder); // 6.4.11.4
  44956. symbolWidth += rdw;
  44957. symbolHeight += rdh;
  44958. symbolBitmap = decodeRefinement(symbolWidth, symbolHeight,
  44959. refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx,
  44960. (rdh >> 1) + rdy, false, refinementAt,
  44961. decodingContext);
  44962. }
  44963. var offsetT = t - ((referenceCorner & 1) ? 0 : symbolHeight);
  44964. var offsetS = currentS - ((referenceCorner & 2) ? symbolWidth : 0);
  44965. var s2, t2, symbolRow;
  44966. if (transposed) {
  44967. // Place Symbol Bitmap from T1,S1
  44968. for (s2 = 0; s2 < symbolHeight; s2++) {
  44969. row = bitmap[offsetS + s2];
  44970. if (!row) {
  44971. continue;
  44972. }
  44973. symbolRow = symbolBitmap[s2];
  44974. // To ignore Parts of Symbol bitmap which goes
  44975. // outside bitmap region
  44976. var maxWidth = Math.min(width - offsetT, symbolWidth);
  44977. switch (combinationOperator) {
  44978. case 0: // OR
  44979. for (t2 = 0; t2 < maxWidth; t2++) {
  44980. row[offsetT + t2] |= symbolRow[t2];
  44981. }
  44982. break;
  44983. case 2: // XOR
  44984. for (t2 = 0; t2 < maxWidth; t2++) {
  44985. row[offsetT + t2] ^= symbolRow[t2];
  44986. }
  44987. break;
  44988. default:
  44989. error('JBIG2 error: operator ' + combinationOperator +
  44990. ' is not supported');
  44991. }
  44992. }
  44993. currentS += symbolHeight - 1;
  44994. } else {
  44995. for (t2 = 0; t2 < symbolHeight; t2++) {
  44996. row = bitmap[offsetT + t2];
  44997. if (!row) {
  44998. continue;
  44999. }
  45000. symbolRow = symbolBitmap[t2];
  45001. switch (combinationOperator) {
  45002. case 0: // OR
  45003. for (s2 = 0; s2 < symbolWidth; s2++) {
  45004. row[offsetS + s2] |= symbolRow[s2];
  45005. }
  45006. break;
  45007. case 2: // XOR
  45008. for (s2 = 0; s2 < symbolWidth; s2++) {
  45009. row[offsetS + s2] ^= symbolRow[s2];
  45010. }
  45011. break;
  45012. default:
  45013. error('JBIG2 error: operator ' + combinationOperator +
  45014. ' is not supported');
  45015. }
  45016. }
  45017. currentS += symbolWidth - 1;
  45018. }
  45019. i++;
  45020. var deltaS = decodeInteger(contextCache, 'IADS', decoder); // 6.4.8
  45021. if (deltaS === null) {
  45022. break; // OOB
  45023. }
  45024. currentS += deltaS + dsOffset;
  45025. } while (true);
  45026. }
  45027. return bitmap;
  45028. }
  45029. function readSegmentHeader(data, start) {
  45030. var segmentHeader = {};
  45031. segmentHeader.number = readUint32(data, start);
  45032. var flags = data[start + 4];
  45033. var segmentType = flags & 0x3F;
  45034. if (!SegmentTypes[segmentType]) {
  45035. error('JBIG2 error: invalid segment type: ' + segmentType);
  45036. }
  45037. segmentHeader.type = segmentType;
  45038. segmentHeader.typeName = SegmentTypes[segmentType];
  45039. segmentHeader.deferredNonRetain = !!(flags & 0x80);
  45040. var pageAssociationFieldSize = !!(flags & 0x40);
  45041. var referredFlags = data[start + 5];
  45042. var referredToCount = (referredFlags >> 5) & 7;
  45043. var retainBits = [referredFlags & 31];
  45044. var position = start + 6;
  45045. if (referredFlags == 7) {
  45046. referredToCount = readUint32(data, position - 1) & 0x1FFFFFFF;
  45047. position += 3;
  45048. var bytes = (referredToCount + 7) >> 3;
  45049. retainBits[0] = data[position++];
  45050. while (--bytes > 0) {
  45051. retainBits.push(data[position++]);
  45052. }
  45053. } else if (referredFlags == 5 || referredFlags == 6) {
  45054. error('JBIG2 error: invalid referred-to flags');
  45055. }
  45056. segmentHeader.retainBits = retainBits;
  45057. var referredToSegmentNumberSize = (segmentHeader.number <= 256 ? 1 :
  45058. (segmentHeader.number <= 65536 ? 2 : 4));
  45059. var referredTo = [];
  45060. var i, ii;
  45061. for (i = 0; i < referredToCount; i++) {
  45062. var number = (referredToSegmentNumberSize == 1 ? data[position] :
  45063. (referredToSegmentNumberSize == 2 ? readUint16(data, position) :
  45064. readUint32(data, position)));
  45065. referredTo.push(number);
  45066. position += referredToSegmentNumberSize;
  45067. }
  45068. segmentHeader.referredTo = referredTo;
  45069. if (!pageAssociationFieldSize) {
  45070. segmentHeader.pageAssociation = data[position++];
  45071. } else {
  45072. segmentHeader.pageAssociation = readUint32(data, position);
  45073. position += 4;
  45074. }
  45075. segmentHeader.length = readUint32(data, position);
  45076. position += 4;
  45077. if (segmentHeader.length == 0xFFFFFFFF) {
  45078. // 7.2.7 Segment data length, unknown segment length
  45079. if (segmentType === 38) { // ImmediateGenericRegion
  45080. var genericRegionInfo = readRegionSegmentInformation(data, position);
  45081. var genericRegionSegmentFlags = data[position +
  45082. RegionSegmentInformationFieldLength];
  45083. var genericRegionMmr = !!(genericRegionSegmentFlags & 1);
  45084. // searching for the segment end
  45085. var searchPatternLength = 6;
  45086. var searchPattern = new Uint8Array(searchPatternLength);
  45087. if (!genericRegionMmr) {
  45088. searchPattern[0] = 0xFF;
  45089. searchPattern[1] = 0xAC;
  45090. }
  45091. searchPattern[2] = (genericRegionInfo.height >>> 24) & 0xFF;
  45092. searchPattern[3] = (genericRegionInfo.height >> 16) & 0xFF;
  45093. searchPattern[4] = (genericRegionInfo.height >> 8) & 0xFF;
  45094. searchPattern[5] = genericRegionInfo.height & 0xFF;
  45095. for (i = position, ii = data.length; i < ii; i++) {
  45096. var j = 0;
  45097. while (j < searchPatternLength && searchPattern[j] === data[i + j]) {
  45098. j++;
  45099. }
  45100. if (j == searchPatternLength) {
  45101. segmentHeader.length = i + searchPatternLength;
  45102. break;
  45103. }
  45104. }
  45105. if (segmentHeader.length == 0xFFFFFFFF) {
  45106. error('JBIG2 error: segment end was not found');
  45107. }
  45108. } else {
  45109. error('JBIG2 error: invalid unknown segment length');
  45110. }
  45111. }
  45112. segmentHeader.headerEnd = position;
  45113. return segmentHeader;
  45114. }
  45115. function readSegments(header, data, start, end) {
  45116. var segments = [];
  45117. var position = start;
  45118. while (position < end) {
  45119. var segmentHeader = readSegmentHeader(data, position);
  45120. position = segmentHeader.headerEnd;
  45121. var segment = {
  45122. header: segmentHeader,
  45123. data: data
  45124. };
  45125. if (!header.randomAccess) {
  45126. segment.start = position;
  45127. position += segmentHeader.length;
  45128. segment.end = position;
  45129. }
  45130. segments.push(segment);
  45131. if (segmentHeader.type == 51) {
  45132. break; // end of file is found
  45133. }
  45134. }
  45135. if (header.randomAccess) {
  45136. for (var i = 0, ii = segments.length; i < ii; i++) {
  45137. segments[i].start = position;
  45138. position += segments[i].header.length;
  45139. segments[i].end = position;
  45140. }
  45141. }
  45142. return segments;
  45143. }
  45144. // 7.4.1 Region segment information field
  45145. function readRegionSegmentInformation(data, start) {
  45146. return {
  45147. width: readUint32(data, start),
  45148. height: readUint32(data, start + 4),
  45149. x: readUint32(data, start + 8),
  45150. y: readUint32(data, start + 12),
  45151. combinationOperator: data[start + 16] & 7
  45152. };
  45153. }
  45154. var RegionSegmentInformationFieldLength = 17;
  45155. function processSegment(segment, visitor) {
  45156. var header = segment.header;
  45157. var data = segment.data, position = segment.start, end = segment.end;
  45158. var args, at, i, atLength;
  45159. switch (header.type) {
  45160. case 0: // SymbolDictionary
  45161. // 7.4.2 Symbol dictionary segment syntax
  45162. var dictionary = {};
  45163. var dictionaryFlags = readUint16(data, position); // 7.4.2.1.1
  45164. dictionary.huffman = !!(dictionaryFlags & 1);
  45165. dictionary.refinement = !!(dictionaryFlags & 2);
  45166. dictionary.huffmanDHSelector = (dictionaryFlags >> 2) & 3;
  45167. dictionary.huffmanDWSelector = (dictionaryFlags >> 4) & 3;
  45168. dictionary.bitmapSizeSelector = (dictionaryFlags >> 6) & 1;
  45169. dictionary.aggregationInstancesSelector = (dictionaryFlags >> 7) & 1;
  45170. dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256);
  45171. dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512);
  45172. dictionary.template = (dictionaryFlags >> 10) & 3;
  45173. dictionary.refinementTemplate = (dictionaryFlags >> 12) & 1;
  45174. position += 2;
  45175. if (!dictionary.huffman) {
  45176. atLength = dictionary.template === 0 ? 4 : 1;
  45177. at = [];
  45178. for (i = 0; i < atLength; i++) {
  45179. at.push({
  45180. x: readInt8(data, position),
  45181. y: readInt8(data, position + 1)
  45182. });
  45183. position += 2;
  45184. }
  45185. dictionary.at = at;
  45186. }
  45187. if (dictionary.refinement && !dictionary.refinementTemplate) {
  45188. at = [];
  45189. for (i = 0; i < 2; i++) {
  45190. at.push({
  45191. x: readInt8(data, position),
  45192. y: readInt8(data, position + 1)
  45193. });
  45194. position += 2;
  45195. }
  45196. dictionary.refinementAt = at;
  45197. }
  45198. dictionary.numberOfExportedSymbols = readUint32(data, position);
  45199. position += 4;
  45200. dictionary.numberOfNewSymbols = readUint32(data, position);
  45201. position += 4;
  45202. args = [dictionary, header.number, header.referredTo,
  45203. data, position, end];
  45204. break;
  45205. case 6: // ImmediateTextRegion
  45206. case 7: // ImmediateLosslessTextRegion
  45207. var textRegion = {};
  45208. textRegion.info = readRegionSegmentInformation(data, position);
  45209. position += RegionSegmentInformationFieldLength;
  45210. var textRegionSegmentFlags = readUint16(data, position);
  45211. position += 2;
  45212. textRegion.huffman = !!(textRegionSegmentFlags & 1);
  45213. textRegion.refinement = !!(textRegionSegmentFlags & 2);
  45214. textRegion.stripSize = 1 << ((textRegionSegmentFlags >> 2) & 3);
  45215. textRegion.referenceCorner = (textRegionSegmentFlags >> 4) & 3;
  45216. textRegion.transposed = !!(textRegionSegmentFlags & 64);
  45217. textRegion.combinationOperator = (textRegionSegmentFlags >> 7) & 3;
  45218. textRegion.defaultPixelValue = (textRegionSegmentFlags >> 9) & 1;
  45219. textRegion.dsOffset = (textRegionSegmentFlags << 17) >> 27;
  45220. textRegion.refinementTemplate = (textRegionSegmentFlags >> 15) & 1;
  45221. if (textRegion.huffman) {
  45222. var textRegionHuffmanFlags = readUint16(data, position);
  45223. position += 2;
  45224. textRegion.huffmanFS = (textRegionHuffmanFlags) & 3;
  45225. textRegion.huffmanDS = (textRegionHuffmanFlags >> 2) & 3;
  45226. textRegion.huffmanDT = (textRegionHuffmanFlags >> 4) & 3;
  45227. textRegion.huffmanRefinementDW = (textRegionHuffmanFlags >> 6) & 3;
  45228. textRegion.huffmanRefinementDH = (textRegionHuffmanFlags >> 8) & 3;
  45229. textRegion.huffmanRefinementDX = (textRegionHuffmanFlags >> 10) & 3;
  45230. textRegion.huffmanRefinementDY = (textRegionHuffmanFlags >> 12) & 3;
  45231. textRegion.huffmanRefinementSizeSelector =
  45232. !!(textRegionHuffmanFlags & 14);
  45233. }
  45234. if (textRegion.refinement && !textRegion.refinementTemplate) {
  45235. at = [];
  45236. for (i = 0; i < 2; i++) {
  45237. at.push({
  45238. x: readInt8(data, position),
  45239. y: readInt8(data, position + 1)
  45240. });
  45241. position += 2;
  45242. }
  45243. textRegion.refinementAt = at;
  45244. }
  45245. textRegion.numberOfSymbolInstances = readUint32(data, position);
  45246. position += 4;
  45247. // TODO 7.4.3.1.7 Symbol ID Huffman table decoding
  45248. if (textRegion.huffman) {
  45249. error('JBIG2 error: huffman is not supported');
  45250. }
  45251. args = [textRegion, header.referredTo, data, position, end];
  45252. break;
  45253. case 38: // ImmediateGenericRegion
  45254. case 39: // ImmediateLosslessGenericRegion
  45255. var genericRegion = {};
  45256. genericRegion.info = readRegionSegmentInformation(data, position);
  45257. position += RegionSegmentInformationFieldLength;
  45258. var genericRegionSegmentFlags = data[position++];
  45259. genericRegion.mmr = !!(genericRegionSegmentFlags & 1);
  45260. genericRegion.template = (genericRegionSegmentFlags >> 1) & 3;
  45261. genericRegion.prediction = !!(genericRegionSegmentFlags & 8);
  45262. if (!genericRegion.mmr) {
  45263. atLength = genericRegion.template === 0 ? 4 : 1;
  45264. at = [];
  45265. for (i = 0; i < atLength; i++) {
  45266. at.push({
  45267. x: readInt8(data, position),
  45268. y: readInt8(data, position + 1)
  45269. });
  45270. position += 2;
  45271. }
  45272. genericRegion.at = at;
  45273. }
  45274. args = [genericRegion, data, position, end];
  45275. break;
  45276. case 48: // PageInformation
  45277. var pageInfo = {
  45278. width: readUint32(data, position),
  45279. height: readUint32(data, position + 4),
  45280. resolutionX: readUint32(data, position + 8),
  45281. resolutionY: readUint32(data, position + 12)
  45282. };
  45283. if (pageInfo.height == 0xFFFFFFFF) {
  45284. delete pageInfo.height;
  45285. }
  45286. var pageSegmentFlags = data[position + 16];
  45287. var pageStripingInformatiom = readUint16(data, position + 17);
  45288. pageInfo.lossless = !!(pageSegmentFlags & 1);
  45289. pageInfo.refinement = !!(pageSegmentFlags & 2);
  45290. pageInfo.defaultPixelValue = (pageSegmentFlags >> 2) & 1;
  45291. pageInfo.combinationOperator = (pageSegmentFlags >> 3) & 3;
  45292. pageInfo.requiresBuffer = !!(pageSegmentFlags & 32);
  45293. pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64);
  45294. args = [pageInfo];
  45295. break;
  45296. case 49: // EndOfPage
  45297. break;
  45298. case 50: // EndOfStripe
  45299. break;
  45300. case 51: // EndOfFile
  45301. break;
  45302. case 62: // 7.4.15 defines 2 extension types which
  45303. // are comments and can be ignored.
  45304. break;
  45305. default:
  45306. error('JBIG2 error: segment type ' + header.typeName + '(' +
  45307. header.type + ') is not implemented');
  45308. }
  45309. var callbackName = 'on' + header.typeName;
  45310. if (callbackName in visitor) {
  45311. visitor[callbackName].apply(visitor, args);
  45312. }
  45313. }
  45314. function processSegments(segments, visitor) {
  45315. for (var i = 0, ii = segments.length; i < ii; i++) {
  45316. processSegment(segments[i], visitor);
  45317. }
  45318. }
  45319. function parseJbig2(data, start, end) {
  45320. var position = start;
  45321. if (data[position] != 0x97 || data[position + 1] != 0x4A ||
  45322. data[position + 2] != 0x42 || data[position + 3] != 0x32 ||
  45323. data[position + 4] != 0x0D || data[position + 5] != 0x0A ||
  45324. data[position + 6] != 0x1A || data[position + 7] != 0x0A) {
  45325. error('JBIG2 error: invalid header');
  45326. }
  45327. var header = {};
  45328. position += 8;
  45329. var flags = data[position++];
  45330. header.randomAccess = !(flags & 1);
  45331. if (!(flags & 2)) {
  45332. header.numberOfPages = readUint32(data, position);
  45333. position += 4;
  45334. }
  45335. var segments = readSegments(header, data, position, end);
  45336. error('Not implemented');
  45337. // processSegments(segments, new SimpleSegmentVisitor());
  45338. }
  45339. function parseJbig2Chunks(chunks) {
  45340. var visitor = new SimpleSegmentVisitor();
  45341. for (var i = 0, ii = chunks.length; i < ii; i++) {
  45342. var chunk = chunks[i];
  45343. var segments = readSegments({}, chunk.data, chunk.start, chunk.end);
  45344. processSegments(segments, visitor);
  45345. }
  45346. return visitor.buffer;
  45347. }
  45348. function SimpleSegmentVisitor() {}
  45349. SimpleSegmentVisitor.prototype = {
  45350. onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) {
  45351. this.currentPageInfo = info;
  45352. var rowSize = (info.width + 7) >> 3;
  45353. var buffer = new Uint8Array(rowSize * info.height);
  45354. // The contents of ArrayBuffers are initialized to 0.
  45355. // Fill the buffer with 0xFF only if info.defaultPixelValue is set
  45356. if (info.defaultPixelValue) {
  45357. for (var i = 0, ii = buffer.length; i < ii; i++) {
  45358. buffer[i] = 0xFF;
  45359. }
  45360. }
  45361. this.buffer = buffer;
  45362. },
  45363. drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) {
  45364. var pageInfo = this.currentPageInfo;
  45365. var width = regionInfo.width, height = regionInfo.height;
  45366. var rowSize = (pageInfo.width + 7) >> 3;
  45367. var combinationOperator = pageInfo.combinationOperatorOverride ?
  45368. regionInfo.combinationOperator : pageInfo.combinationOperator;
  45369. var buffer = this.buffer;
  45370. var mask0 = 128 >> (regionInfo.x & 7);
  45371. var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3);
  45372. var i, j, mask, offset;
  45373. switch (combinationOperator) {
  45374. case 0: // OR
  45375. for (i = 0; i < height; i++) {
  45376. mask = mask0;
  45377. offset = offset0;
  45378. for (j = 0; j < width; j++) {
  45379. if (bitmap[i][j]) {
  45380. buffer[offset] |= mask;
  45381. }
  45382. mask >>= 1;
  45383. if (!mask) {
  45384. mask = 128;
  45385. offset++;
  45386. }
  45387. }
  45388. offset0 += rowSize;
  45389. }
  45390. break;
  45391. case 2: // XOR
  45392. for (i = 0; i < height; i++) {
  45393. mask = mask0;
  45394. offset = offset0;
  45395. for (j = 0; j < width; j++) {
  45396. if (bitmap[i][j]) {
  45397. buffer[offset] ^= mask;
  45398. }
  45399. mask >>= 1;
  45400. if (!mask) {
  45401. mask = 128;
  45402. offset++;
  45403. }
  45404. }
  45405. offset0 += rowSize;
  45406. }
  45407. break;
  45408. default:
  45409. error('JBIG2 error: operator ' + combinationOperator +
  45410. ' is not supported');
  45411. }
  45412. },
  45413. onImmediateGenericRegion:
  45414. function SimpleSegmentVisitor_onImmediateGenericRegion(region, data,
  45415. start, end) {
  45416. var regionInfo = region.info;
  45417. var decodingContext = new DecodingContext(data, start, end);
  45418. var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height,
  45419. region.template, region.prediction, null,
  45420. region.at, decodingContext);
  45421. this.drawBitmap(regionInfo, bitmap);
  45422. },
  45423. onImmediateLosslessGenericRegion:
  45424. function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() {
  45425. this.onImmediateGenericRegion.apply(this, arguments);
  45426. },
  45427. onSymbolDictionary:
  45428. function SimpleSegmentVisitor_onSymbolDictionary(dictionary,
  45429. currentSegment,
  45430. referredSegments,
  45431. data, start, end) {
  45432. var huffmanTables;
  45433. if (dictionary.huffman) {
  45434. error('JBIG2 error: huffman is not supported');
  45435. }
  45436. // Combines exported symbols from all referred segments
  45437. var symbols = this.symbols;
  45438. if (!symbols) {
  45439. this.symbols = symbols = {};
  45440. }
  45441. var inputSymbols = [];
  45442. for (var i = 0, ii = referredSegments.length; i < ii; i++) {
  45443. inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]);
  45444. }
  45445. var decodingContext = new DecodingContext(data, start, end);
  45446. symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman,
  45447. dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols,
  45448. dictionary.numberOfExportedSymbols, huffmanTables,
  45449. dictionary.template, dictionary.at,
  45450. dictionary.refinementTemplate, dictionary.refinementAt,
  45451. decodingContext);
  45452. },
  45453. onImmediateTextRegion:
  45454. function SimpleSegmentVisitor_onImmediateTextRegion(region,
  45455. referredSegments,
  45456. data, start, end) {
  45457. var regionInfo = region.info;
  45458. var huffmanTables;
  45459. // Combines exported symbols from all referred segments
  45460. var symbols = this.symbols;
  45461. var inputSymbols = [];
  45462. for (var i = 0, ii = referredSegments.length; i < ii; i++) {
  45463. inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]);
  45464. }
  45465. var symbolCodeLength = log2(inputSymbols.length);
  45466. var decodingContext = new DecodingContext(data, start, end);
  45467. var bitmap = decodeTextRegion(region.huffman, region.refinement,
  45468. regionInfo.width, regionInfo.height, region.defaultPixelValue,
  45469. region.numberOfSymbolInstances, region.stripSize, inputSymbols,
  45470. symbolCodeLength, region.transposed, region.dsOffset,
  45471. region.referenceCorner, region.combinationOperator, huffmanTables,
  45472. region.refinementTemplate, region.refinementAt, decodingContext);
  45473. this.drawBitmap(regionInfo, bitmap);
  45474. },
  45475. onImmediateLosslessTextRegion:
  45476. function SimpleSegmentVisitor_onImmediateLosslessTextRegion() {
  45477. this.onImmediateTextRegion.apply(this, arguments);
  45478. }
  45479. };
  45480. function Jbig2Image() {}
  45481. Jbig2Image.prototype = {
  45482. parseChunks: function Jbig2Image_parseChunks(chunks) {
  45483. return parseJbig2Chunks(chunks);
  45484. }
  45485. };
  45486. return Jbig2Image;
  45487. })();
  45488. var bidi = PDFJS.bidi = (function bidiClosure() {
  45489. // Character types for symbols from 0000 to 00FF.
  45490. var baseTypes = [
  45491. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS',
  45492. 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  45493. 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON',
  45494. 'ON', 'ON', 'ON', 'ON', 'ON', 'CS', 'ON', 'CS', 'ON', 'EN', 'EN', 'EN',
  45495. 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'ON', 'ON', 'ON', 'ON', 'ON',
  45496. 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45497. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON',
  45498. 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45499. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45500. 'L', 'ON', 'ON', 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN',
  45501. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  45502. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  45503. 'BN', 'CS', 'ON', 'ET', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON',
  45504. 'ON', 'ON', 'ON', 'ON', 'ET', 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON',
  45505. 'EN', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45506. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45507. 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45508. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  45509. 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'
  45510. ];
  45511. // Character types for symbols from 0600 to 06FF
  45512. var arabicTypes = [
  45513. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45514. 'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL',
  45515. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45516. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45517. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45518. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45519. 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
  45520. 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL',
  45521. 'AL', 'AL', 'AL', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN',
  45522. 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL', 'NSM', 'AL', 'AL', 'AL', 'AL',
  45523. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45524. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45525. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45526. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45527. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45528. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45529. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45530. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45531. 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
  45532. 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'ON', 'NSM',
  45533. 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  45534. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
  45535. ];
  45536. function isOdd(i) {
  45537. return (i & 1) !== 0;
  45538. }
  45539. function isEven(i) {
  45540. return (i & 1) === 0;
  45541. }
  45542. function findUnequal(arr, start, value) {
  45543. for (var j = start, jj = arr.length; j < jj; ++j) {
  45544. if (arr[j] != value) {
  45545. return j;
  45546. }
  45547. }
  45548. return j;
  45549. }
  45550. function setValues(arr, start, end, value) {
  45551. for (var j = start; j < end; ++j) {
  45552. arr[j] = value;
  45553. }
  45554. }
  45555. function reverseValues(arr, start, end) {
  45556. for (var i = start, j = end - 1; i < j; ++i, --j) {
  45557. var temp = arr[i];
  45558. arr[i] = arr[j];
  45559. arr[j] = temp;
  45560. }
  45561. }
  45562. function createBidiText(str, isLTR, vertical) {
  45563. return {
  45564. str: str,
  45565. dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl'))
  45566. };
  45567. }
  45568. // These are used in bidi(), which is called frequently. We re-use them on
  45569. // each call to avoid unnecessary allocations.
  45570. var chars = [];
  45571. var types = [];
  45572. function bidi(str, startLevel, vertical) {
  45573. var isLTR = true;
  45574. var strLength = str.length;
  45575. if (strLength === 0 || vertical) {
  45576. return createBidiText(str, isLTR, vertical);
  45577. }
  45578. // Get types and fill arrays
  45579. chars.length = 0;
  45580. types.length = 0;
  45581. var numBidi = 0;
  45582. var i, ii;
  45583. for (i = 0; i < strLength; ++i) {
  45584. chars[i] = str.charAt(i);
  45585. var charCode = str.charCodeAt(i);
  45586. var charType = 'L';
  45587. if (charCode <= 0x00ff) {
  45588. charType = baseTypes[charCode];
  45589. } else if (0x0590 <= charCode && charCode <= 0x05f4) {
  45590. charType = 'R';
  45591. } else if (0x0600 <= charCode && charCode <= 0x06ff) {
  45592. charType = arabicTypes[charCode & 0xff];
  45593. } else if (0x0700 <= charCode && charCode <= 0x08AC) {
  45594. charType = 'AL';
  45595. }
  45596. if (charType == 'R' || charType == 'AL' || charType == 'AN') {
  45597. numBidi++;
  45598. }
  45599. types[i] = charType;
  45600. }
  45601. // Detect the bidi method
  45602. // - If there are no rtl characters then no bidi needed
  45603. // - If less than 30% chars are rtl then string is primarily ltr
  45604. // - If more than 30% chars are rtl then string is primarily rtl
  45605. if (numBidi === 0) {
  45606. isLTR = true;
  45607. return createBidiText(str, isLTR);
  45608. }
  45609. if (startLevel == -1) {
  45610. if ((strLength / numBidi) < 0.3) {
  45611. isLTR = true;
  45612. startLevel = 0;
  45613. } else {
  45614. isLTR = false;
  45615. startLevel = 1;
  45616. }
  45617. }
  45618. var levels = [];
  45619. for (i = 0; i < strLength; ++i) {
  45620. levels[i] = startLevel;
  45621. }
  45622. /*
  45623. X1-X10: skip most of this, since we are NOT doing the embeddings.
  45624. */
  45625. var e = (isOdd(startLevel) ? 'R' : 'L');
  45626. var sor = e;
  45627. var eor = sor;
  45628. /*
  45629. W1. Examine each non-spacing mark (NSM) in the level run, and change the
  45630. type of the NSM to the type of the previous character. If the NSM is at the
  45631. start of the level run, it will get the type of sor.
  45632. */
  45633. var lastType = sor;
  45634. for (i = 0; i < strLength; ++i) {
  45635. if (types[i] == 'NSM') {
  45636. types[i] = lastType;
  45637. } else {
  45638. lastType = types[i];
  45639. }
  45640. }
  45641. /*
  45642. W2. Search backwards from each instance of a European number until the
  45643. first strong type (R, L, AL, or sor) is found. If an AL is found, change
  45644. the type of the European number to Arabic number.
  45645. */
  45646. lastType = sor;
  45647. var t;
  45648. for (i = 0; i < strLength; ++i) {
  45649. t = types[i];
  45650. if (t == 'EN') {
  45651. types[i] = (lastType == 'AL') ? 'AN' : 'EN';
  45652. } else if (t == 'R' || t == 'L' || t == 'AL') {
  45653. lastType = t;
  45654. }
  45655. }
  45656. /*
  45657. W3. Change all ALs to R.
  45658. */
  45659. for (i = 0; i < strLength; ++i) {
  45660. t = types[i];
  45661. if (t == 'AL') {
  45662. types[i] = 'R';
  45663. }
  45664. }
  45665. /*
  45666. W4. A single European separator between two European numbers changes to a
  45667. European number. A single common separator between two numbers of the same
  45668. type changes to that type:
  45669. */
  45670. for (i = 1; i < strLength - 1; ++i) {
  45671. if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN') {
  45672. types[i] = 'EN';
  45673. }
  45674. if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') &&
  45675. types[i + 1] == types[i - 1]) {
  45676. types[i] = types[i - 1];
  45677. }
  45678. }
  45679. /*
  45680. W5. A sequence of European terminators adjacent to European numbers changes
  45681. to all European numbers:
  45682. */
  45683. for (i = 0; i < strLength; ++i) {
  45684. if (types[i] == 'EN') {
  45685. // do before
  45686. var j;
  45687. for (j = i - 1; j >= 0; --j) {
  45688. if (types[j] != 'ET') {
  45689. break;
  45690. }
  45691. types[j] = 'EN';
  45692. }
  45693. // do after
  45694. for (j = i + 1; j < strLength; --j) {
  45695. if (types[j] != 'ET') {
  45696. break;
  45697. }
  45698. types[j] = 'EN';
  45699. }
  45700. }
  45701. }
  45702. /*
  45703. W6. Otherwise, separators and terminators change to Other Neutral:
  45704. */
  45705. for (i = 0; i < strLength; ++i) {
  45706. t = types[i];
  45707. if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS') {
  45708. types[i] = 'ON';
  45709. }
  45710. }
  45711. /*
  45712. W7. Search backwards from each instance of a European number until the
  45713. first strong type (R, L, or sor) is found. If an L is found, then change
  45714. the type of the European number to L.
  45715. */
  45716. lastType = sor;
  45717. for (i = 0; i < strLength; ++i) {
  45718. t = types[i];
  45719. if (t == 'EN') {
  45720. types[i] = ((lastType == 'L') ? 'L' : 'EN');
  45721. } else if (t == 'R' || t == 'L') {
  45722. lastType = t;
  45723. }
  45724. }
  45725. /*
  45726. N1. A sequence of neutrals takes the direction of the surrounding strong
  45727. text if the text on both sides has the same direction. European and Arabic
  45728. numbers are treated as though they were R. Start-of-level-run (sor) and
  45729. end-of-level-run (eor) are used at level run boundaries.
  45730. */
  45731. for (i = 0; i < strLength; ++i) {
  45732. if (types[i] == 'ON') {
  45733. var end = findUnequal(types, i + 1, 'ON');
  45734. var before = sor;
  45735. if (i > 0) {
  45736. before = types[i - 1];
  45737. }
  45738. var after = eor;
  45739. if (end + 1 < strLength) {
  45740. after = types[end + 1];
  45741. }
  45742. if (before != 'L') {
  45743. before = 'R';
  45744. }
  45745. if (after != 'L') {
  45746. after = 'R';
  45747. }
  45748. if (before == after) {
  45749. setValues(types, i, end, before);
  45750. }
  45751. i = end - 1; // reset to end (-1 so next iteration is ok)
  45752. }
  45753. }
  45754. /*
  45755. N2. Any remaining neutrals take the embedding direction.
  45756. */
  45757. for (i = 0; i < strLength; ++i) {
  45758. if (types[i] == 'ON') {
  45759. types[i] = e;
  45760. }
  45761. }
  45762. /*
  45763. I1. For all characters with an even (left-to-right) embedding direction,
  45764. those of type R go up one level and those of type AN or EN go up two
  45765. levels.
  45766. I2. For all characters with an odd (right-to-left) embedding direction,
  45767. those of type L, EN or AN go up one level.
  45768. */
  45769. for (i = 0; i < strLength; ++i) {
  45770. t = types[i];
  45771. if (isEven(levels[i])) {
  45772. if (t == 'R') {
  45773. levels[i] += 1;
  45774. } else if (t == 'AN' || t == 'EN') {
  45775. levels[i] += 2;
  45776. }
  45777. } else { // isOdd
  45778. if (t == 'L' || t == 'AN' || t == 'EN') {
  45779. levels[i] += 1;
  45780. }
  45781. }
  45782. }
  45783. /*
  45784. L1. On each line, reset the embedding level of the following characters to
  45785. the paragraph embedding level:
  45786. segment separators,
  45787. paragraph separators,
  45788. any sequence of whitespace characters preceding a segment separator or
  45789. paragraph separator, and any sequence of white space characters at the end
  45790. of the line.
  45791. */
  45792. // don't bother as text is only single line
  45793. /*
  45794. L2. From the highest level found in the text to the lowest odd level on
  45795. each line, reverse any contiguous sequence of characters that are at that
  45796. level or higher.
  45797. */
  45798. // find highest level & lowest odd level
  45799. var highestLevel = -1;
  45800. var lowestOddLevel = 99;
  45801. var level;
  45802. for (i = 0, ii = levels.length; i < ii; ++i) {
  45803. level = levels[i];
  45804. if (highestLevel < level) {
  45805. highestLevel = level;
  45806. }
  45807. if (lowestOddLevel > level && isOdd(level)) {
  45808. lowestOddLevel = level;
  45809. }
  45810. }
  45811. // now reverse between those limits
  45812. for (level = highestLevel; level >= lowestOddLevel; --level) {
  45813. // find segments to reverse
  45814. var start = -1;
  45815. for (i = 0, ii = levels.length; i < ii; ++i) {
  45816. if (levels[i] < level) {
  45817. if (start >= 0) {
  45818. reverseValues(chars, start, i);
  45819. start = -1;
  45820. }
  45821. } else if (start < 0) {
  45822. start = i;
  45823. }
  45824. }
  45825. if (start >= 0) {
  45826. reverseValues(chars, start, levels.length);
  45827. }
  45828. }
  45829. /*
  45830. L3. Combining marks applied to a right-to-left base character will at this
  45831. point precede their base character. If the rendering engine expects them to
  45832. follow the base characters in the final display process, then the ordering
  45833. of the marks and the base character must be reversed.
  45834. */
  45835. // don't bother for now
  45836. /*
  45837. L4. A character that possesses the mirrored property as specified by
  45838. Section 4.7, Mirrored, must be depicted by a mirrored glyph if the resolved
  45839. directionality of that character is R.
  45840. */
  45841. // don't mirror as characters are already mirrored in the pdf
  45842. // Finally, return string
  45843. var result = '';
  45844. for (i = 0, ii = chars.length; i < ii; ++i) {
  45845. var ch = chars[i];
  45846. if (ch != '<' && ch != '>') {
  45847. result += ch;
  45848. }
  45849. }
  45850. return createBidiText(result, isLTR);
  45851. }
  45852. return bidi;
  45853. })();
  45854. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  45855. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  45856. /* Copyright 2014 Opera Software ASA
  45857. *
  45858. * Licensed under the Apache License, Version 2.0 (the "License");
  45859. * you may not use this file except in compliance with the License.
  45860. * You may obtain a copy of the License at
  45861. *
  45862. * http://www.apache.org/licenses/LICENSE-2.0
  45863. *
  45864. * Unless required by applicable law or agreed to in writing, software
  45865. * distributed under the License is distributed on an "AS IS" BASIS,
  45866. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  45867. * See the License for the specific language governing permissions and
  45868. * limitations under the License.
  45869. *
  45870. *
  45871. * Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.
  45872. * Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
  45873. */
  45874. /* globals Uint32ArrayView */
  45875. 'use strict';
  45876. var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
  45877. // Workaround for missing math precison in JS.
  45878. var MASK_HIGH = 0xffff0000;
  45879. var MASK_LOW = 0xffff;
  45880. function MurmurHash3_64 (seed) {
  45881. var SEED = 0xc3d2e1f0;
  45882. this.h1 = seed ? seed & 0xffffffff : SEED;
  45883. this.h2 = seed ? seed & 0xffffffff : SEED;
  45884. }
  45885. var alwaysUseUint32ArrayView = false;
  45886. // old webkits have issues with non-aligned arrays
  45887. try {
  45888. new Uint32Array(new Uint8Array(5).buffer, 0, 1);
  45889. } catch (e) {
  45890. alwaysUseUint32ArrayView = true;
  45891. }
  45892. MurmurHash3_64.prototype = {
  45893. update: function MurmurHash3_64_update(input) {
  45894. var useUint32ArrayView = alwaysUseUint32ArrayView;
  45895. var i;
  45896. if (typeof input == 'string') {
  45897. var data = new Uint8Array(input.length * 2);
  45898. var length = 0;
  45899. for (i = 0; i < input.length; i++) {
  45900. var code = input.charCodeAt(i);
  45901. if (code <= 0xff) {
  45902. data[length++] = code;
  45903. }
  45904. else {
  45905. data[length++] = code >>> 8;
  45906. data[length++] = code & 0xff;
  45907. }
  45908. }
  45909. } else if (input instanceof Uint8Array) {
  45910. data = input;
  45911. length = data.length;
  45912. } else if (typeof input === 'object' && ('length' in input)) {
  45913. // processing regular arrays as well, e.g. for IE9
  45914. data = input;
  45915. length = data.length;
  45916. useUint32ArrayView = true;
  45917. } else {
  45918. throw new Error('Wrong data format in MurmurHash3_64_update. ' +
  45919. 'Input must be a string or array.');
  45920. }
  45921. var blockCounts = length >> 2;
  45922. var tailLength = length - blockCounts * 4;
  45923. // we don't care about endianness here
  45924. var dataUint32 = useUint32ArrayView ?
  45925. new Uint32ArrayView(data, blockCounts) :
  45926. new Uint32Array(data.buffer, 0, blockCounts);
  45927. var k1 = 0;
  45928. var k2 = 0;
  45929. var h1 = this.h1;
  45930. var h2 = this.h2;
  45931. var C1 = 0xcc9e2d51;
  45932. var C2 = 0x1b873593;
  45933. var C1_LOW = C1 & MASK_LOW;
  45934. var C2_LOW = C2 & MASK_LOW;
  45935. for (i = 0; i < blockCounts; i++) {
  45936. if (i & 1) {
  45937. k1 = dataUint32[i];
  45938. k1 = (k1 * C1 & MASK_HIGH) | (k1 * C1_LOW & MASK_LOW);
  45939. k1 = k1 << 15 | k1 >>> 17;
  45940. k1 = (k1 * C2 & MASK_HIGH) | (k1 * C2_LOW & MASK_LOW);
  45941. h1 ^= k1;
  45942. h1 = h1 << 13 | h1 >>> 19;
  45943. h1 = h1 * 5 + 0xe6546b64;
  45944. } else {
  45945. k2 = dataUint32[i];
  45946. k2 = (k2 * C1 & MASK_HIGH) | (k2 * C1_LOW & MASK_LOW);
  45947. k2 = k2 << 15 | k2 >>> 17;
  45948. k2 = (k2 * C2 & MASK_HIGH) | (k2 * C2_LOW & MASK_LOW);
  45949. h2 ^= k2;
  45950. h2 = h2 << 13 | h2 >>> 19;
  45951. h2 = h2 * 5 + 0xe6546b64;
  45952. }
  45953. }
  45954. k1 = 0;
  45955. switch (tailLength) {
  45956. case 3:
  45957. k1 ^= data[blockCounts * 4 + 2] << 16;
  45958. /* falls through */
  45959. case 2:
  45960. k1 ^= data[blockCounts * 4 + 1] << 8;
  45961. /* falls through */
  45962. case 1:
  45963. k1 ^= data[blockCounts * 4];
  45964. /* falls through */
  45965. k1 = (k1 * C1 & MASK_HIGH) | (k1 * C1_LOW & MASK_LOW);
  45966. k1 = k1 << 15 | k1 >>> 17;
  45967. k1 = (k1 * C2 & MASK_HIGH) | (k1 * C2_LOW & MASK_LOW);
  45968. if (blockCounts & 1) {
  45969. h1 ^= k1;
  45970. } else {
  45971. h2 ^= k1;
  45972. }
  45973. }
  45974. this.h1 = h1;
  45975. this.h2 = h2;
  45976. return this;
  45977. },
  45978. hexdigest: function MurmurHash3_64_hexdigest () {
  45979. var h1 = this.h1;
  45980. var h2 = this.h2;
  45981. h1 ^= h2 >>> 1;
  45982. h1 = (h1 * 0xed558ccd & MASK_HIGH) | (h1 * 0x8ccd & MASK_LOW);
  45983. h2 = (h2 * 0xff51afd7 & MASK_HIGH) |
  45984. (((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16);
  45985. h1 ^= h2 >>> 1;
  45986. h1 = (h1 * 0x1a85ec53 & MASK_HIGH) | (h1 * 0xec53 & MASK_LOW);
  45987. h2 = (h2 * 0xc4ceb9fe & MASK_HIGH) |
  45988. (((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16);
  45989. h1 ^= h2 >>> 1;
  45990. for (var i = 0, arr = [h1, h2], str = ''; i < arr.length; i++) {
  45991. var hex = (arr[i] >>> 0).toString(16);
  45992. while (hex.length < 8) {
  45993. hex = '0' + hex;
  45994. }
  45995. str += hex;
  45996. }
  45997. return str;
  45998. }
  45999. };
  46000. return MurmurHash3_64;
  46001. })();
  46002. }).call((typeof window === 'undefined') ? this : window);
  46003. if (!PDFJS.workerSrc && typeof document !== 'undefined') {
  46004. // workerSrc is not set -- using last script url to define default location
  46005. PDFJS.workerSrc = (function () {
  46006. 'use strict';
  46007. var scriptTagContainer = document.body ||
  46008. document.getElementsByTagName('head')[0];
  46009. var pdfjsSrc = scriptTagContainer.lastChild.src;
  46010. return pdfjsSrc && pdfjsSrc.replace(/\.js$/i, '.worker.js');
  46011. })();
  46012. }